Skip to main content

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. Regenerate lock data when dependency inputs change:

uv lock

Run checks with uv:

uv run ruff check .
uv run ruff format --check .
uv run mypy axis
uv run pytest

Initial ty support is configured as an opt-in check and does not replace mypy:

uvx ty check

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 ApiRequest subclass must set response_type explicitly.
  • Decoded/read requests use their concrete response model as response_type.
  • Write-style requests use BytesResponse as response_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:

  • LightHandler participates in both API_DISCOVERY and PARAM_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 72

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

Source distribution (sdist)

Source distribution for axis 72
File Size Uploaded Provenance
axis-72.tar.gz 121.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 226.0 kB

Release files / axis-72.tar.gz

Download URL axis-72.tar.gz
Size 121.4 kB
Tags Source
SHA-256 checksum
How to use checksums
94d9ef1e69e492e17df80a4cd20dc0446c1793f8ba580307932c054b0ebad57f
BLAKE2b-256 checksum
How to use checksums
59c61f45cbbc1178b8adf00afea0d6a59d41f7cf04fdc862ccf973092f771e24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / axis-72-py3-none-any.whl

Download URL axis-72-py3-none-any.whl
Size 104.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c663844471d164c19bb001302eb142e0e9db7739955d24fafa437784f522826
BLAKE2b-256 checksum
How to use checksums
293dc26c21347baa036d71cd7f0a8e177cfd85f8857d6748f71ddc1cd73f559e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for axis 72

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.

Release history Release notifications | RSS feed

This release

72 This release

2 release files No provenance

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