Skip to main content

HubAxle - control interface for the GL Hub

Exposes an HTTP API for controlling the GL Hub.

There are several primary functions:

  • Update the configuration files which the GL Runtime is consuming
  • Monitor status of the GL Runtime
  • Discover and set up cameras that are accessible to the hub

Command-line tools

  • poetry run discover-cameras - discover cameras on the local network
  • poetry run launch-service - start the hubaxle service

Using it.

  1. Set up a user by setting the HUB_LOGINS env var to username:password Either do this through the balena dashboard, or by running
docker compose up -e HUB_LOGINS="username:password" hubaxle
  1. Open the port on the hubaxle container. (port 8000 inside the container, port 80 on the host)

  2. Open /admin/ page, and authenticate with your login

  3. Create a config entry called runtime.yaml

  4. Watch as the glruntime container does what you tell it to!

Testing

poetry run pytest

Development:

If it's awkward to set the HUB_LOGINS env var, you can also run

./src/manage.py createsuperuser

from the hubaxle container, and then you can log in with the credentials you set.

API Development

Using DRF-spectacular, we completely auto-generate the Open-api spec and then in turn use that to autogenerate a client library using Openapi-generator. We then provide a thin wrapper around the client library to make it easier to use.

To generate the api-spec and the client library, inside the src directory run:

make generate-api

A couple of notes:

  • This means that schema.yaml should NEVER be manually edited.
  • Inside the autogenerated client library, we generate classes with the exact same name as the the Django models, and, by default, the exact same fields. Note this if there are any fields that you want to keep private. However, this model provides increased clarity, the data that you send in as a request maps extremely directly onto the model that the backend deals with

Metadata

Release files for hubaxle 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hubaxle 0.1.8
File Size Uploaded Provenance Actions
hubaxle-0.1.8.tar.gz 76.6 kB Without provenance Details for hubaxle-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hubaxle 0.1.8
File Interpreter ABI Platform Actions
hubaxle-0.1.8-py3-none-any.whl Python 3 none any Details for hubaxle-0.1.8-py3-none-any.whl

Total release size: 198.0 kB

Release files / hubaxle-0.1.8.tar.gz

Download URL hubaxle-0.1.8.tar.gz
Size 76.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b17f20b60b9966cc4db0f0b5282fdbbbfe1d11544d48cd3928ad091f64558701
BLAKE2b-256 checksum
How to use checksums
f05bac44d71a629d170f4372860bf5eef01e5d33f05325229e3153429348f0d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.5 Darwin/22.6.0

Release files / hubaxle-0.1.8-py3-none-any.whl

Download URL hubaxle-0.1.8-py3-none-any.whl
Size 121.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
edb558130c5e297d0bd57a8e3ce9c63035f952321eac87b162ce16299afeba77
BLAKE2b-256 checksum
How to use checksums
9186b0e09fb07723294731cb2a83ee8b2b71e8bb1a9ace4dc9b482bc88370492
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.5 Darwin/22.6.0

Security for hubaxle 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page