Skip to content

Python package to publish RuuviTag data to cloud

License

Notifications You must be signed in to change notification settings

jlipponen/RuuviGate

Repository files navigation

RuuviGate

Python package to publish RuuviTag data to cloud services.

Acknowledgments

Prerequisites

  • Python (>=3.10)
  • Poetry (>=1.5.1)
  • Azure IoT Central application with a RuuviGate device

Installation

Install locally build version

> poetry build
> pip install ./dist/ruuvigate-<version>-py3-none-any.whl

Install from GitHub releases

> pip install https://github.com/jlipponen/RuuviGate/releases/download/<version>/ruuvigate-<version>-py3-none-any.whl

Usage

Examples of configuration files:

Write sample data to stdout

> python3 -m ruuvigate -r /path/to/ruuvitags.yml --mode stdout --interval 5 --loglevel INFO --simulate

Publish sample data to Azure IoT Central

> python3 -m ruuvigate -r /path/to/ruuvitags.yml -c /path/to/azure.yml --interval 5 --loglevel INFO --simulate

Publish RuuviTag data to Azure IoT Central

> python3 -m ruuvigate -r /path/to/ruuvitags.yml -c /path/to/azure.yml --interval 5 --loglevel INFO

Development

Install dependencies

> poetry install

Run local

> poetry run python -m ruuvigate -r /path/to/ruuvitags.yml --mode stdout --interval 5 --loglevel INFO --simulate

Run unit tests

> poetry run pytest

Typing

Check typing

> poetry run mypy .

Formatting

Check formatting

> poetry run yapf --diff --recursive .

Apply formatting

> poetry run yapf -i --recursive .