A loose python wrapper around the ZoneMinder REST API.
Project description
Zm-py
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
Release history Release notifications | RSS feed
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.2.tar.gz
(12.7 kB
view details)
Built Distribution
zm_py-0.5.2-py3-none-any.whl
(14.2 kB
view details)
File details
Details for the file zm-py-0.5.2.tar.gz
.
File metadata
- Download URL: zm-py-0.5.2.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b391cca0e52f2a887aa7a46c314b73335b7e3341c428b425fcf314983e5ebb36 |
|
MD5 | d517f8f12debf8c1b9f49fa65a865a9a |
|
BLAKE2b-256 | 93219647005a4d38ad4323906bbfffa630f6b362eb6d44c72be0223988f47e5d |
File details
Details for the file zm_py-0.5.2-py3-none-any.whl
.
File metadata
- Download URL: zm_py-0.5.2-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2705315b11d880878704e3e3d5b637674340247a05581cc287ca8e4911c33ea |
|
MD5 | 6b395fce86276e97078a883ef1da8640 |
|
BLAKE2b-256 | 2e54c7123c753f0b8668a6e6b20a546af0ea892a142a0a29c84758f4a5e80315 |