{ "info": { "author": "Jeremy Carbaugh", "author_email": "jcarbaugh@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "python-roku\n===========\n\nScrew remotes. Control your `Roku `_ via Python.\n\n.. image:: https://travis-ci.org/jcarbaugh/python-roku.svg?branch=master\n :target: https://travis-ci.org/jcarbaugh/python-roku\n\n\nInstallation\n------------\n\n::\n\n pip install python-roku\n\n\nUsage\n-----\n\n\nThe Basics\n~~~~~~~~~~\n\nTo start, import the Roku object and create it with the IP of your Roku.\n::\n\n >>> from roku import Roku\n >>> roku = Roku('192.168.10.163')\n\nThe Roku object has a method for each of the buttons on the remote.\n::\n\n >>> roku.home()\n >>> roku.right()\n >>> roku.select()\n\nTo see a full list of available commands, use the *commands* property.\n::\n\n >>> roku.commands\n ['back', 'backspace', 'down', 'enter', 'forward', 'home', 'info', 'left', 'literal', 'play', 'replay', 'reverse', 'right', 'search', 'select', 'up']\n\nIf you are following along on your home network and are connected to your Roku, you should see it doing stuff. *Cool!*\n\n\nApps\n~~~~\n\nThe *apps* property will return a list of the applications on your device.\n::\n\n >>> roku.apps\n [, , ]\n\nApps have *id*, *name*, and *version* properties.\n::\n\n >>> app = roku.apps[0]\n >>> print app.id, app.name, app.version\n 2285 Hulu Plus 2.7.6\n\nYou can get an individual app from the Roku object by either its *name* or *id*.\n::\n\n >>> roku['Hulu Plus']\n \n >>> roku[2285]\n \n\nSeeing the reference to this Hulu Plus app makes me really want to watch the latest episode of `Nashville `_. Let's launch it!\n::\n\n >>> hulu = roku['Hulu Plus']\n >>> hulu.launch()\n\nAgain, if you are following along at home, you should see that your Roku has launched the Hulu Plus app. Want to see the app's entry in the Channel Store?\n::\n\n >>> hulu.store()\n\nYou can also get the app's icon.\n::\n\n >>> with open('hulu.png', 'w') as f:\n ... f.write(hulu.icon)\n\n\nEntering Text\n~~~~~~~~~~~~~\n\nOkay, I've already seen all of the available episodes of Nashville, so I'm going to search for *Stargate*. With the search open and waiting for text entry::\n\n >>> roku.literal('stargate')\n\nThis will iterate over each character, sending it individually to the Roku.\n\n\nAdvanced Stuff\n--------------\n\n\nDiscovery\n~~~~~~~~~\n\nRoku devices can be discovered using `SSDP `_. A class method is available on the Roku object that will return Roku object instances for each device found on the same network.\n::\n\n >>> Roku.discover()\n []\n\nIt may take a few seconds for a device to be found. You can call discover again or change the *timeout* or *retries* parameters on the discover method. This will take longer, but will find more devices.\n::\n\n >>> Roku.discover(timeout=10)\n [, ]\n\nThanks to `Dan Krause `_ for his `SSDP code `_.\n\n\nSensors\n~~~~~~~\n\nNewer Roku remotes have extra sensors built into them that measure acceleration, orientation, and other things.You can mimic these sensors using the provided helper methods.\n::\n\n >>> roku.orientation(1, 1, 1)\n\nThe parameters to all of the sensor methods are x, y, and z values. Available methods include:\n\n* acceleration - in each dimension relative to free fall measured in meters/sec^2\n* magnetic - magnetic field strength in microtesla\n* orientation - angular displacement from flat/level and north in radians\n* rotation - angular rotation rate about each axis using the right hand rule in radians/sec\n\n\nTouch\n~~~~~\n\nSome Roku input devices support touch. The parameters to the *touch* method are the *x* and *y* coordinates of the touch.\n::\n\n >>> roku.touch(10, 40)\n\nYou can change the event triggered by passing an optional *op* parameter.\n::\n\n >>> roku.touch(10, 40, op='up')\n\nSupported events are:\n\n* down\n* up\n* press (down and up)\n* move\n* cancel\n\nMultitouch is not yet supported in this package.\n\n\nGeneric Input\n~~~~~~~~~~~~~\n\nBoth the sensor and touch methods rely on the generic *input* method for sending data to a running application. If you refuse to use covenience methods because they make people lazy and weak, you can call the sensor and touch methods directly.\n::\n\n >>> params = {'touch.0.x': 10, 'touch.0.y': 20, 'touch.0.op': 'press'}\n >>> roku.input(params)\n\nMore information about input, touch, and sensors is available in the `Roku External Control docs `_.\n\n\nTODO\n----\n\n* Tests, of course.\n* Multitouch support.\n* A Flask proxy server that can listen to requests and forward them to devices on the local network. Control multiple devices at once, eh?\n* A server that mimics the Roku interface so you can make your own Roku-like stuff.\n* A task runner that will take a set of commands and run them with delays that are appropriate for most devices.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bah2830/python-roku", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "python-roku-custom", "package_url": "https://pypi.org/project/python-roku-custom/", "platform": "any", "project_url": "https://pypi.org/project/python-roku-custom/", "project_urls": { "Homepage": "https://github.com/bah2830/python-roku" }, "release_url": "https://pypi.org/project/python-roku-custom/4.3.0/", "requires_dist": null, "requires_python": "", "summary": "Client for the Roku media player", "version": "4.3.0" }, "last_serial": 5629297, "releases": { "3.1.4": [ { "comment_text": "", "digests": { "md5": "2baab14ac6234e9208d8fbda489b0ede", "sha256": "1c081050d33310eb47d8f12026fb4433b4317931af46e8d69f2e53154f478039" }, "downloads": -1, "filename": "python-roku-custom-3.1.4.tar.gz", "has_sig": false, "md5_digest": "2baab14ac6234e9208d8fbda489b0ede", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9379, "upload_time": "2017-06-25T01:38:35", "url": "https://files.pythonhosted.org/packages/6b/7d/e413dd8ee60d4490f8f45047f0209d01a79d8af57d383d630c2f839d9dec/python-roku-custom-3.1.4.tar.gz" } ], "4.0.0": [ { "comment_text": "", "digests": { "md5": "3f967c7c60dc942db9967ae9675f1108", "sha256": "ac27d4dae31a1b4d56c524f6adb01f21de9f3b2356d5885488a6bd983a67a19f" }, "downloads": -1, "filename": "python-roku-custom-4.0.0.tar.gz", "has_sig": false, "md5_digest": "3f967c7c60dc942db9967ae9675f1108", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9937, "upload_time": "2019-08-03T18:18:15", "url": "https://files.pythonhosted.org/packages/2b/f6/5e8fe2951ab8af3125238668add7d489f5f0a723f019880566e75189a124/python-roku-custom-4.0.0.tar.gz" } ], "4.1.0": [ { "comment_text": "", "digests": { "md5": "ca7f8f1a3e766aa2b474566b65151d9e", "sha256": "87b708439c7580717f4553b8b0b56bfd4e62235ede7ede35d2dd5c613cdedac3" }, "downloads": -1, "filename": "python-roku-custom-4.1.0.tar.gz", "has_sig": false, "md5_digest": "ca7f8f1a3e766aa2b474566b65151d9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9924, "upload_time": "2019-08-03T18:28:30", "url": "https://files.pythonhosted.org/packages/ae/cb/79f1a7150794ba44a3bfc2c2aabb09b0569d98e69df8e4c445ee0a6e180a/python-roku-custom-4.1.0.tar.gz" } ], "4.2.0": [ { "comment_text": "", "digests": { "md5": "d25b316731bb31ae49c76b7015d90321", "sha256": "eb16d3eff1c7b4e7ac6829d4f30956ad164137466485bf5a62523d7ccec01311" }, "downloads": -1, "filename": "python-roku-custom-4.2.0.tar.gz", "has_sig": false, "md5_digest": "d25b316731bb31ae49c76b7015d90321", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9499, "upload_time": "2019-08-03T18:35:11", "url": "https://files.pythonhosted.org/packages/86/5f/7cd8756fdeb846672237a9cc6dc0f482c6615234bcad2ffda0811c356899/python-roku-custom-4.2.0.tar.gz" } ], "4.3.0": [ { "comment_text": "", "digests": { "md5": "725048f254c37f2e950206351ff7a844", "sha256": "8eeaa09ff8e0ba88d3f6d27508aa0908b14e975f5375bea3eda02041d2ec2a7c" }, "downloads": -1, "filename": "python-roku-custom-4.3.0.tar.gz", "has_sig": false, "md5_digest": "725048f254c37f2e950206351ff7a844", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9514, "upload_time": "2019-08-03T22:14:36", "url": "https://files.pythonhosted.org/packages/0d/70/9172ed12dedbe6774cc1060878a563fb1a7081fbae8124187dcb9988d833/python-roku-custom-4.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "725048f254c37f2e950206351ff7a844", "sha256": "8eeaa09ff8e0ba88d3f6d27508aa0908b14e975f5375bea3eda02041d2ec2a7c" }, "downloads": -1, "filename": "python-roku-custom-4.3.0.tar.gz", "has_sig": false, "md5_digest": "725048f254c37f2e950206351ff7a844", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9514, "upload_time": "2019-08-03T22:14:36", "url": "https://files.pythonhosted.org/packages/0d/70/9172ed12dedbe6774cc1060878a563fb1a7081fbae8124187dcb9988d833/python-roku-custom-4.3.0.tar.gz" } ] }