{ "info": { "author": "sinchb", "author_email": "sinchb128@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "python-onvif\n============\n\nONVIF Client Implementation in Python\n\nDependencies\n------------\n`Python 2.x` (For a Python 3 compatible fork, see https://github.com/FalkTannhaeuser/python-onvif-zeep)\n\n`suds `_ >= 0.4\n\n`suds-passworddigest `_\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\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.TZ = '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 `_\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/quatanium/python-onvif", "keywords": "ONVIF", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "onvif", "package_url": "https://pypi.org/project/onvif/", "platform": "", "project_url": "https://pypi.org/project/onvif/", "project_urls": { "Homepage": "http://github.com/quatanium/python-onvif" }, "release_url": "https://pypi.org/project/onvif/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Python Client for ONVIF Camera", "version": "0.2.0" }, "last_serial": 3124893, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1e983de1b85ee998e0d6637cb925d9fc", "sha256": "bfe5d30cee9b1cbc23f5a27ba81d2c13f01a70fa05a54bd09804adc8d432f940" }, "downloads": -1, "filename": "onvif-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1e983de1b85ee998e0d6637cb925d9fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10719, "upload_time": "2014-12-14T07:00:45", "url": "https://files.pythonhosted.org/packages/55/83/d3ee319c0a63773048016eab23508243363f1566222aacf7a308a977a7a4/onvif-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c6dd221f8923ee554f5ef477e8a1737d", "sha256": "8cb6ccfeef43df853b499b515004c342a316d2229e81269373777ef7819af8d5" }, "downloads": -1, "filename": "onvif-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c6dd221f8923ee554f5ef477e8a1737d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 153805, "upload_time": "2014-12-15T10:05:48", "url": "https://files.pythonhosted.org/packages/e9/e8/c481d8c868875019bc72cb383c7d580cdd8757cbb82923b2991b7fc04cdb/onvif-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "4929fe18d21a3e9e8bbcfbc923f17acb", "sha256": "ce98b8d873640851004fc8e9ecc24a15af6a4f16536077c095dc66ac51b7174d" }, "downloads": -1, "filename": "onvif-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4929fe18d21a3e9e8bbcfbc923f17acb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 156668, "upload_time": "2015-01-05T08:23:17", "url": "https://files.pythonhosted.org/packages/14/ad/926f111ba2cafffe973f832c86d4f8f2e35ab0cd88f181c4770d4507d5cb/onvif-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "61afc169014a76f868efc3b664897ecb", "sha256": "89fcf784e2d8f4c0592a8f5520086dedb9030c7434016745dcc84217dcb8a452" }, "downloads": -1, "filename": "onvif-0.1.3.tar.gz", "has_sig": false, "md5_digest": "61afc169014a76f868efc3b664897ecb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 162423, "upload_time": "2016-03-08T02:28:11", "url": "https://files.pythonhosted.org/packages/c1/df/5a4ed72f81b3d651b64520cb37f41579f2da16f31643e44b835838ed8a9a/onvif-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "38916f49084521f03ee544388709c662", "sha256": "8ea6802b6dca6fac3ba603d1c1ef22b29d5dcf36f534fb303cc3eb8674e9d180" }, "downloads": -1, "filename": "onvif-0.2.0.tar.gz", "has_sig": false, "md5_digest": "38916f49084521f03ee544388709c662", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 163189, "upload_time": "2017-08-26T09:08:49", "url": "https://files.pythonhosted.org/packages/fc/69/70c3cec902cac1dea2cfa40d1b2d959645daf383187f0a1061ec1fb60dec/onvif-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "38916f49084521f03ee544388709c662", "sha256": "8ea6802b6dca6fac3ba603d1c1ef22b29d5dcf36f534fb303cc3eb8674e9d180" }, "downloads": -1, "filename": "onvif-0.2.0.tar.gz", "has_sig": false, "md5_digest": "38916f49084521f03ee544388709c662", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 163189, "upload_time": "2017-08-26T09:08:49", "url": "https://files.pythonhosted.org/packages/fc/69/70c3cec902cac1dea2cfa40d1b2d959645daf383187f0a1061ec1fb60dec/onvif-0.2.0.tar.gz" } ] }