{ "info": { "author": "Digi International Inc.", "author_email": "paul.osborne@etherios.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries" ], "description": "Python WVA Library\n==================\n\n`Full Documentation `__\n\nThis library contains a set of classes and functions for performing\ncommon operations using the WVA Web Services API. It contains both\ngeneral web services helpers (using the Python requests library) as well\nas more specific helpers.\n\nIn addition, packaged with the library is a command-line utility using\nthe API that serves as both an example of how the library may be used as\nwell as a convenient tool for developer use.\n\nInstallation\n------------\n\nThe library may be installed using pip by doing the following:\n\n::\n\n pip install wva\n\nThis will install both the library and command-line application.\n\nCLI Usage\n---------\n\nHelp for the CLI application can be obtained by running the application\nwith the ``--help`` option. This will show the available commands:\n\n::\n\n $ wva --help\n Usage: wva [OPTIONS] COMMAND [ARGS]...\n\n Command-line interface for interacting with a WVA device\n\n Options:\n --https / --no-https Use HTTPS instead of HTTP\n --hostname TEXT Force use of the specified hostname\n --username TEXT Force use of the specified username\n --password TEXT Force use of the specified password\n --config-dir TEXT Directory containing wva configuration files\n --help Show this message and exit.\n\n Commands:\n cliconfig View and clear CLI config\n delete DELETE the specified URI Example: $ wva get...\n get Perform an HTTP GET of the provided URI The...\n post POST file data to a specific URI Note that...\n put PUT file data to a specific URI Example: $...\n subscriptions View and Edit subscriptions\n vehicle Vehicle Data Commands\n\nYou can get help for a specific command by specifying ``--help`` after\nthe command. For instance,\n\n::\n\n $ wva subscriptions --help\n Usage: wva subscriptions [OPTIONS] COMMAND [ARGS]...\n\n View and Edit subscriptions\n\n Options:\n --help Show this message and exit.\n\n Commands:\n add Add a subscription with a given short_name...\n clear Remove all registered subscriptions Example:...\n delete Delete a specific subscription by short name\n graph Present a live graph of the incoming...\n list List short name of all current subscriptions\n listen Output the contents of the WVA event stream...\n show Show metadata for a specific subscription...\n\nThe first time you attempt to talk to a device, you will need to provide\ncredentials for talking to the device. The CLI application will then\nstore those credentials in the file ``~/.wva/config.json`` and attempt\nto use those credentials in the future. If the credentials are ever\ninvalid, you will be prompted to enter the credentials again.\n\nYou can clear the credentials that are stored by deleting the wva\nconfiguration or by running the following command:\n\n::\n\n $ wva cliconfig clear\n\nLibrary Usage and Examples\n--------------------------\n\nSee the `Full API\ndocumentation `__ for full\ndetails on the API and its usage. Here's some examples:\n\nSubscribe to event streams\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n from wva import WVA\n wva = WVA(\"\", \"user\", \"password\")\n\n # clear any existing subscriptions\n for sub in wva.get_subscriptions():\n sub.delete()\n\n # add subscriptions for some pieces of vehicle data\n wva.get_subscription(\"speed\").create(\"vehicle/data/VehicleSpeed\", interval=3)\n wva.get_subscription(\"rpm\").create(\"vehicle/data/EngineSpeed\", interval=5)\n\n # receive vehicle data and print it\n def data_received(data):\n print(\"<- {}\".format(data))\n\n es = wva.get_event_stream()\n es.add_event_listner(data_received)\n es.enable()\n\nSample vehicle data\n~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n from wva import WVA\n from wva.exceptions import WVAHttpServiceUnavailableError\n\n wva = WVA(\"\", \"user\", \"password\")\n\n # print out all available data elements and whether\n # they currently have data or not\n for name, element in wva.get_vehicle_data_elements().items():\n try:\n curval = element.sample()\n except WVAHttpServiceUnavailableError:\n print(\"{} (Unavailable)\".format(name))\n else:\n print(\"{} = {} at {}\".format(name, curval.value, curval.timestamp.ctime()))\n\nMake direct web services calls\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n from wva import WVA\n\n wva = WVA(\"\", \"user\", \"password\")\n\n client = wva.get_http_client()\n\n # write a hello.py file to the python filesystem\n client.put(\"/files/userfs/WEB/python/hello.py\".format(relpath), \"print 'Hello, World!'\\n\")\n\n # print the contents of hello.py on the target to the screen\n print(client.get(\"/files/userfs/WEB/python/hello.py\"))\n\n # delete hello.py\n client.delete(\"/files/userfs/WEB/python/hello.py\")\n\nContributing and Developer Information\n--------------------------------------\n\nContributions to the project are very welcome. Please submit any issues\nyou find on the github issue tracker. If you have a change you would\nlike to have included in the library, please submit a pull request.\n\nInformation for developers on coding style, how to run the tests, etc.\nmay be found in the `Developer's README `__.\n\nSupport\n-------\n\nThis library is in \"Alpha\" currently and is not tested beyond the unit\ntests included in the code and basic developer testing. Prior to a 1.0\nrelease, the APIs may change in backwards incompatible ways at each\nminor revision.\n\nIf you run into issues, please create an issue on the project's `Github\nPage `__.\n\nLicense\n-------\n\nThis software is open-source. Copyright (c), Digi International Inc.,\n2015.\n\nThis Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\nfile, you can obtain one at http://mozilla.org/MPL/2.0/.\n\nDigi, Digi International, the Digi logo, the Digi website, and Digi\nDevice Cloud are trademarks or registered trademarks of Digi\nInternational, Inc. in the United States and other countries worldwide.\nAll other trademarks are the property of their respective owners.\n\nTHE SOFTWARE AND RELATED TECHNICAL INFORMATION IS PROVIDED \"AS IS\"\nWITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT\nLIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\nPURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL DIGI OR ITS SUBSIDIARIES\nBE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\nACTION IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE AND TECHNICAL INFORMATION HEREIN, INCLUDING\nALL SOURCE AND OBJECT CODES, IRRESPECTIVE OF HOW IT IS USED. YOU AGREE\nTHAT YOU ARE NOT PROHIBITED FROM RECEIVING THIS SOFTWARE AND TECHNICAL\nINFORMATION UNDER UNITED STATES AND OTHER APPLICABLE COUNTRY EXPORT\nCONTROL LAWS AND REGULATIONS AND THAT YOU WILL COMPLY WITH ALL\nAPPLICABLE UNITED STATES AND OTHER COUNTRY EXPORT LAWS AND REGULATIONS\nWITH REGARD TO USE AND EXPORT OR RE-EXPORT OF THE SOFTWARE AND TECHNICAL\nINFORMATION.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/digidotcom/python-wvalib", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "wva", "package_url": "https://pypi.org/project/wva/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/wva/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/digidotcom/python-wvalib" }, "release_url": "https://pypi.org/project/wva/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Python API/CLI for the Digi Wireless Vehicle Adapter (WVA)", "version": "0.1.0" }, "last_serial": 1996198, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6ddaa8c76a4b37754c4f146fcaa3ac33", "sha256": "1d69e51a11320c137a340026e0f32633b6068bf00c06029f7327d125caacdbbd" }, "downloads": -1, "filename": "wva-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6ddaa8c76a4b37754c4f146fcaa3ac33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22421, "upload_time": "2015-03-31T21:07:25", "url": "https://files.pythonhosted.org/packages/d6/69/43e6e3b0f9ae5efd5ff645990b27fbebcc8f4d68d8c060b1446904853add/wva-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6ddaa8c76a4b37754c4f146fcaa3ac33", "sha256": "1d69e51a11320c137a340026e0f32633b6068bf00c06029f7327d125caacdbbd" }, "downloads": -1, "filename": "wva-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6ddaa8c76a4b37754c4f146fcaa3ac33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22421, "upload_time": "2015-03-31T21:07:25", "url": "https://files.pythonhosted.org/packages/d6/69/43e6e3b0f9ae5efd5ff645990b27fbebcc8f4d68d8c060b1446904853add/wva-0.1.0.tar.gz" } ] }