Skip to main content

A loose python wrapper around the ZoneMinder REST API.

Project description

Zm-py

image

image

image

license

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

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.1.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file zm-py-0.5.1.tar.gz.

File metadata

  • Download URL: zm-py-0.5.1.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.9

File hashes

Hashes for zm-py-0.5.1.tar.gz
Algorithm Hash digest
SHA256 4cd1a2191ed1b8414b0c962a5a7c7ee0c573613da751178669685cfa118b9ca7
MD5 8e498458f33da8cd3ddec95b278e8881
BLAKE2b-256 217d4bdc4a905a3789d9a102366d37725852dd686e0812e63c5c2d302cb18067

See more details on using hashes here.

File details

Details for the file zm_py-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: zm_py-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.9

File hashes

Hashes for zm_py-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c17090b1446987ca8eef20342808c3e0f9de1dc73dc554dec1413f984faf17fc
MD5 dc7761d81b1a49b1ee59a252699aba56
BLAKE2b-256 426e5e8614685ed39fcc3bae5a5227478a25de0690e1bf971c43e2e44ca580a7

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