A thin wrapper around the NervesHub User API
See https://github.com/nerves-hub/nerves_hub_user_api for more details.
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()
# Ensure linting passes before committing
poetry run pre-commit install
poetry run pytest --mypy
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