Skip to main content

zm-py

image

Python package

image

license

A lightweight Python API client for ZoneMinder, built specifically for the Home Assistant ZoneMinder integration.

The official Home Assistant ZoneMinder component depends on zm-py==0.5.4. Active development of the integration has moved to nabbi/ha-zoneminder; it is unknown if or when those changes will be submitted back to HA core.

Project Status

This project is in maintenance mode. zm-py provides the limited set of ZoneMinder API interactions that Home Assistant needs (monitors, camera streaming, events, sensors, and switches). Bug fixes and compatibility updates are accepted; new feature development is not planned.

Not pyzm / pyzm2

zm-py is not a general-purpose ZoneMinder Python library. For full-featured ZoneMinder API access, see pyzm or its fork pyzm2. zm-py covers only the subset of the ZoneMinder API required by Home Assistant and carries no heavy dependencies. Replacing zm-py with pyzm or pyzm2 would require significant refactoring of the HA integration due to dependency conflicts and functional differences.

Origins

zm-py is based on code that was originally part of Home Assistant. Historical sources and authorship information is available as part of the Home Assistant project:

Documentation

Installation

PyPI

pip install zm-py

Usage

from zoneminder.zm import ZoneMinder

SERVER_HOST = "{{host}}:{{port}}"
USER = "{{user}}"
PASS = "{{pass}}"
SERVER_PATH = "{{path}}"

zm_client = ZoneMinder(
    server_host=SERVER_HOST,
    server_path=SERVER_PATH,
    username=USER,
    password=PASS,
    verify_ssl=False,
    stream_scale=50,       # optional: scale streams to 50%
    stream_maxfps=5.0,     # optional: cap MJPEG at 5 FPS
)

# Zoneminder authentication
zm_client.login()


# Get all monitors
monitors = zm_client.get_monitors()

for monitor in monitors:
    print(monitor)

>>> Monitor(id='monitor_id', name='monitor_name', controllable='is_controllable')


# Move camera down
controllable_monitors = [m for m in monitors if m.controllable]

for monitor in controllable_monitors:
    zm_client.move_monitor(monitor, "right")

Releasing

  1. Bump version in pyproject.toml and move the "Unreleased" notes in CHANGELOG.md under the new version.
  2. Merge to develop.
  3. Publish a GitHub release with the tag vX.Y.Z, matching the version.

The release workflow builds the sdist and wheel and publishes them to PyPI through trusted publishing, with attestations.

Metadata

Release files for zm-py 0.5.11

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

Source distribution (sdist)

Source distribution for zm-py 0.5.11
File Size Uploaded Provenance Actions
zm_py-0.5.11.tar.gz 51.5 kB With provenance Details for zm_py-0.5.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zm-py 0.5.11
File Interpreter ABI Platform Actions
zm_py-0.5.11-py3-none-any.whl Python 3 none any Details for zm_py-0.5.11-py3-none-any.whl

Total release size: 72.2 kB

Release files / zm_py-0.5.11.tar.gz

Download URL zm_py-0.5.11.tar.gz
Size 51.5 kB
Tags Source
SHA-256 checksum
How to use checksums
28115e81764f180dc757d102d7d629ed3e3c5ebc6293581732b193b56415f650
BLAKE2b-256 checksum
How to use checksums
be6a73f259f0e613ac7c1585df85ce48caed6f9c9ee380341d3134ed66dbe1aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 5, 2026.

Transparency log

Release files / zm_py-0.5.11-py3-none-any.whl

Download URL zm_py-0.5.11-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05a95b87c8fac42bdc972f67773641b16d35c838e91fa8508387b95f00d0dbcf
BLAKE2b-256 checksum
How to use checksums
098501e6482c3ccc6cb53796b4e8a5c72306e3cf5126dac5c1ca2070baa7feda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 5, 2026.

Transparency log

Security for zm-py 0.5.11

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.

Select from 2 files

Attestation for zm_py-0.5.11.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 5, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.5.11 This release

2 release files Full 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