Skip to main content

Zm-py

image

Python package

image

license

A loose python wrapper around the ZoneMinder API. As time goes on additional functionality will be added to this API client.

Acknowledgments

Not to be confused with ZoneMinder's Pythonic wrapper pyzm, this zm-py project (with a hyphen) is tailored for the Home Assistant ZoneMinder Integration

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:

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
)

#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")

Metadata

Release files for zmha-py 0.5.3.post4

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

Source distribution (sdist)

Source distribution for zmha-py 0.5.3.post4
File Size Uploaded
zmha_py-0.5.3.post4.tar.gz 13.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zmha-py 0.5.3.post4
File Interpreter ABI Platform
zmha_py-0.5.3.post4-py3-none-any.whl Python 3 none any Details

Total release size: 25.9 kB

Release files / zmha_py-0.5.3.post4.tar.gz

Download URL zmha_py-0.5.3.post4.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4c6110b8988626691b989a49eea1d0e7bd6ec7a28754f896771fcaebe28540a2
BLAKE2b-256 checksum
How to use checksums
1ae53873e94a547a1cb91cb3aef7d341a3d2232a83a3bb28f4a0dd0929bcbbad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.6 Linux/6.1.57-gentoo-x86_64

Release files / zmha_py-0.5.3.post4-py3-none-any.whl

Download URL zmha_py-0.5.3.post4-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d0c36b38605eabca3549b1bcd570ebed7a94fed85b53fbbed99d3553476e55e
BLAKE2b-256 checksum
How to use checksums
e79ce7ad2378d99121929990400427e2cb0a508512408621a7f9b442152f52ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.6 Linux/6.1.57-gentoo-x86_64

Release history Release notifications | RSS feed

This release

0.5.3.post4 This release

2 release files

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