{"id":22457,"library":"textual-autocomplete","title":"Textual Autocomplete","description":"A library to add autocomplete dropdowns to Textual apps. Current version 4.0.6, requires Python >=3.9. Simplifies building interactive CLI applications with autocomplete widgets.","status":"active","version":"4.0.6","language":"python","source_language":"en","source_url":"https://github.com/Textualize/textual-autocomplete","tags":["textual","autocomplete","cli","tui"],"install":[{"cmd":"pip install textual-autocomplete","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency; requires Textual >=0.34.0","package":"textual","optional":false}],"imports":[{"note":"Wrong import from older API versions or confusion with internal module structure.","wrong":"from textual_autocomplete_autocomplete import AutoComplete","symbol":"AutoComplete","correct":"from textual_autocomplete import AutoComplete"},{"note":"Old import path from version <4.0; DropdownItem is now directly exported from main module.","wrong":"from textual_autocomplete.items import DropdownItem","symbol":"DropdownItem","correct":"from textual_autocomplete import DropdownItem"}],"quickstart":{"code":"from textual.app import App, ComposeResult\nfrom textual_autocomplete import AutoComplete, DropdownItem\n\nclass MyApp(App):\n    def compose(self) -> ComposeResult:\n        yield AutoComplete(items=[DropdownItem(\"apple\"), DropdownItem(\"banana\")])\n\napp = MyApp()\napp.run()","lang":"python","description":"A minimal Textual app with an autocomplete widget."},"warnings":[{"fix":"Update imports: 'from textual_autocomplete import DropdownItem'.","message":"In version 4.0, the import path for DropdownItem changed. Previously it was 'from textual_autocomplete.items import DropdownItem'; now it's 'from textual_autocomplete import DropdownItem'.","severity":"breaking","affected_versions":">=3.0, <4.0"},{"fix":"Wrap your autocomplete usage within a Textual Application.","message":"AutoComplete must be used inside a Textual App. It will not render standalone or outside of a Textual event loop.","severity":"gotcha","affected_versions":"all"},{"fix":"Use a callback or reactive attribute to update the items list dynamically based on user input.","message":"Dropdown items are filtered client-side only; if you need server-side filtering, you must manage the items list programmatically.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install textual-autocomplete' in your environment.","cause":"Library not installed or virtual environment not activated.","error":"ModuleNotFoundError: No module named 'textual_autocomplete'"},{"fix":"Use 'from textual_autocomplete import DropdownItem'.","cause":"Old import path from version <4.0; DropdownItem was moved to main module.","error":"ImportError: cannot import name 'DropdownItem' from 'textual_autocomplete'"},{"fix":"Use widget.mount() or reactive: self.query_one(AutoComplete).items = new_items.","cause":"Trying to set 'items' as an attribute after initialization; items are managed via reactive property.","error":"AttributeError: 'AutoComplete' object has no attribute 'items'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}