Skip to main content

A library that wraps PyFiglet with the Rich library for rendering ASCII art in the terminal.

Project description

Rich-Pyfiglet

badge badge badge badge badge

Rich-PyFiglet is an implementation of PyFiglet for Rich.

It provides a RichFiglet class that is fully compatible with the Rich API and can be dropped into your Rich scripts.

This library is related to Textual-Pyfiglet.

Features

  • Usage in your Rich scripts can be a single line of code with default settings.
  • Color system built on Rich can take common formats such as hex code and RGB, as well as a big list of named colors.
  • Banner will automatically adjust to the terminal width and word-wrap the text.
  • Automatically create gradients between colors vertically or horizontally.
  • Comes with 4 animation modes built in (up, down, smooth-strobe, fast-strobe).
  • Pass in a list of colors for multicolored gradients and animations.
  • Manually tweak the gradient quality as well as the animation FPS in order to customize the banner the way you want it.
  • Add borders around the banner - The RichFiglet takes border settings as arguments, which allows it to properly account for the border and padding when calculating its available space (without doing this, some terminal sizes would mess up the render).
  • Included CLI mode for quick testing.
  • The fonts are type-hinted to give you auto-completion in your code editor, eliminating the need to manually check what fonts are available.

Try out the CLI

If you have uv or pipx, you can immediately try the included CLI:

uvx rich-pyfiglet "Rich is awesome" --colors blue:green
pipx rich-pyfiglet "Rich is awesome" --colors blue:green

Documentation

Click here for documentation

Questions, Issues, Suggestions?

Use the issues section for bugs or problems, and post ideas or feature requests on the TTY group discussion board.

Thanks and Copyright

Both Rich-Pyfiglet and the original PyFiglet are under MIT License. See LICENSE file.

FIGlet fonts have existed for a long time, and many people have contributed over the years.

Original creators of FIGlet:
https://www.figlet.org

The PyFiglet creators:
https://github.com/pwaller/pyfiglet

Rich:
https://github.com/Textualize/rich

And finally, thanks to the many hundreds of people that contributed to the fonts collection.

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

rich_pyfiglet-1.0.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rich_pyfiglet-1.0.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file rich_pyfiglet-1.0.0.tar.gz.

File metadata

  • Download URL: rich_pyfiglet-1.0.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for rich_pyfiglet-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a9ba2ae109eb43112a2eb8f35abb3fc4113be0927d4718cdbbc47513957f38ed
MD5 591d79fd24cac8d001af26141c735395
BLAKE2b-256 6345e9fe32d846099de94bb89402a0bd87ae536d5317329cc4adb1373e027c8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for rich_pyfiglet-1.0.0.tar.gz:

Publisher: release.yml on edward-jazzhands/rich-pyfiglet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rich_pyfiglet-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: rich_pyfiglet-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for rich_pyfiglet-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b1653b0381cab356772c562e528c091171beeaa1821f71cfd65c379197b4244
MD5 06c5c1802dc40f7548def3b5cfed142a
BLAKE2b-256 7e33594d2997ce77d4a18984a9bfc01907d456b8f60dbcc313c8ad1cb568526e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rich_pyfiglet-1.0.0-py3-none-any.whl:

Publisher: release.yml on edward-jazzhands/rich-pyfiglet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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