pyweboverlay
A Python package for easily creating web overlays in Python using Flask and SocketIO.
Installation
pip install pyweboverlay
Usage
Set up your directory structure like the example provided in the repository:
│ example.py
│
└───rloverlay
│ rloverlay.html
│
└───static
background.png
pivot.png
See example.py and the rloverlay/ directory for a complete working example.
API Reference
pyweboverlay.init(port=5000, verbose=True)
Initialize the pyweboverlay server.
- port (int): Port number for the web server (default: 5000)
- verbose (bool): Enable detailed logging (default: True)
pyweboverlay.register(overlay, name, template_file=None, static_dir=None)
Register an overlay instance with the server.
- overlay (Overlay): Instance of a class extending Overlay
- name (str): Unique name for the overlay's namespace
- template_file (str, optional): Path to custom HTML template file
- static_dir (str, optional): Path to directory for serving static files
Returns the overlay ID.
pyweboverlay.update(name, data=None)
Update an overlay with new data and emit to connected clients.
- name (str): The registered name of the overlay
- data (any): Data to pass to the overlay's update method
Creating Custom Overlays
Extend the Overlay base class and implement two required methods:
from pyweboverlay import Overlay
class CustomOverlay(Overlay):
def get_data(self):
"""Return current overlay data as a dictionary."""
return {"key": "value"}
def update(self, data=None):
"""Update the overlay state with new data."""
if data is not None:
# Process and store the data
pass
Features
- Real-time updates using WebSocket connections
- Custom HTML templates with Jinja2 templating
- Static file serving for images, CSS, and JavaScript
- Multiple overlays on a single server
- Minimal configuration required
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for pyweboverlay 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyweboverlay-1.0.6.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyweboverlay-1.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.3 kB
Release files / pyweboverlay-1.0.6.tar.gz
| Download URL | pyweboverlay-1.0.6.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d301a9be567821cba7655657e3a6e05408b909c146371f26cacbe418b39ee672
|
|
BLAKE2b-256 checksum How to use checksums |
c6779389a6e21b4c6b43521bb75bbd64f3a6162e9b1b085e58b2bf8cbb1a6ee5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Oct 7, 2025.
Transparency logRelease files / pyweboverlay-1.0.6-py3-none-any.whl
| Download URL | pyweboverlay-1.0.6-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
adce770ec3bee30742f9bd1642be6415ffac43ab84bd1437b3baa32357d1c354
|
|
BLAKE2b-256 checksum How to use checksums |
82a2034442da870d149ec230d29ce50ad6d9621d54081b4d94ed55cb4983db5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Oct 7, 2025.
Transparency log