Skip to main content

py5 Posix Renderer

The Posix Renderer library is used to render py5 Sketches in the terminal.

For example, you can create something like this:

ascii style image of happy software developer

or perhaps something like this:

rotating cube with green background

This library makes heavy use of ANSI escape codes to integrate a py5 Sketch into the terminal.

The main idea is to create a hidden rasterized image and then convert that image into something that can appear in the terminal. Sketches can be converted into plain ASCII characters, colored ASCII characters, colored cells, and more! You can customize this conversion process however you like.

The animated Posix Sketch supports many of py5's keyboard, mouse, and window events.

Requirements

This library creates animations that appear in a Posix terminal window. Therefore, this works on Linux and MacOS only. It cannot work in a Windows DOS window because a DOS window is not a Posix terminal. It probably works in the Windows Linux subsystem but I haven't specifically tested that.

You must have a working py5 installation. You can learn how to install py5 on the documentation website. Installing py5 requires you have Java installed on your machine.

Once you have py5 installed, you can install the Posix Renderer library with pip:

pip install py5-posix-renderer

You will find some examples to get you started in the examples/ directory.

Caveats

This library is highly experimental and subject to change. There are certainly many bugs that will impact user experience.

py5 issue #772 impacts this library's performance on MacOS machines. This will be resolved after the next py5 release.

When you use this library's 3D renderer (POSIX3D), you will see a small window with the py5 logo appear on the screen. It is not possible for this library to offer 3D graphics without opening that window.

Currently this library has no documentation or docstrings. You can learn how to use it from reading the example code or from looking at the source code. If you'd like to help create more example code or write tutorials, I'd be grateful.

Why does this exist?

This renderer was built over the past two years as a passion project, driven by curiosity and the willingness to do something without a clear purpose beyond the desire to explore a corner of the technology world I am not familiar with. The more I learned about Python and Posix terminals, the more opportunities I saw to expand py5’s functionality in ways I didn’t think were possible. I’d like to share that expanded horizon with the Python community.

The Python library py5 is often used for educational purposes to teach people how to code in the context of creative coding. Providing an avenue for creative coding in the terminal can make the terminal a more inviting place to people who might otherwise be intimidated by its complexity.

There is a deeper purpose here related to my interest in creating what I call experimental renderers for computational art. Processing is an amazing library with a long history. One of its overlooked strengths is its ability to support users who wish to inherit from the PGraphics class and create their own renderers. I intend to explore this idea further. This library is also an investigation into some of the design decisions for how to go about creating these experimental renderers. Any thoughts or feedback is welcome.

Acknowledgements

Many, many thanks to @jsbueno for the very helpful discussions about terminal programming. We met at Python Brasil 2025 in Sao Paulo, Brazil and he introduced me to his project terminedia. It wouldn't have occurred to me that receiving mouse events in the terminal was even possible had he not shown me how. Some of the code in device_events.py is adapted from terminedia. Obrigado!

Accessibility

What kind of support does this library provide folks who use screen readers?

I don't know, someone will have to tell me. I do know that this library moves the cursor around the terminal, and I suspect this would conflict with how a screen reader moves its focus around a terminal window. But perhaps screen readers can do things that I don't know about? This is likely. In any case, I'd love it if someone who is more knowledgeable about this subject will investigate and tell me what they find. If there's a way for me to improve this library and make it useful for screen reader users, I'd be happy to hear about it.

Funding

Please sponsor py5!

This project is not an official part of the Processing Foundation and is not receiving any funding from them. Any funds you contribute will be used first for website expenses and next to support @hx2A's time to further develop py5 as a solid creative coding framework used by educators, artists, and hobbyists all around the world.

Thank you much for the support from py5's generous sponsors!

Get In Touch

Have a comment or question? We'd love to hear from you! The best ways to reach out are:

Metadata

Release files for py5-posix-renderer 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py5-posix-renderer 0.1.1
File Size Uploaded
py5_posix_renderer-0.1.1.tar.gz 564.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py5-posix-renderer 0.1.1
File Interpreter ABI Platform
py5_posix_renderer-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 613.5 kB

Release files / py5_posix_renderer-0.1.1.tar.gz

Download URL py5_posix_renderer-0.1.1.tar.gz
Size 564.4 kB
Tags Source
SHA-256 checksum
How to use checksums
816eea32498a91f35150aff5e3822c31d04adbefeec6a2d92c58264de744c0b5
BLAKE2b-256 checksum
How to use checksums
1b5a3692afc49338f333921816912cdb37b2af740f36619b5b99e6abdedd3536
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / py5_posix_renderer-0.1.1-py3-none-any.whl

Download URL py5_posix_renderer-0.1.1-py3-none-any.whl
Size 49.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4babf9d48fe7f0404104a98507d6ab65b7179bf606c446a8726ea92b27d3f74c
BLAKE2b-256 checksum
How to use checksums
7bd995f243ce47a190a9e932f938c5cc23e057662ce4d761d9dfc90050c0528d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page