Skip to main content

A loose python wrapper around the ZoneMinder REST API.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zm_py-0.5.5.dev1.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

zm_py-0.5.5.dev1-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file zm_py-0.5.5.dev1.tar.gz.

File metadata

  • Download URL: zm_py-0.5.5.dev1.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.6.38-gentoo-x86_64

File hashes

Hashes for zm_py-0.5.5.dev1.tar.gz
Algorithm Hash digest
SHA256 35a064f50bfac5387b13feba5a8dde7d54ba340a2b318da2a01cdc1199872eba
MD5 70e02b05c6f48b8533872675f6419c12
BLAKE2b-256 4f8f16bf82f076109538f9087cc17f5756a8a5c23584328cbcc21e77b550d4e0

See more details on using hashes here.

File details

Details for the file zm_py-0.5.5.dev1-py3-none-any.whl.

File metadata

  • Download URL: zm_py-0.5.5.dev1-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.6.38-gentoo-x86_64

File hashes

Hashes for zm_py-0.5.5.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 b2f5af9f4af208d07a5a03a613b3194a8773092039a99e57f13d5f444bb2ca83
MD5 c6f5ccfbbb616319e8245c591ab7472d
BLAKE2b-256 b48a27c528bf9f051d350428c2455d9562e037454899c45a44f425eb2a9d128b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page