BalkonGas Python
A small library to interact with the BalkonGas API for a reactor. It allows you to get the latest values for a reactor.
📦 Installation
pip install balkongas
🚀 Quick start
In this example, we create a reactor based on the data from this URL https://api.balkongas.de/metrics/6f1d3382-6b95-4adc-9d6f-6785ae0456f3/json/latest/
from balkongas import Reactor
r = Reactor('6f1d3382-6b95-4adc-9d6f-6785ae0456f3')
r.refresh()
print(r.data["uptime_sec"])
🚀 Development
1️⃣ Setup a Local Development Environment
- Clone the repository
git clone https://github.com/balkongas/BalkonGas-Python.git cd balkongas
- Create a virtual environment
python -m venv .venv
- Activate the virtual environment
- macOS/Linux:
source .venv/bin/activate
- Windows (CMD):
.venv\Scripts\activate
- Windows (PowerShell):
.venv\Scripts\Activate.ps1
- macOS/Linux:
- Install dependencies
pip install -e .[dev]
2️⃣ Running Tests
To run tests using pytest, use:
pytest
3️⃣ Building the Package
To build the package, run:
python -m build
This will generate a dist/ directory with .tar.gz and .whl files.
4️⃣ Uploading to PyPI
- Ensure you have Twine installed
pip install twine
- Upload the package
twine upload dist/*
- Verify installation from PyPI
pip install balkongas
Now you're ready to develop, test, and distribute balkongas! 🚀
Metadata
Release files for balkongas 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| balkongas-0.1.2.tar.gz | 2.8 kB | Without provenance | Details for balkongas-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| balkongas-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for balkongas-0.1.2-py3-none-any.whl |
Total release size: 5.3 kB
Release files / balkongas-0.1.2.tar.gz
| Download URL | balkongas-0.1.2.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84e3ba228af2668999b8259d44c36d4482bb43a7b5d8d20c2c2a7a749e3195c4
|
|
BLAKE2b-256 checksum How to use checksums |
973b7debc5aaa45ddfb3b63bb1e871d995824eb08528addc7c63ecad0b5166b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Release files / balkongas-0.1.2-py3-none-any.whl
| Download URL | balkongas-0.1.2-py3-none-any.whl |
|---|---|
| Size | 2.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c47609bf7823ad51bec3cad5f823ec9a48e2f036db86ae4819efcb8ba01d8a0
|
|
BLAKE2b-256 checksum How to use checksums |
21ff0f498dc2c0f95142ea97ba1016e1c9eda46527e651e58ad8cf0585a5c3b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Security for balkongas 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.