{ "info": { "author": "rambo", "author_email": "rambo@iki.fi", "bugtrack_url": null, "classifiers": [], "description": "python-onvif\n============\n\nONVIF Client Implementation in Python\n\nDependencies\n------------\n`suds-py3 `_\n\n`suds-passworddigest-py `_\n\nInstall python-onvif\n--------------------\n**From Source**\n\nYou should clone this repository and run setup.py::\n\n cd python-onvif && python setup.py install\n\n**From PyPI**\n\n::\n\n pip install onvif-py3\n\nGetting Started\n---------------\n\nInitialize an ONVIFCamera instance\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n from onvif import ONVIFCamera\n mycam = ONVIFCamera('192.168.0.2', 80, 'user', 'passwd', '/etc/onvif/wsdl/')\n\nNow, an ONVIFCamera instance is available. By default, a devicemgmt service is also available if everything is OK.\n\nSo, all operations defined in the WSDL document::\n\n/etc/onvif/wsdl/devicemgmt.wsdl\n\nare available.\n\nGet information from your camera\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n::\n\n # Get Hostname\n resp = mycam.devicemgmt.GetHostname()\n print 'My camera`s hostname: ' + str(resp.Name)\n\n # Get system date and time\n dt = mycam.devicemgmt.GetSystemDateAndTime()\n tz = dt.TimeZone\n year = dt.UTCDateTime.Date.Year\n hour = dt.UTCDateTime.Time.Hour\n\nConfigure (Control) your camera\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo configure your camera, there are two ways to pass parameters to service methods.\n\n**Dict**\n\nThis is the simpler way::\n\n params = {'Name': 'NewHostName'}\n device_service.SetHostname(params)\n\n**Type Instance**\n\nThis is the recommended way. Type instance will raise an\nexception if you set an invalid (or non-existent) parameter.\n\n::\n\n params = mycam.devicemgmt.create_type('SetHostname')\n params.Hostname = 'NewHostName'\n mycam.devicemgmt.SetHostname(params)\n\n time_params = mycam.devicemgmt.create_type('SetSystemDateAndTime')\n time_params.DateTimeType = 'Manual'\n time_params.DaylightSavings = True\n time_params.TimeZone = 'CST-8:00:00'\n time_params.UTCDateTime.Date.Year = 2014\n time_params.UTCDateTime.Date.Month = 12\n time_params.UTCDateTime.Date.Day = 3\n time_params.UTCDateTime.Time.Hour = 9\n time_params.UTCDateTime.Time.Minute = 36\n time_params.UTCDateTime.Time.Second = 11\n mycam.devicemgmt.SetSystemDateAndTime(time_params)\n\nUse other services\n~~~~~~~~~~~~~~~~~~\nONVIF protocol has defined many services.\nYou can find all the services and operations `here `_.\nONVIFCamera has support methods to create new services::\n\n # Create ptz service\n ptz_service = mycam.create_ptz_service()\n # Get ptz configuration\n mycam.ptz.GetConfiguration()\n # Another way\n # ptz_service.GetConfiguration()\n\nOr create an unofficial service::\n\n xaddr = 'http://192.168.0.3:8888/onvif/yourservice'\n yourservice = mycam.create_onvif_service('service.wsdl', xaddr, 'yourservice')\n yourservice.SomeOperation()\n # Another way\n # mycam.yourservice.SomeOperation()\n\nONVIF CLI\n---------\npython-onvif also provides a command line interactive interface: onvif-cli.\nonvif-cli is installed automatically.\n\nSingle command example\n~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n $ onvif-cli devicemgmt GetHostname --user 'admin' --password '12345' --host '192.168.0.112' --port 80\n True: {'FromDHCP': True, 'Name': hision}\n $ onvif-cli devicemgmt SetHostname \"{'Name': 'NewerHostname'}\" --user 'admin' --password '12345' --host '192.168.0.112' --port 80\n True: {}\n\nInteractive mode\n~~~~~~~~~~~~~~~~\n\n::\n\n $ onvif-cli -u 'admin' -a '12345' --host '192.168.0.112' --port 80 --wsdl /etc/onvif/wsdl/\n ONVIF >>> cmd\n analytics devicemgmt events imaging media ptz\n ONVIF >>> cmd devicemgmt GetWsdlUrl\n True: http://www.onvif.org/\n ONVIF >>> cmd devicemgmt SetHostname {'Name': 'NewHostname'}\n ONVIF >>> cmd devicemgmt GetHostname\n True: {'Name': 'NewHostName'}\n ONVIF >>> cmd devicemgmt SomeOperation\n False: No Operation: SomeOperation\n\nNOTE: Tab completion is supported for interactive mode.\n\nBatch mode\n~~~~~~~~~~\n\n::\n\n $ vim batchcmds\n $ cat batchcmds\n cmd devicemgmt GetWsdlUrl\n cmd devicemgmt SetHostname {'Name': 'NewHostname', 'FromDHCP': True}\n cmd devicemgmt GetHostname\n $ onvif-cli --host 192.168.0.112 -u admin -a 12345 -w /etc/onvif/wsdl/ < batchcmds\n ONVIF >>> True: http://www.onvif.org/\n ONVIF >>> True: {}\n ONVIF >>> True: {'FromDHCP': False, 'Name': NewHostname}\n\nReferences\n----------\n\n* `ONVIF Offical Website `_\n\n* `Operations Index `_\n\n* `ONVIF Develop Documents `_\n\n* `Foscam Python Lib `_", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/rambo/python-onvif", "keywords": "ONVIF,Camera,IPC", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "onvif-py3", "package_url": "https://pypi.org/project/onvif-py3/", "platform": "", "project_url": "https://pypi.org/project/onvif-py3/", "project_urls": { "Homepage": "http://github.com/rambo/python-onvif" }, "release_url": "https://pypi.org/project/onvif-py3/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Python Client for ONVIF Camera", "version": "0.1.3" }, "last_serial": 2880683, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "cb6ad16dd2cd8062c63ee4f523e9ac01", "sha256": "0683b58c693e451932087f1bdb8b5280aadc8d67c34868c5533c7914fcb8bd1a" }, "downloads": -1, "filename": "onvif-py3-0.1.3.tar.gz", "has_sig": false, "md5_digest": "cb6ad16dd2cd8062c63ee4f523e9ac01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 162781, "upload_time": "2017-05-17T14:13:26", "url": "https://files.pythonhosted.org/packages/2c/95/51e0a1943ace3cb1f8fd05fb467dc78a7cd03738f9bfb904bacc040bebe2/onvif-py3-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cb6ad16dd2cd8062c63ee4f523e9ac01", "sha256": "0683b58c693e451932087f1bdb8b5280aadc8d67c34868c5533c7914fcb8bd1a" }, "downloads": -1, "filename": "onvif-py3-0.1.3.tar.gz", "has_sig": false, "md5_digest": "cb6ad16dd2cd8062c63ee4f523e9ac01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 162781, "upload_time": "2017-05-17T14:13:26", "url": "https://files.pythonhosted.org/packages/2c/95/51e0a1943ace3cb1f8fd05fb467dc78a7cd03738f9bfb904bacc040bebe2/onvif-py3-0.1.3.tar.gz" } ] }