Textual
Build cross-platform user interfaces with a simple Python API. Run your apps in the terminal or a web browser.
Textual's API combines modern Python with the best of developments from the web world, for a lean app development experience. De-coupled components and an advanced testing framework ensure you can maintain your app for the long-term.
Want some more examples? See the examples directory.
"""
An App to show the current time.
"""
from datetime import datetime
from textual.app import App, ComposeResult
from textual.widgets import Digits
class ClockApp(App):
CSS = """
Screen { align: center middle; }
Digits { width: auto; }
"""
def compose(self) -> ComposeResult:
yield Digits("")
def on_ready(self) -> None:
self.update_clock()
self.set_interval(1, self.update_clock)
def update_clock(self) -> None:
clock = datetime.now().time()
self.query_one(Digits).update(f"{clock:%T}")
if __name__ == "__main__":
app = ClockApp()
app.run()
Widgets
Textual's library of widgets covers everything from buttons, tree controls, data tables, inputs, text areas, and more… Combined with a flexible layout system, you can realize any User Interface you need.
Predefined themes ensure your apps will look good out of the box.
|
|
|
|
|
|
|
|
|
Installing
Install Textual via pip:
pip install textual textual-dev
See getting started for details.
Demo
Run the following command to see a little of what Textual can do:
python -m textual
Or try the textual demo without installing (requires uv):
uvx --python 3.12 textual-demo
Dev Console
How do you debug an app in the terminal that is also running in the terminal?
The textual-dev package supplies a dev console that connects to your application from another terminal.
In addition to system messages and events, your logged messages and print statements will appear in the dev console.
See the guide for other helpful tools provided by the textual-dev package.
Command Palette
Textual apps have a fuzzy search command palette.
Hit ctrl+p to open the command palette.
It is easy to extend the command palette with custom commands for your application.
Textual ❤️ Web
Textual apps are equally at home in the browser as they are the terminal. Any Textual app may be served with textual serve — so you can share your creations on the web.
Here's how to serve the demo app:
textual serve "python -m textual"
In addition to serving your apps locally, you can serve apps with Textual Web.
Textual Web's firewall-busting technology can serve an unlimited number of applications.
Since Textual apps have low system requirements, you can install them anywhere Python also runs. Turning any device into a connected device. No desktop required!
Join us on Discord
Join the Textual developers and community on our Discord Server.
Metadata
Release files for textual 8.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| textual-8.2.8.tar.gz | 1.9 MB | Without provenance | Details for textual-8.2.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| textual-8.2.8-py3-none-any.whl | Python 3 | none | any | Details for textual-8.2.8-py3-none-any.whl |
Total release size: 2.6 MB
Release files / textual-8.2.8.tar.gz
| Download URL | textual-8.2.8.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f106a9fbc73e39dd266c9712432087de78a6d644084c7c241d6a25c3169115b
|
|
BLAKE2b-256 checksum How to use checksums |
002139a76b01bd5eea82a04baaca7580e105d8c59450df03998345bb2cfb307b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.12.11 Darwin/25.5.0
|
Release files / textual-8.2.8-py3-none-any.whl
| Download URL | textual-8.2.8-py3-none-any.whl |
|---|---|
| Size | 731.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
267375fd402dc8d981457212efa71f0e3365fd17bba144ba9bb3ed7563cb374a
|
|
BLAKE2b-256 checksum How to use checksums |
fbbe35261223d9416a0751cdff1c7b4a6f881387218a12d439fe22fefebc8c04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.12.11 Darwin/25.5.0
|
Security for textual 8.2.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.