Python display framework for Raspberry Pi, currently focused on SSD1306 and SH1106 OLEDs
Project description
rpi-display-core
rpi-display-core is a Python display framework for Raspberry Pi projects.
Today it supports SSD1306 and SH1106 OLED displays through dedicated backends under rpi_display.displays, while keeping the shared drawing and widget framework generic.
Install
From the repository
git clone https://github.com/andremmfaria/rpi-display-core.git
cd rpi-display-core
uv sync
From PyPI
uv add rpi-display-core
Import it as:
from rpi_display import Runner, canvas
from rpi_display.displays.ssd1306 import SSD1306Display
What it provides
rpi_display.displays.ssd1306.SSD1306Display— SSD1306 display wrapper for Raspberry Pirpi_display.displays.sh1106.SH1106Display— SH1106 display wrapper for Raspberry Picanvas(display)— context manager that creates a fresh PIL image and flushes it on exitRunner— simple fixed-FPS render loopMockDisplay— hardware-free test helper- Built-in widgets for text, progress bars, clocks, network info, system stats, and spinners
Quick example
from rpi_display import Runner
from rpi_display.displays.ssd1306 import SSD1306Display
from rpi_display.widgets.clock import ClockWidget
Runner(SSD1306Display(), ClockWidget(), fps=1).run()
Display integrations
from rpi_display.displays.ssd1306 import SSD1306Display
from rpi_display.displays.sh1106 import SH1106Display
Other display chips can follow the same pattern under rpi_display.displays.
Widget modules
from rpi_display.widgets.text import Text, MultiLineText, ScrollingText
from rpi_display.widgets.shapes import ProgressBar
from rpi_display.widgets.clock import ClockWidget
from rpi_display.widgets.system import SystemStatsWidget
from rpi_display.widgets.network import NetworkWidget
from rpi_display.widgets.spinner import Spinner
Examples
The repository includes ready-to-run examples in examples/:
01_hello_world.py02_system_stats.py05_animation.py07_clock.py09_systemd_service.py10_sh1106_system_stats.py
Raspberry Pi setup
For wiring, I2C enablement, uv-based setup, and systemd instructions, see SETUP.md.
Development workflow
uv sync
uv run pytest
uv run ruff check .
uv run black --check .
uv run isort --check-only .
uv run mypy
Build and validate for PyPI
uv build
uvx twine check dist/*
Publish
uv publish
Current scope
- Raspberry Pi focused
- SSD1306 and SH1106 support implemented today
- Architecture intended to grow to more display types later
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rpi_display_core-1.1.2.tar.gz.
File metadata
- Download URL: rpi_display_core-1.1.2.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76bfa68dc8d38be2720594ede3c6bb10ce34e37986b68ec5b99942e9fc3911b8
|
|
| MD5 |
17e40c66f79beefe28343e254dbf9064
|
|
| BLAKE2b-256 |
caa244c7eae26ac0ca671ef5dc9068d721f2e2b90ac143b4b32797996a75eedf
|
Provenance
The following attestation bundles were made for rpi_display_core-1.1.2.tar.gz:
Publisher:
publish.yml on andremmfaria/rpi-display-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rpi_display_core-1.1.2.tar.gz -
Subject digest:
76bfa68dc8d38be2720594ede3c6bb10ce34e37986b68ec5b99942e9fc3911b8 - Sigstore transparency entry: 1281757926
- Sigstore integration time:
-
Permalink:
andremmfaria/rpi-display-core@4179ea05577442be43837fe1f3d26149787a2d06 -
Branch / Tag:
refs/tags/v1.1.3 - Owner: https://github.com/andremmfaria
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4179ea05577442be43837fe1f3d26149787a2d06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rpi_display_core-1.1.2-py3-none-any.whl.
File metadata
- Download URL: rpi_display_core-1.1.2-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9de476338e1b0d646c9901803faebda40e608af787a142d829352e578e2922a
|
|
| MD5 |
9224d11d16338ea32525e1ab9c79eda9
|
|
| BLAKE2b-256 |
45e18ab3db063144d84775f21611ffa13af43f97c709ab780c8b1031b481abe2
|
Provenance
The following attestation bundles were made for rpi_display_core-1.1.2-py3-none-any.whl:
Publisher:
publish.yml on andremmfaria/rpi-display-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rpi_display_core-1.1.2-py3-none-any.whl -
Subject digest:
b9de476338e1b0d646c9901803faebda40e608af787a142d829352e578e2922a - Sigstore transparency entry: 1281757994
- Sigstore integration time:
-
Permalink:
andremmfaria/rpi-display-core@4179ea05577442be43837fe1f3d26149787a2d06 -
Branch / Tag:
refs/tags/v1.1.3 - Owner: https://github.com/andremmfaria
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4179ea05577442be43837fe1f3d26149787a2d06 -
Trigger Event:
push
-
Statement type: