Skip to content

ctalkington/python-rokuecp

Folders and files

NameName
Last commit message
Last commit date
Jun 10, 2023
Dec 9, 2024
May 8, 2024
May 8, 2024
May 8, 2024
May 1, 2020
Jun 10, 2023
Feb 3, 2022
Dec 9, 2024
Jun 10, 2023
Jun 10, 2023
May 1, 2020
May 16, 2024
Dec 12, 2024
Dec 12, 2024
Dec 12, 2024
Dec 12, 2024
Dec 9, 2024

Repository files navigation

Python: Roku (ECP) Client

Asynchronous Python client for Roku devices using the External Control Protocol.

About

This package allows you to monitor and control Roku devices.

Installation

pip install rokuecp

Usage

import asyncio

from rokuecp import Roku


async def main():
    """Show example of connecting to your Roku device."""
    async with Roku("192.168.1.100") as roku:
        print(roku)


if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

Setting up development environment

This Python project is fully managed using the Poetry dependency manager. But also relies on the use of NodeJS for certain checks during development.

You need at least:

  • Python 3.9+
  • Poetry
  • NodeJS 20+ (including NPM)

To install all packages, including all development requirements:

npm install
poetry install

As this repository uses the pre-commit framework, all changes are linted and tested with each commit. You can run all checks and tests manually, using the following command:

poetry run pre-commit run --all-files

To run just the Python tests:

poetry run pytest