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.1.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.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: balkongas-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 da4c13772321b16f183e839912ddde6a7b647ed5231a3f784886865b18f4f781
MD5 89fcdcb5fbc1901fa7102630d466905d
BLAKE2b-256 635258f49f79a8e3ae2e66ada374e15bd16a1dbf71d3c85137310f82d751fecc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: balkongas-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe085f19d2a044e07186c94499ca2a76d31f45f9197a56f9faa44ad08adf8cdb
MD5 b967c724786350bef8aec0ab1877fb38
BLAKE2b-256 7f0bdc9d59be53d6dc6d208af5a66c9b51bfc797b3a10acfad2939407962160d

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