{ "info": { "author": "Paulo Mateus Moura da Silva (SrMouraSilva)", "author_email": "mateus.moura@hotmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Multimedia :: Sound/Audio" ], "description": "Pedal Pi - WebService\n=====================\n\n.. image:: https://travis-ci.org/PedalPi/WebService.svg?branch=master\n :target: https://travis-ci.org/PedalPi/WebService\n :alt: Build Status\n\n.. image:: https://codecov.io/gh/PedalPi/WebService/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/PedalPi/WebService\n :alt: Code coverage\n\n.. image:: https://landscape.io/github/PedalPi/WebService/master/landscape.svg?style=flat\n :target: https://landscape.io/github/PedalPi/WebService/master\n :alt: Code Health\n\n**Pedal Pi - WebService** is a Pedal Pi component that offers a\nPedal Pi management over REST + WebSocket.\n\nWebService also supports auto discover: by publishing to the network using *zeroconf*,\nit offers a certain level of location transparency, allowing applications to connect to\nthe WebService with minimal user effort.\n\n**Documentation:**\n http://pedalpi.github.io/WebService/\n\n**Code:**\n https://github.com/PedalPi/WebService\n\n**Python Package Index:**\n https://pypi.org/project/PedalPi-WebService\n\n**License:**\n `Apache License 2.0`_\n\n.. _Apache License 2.0: https://github.com/PedalPi/WebService/blob/master/LICENSE\n\n\nUse\n---\n\nInstallation and dependencies\n*****************************\n\nMost dependencies will be installed through `pip`\n\n.. code-block:: bash\n\n pip install PedalPi-WebService\n\nWebService, for its publication in the network for auto discover, needs the installation\nof `pybonjour-python3`_. On debian/ubuntu-based systems, run:\n\n.. code-block:: bash\n\n sudo apt-get install libavahi-compat-libdnssd1\n pip3 install git+https://github.com/depl0y/pybonjour-python3\n\n.. _pybonjour-python3: https://github.com/depl0y/pybonjour-python3\n\nConfiguring the component\n*************************\n\nPedalPi components enable the extension of `Pedal Pi - Application`_.\nThrough them, opening services are offered. A list of components can be found in the `Components repository`_.\n\nTo use this component, two steps are required:\n\n.. _Pedal Pi - Application: http://pedalpi-application.readthedocs.io/en/latest/\n.. _Components repository: https://github.com/PedalPi/Components#list\n\n1. Registering the webservice in Application\n++++++++++++++++++++++++++++++++++++++++++++\n\nThe registration must occur before application initialization (``application.start``)\n\n.. code-block:: python\n\n from application.application import Application\n application = Application(path_data=\"data/\", address='localhost')\n\n from webservice.webservice import WebService\n application.register(WebService(application, port))\n\n2. Initialization of the web server\n+++++++++++++++++++++++++++++++++++\n\nThe Application documentation suggests using `signal.pause` so\nthat the program does not terminate at the end of initialization:\n`signal.pause` causes the program to be terminated only when it is\nrequested (`Ctrl + C`).\n\nWhen we use PedalPi-WebService, we must replace the use of `signal.pause`\nby initializing the web server. This is done using the following\nlines of code:\n\n.. code-block:: python\n\n application.start()\n\n import tornado\n try:\n tornado.ioloop.IOLoop.current().start()\n except KeyboardInterrupt:\n application.stop()\n\n # Not more necessary\n #from signal import pause\n #try:\n # pause()\n #except KeyboardInterrupt:\n # application.stop()\n\nConfig file\n+++++++++++\n\nThe code for starting the Application using the WebService component\nlook like the following code:\n\n.. code-block:: python\n\n from application.application import Application\n application = Application(path_data=\"data/\", address='localhost')\n\n from webservice.webservice import WebService\n application.register(WebService(application, port))\n\n application.start()\n\n import tornado\n tornado.ioloop.IOLoop.current().start()\n\nAPI\n---\n\nRest\n****\n\nAPI documentation can be found at http://pedalpi.github.io/WebService/\n\nWebSocket\n*********\n\nCommunication via WebService basically consists of receiving updates\nabout the state of the application.\n\nWebService API documentation can be found at http://pedalpi.github.io/WebService/#websocket\n\nUsing in your client\n--------------------\n\nWebService disposes the Application features in a web service. These projects uses it for control:\n\n* `Apk`_: App controller for smart devices and navigators.\n\n.. _Apk: https://github.com/PedalPi/Apk\n\nIf you are using too, please, send a pull request for this project.\n\n\nMaintenance\n-----------\n\nDocumentation\n*************\n\n.. code-block:: bash\n\n # Installing dependencies\n npm install -g aglio\n\n # Generate doc\n cd docs/\n aglio -i documentation.apib --theme-variables streak --theme-template triple -o index.html\n\n # View documentation\n firefox index.html\n\nTest\n****\n\n.. code-block:: bash\n\n # if number != 0 error\n sh -c 'coverage3 run --source=webservice wstest/config.py test'; echo $?\n\n coverage3 run --source=webservice wstest/config.py test\n coverage3 report\n coverage3 html\n firefox htmlcov/index.html\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/PedalPi/WebService", "keywords": "pedal-pi mod-host lv2 audio plugins-manager pedal-pi-component", "license": "Apache Software License v2", "maintainer": "", "maintainer_email": "", "name": "PedalPi-WebService", "package_url": "https://pypi.org/project/PedalPi-WebService/", "platform": "Linux", "project_url": "https://pypi.org/project/PedalPi-WebService/", "project_urls": { "Homepage": "https://github.com/PedalPi/WebService" }, "release_url": "https://pypi.org/project/PedalPi-WebService/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "WebService (REST and WebSocket) to access and controller your Pedal Pi pedals set configurations", "version": "0.3.0" }, "last_serial": 2915456, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "3d620be94969be458785efca614c386f", "sha256": "ccec3395480268289c7fbc54985cfe4c25ca10d55226d1697c8098080e1a86d8" }, "downloads": -1, "filename": "PedalPi-WebService-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3d620be94969be458785efca614c386f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16628, "upload_time": "2017-05-14T00:57:23", "url": "https://files.pythonhosted.org/packages/32/79/b4d6842193c69893baeb2a39ccf9aa70237fad497376b2e90c4e95fa89f4/PedalPi-WebService-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "3a8cc3e9043dc835c7fd34b562e93cee", "sha256": "edd584a0c01812622c2128d10a545bea18fe13eb7dbd89813db3623697b2a3a3" }, "downloads": -1, "filename": "PedalPi-WebService-0.3.0.tar.gz", "has_sig": false, "md5_digest": "3a8cc3e9043dc835c7fd34b562e93cee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17366, "upload_time": "2017-06-01T02:37:22", "url": "https://files.pythonhosted.org/packages/02/16/c456eb372e748f1111872ad1b4fe1868e479cb036336bf781e563ecddad4/PedalPi-WebService-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3a8cc3e9043dc835c7fd34b562e93cee", "sha256": "edd584a0c01812622c2128d10a545bea18fe13eb7dbd89813db3623697b2a3a3" }, "downloads": -1, "filename": "PedalPi-WebService-0.3.0.tar.gz", "has_sig": false, "md5_digest": "3a8cc3e9043dc835c7fd34b562e93cee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17366, "upload_time": "2017-06-01T02:37:22", "url": "https://files.pythonhosted.org/packages/02/16/c456eb372e748f1111872ad1b4fe1868e479cb036336bf781e563ecddad4/PedalPi-WebService-0.3.0.tar.gz" } ] }