summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 09:42:30 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 09:42:30 +0000
commit647d5e935dd134960c8a990a8f4d318ef9fb40e2 (patch)
tree3ea05f5b8aff8ec6701eca3020fa0a65d7922350
parent62e4a34558147bfc93a5b36ef92712c829127ff3 (diff)
automatic import of python-zm-py
-rw-r--r--.gitignore1
-rw-r--r--python-zm-py.spec259
-rw-r--r--sources1
3 files changed, 261 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..8cea5d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/zm-py-0.5.2.tar.gz
diff --git a/python-zm-py.spec b/python-zm-py.spec
new file mode 100644
index 0000000..dc5905e
--- /dev/null
+++ b/python-zm-py.spec
@@ -0,0 +1,259 @@
+%global _empty_manifest_terminate_build 0
+Name: python-zm-py
+Version: 0.5.2
+Release: 1
+Summary: A loose python wrapper around the ZoneMinder REST API.
+License: Apache Software License
+URL: https://github.com/rohankapoorcom/zm-py
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/93/21/9647005a4d38ad4323906bbfffa630f6b362eb6d44c72be0223988f47e5d/zm-py-0.5.2.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+
+%description
+# Zm-py
+
+[![image](https://badge.fury.io/py/zm-py.svg)](https://badge.fury.io/py/zm-py/)
+
+[![image](https://travis-ci.org/rohankapoorcom/zm-py.svg?branch=master)](https://travis-ci.org/rohankapoorcom/zm-py)
+
+[![image](https://img.shields.io/pypi/pyversions/zm-py.svg)](https://pypi.python.org/pypi/zm-py)
+
+[![license](https://img.shields.io/github/license/rohankapoorcom/zm-py.svg?style=flat-square)](https://github.com/rohankapoorcom/zm-py/blob/master/LICENSE.md)
+
+A loose python wrapper around the [ZoneMinder](https://www.zoneminder.org) 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](https://www.home-assistant.io). Historical sources and authorship information is available as part of the Home Assistant project:
+
+- [ZoneMinder Platform](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/zoneminder.py)
+- [ZoneMinder Camera](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/camera/zoneminder.py)
+- [ZoneMinder Sensor](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/sensor/zoneminder.py)
+- [ZoneMinder Switch](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/switch/zoneminder.py)
+
+## Installation
+
+### PyPI
+
+```bash
+$ pip install zm-py
+```
+
+## Usage
+
+```python
+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")
+```
+
+
+
+
+%package -n python3-zm-py
+Summary: A loose python wrapper around the ZoneMinder REST API.
+Provides: python-zm-py
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-zm-py
+# Zm-py
+
+[![image](https://badge.fury.io/py/zm-py.svg)](https://badge.fury.io/py/zm-py/)
+
+[![image](https://travis-ci.org/rohankapoorcom/zm-py.svg?branch=master)](https://travis-ci.org/rohankapoorcom/zm-py)
+
+[![image](https://img.shields.io/pypi/pyversions/zm-py.svg)](https://pypi.python.org/pypi/zm-py)
+
+[![license](https://img.shields.io/github/license/rohankapoorcom/zm-py.svg?style=flat-square)](https://github.com/rohankapoorcom/zm-py/blob/master/LICENSE.md)
+
+A loose python wrapper around the [ZoneMinder](https://www.zoneminder.org) 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](https://www.home-assistant.io). Historical sources and authorship information is available as part of the Home Assistant project:
+
+- [ZoneMinder Platform](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/zoneminder.py)
+- [ZoneMinder Camera](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/camera/zoneminder.py)
+- [ZoneMinder Sensor](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/sensor/zoneminder.py)
+- [ZoneMinder Switch](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/switch/zoneminder.py)
+
+## Installation
+
+### PyPI
+
+```bash
+$ pip install zm-py
+```
+
+## Usage
+
+```python
+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")
+```
+
+
+
+
+%package help
+Summary: Development documents and examples for zm-py
+Provides: python3-zm-py-doc
+%description help
+# Zm-py
+
+[![image](https://badge.fury.io/py/zm-py.svg)](https://badge.fury.io/py/zm-py/)
+
+[![image](https://travis-ci.org/rohankapoorcom/zm-py.svg?branch=master)](https://travis-ci.org/rohankapoorcom/zm-py)
+
+[![image](https://img.shields.io/pypi/pyversions/zm-py.svg)](https://pypi.python.org/pypi/zm-py)
+
+[![license](https://img.shields.io/github/license/rohankapoorcom/zm-py.svg?style=flat-square)](https://github.com/rohankapoorcom/zm-py/blob/master/LICENSE.md)
+
+A loose python wrapper around the [ZoneMinder](https://www.zoneminder.org) 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](https://www.home-assistant.io). Historical sources and authorship information is available as part of the Home Assistant project:
+
+- [ZoneMinder Platform](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/zoneminder.py)
+- [ZoneMinder Camera](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/camera/zoneminder.py)
+- [ZoneMinder Sensor](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/sensor/zoneminder.py)
+- [ZoneMinder Switch](https://github.com/home-assistant/home-assistant/commits/dev/homeassistant/components/switch/zoneminder.py)
+
+## Installation
+
+### PyPI
+
+```bash
+$ pip install zm-py
+```
+
+## Usage
+
+```python
+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")
+```
+
+
+
+
+%prep
+%autosetup -n zm-py-0.5.2
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-zm-py -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..b970796
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+d517f8f12debf8c1b9f49fa65a865a9a zm-py-0.5.2.tar.gz