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.12

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.12
File Size Uploaded Provenance Actions
zm_py-0.5.12.tar.gz 52.4 kB With provenance Details for zm_py-0.5.12.tar.gz

Built distribution (wheel)

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

Total release size: 73.3 kB

Release files / zm_py-0.5.12.tar.gz

Download URL zm_py-0.5.12.tar.gz
Size 52.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c50fc37ff2a4c3279272893413e41d781cb00206da17c0520599a1a91a228cc7
BLAKE2b-256 checksum
How to use checksums
19bc04c8d2d245ffc699d8c7396e4221d270da7323ee5146707c8b67c963d341
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.12-py3-none-any.whl

Download URL zm_py-0.5.12-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
966574f8a6c03c1c3f55fdf0cc40d5c3851bfed832aae921e85b1ef65bae7c8d
BLAKE2b-256 checksum
How to use checksums
797b6d4795098868be879fc02b152a86b4210088ef506518c89b77d36071c158
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.12

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.12.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.12 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