Skip to main content

Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!

Project description

title

Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!

pip3 install pytermgui

PyPi project Code quality

Twitter Buy Me A Coffee donate button

Why?

Mostly because terminals are cool, but creating terminal apps has historically been difficult. PyTermGUI aims to provide a simple, readable and modular way to make the app of your dreams!

Terminal apps are (often):

  • Easier to install
  • Faster & more resource efficient
  • Less prone to differences between environments (no IE7 here!)

...than their web or native counterparts.

How?

We provide a couple of things to make your life easier:

  • Sensible abstractions over most terminal standards
  • A fully fledged, desktop-inspired window manager system with modals and completely customizable windows
  • Mouse support out of the box with 0 configuration
  • YAML (or Python) based styling engines
  • TIM, our markup language for creating styled terminal text with expressive text, including systems for aliases & macros
  • A bunch of things I can't think of right now :slightly_smiling_face:

Additionally, there are a couple of neat tools to make your general Python development easier:

  • An inspection utility
  • A pretty printer for both the REPL and IPython
  • A way to create SVG and HTML screenshots of your terminal

Latest release

7.3.0 - 2022-11-17

Additions

  • Add support for SHIFT+ scroll events
  • Add shade number indicators to Palette.print
  • Add inline widget runner

Bugfixes

  • Fix incorrect macro caching behaviour
  • Fix various issues and misbehaviours with SVG exports
  • Fix incorrect placement of InputField cursor

Refactors

  • New MkDocs based documentation
  • Change terminal.py -> term.py and serializer.py -> serialization.py to avoid naming conflicts
  • Improve pseudo token behaviour by parsing it as a new token type
  • Start generating semantic colors (success, warning, error) by blending with the primary

Removals

  • Remove is_bindable widget attribute

7.2.0 - 2022-08-05

Additions

  • Add various color manipulation utilities
  • Add #auto TIM pseudo-tag that always gives properly contrasted foreground text
  • Add palettes module for framework-wide color generation & configuration
  • Add Synchronized Output support
  • Add FancyReprWidget
  • Add ptg --palette flag

Bugfixes

  • Fix markup aliases getting literalized during parsing.eval_alias & MarkupLanguage.alias
  • Fix background colors creating vertical seams in SVG exports
  • Fix colors getting localized pre-maturely

Refactors

  • Make all the ptg program & all builting widgets use the global palette
  • Prefix all ANSI colors with ansi-

Read the full changelog here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytermgui-7.3.0.tar.gz (144.3 kB view details)

Uploaded Source

Built Distribution

pytermgui-7.3.0-py3-none-any.whl (173.1 kB view details)

Uploaded Python 3

File details

Details for the file pytermgui-7.3.0.tar.gz.

File metadata

  • Download URL: pytermgui-7.3.0.tar.gz
  • Upload date:
  • Size: 144.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.22.0

File hashes

Hashes for pytermgui-7.3.0.tar.gz
Algorithm Hash digest
SHA256 3a6211e872fae6b6a6445efff2260266f33d288a7ec64411238a673a23f333af
MD5 0800c3be48b62a601df01421bb7f7825
BLAKE2b-256 973df1e215b379759faed454a7ad62c798e200c0824b2bfea93f0faf0fde326b

See more details on using hashes here.

File details

Details for the file pytermgui-7.3.0-py3-none-any.whl.

File metadata

  • Download URL: pytermgui-7.3.0-py3-none-any.whl
  • Upload date:
  • Size: 173.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.22.0

File hashes

Hashes for pytermgui-7.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a08e525c6bd7fe74bb3d0910bd37bd2b9eb6dbb98667f807cce2cd02eb8e9525
MD5 78ee37dc7dafc92e49bd08e3f123e684
BLAKE2b-256 7cc9d7ada0a0aab8928488f88c296309d73a92d9c98b0155ddc485db056166e3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page