Skip to main content

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

  1. Clone the repository
    git clone https://github.com/balkongas/BalkonGas-Python.git
    cd balkongas
    
  2. Create a virtual environment
    python -m venv .venv
    
  3. Activate the virtual environment
    • macOS/Linux:
      source .venv/bin/activate
      
    • Windows (CMD):
      .venv\Scripts\activate
      
    • Windows (PowerShell):
      .venv\Scripts\Activate.ps1
      
  4. 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

  1. Ensure you have Twine installed
    pip install twine
    
  2. Upload the package
    twine upload dist/*
    
  3. Verify installation from PyPI
    pip install balkongas
    

Now you're ready to develop, test, and distribute balkongas! 🚀

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)

Source distribution for balkongas 0.1.2
File Size Uploaded
balkongas-0.1.2.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for balkongas 0.1.2
File Interpreter ABI Platform
balkongas-0.1.2-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

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