[go: up one dir, main page]

Skip to content

Textual is a TUI (Text User Interface) framework for Python inspired by modern web development.

License

Notifications You must be signed in to change notification settings

psy-repos-python/textual

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Textual splash image

Discord

Textual

Textual is a Rapid Application Development framework for Python.

Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser!

🎬 Demonstration

A quick run through of some Textual features.

Screen.Recording.2022-10-22.at.19.00.48.mov

About

Textual adds interactivity to Rich with an API inspired by modern web development.

On modern terminal software (installed by default on most systems), Textual apps can use 16.7 million colors with mouse support and smooth flicker-free animation. A powerful layout engine and re-usable components makes it possible to build apps that rival the desktop and web experience.

Compatibility

Textual runs on Linux, macOS, and Windows. Textual requires Python 3.8 or above.

Installing

Install Textual via pip:

pip install textual

If you plan on developing Textual apps, you should also install the development tools with the following command:

pip install textual-dev

See the docs if you need help getting started.

Demo

Run the following command to see a little of what Textual can do:

python -m textual

Textual demo

Documentation

Head over to the Textual documentation to start building!

Join us on Discord

Join the Textual developers and community on our Discord Server.

Examples

The Textual repository comes with a number of examples you can experiment with or use as a template for your own projects.

🎬 Code browser

This is the code_browser.py example which clocks in at 61 lines (including docstrings and blank lines).

Screen.Recording.2022-10-21.at.12.41.15.mov
📷 Calculator

This is calculator.py which demonstrates Textual grid layouts.

calculator screenshot

🎬 Stopwatch

This is the Stopwatch example from the tutorial.

Screen.Recording.2022-10-22.at.21.12.22.mov

Reference commands

The textual command has a few sub-commands to preview Textual styles.

🎬 Easing reference

This is the easing reference which demonstrates the easing parameter on animation, with both movement and opacity. You can run it with the following command:

textual easing
Screen.Recording.2022-10-17.at.11.38.13.mov
🎬 Borders reference

This is the borders reference which demonstrates some of the borders styles in Textual. You can run it with the following command:

textual borders
Screen.Recording.2022-10-17.at.11.44.24.mov
🎬 Colors reference

This is a reference for Textual's color design system.

textual colors
Screen.Recording.2022-10-22.at.19.07.20.mov

About

Textual is a TUI (Text User Interface) framework for Python inspired by modern web development.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.7%
  • Other 1.3%