Skip to main content

A Python package for interacting with the balkongas API.

Project description

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! 🚀

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

balkongas-0.1.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

balkongas-0.1.2-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file balkongas-0.1.2.tar.gz.

File metadata

  • Download URL: balkongas-0.1.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for balkongas-0.1.2.tar.gz
Algorithm Hash digest
SHA256 84e3ba228af2668999b8259d44c36d4482bb43a7b5d8d20c2c2a7a749e3195c4
MD5 4f22301c8213501b57298573df47b659
BLAKE2b-256 973b7debc5aaa45ddfb3b63bb1e871d995824eb08528addc7c63ecad0b5166b6

See more details on using hashes here.

File details

Details for the file balkongas-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: balkongas-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for balkongas-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9c47609bf7823ad51bec3cad5f823ec9a48e2f036db86ae4819efcb8ba01d8a0
MD5 0c777400db67220f204cb9044cc61ebc
BLAKE2b-256 21ff0f498dc2c0f95142ea97ba1016e1c9eda46527e651e58ad8cf0585a5c3b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page