{"id":13680883,"url":"https://github.com/yuppity/unifi-video-api","last_synced_at":"2025-10-06T16:46:10.111Z","repository":{"id":50538638,"uuid":"161906618","full_name":"yuppity/unifi-video-api","owner":"yuppity","description":"Python API for UniFi Video","archived":false,"fork":false,"pushed_at":"2022-12-08T01:29:53.000Z","size":2264,"stargazers_count":59,"open_issues_count":7,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-12T19:29:13.567Z","etag":null,"topics":["nvr","python","python2","python3","unifi-nvr","unifi-video"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuppity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-15T13:17:03.000Z","updated_at":"2024-09-08T04:33:23.000Z","dependencies_parsed_at":"2023-01-24T03:15:09.161Z","dependency_job_id":null,"html_url":"https://github.com/yuppity/unifi-video-api","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/yuppity/unifi-video-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuppity%2Funifi-video-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuppity%2Funifi-video-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuppity%2Funifi-video-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuppity%2Funifi-video-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuppity","download_url":"https://codeload.github.com/yuppity/unifi-video-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuppity%2Funifi-video-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278646734,"owners_count":26021511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nvr","python","python2","python3","unifi-nvr","unifi-video"],"created_at":"2024-08-02T13:01:23.346Z","updated_at":"2025-10-06T16:46:10.092Z","avatar_url":"https://github.com/yuppity.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# 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.13\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, UVC G4 Bullet, UVC G4 Pro.\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# List all cameras UniFi Video is aware of\nfor camera in uva.cameras:\n  print(camera)\n\n# Save snapshot from every currently online camera managed by the UniFi Video\n# instance. Default filepath: # ./snapshot_{camera ID}_{timestamp}.jpg\nfor camera in uva.active_cameras:\n  camera.snapshot()\n\n# List all cameras managed by the UniFi Video instance, online or not\nfor camera in uva.managed_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 whose details were fetched during initialization\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## 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuppity%2Funifi-video-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuppity%2Funifi-video-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuppity%2Funifi-video-api/lists"}