Registry / web-framework / textual-autocomplete

textual-autocomplete

JSON →
library4.0.6pypypi✓ verified 86d ago

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.

pip install textual-autocomplete
INSTALL
IMPORT
SIG · TEXTUAL-AUTOCOMPLE
T
textual-autocomplete
web-frameworkpythonv4.0.6
Install
3.4s avg
Import
714ms
Disk
37MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.0.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.760s · 37.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.4s · import 0.668s · 38MB
37MB installed
● package 37MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AutoComplete
from textual_autocomplete import AutoComplete
from textual_autocomplete_autocomplete import AutoComplete
Wrong import from older API versions or confusion with internal module structure.
DropdownItem
from textual_autocomplete import DropdownItem
from textual_autocomplete.items import DropdownItem
Old import path from version <4.0; DropdownItem is now directly exported from main module.

A minimal Textual app with an autocomplete widget.

from textual.app import App, ComposeResult from textual_autocomplete import AutoComplete, DropdownItem class MyApp(App): def compose(self) -> ComposeResult: yield AutoComplete(items=[DropdownItem("apple"), DropdownItem("banana")]) app = MyApp() app.run()
Debug
Known issues
breakingIn 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'.
fix
Update imports: 'from textual_autocomplete import DropdownItem'.
affects: >=3.0, <4.0
gotchaAutoComplete must be used inside a Textual App. It will not render standalone or outside of a Textual event loop.
fix
Wrap your autocomplete usage within a Textual Application.
affects: all
gotchaDropdown items are filtered client-side only; if you need server-side filtering, you must manage the items list programmatically.
fix
Use a callback or reactive attribute to update the items list dynamically based on user input.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'textual_autocomplete'
Library not installed or virtual environment not activated.
fix
Run 'pip install textual-autocomplete' in your environment.
ImportError: cannot import name 'DropdownItem' from 'textual_autocomplete'
Old import path from version <4.0; DropdownItem was moved to main module.
fix
Use 'from textual_autocomplete import DropdownItem'.
AttributeError: 'AutoComplete' object has no attribute 'items'
Trying to set 'items' as an attribute after initialization; items are managed via reactive property.
fix
Use widget.mount() or reactive: self.query_one(AutoComplete).items = new_items.
Upgrade
Version history
4.0.6latest on PyPI · released Sep 24, 2025
Audit
Dependencies
textualrequiredCore dependency; requires Textual >=0.34.0
Agent activity
3 hits · last 30 days
node
2
Resources
textual-autocomplete — pip install textual-autocomplete · libregistry