Skip to main content

Asynchronous library to the Roku media player. Easy, breezy, beautiful.

Project description

Screw remotes. Control your Roku via Python. Asynchronously.

Installation

pip install aioroku

Usage

Requires Python 3.5 and uses asyncio and aiohttp.

 import asyncio
 import aiohttp
 from aioroku import AioRoku

def get_args():
    arg_parser = ArgumentParser()
    arg_parser.add_argument('--roku_ip', '-r', metavar="ROKU_IP_ADDRESS")
    args = arg_parser.parse_args()
    return args.roku_ip

 async def main():
     async with aiohttp.ClientSession() as session:
         my_roku = AioRoku(host, session)
         print(await my_roku.active_app)

 if __name__ == '__main__':
     roku_ip = get_args()
     loop = asyncio.get_event_loop()
     loop.run_until_complete(main(roku_ip))
     loop.close()

TODO

  • Docs

  • Tests, of course.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aioroku-1.0.0.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

aioroku-1.0.0-py2.py3-none-any.whl (13.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page