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.

This is both a library and a CLI tool. The library provides a RichFiglet class that is fully compatible with the Rich API and can be dropped into your Rich scripts. It also includes a CLI that can be used as part of shell scripts or to quickly test out different settings.

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 shell scripting and quick testing.
  • The fonts are type-hinted to give you auto-completion in your code editor.
  • Demo script included in the package, check it out using the CLI.

Try out the CLI without Installing

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

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

Demo

Try out the demo script included in the package without installing:

uvx rich-pyfiglet demo
pipx run rich-pyfiglet demo

Documentation

Click here for documentation

Questions, Issues, Suggestions?

Use the issues section for bugs, issues, ideas or feature requests.

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-2.0.1.tar.gz (19.7 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-2.0.1-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rich_pyfiglet-2.0.1.tar.gz
Algorithm Hash digest
SHA256 0e146ade2b8b41395dc0d48f4a6b5596e638c5d91d963d3bc6d6b054fe9d2c96
MD5 0ef4ecbb48d24caa8361534c545aac8b
BLAKE2b-256 dd4c34c491a2c4668a18638235344e0b8a26c829918faabfb96358fa485c42a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rich_pyfiglet-2.0.1.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-2.0.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for rich_pyfiglet-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c98256d3735810447a7f7b19f645832d5574b37929390e84b5c8b747b1a97a29
MD5 68fba2e0da8e80deb82e63120de55a74
BLAKE2b-256 50b9508c72fc38cc1f470643b2ea8dad72020b6313ce844d7170e1f06889090c

See more details on using hashes here.

Provenance

The following attestation bundles were made for rich_pyfiglet-2.0.1-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