{"id":13460091,"url":"https://github.com/Textualize/textual","last_synced_at":"2025-03-24T18:33:07.515Z","repository":{"id":37088063,"uuid":"355959597","full_name":"Textualize/textual","owner":"Textualize","description":"The lean application framework for Python.  Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser.","archived":false,"fork":false,"pushed_at":"2025-03-16T17:05:39.000Z","size":437048,"stargazers_count":27849,"open_issues_count":230,"forks_count":858,"subscribers_count":163,"default_branch":"main","last_synced_at":"2025-03-19T11:07:25.868Z","etag":null,"topics":["cli","framework","python","rich","terminal","tui"],"latest_commit_sha":null,"homepage":"https://textual.textualize.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Textualize.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":null},"created_at":"2021-04-08T15:24:47.000Z","updated_at":"2025-03-19T10:41:09.000Z","dependencies_parsed_at":"2023-07-14T00:47:29.901Z","dependency_job_id":"f62ea573-0431-4c82-b7c9-a394fa7a7c3b","html_url":"https://github.com/Textualize/textual","commit_stats":{"total_commits":9036,"total_committers":164,"mean_commits":55.09756097560975,"dds":0.533311199645861,"last_synced_commit":"3a8eeddbef8d2d81ccbe709fe97724422d14c7d8"},"previous_names":["willmcgugan/textual"],"tags_count":167,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Textualize%2Ftextual","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Textualize%2Ftextual/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Textualize%2Ftextual/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Textualize%2Ftextual/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Textualize","download_url":"https://codeload.github.com/Textualize/textual/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245325211,"owners_count":20596818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","framework","python","rich","terminal","tui"],"created_at":"2024-07-31T10:00:35.408Z","updated_at":"2025-03-24T18:33:07.510Z","avatar_url":"https://github.com/Textualize.png","language":"Python","readme":"\n\n[![Discord](https://img.shields.io/discord/1026214085173461072)](https://discord.gg/Enf6Z3qhVr)\n[![Supported Python Versions](https://img.shields.io/pypi/pyversions/textual/1.0.0)](https://pypi.org/project/textual/)\n[![PyPI version](https://badge.fury.io/py/textual.svg?)](https://badge.fury.io/py/textual)\n![OS support](https://img.shields.io/badge/OS-macOS%20Linux%20Windows-red)\n\n\n\n![textual-splash](https://github.com/user-attachments/assets/4caeb77e-48c0-4cf7-b14d-c53ded855ffd)\n\n# Textual\n\n\u003cimg align=\"right\" width=\"250\" alt=\"clock\" src=\"https://github.com/user-attachments/assets/63e839c3-5b8e-478d-b78e-cf7647eb85e8\" /\u003e\n\nBuild cross-platform user interfaces with a simple Python API. Run your apps in the terminal *or* a web browser.\n\nTextual's API combines modern Python with the best of developments from the web world, for a lean app development experience.\nDe-coupled components and an advanced [testing](https://textual.textualize.io/guide/testing/) framework ensure you can maintain your app for the long-term.\n\nWant some more examples? See the [examples](https://github.com/Textualize/textual/tree/main/examples) directory.\n\n```python\n\"\"\"\nAn App to show the current time.\n\"\"\"\n\nfrom datetime import datetime\n\nfrom textual.app import App, ComposeResult\nfrom textual.widgets import Digits\n\n\nclass ClockApp(App):\n    CSS = \"\"\"\n    Screen { align: center middle; }\n    Digits { width: auto; }\n    \"\"\"\n\n    def compose(self) -\u003e ComposeResult:\n        yield Digits(\"\")\n\n    def on_ready(self) -\u003e None:\n        self.update_clock()\n        self.set_interval(1, self.update_clock)\n\n    def update_clock(self) -\u003e None:\n        clock = datetime.now().time()\n        self.query_one(Digits).update(f\"{clock:%T}\")\n\n\nif __name__ == \"__main__\":\n    app = ClockApp()\n    app.run()\n```\n\n\u003e [!TIP]\n\u003e Textual is an asynchronous framework under the hood. Which means you can integrate your apps with async libraries \u0026mdash; if you want to.\n\u003e If you don't want or need to use async, Textual won't force it on you. \n\n\n\n\u003cimg src=\"https://img.spacergif.org/spacer.gif\" width=\"1\" height=\"64\"/\u003e\n\n## Widgets\n\nTextual's library of [widgets](https://textual.textualize.io/widget_gallery/) covers everything from buttons, tree controls, data tables, inputs, text areas, and more…\nCombined with a flexible [layout](https://textual.textualize.io/how-to/design-a-layout/) system, you can realize any User Interface you need.\n\nPredefined themes ensure your apps will look good out of the box. \n\n\n\u003ctable\u003e\n\n\u003ctr\u003e\n\n  \u003ctd\u003e\n    \n  ![buttons](https://github.com/user-attachments/assets/2ac26387-aaa3-41ed-bc00-7d488600343c)\n    \n  \u003c/td\u003e\n\n  \u003ctd\u003e\n    \n![tree](https://github.com/user-attachments/assets/61ccd6e9-97ea-4918-8eda-3ee0f0d3770e)\n    \n  \u003c/td\u003e\n  \n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\n  \u003ctd\u003e\n    \n  ![datatables](https://github.com/user-attachments/assets/3e1f9f7a-f965-4901-a114-3c188bd17695)\n    \n  \u003c/td\u003e\n\n  \u003ctd\u003e\n    \n![inputs](https://github.com/user-attachments/assets/b02aa203-7c37-42da-a1bb-2cb244b7d0d3)\n    \n  \u003c/td\u003e\n  \n\u003c/tr\u003e\n\u003ctr\u003e\n\n\u003ctd\u003e\n\n![listview](https://github.com/user-attachments/assets/963603bc-aa07-4688-bd24-379962ece871)\n\n\u003c/td\u003e\n\n\u003ctd\u003e\n\n![textarea](https://github.com/user-attachments/assets/cd4ba787-5519-40e2-8d86-8224e1b7e506)\n  \n\u003c/td\u003e\n\n  \n\u003c/tr\u003e\n\n\u003c/table\u003e\n\n\n\u003cimg src=\"https://img.spacergif.org/spacer.gif\" width=\"1\" height=\"32\"/\u003e\n\n## Installing\n\nInstall Textual via pip:\n\n```\npip install textual textual-dev\n```\n\nSee [getting started](https://textual.textualize.io/getting_started/) for details.\n\n\n\u003cimg src=\"https://img.spacergif.org/spacer.gif\" width=\"1\" height=\"32\"/\u003e\n\n## Demo\n\n\nRun the following command to see a little of what Textual can do:\n\n```\npython -m textual\n```\n\nOr try the [textual demo](https://github.com/textualize/textual-demo) *without* installing (requires [uv](https://docs.astral.sh/uv/)):\n\n```bash\nuvx --python 3.12 textual-demo\n```\n\n\u003cimg src=\"https://img.spacergif.org/spacer.gif\" width=\"1\" height=\"32\"/\u003e\n\n## Dev Console\n\n\u003cimg align=\"right\" width=\"40%\" alt=\"devtools\" src=\"https://github.com/user-attachments/assets/12c60d65-e342-4b2f-9372-bae0459a7552\" /\u003e\n\n\nHow do you debug an app in the terminal that is also running in the terminal?\n\nThe `textual-dev` package supplies a dev console that connects to your application from another terminal.\nIn addition to system messages and events, your logged messages and print statements will appear in the dev console.\n\nSee [the guide](https://textual.textualize.io/guide/devtools/) for other helpful tools provided by the `textual-dev` package.\n\n\u003cimg src=\"https://img.spacergif.org/spacer.gif\" width=\"1\" height=\"32\"/\u003e\n\n## Command Palette\n\n\nTextual apps have a *fuzzy search* command palette.\nHit `ctrl+p` to open the command palette.\n\nIt is easy to extend the command palette with [custom commands](https://textual.textualize.io/guide/command_palette/) for your application.\n\n\n![Command Palette](https://github.com/user-attachments/assets/94d8ec5d-b668-4033-a5cb-bf820e1b8d60)\n\n\u003cimg src=\"https://img.spacergif.org/spacer.gif\" width=\"1\" height=\"32\"/\u003e\n\n# Textual ❤️ Web\n\n\u003cimg align=\"right\" width=\"40%\" alt=\"textual-serve\" src=\"https://github.com/user-attachments/assets/a25820fb-87ae-433a-858b-ac3940169242\"\u003e\n\n\nTextual apps are equally at home in the browser as they are the terminal. Any Textual app may be served with `textual serve` \u0026mdash; so you can share your creations on the web.\nHere's how to serve the demo app:\n\n```\ntextual serve \"python -m textual\"\n```\n\nIn addition to serving your apps locally, you can serve apps with [Textual Web](https://github.com/Textualize/textual-web).\n\nTextual Web's firewall-busting technology can serve an unlimited number of applications.\n\nSince Textual apps have low system requirements, you can install them anywhere Python also runs. Turning any device into a connected device.\nNo desktop required!\n\n\n\u003cimg src=\"https://img.spacergif.org/spacer.gif\" width=\"1\" height=\"32\"/\u003e\n\n\n## Join us on Discord\n\nJoin the Textual developers and community on our [Discord Server](https://discord.gg/Enf6Z3qhVr).\n","funding_links":[],"categories":["Python","语言资源库","Python 程序","Command-line Interface Development","cli","📚 فهرست","Uncategorized","Repository app","Python 🐍","ASCII UI/UX Frameworks \u0026 Foundations"],"sub_categories":["python","网络服务_其他","کتابخانه هاي TUI","Uncategorized","Imported: Upstream Snippet Gallery"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTextualize%2Ftextual","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTextualize%2Ftextual","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTextualize%2Ftextual/lists"}