Skip to content

sparkmeter/py-nerves-hub-client

Repository files navigation

Python client for NervesHub

A thin wrapper around the NervesHub User API

See https://github.com/nerves-hub/nerves_hub_user_api for more details.

Usage

Set up your environment

export NERVES_HUB_ORG="MY ORG"
export NERVES_HUB_PRODUCT="MY PRODUCT"
export NERVES_HUB_CERT="MY USER CERT"
export NERVES_HUB_KEY="MY USER KEY"

# If using a self-hosted NervesHub instance (optional)
export NERVES_HUB_BASE_URL="https://my-nerveshub-domain"
export NERVES_HUB_CA_CERT="MY CA CERT"
from nerves_hub_client import NervesHubAPI
api = NervesHubAPI.from_env()
api.device_list()

Development

# Ensure linting passes before committing
poetry run pre-commit install

Testing

poetry run pytest --mypy

Manual lint

Linting is run before each commit if you have the pre-commit installed, but you can run it manually with the following command.

poetry run pre-commit run

About

Python client for NervesHub user API

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages