plain_pages
Minimalist base classes for microservice servers and matrix display pages.
plain_pages is a lightweight Python package that provides two foundational classes—ServerPage and DisplayPage—designed to orchestrate real-time data collection and visual display in homelab environments. It’s built for clarity, composability, and just enough abstraction to stay out of your way.
✨ Why plain_pages?
This project grew out of a desire to keep things simple—but not simplistic. In a homelab where services talk over Redis, update displays via RGB matrices, and pull secrets from Vault or Kubernetes, plain_pages offers a clean interface for:
- Scheduling periodic updates
- Fetching and publishing data
- Rendering to LED panels or web displays
- Managing secrets and state with minimal ceremony
🧱 Core Components
ServerPage
A base class for microservices that:
- Reads secrets from Vault, Kubernetes, or environment
- Connects to Redis and a backing database (Postgres, SQLite, MongoDB)
- Periodically fetches data from external APIs
- Writes state to the backing database, and
- Publishes updates via Redis pub/sub
- Supports liveness probes and production/development modes
DisplayPage
A base class for display clients that:
- Reads data from the database
- Tracks freshness and avoids redundant redraws
- Provides helper methods for text alignment, color formatting, and time parsing
- Supports both RGB LED matrix output and static image generation (for testing without RGB LED hardware)
🌕 Example: Moon Phase Tracker
The examples/moon_clock/ directory (coming soon) includes:
MoonServer: Fetches sun/moon data from MET Norway’s API and publishes itMoonDisplay: Renders current time, moon phase, and next moonrise/set on an RGB matrixclientdisplay.py: Drives the LED panel and handles display cycling, pause/play, and override logic via Redis
📦 Installation
pip install dekeyrej-plain-pages
🛠️ Usage
from pages.serverpage import ServerPage
from pages.displaypage import DisplayPage
class MyServer(ServerPage):
def update(self):
# Fetch data, write to DB, publish to Redis
pass
class MyDisplay(DisplayPage):
def display(self):
# Render data to matrix or image
pass
🔐 Secrets & Config
ServerPage supports multiple secret sources from dekeyrej-secretmanager:
- KubeVault - encrypted Kubernetes Secrets with Vault Transit decrypt
- Kubernetes Secrets
- Vault static keys - coming soon!
- Environment variables
- Local JSON files
🧪 Status
This project is under active development. Expect updates, refinements, and the occasional moonbeam.
📄 License
MIT License. See LICENSE for details.
Metadata
Release files for dekeyrej-plain-pages 0.9.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dekeyrej_plain_pages-0.9.7.tar.gz | 7.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dekeyrej_plain_pages-0.9.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.7 kB
Release files / dekeyrej_plain_pages-0.9.7.tar.gz
| Download URL | dekeyrej_plain_pages-0.9.7.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5ea8caf55241ba7226b4cf107c50c4207a2096f882e0b4f9711e8e7c7e4909e
|
|
BLAKE2b-256 checksum How to use checksums |
097b38496a1cfebc50e2c4c808cf1810695f42a951662959eabf687646e32231
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2025.
Transparency logRelease files / dekeyrej_plain_pages-0.9.7-py3-none-any.whl
| Download URL | dekeyrej_plain_pages-0.9.7-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b005d6eb1b323334d30a86451cf1ce2a3ea68578e75fe565fbb135d738adeb3f
|
|
BLAKE2b-256 checksum How to use checksums |
fa8db386ef2a70857f86889cb4af74b4d4b1c1bbb3654d52f6e63a856ec3e662
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2025.
Transparency log