%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 * Tue May 30 2023 Python_Bot - 0.5.2-1 - Package Spec generated