axis
Python project to set up a connection towards Axis Communications devices and to subscribe to specific events on the metadatastream.
Development setup
uv is required for development setup:
uv python install 3.14
uv sync --python 3.14 --all-extras
Or run the bootstrap script, which installs uv if needed and provisions Python 3.14 automatically:
./setup.sh
Dependencies are locked via uv.lock. The pre-commit hook installed by ./setup.sh
automatically refreshes it when pyproject.toml or uv.lock is included in a commit.
If the hook modifies it, include the updated lockfile when retrying the commit.
CI rejects stale or missing lockfiles, even when local hooks are bypassed, and
runs checks with --locked to prevent implicit lockfile updates.
Run checks with uv:
uv run ruff check .
uv run ruff format --check .
uv run mypy axis
uv run pytest
Pull requests expose independent Lint, Formatting, Typing, and
Tests (Python 3.14) checks in GitHub. A failed check does not prevent the
others from running. Ruff lint findings also appear as file-and-line annotations.
The test job uploads JUnit XML and XML/HTML coverage reports as the
test-reports-python-3.14 artifact, including when tests fail.
The workflow run summary shows the test outcome, counts, duration, line coverage,
and configured coverage threshold. Missing reports are flagged explicitly.
Initial ty support is configured as an opt-in check and does not replace mypy:
uvx ty check
CLI navigation contract
The interactive CLI in axis/cli/ follows a menu-first model.
Router runtime is the only interactive execution path.
- Canonical route graph:
main -> devices -> device_operations -> {api|events|accounts}. device_operationsroutes to feature submenus using router navigation, not direct feature command execution.- Feature nodes (
api,events,accounts) own their local menu layout and selected-device context rendering. balways navigates toparent_id;ealways exits.
To keep the CLI reusable boundary clear:
- CLI concerns (menu keys, prompts, render text, router state) stay in
axis/cli/. axis/interfaces/andaxis/models/must remain presentation-agnostic and reusable by non-CLI consumers.- Domain layers return typed data/errors; CLI adapters map them to user-facing text and flow.
Initialization architecture
Vapix initialization is phase-based and driven by handler metadata:
API_DISCOVERY: handlers initialized after API discovery.PARAM_CGI_FALLBACK: handlers that may initialize from parameter support when not listed in discovery.APPLICATION: handlers initialized after applications are loaded.
Handlers declare phase membership through handler_groups and may customize phase eligibility through should_initialize_in_group.
Request and response typing
Vapix.api_request() is the single typed request entrypoint.
- Request models declare their decode contract with
ApiRequest[ResponseT]. - Every
ApiRequestsubclass must setresponse_typeexplicitly. - Decoded/read requests use their concrete response model as
response_type. - Write-style requests use
BytesResponseasresponse_type.
Examples:
@dataclass
class ListApisRequest(ApiRequest[GetAllApisResponse]):
response_type = GetAllApisResponse
@dataclass
class SetPortsRequest(ApiRequest[ApiResponse[bytes]]):
response_type = BytesResponse
Handler methods may unwrap .data when they intentionally preserve a bytes-returning boundary.
Example fallback policy:
LightHandlerparticipates in bothAPI_DISCOVERYandPARAM_CGI_FALLBACK.- In
PARAM_CGI_FALLBACK, it initializes only when not listed in API discovery and listed in parameters.
Event Instance Model Notes
EventInstance keeps name as the raw device-provided NiceName value.
EventInstance.source and EventInstance.data are typed containers (EventInstanceSource and EventInstanceData) built from SimpleItemInstance payloads.
For compatibility with integrations that still need the historical raw payload shape, EventInstance also exposes:
raw_source: returns{}or a dict or a list of dicts.raw_data: returns{}or a dict or a list of dicts.
Metadata
Release files for axis 75
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| axis-75.tar.gz | 154.8 kB | With provenance | Details for axis-75.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| axis-75-py3-none-any.whl | Python 3 | none | any | Details for axis-75-py3-none-any.whl |
Total release size: 293.6 kB
Release files / axis-75.tar.gz
| Download URL | axis-75.tar.gz |
|---|---|
| Size | 154.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
431ce96a0a6c9f35f7bdf5bbc2474a2e68f10103f282e7c6856a9bbcb0f427a5
|
|
BLAKE2b-256 checksum How to use checksums |
ecc6c7dbe30d401984d70b10571f87730dd06c2a0e87adcb204bc92235a4dae8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / axis-75-py3-none-any.whl
| Download URL | axis-75-py3-none-any.whl |
|---|---|
| Size | 138.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b757e2045b3b15ab6c921b6401996e5800f81ab02465d303d541d9a179e76ee0
|
|
BLAKE2b-256 checksum How to use checksums |
78e733d611cff37e4e6ee0d981c04818d4570656d0f747f0a8fec6b615f0dab5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logSecurity for axis 75
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for axis-75.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logA 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.