{ "info": { "author": "yuppity", "author_email": "yuppity_pypi@wubbalubba.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "# unifi-video-api\n\n[![Build Status](https://travis-ci.org/yuppity/unifi-video-api.svg?branch=master)](https://travis-ci.org/yuppity/unifi-video-api)\n[![Documentation Status](https://readthedocs.org/projects/unifi-video-api/badge/?version=latest)](https://unifi-video-api.readthedocs.io/en/latest/?badge=latest)\n\nPython API for interfacing with UniFi Video.\n\n**Supported UniFi Video versions**: v3.9.12 to v3.10.10\n\n**Supported Ubiquiti camera models**: UVC, UVC G3, UVC G3 Dome, UVC Dome, UVC Pro, UVC G3 Pro,\nUVC G3 Flex, UVC Micro, UVC G3 Micro, airCam, airCam Dome, and airCam Mini.\n\n\n## Features\n**For a single UniFi Video server**:\n* Support both username/password and API key auths\n* Provide GET, POST, PUT, and DELETE methods\n* Handle session tracking and login when necessary\n* Provide iterable collections for cameras and recordings that the UniFi Video server\n is aware of\n\n**Per camera**:\n* Set or show picture settings: brightness, contrast, saturation, hue, denoise,\n sharpness, dynamic range\n* Set or show IR led state\n* Set or show on-display text\n* Set or show timestamp state\n* Set or show watermark/logo state\n* Set recording mode to fulltime, motion, or disabled\n* Set recording pre/post padding\n* Take and download pictures (snapshots)\n* Download camera footage between arbitrary start and end times\n\n**Per recording**:\n* Delete\n* Download\n* Snapshot (thumbnail) download\n\n## Installation\n\nEither grab it from PyPI\n\n```\npip install unifi-video\n```\n\nor download a release and manually place [unifi_video](unifi_video) in your project\ndirectory, or any path in `$PYTHONPATH`.\n\nYou shouldn't need any external libraries, unless you want to run the tests or\nbuild the docs (see [requirements_dev.txt](requirements_dev.txt)).\n*unifi-video-api* does use the [six](https://pypi.org/project/six/) library but\nwill fallback to using the included *six* should it fail to import *six* from\nsystem level packages.\n\nBoth python 2.7+ and python3 are supported.\n\n## Usage\n\nSee the [docs](https://unifi-video-api.readthedocs.io/) for an API reference.\n\n```python\nfrom unifi_video import UnifiVideoAPI\n\n# Default kwargs: addr = 'localhost', port = 7080, schema = http\nuva = UnifiVideoAPI(username='username', password='password', addr='10.3.2.1')\n\n# Use API key (can be set per user in Unifi NVR user settings)\nuva = UnifiVideoAPI(api_key='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', addr='10.3.2.1')\n\n# Skip version checking\nuva = UnifiVideoAPI(api_key='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', addr='10.3.2.1',\n check_ufv_version=False)\n\n# Use HTTPS and skip cert verification\nuva = UnifiVideoAPI(api_key='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', addr='10.3.2.1',\n port=7443, schema='https', verify_cert=False)\n\n# Save snapshot from camera whose id, name or onscreen display text\n# is \"Garage\"\nuva.get_camera('Garage').snapshot('some/path/snapshot.jpg')\n\n# Save snapshot from all cameras to ./snapshot_camera id_timestamp.jpg\nfor camera in uva.cameras:\n camera.snapshot()\n\n# Get footage from camera \"Garage\" for specific timespan.\n# (The resulting file will be 0 bytes when no footage is found.)\nuva.get_camera('Garage').recording_between('2018-12-01 00:00:00',\n '2018-12-01 00:05:00')\n\n# Specify filename\nuva.get_camera('Garage').recording_between('2018-12-01 00:00:00',\n '2018-12-01 00:05:00', 'first_mins_of_dec.mp4')\n\n# Change onscreen display text\nuva.get_camera('Garage').set_onscreen_text('Home garage')\n\n# Set IR leds to auto mode\nuva.get_camera('Garage').ir_leds('auto')\n\n# Turn off IR leds (manual mode implied)\nuva.get_camera('Garage').ir_leds('off')\n\n# Turn on IR leds (manual mode implied)\nuva.get_camera('Garage').ir_leds('on')\n\n# Set camera to record at all times and to pre capture 5 secs\nuva.get_camera('Garage').set_recording_settings('fulltime',\n pre_padding_secs=5)\n\n# Set camera to record motion events only\nuva.get_camera('Garage').set_recording_settings('motion')\n\n# Disable recording altogether\nuva.get_camera('Garage').set_recording_settings('disable')\n\n# List recordings\nfor rec in uva.recordings:\n print(rec)\n\n# Download recording, write to local file recording01.mp4\nuva.recordings['xxxxxxxxxxxxxxxxxxxx'].download('recording01.mp4')\n```\n\n\n## Warning\nThis software has been tested against a limited set of API versions and hardware.\nWhile unlikely, should any of the POST payloads result in software or\nhardware failure, the maintainer of this package is not liable.\n\nProceed at your own risk.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/yuppity/unifi-video-api", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "unifi-video", "package_url": "https://pypi.org/project/unifi-video/", "platform": "", "project_url": "https://pypi.org/project/unifi-video/", "project_urls": { "Homepage": "https://github.com/yuppity/unifi-video-api" }, "release_url": "https://pypi.org/project/unifi-video/0.1.4/", "requires_dist": null, "requires_python": ">=2.7", "summary": "Python API for UniFi Video", "version": "0.1.4" }, "last_serial": 6004496, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6e84e21eb8f884daad8ba95edfabd420", "sha256": "d8595feddc3d2eacc5450524928796c4b2643368efa1c0c656bf5deec43004dc" }, "downloads": -1, "filename": "unifi-video-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6e84e21eb8f884daad8ba95edfabd420", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 20277, "upload_time": "2019-10-07T16:03:36", "url": "https://files.pythonhosted.org/packages/79/80/7c71f1239c68f011e1af179a20082b1715500b2575759cbfbcc93fcce688/unifi-video-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "de1edc387819443ee8a50b23750af397", "sha256": "d425e97fe2bb9e0d8e39b40319d35581aa900679bb0e8f85c62132a3368bb7fb" }, "downloads": -1, "filename": "unifi-video-0.1.1.tar.gz", "has_sig": false, "md5_digest": "de1edc387819443ee8a50b23750af397", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 20294, "upload_time": "2019-10-07T17:05:09", "url": "https://files.pythonhosted.org/packages/87/b9/80be74718a6dc498fa6c3e0e3396dcc96d5917e9fc8457ebb98788948824/unifi-video-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "e7d5c88b289b0f55f365c706141ce4df", "sha256": "71b683d1c03de1999f84ea91963319b7e997c3f9927e5a05f8aa497073d6d1a8" }, "downloads": -1, "filename": "unifi-video-0.1.2.tar.gz", "has_sig": false, "md5_digest": "e7d5c88b289b0f55f365c706141ce4df", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 21346, "upload_time": "2019-10-13T20:57:28", "url": "https://files.pythonhosted.org/packages/5e/53/fb1988935fb1270c2617c87211628b8d649972c776f76c96a14f48eadaff/unifi-video-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "e341307ba6b8f0f0b06dc156c80bd584", "sha256": "c63d8dbf52a49200b61ab5e476897dbc8233ee029f3d514634ac577600d8a8c0" }, "downloads": -1, "filename": "unifi-video-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e341307ba6b8f0f0b06dc156c80bd584", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 21360, "upload_time": "2019-10-15T21:44:06", "url": "https://files.pythonhosted.org/packages/04/63/3c8e040d0814cc1a6946a08d557a07e3c0972203f79b2d6fa34e421f632b/unifi-video-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "f9e659efdfc86291e604cdb189c34e22", "sha256": "f3b5150e5b7ef2da6fb063975b3066b8cbb5e7938d84bbc87f1f749f98fab94c" }, "downloads": -1, "filename": "unifi-video-0.1.4.tar.gz", "has_sig": false, "md5_digest": "f9e659efdfc86291e604cdb189c34e22", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 21455, "upload_time": "2019-10-20T20:01:32", "url": "https://files.pythonhosted.org/packages/c6/34/ae1abaf060845c1283e99b02de51a260417715f5b09b4bae87d6fb5dd39c/unifi-video-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f9e659efdfc86291e604cdb189c34e22", "sha256": "f3b5150e5b7ef2da6fb063975b3066b8cbb5e7938d84bbc87f1f749f98fab94c" }, "downloads": -1, "filename": "unifi-video-0.1.4.tar.gz", "has_sig": false, "md5_digest": "f9e659efdfc86291e604cdb189c34e22", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 21455, "upload_time": "2019-10-20T20:01:32", "url": "https://files.pythonhosted.org/packages/c6/34/ae1abaf060845c1283e99b02de51a260417715f5b09b4bae87d6fb5dd39c/unifi-video-0.1.4.tar.gz" } ] }