Thanks for taking the time to contribute. This is a small, hobby-maintained project — issues and pull requests are very welcome.
git clone https://github.com/mrebbert/1komma5-api.git
cd 1komma5-api
python3.11 -m venv venv
./venv/bin/pip install -e ".[dev]"
./venv/bin/pre-commit installPYTHONPATH=. ./venv/bin/pytest tests/ -vUnit tests use the responses
library and do not hit the network.
The integration tests in tests/test_integration.py make real calls
against the 1KOMMA5° API and require credentials in environment variables:
export ONEKOMMAFIVE_USERNAME=you@example.com
export ONEKOMMAFIVE_PASSWORD=...
PYTHONPATH=. ./venv/bin/pytest tests/test_integration.py -v./venv/bin/ruff check onekommafive/ tests/pre-commit runs ruff automatically before each commit; please don't
bypass hooks (--no-verify).
- Keep changes focused. One feature or fix per PR.
- Add or update tests for the behaviour you change.
- Run the full test suite and ruff before pushing.
- Match existing code style (line length 120, type hints, dataclasses
with
from_dictconstructors). - Reference the API endpoint or response payload in the PR description when adding support for new fields, so reviewers can cross-check.
- Add the resource method to
system.py(or the appropriate module), going throughClient._requestfor the HTTP call. - Add a typed dataclass in
models.pywith afrom_dictclassmethod. - Re-export public types from
onekommafive/__init__.py. - Add tests in
tests/test_<module>.pyusingresponses. - Update the API endpoint table in
README.mdif the new endpoint is user-visible.
Please open an issue with a minimal reproduction. Include Python
version, library version (pip show onekommafive), and any relevant
API response snippet (with personal data redacted).
Please do not open a public issue for security problems. See SECURITY.md for the private reporting channel.