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.0.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.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rich_pyfiglet-2.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 908ca4b02fdf7e9ee7db494f9bef7441842d95afcd58087b940229410fcf0f81
MD5 10dfc8f2e359a610cfb45b39c5d56df0
BLAKE2b-256 10810db114a584d8968414d191d41172d35c67433fb6ac5ff21fb1ec7d72a245

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rich_pyfiglet-2.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 387e59e3021d3e72ed324a53fd0fc128f172d40c7835f8b0eb38bb649549eae3
MD5 0bebb1e42ff6ae1940e498591fd6af32
BLAKE2b-256 76c4e48a91d7e9ce58a2b134aa1b298ea335ac1e720c4bc76f816fe313f85736

See more details on using hashes here.

Provenance

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