{"id":24771,"library":"types-prettytable","title":"Typeshed stubs for prettytable","description":"Typing stubs for prettytable, providing type annotations for the prettytable library. Current version 3.4.2.6. Updated frequently alongside typeshed.","status":"active","version":"3.4.2.6","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["types","stubs","prettytable","type-hints"],"install":[{"cmd":"pip install types-prettytable","lang":"bash","label":"Install stubs"}],"dependencies":[],"imports":[{"note":"types-prettytable only provides stubs; the actual import path remains from prettytable.","symbol":"PrettyTable","correct":"from prettytable import PrettyTable"},{"note":"types-prettytable is not importable directly; it is a third-party stub package.","wrong":"from types_prettytable import PrettyTable","symbol":"TableType","correct":"from prettytable import PrettyTable"}],"quickstart":{"code":"from prettytable import PrettyTable\ntable = PrettyTable()\ntable.field_names = [\"City\", \"Population\"]\ntable.add_row([\"New York\", 8419000])\nprint(table)","lang":"python","description":"Basic usage of PrettyTable with type stubs."},"warnings":[{"fix":"Use 'from prettytable import PrettyTable'","message":"types-prettytable only provides stubs; do not import from types_prettytable. Import from prettytable directly.","severity":"gotcha","affected_versions":"all"},{"fix":"Use print(table) instead of table.printt()","message":"Some methods like 'printt' (deprecated since prettytable 3.0) have no stub support. Use 'print' or str(table).","severity":"deprecated","affected_versions":">=3.4.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Remove the incorrect import and use 'from prettytable import PrettyTable'","cause":"Trying to import from types_prettytable instead of prettytable.","error":"No module named 'types_prettytable'"},{"fix":"Ensure types-prettytable is installed and import from prettytable, not types_prettytable.","cause":"IDE or type checker looking for stubs in the wrong package.","error":"Cannot find reference 'PrettyTable' in 'types_prettytable'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}