semvec/pypi-packages huggingface dataset:
rokuecp 0.19.5
Asynchronous Python client for Roku (ECP)
License: MIT
Requires Python: <4.0,>=3.9
Keywords: roku, ecp, api, async, client

# Python: Roku (ECP) Client

Asynchronous Python client for Roku devices using the [External Control Protocol](https://developer.roku.com/docs/developer-program/debugging/external-control-api.md).

## About

This package allows you to monitor and control Roku devices.

## Installation

```bash
pip install rokuecp
```

## Usage

```python
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](https://python-poetry.org) dependency
manager. But also relies on the use of NodeJS for certain checks during
development.

You need at least:

- Python 3.9+
- [Poetry](https://python-poetry.org/docs/#installation)
- NodeJS 20+ (including NPM)

To install all packages, including all development requirements:

```bash
npm install
poetry install
```

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

```bash
poetry run pre-commit run --all-files
```

To run just the Python tests:

```bash
poetry run pytest
```
pyrage 1.3.0
Python bindings for rage (age in Rust)
License: MIT
Requires Python: >=3.9

pyrage
======

[![CI](https://github.com/woodruffw/pyrage/actions/workflows/ci.yml/badge.svg)](https://github.com/woodruffw/pyrage/actions/workflows/ci.yml)
[![PyPI version](https://badge.fury.io/py/pyrage.svg)](https://badge.fury.io/py/pyrage)
[![PyPI Downloads](https://static.pepy.tech/badge/pyrage)](https://pepy.tech/projects/pyrage)

Python bindings for the [Rust implementation of `age`](https://github.com/str4d/rage).

## Index

* [Installation](#installation)
* [Usage](#usage)
* [Development](#development)
* [Licensing](#licensing)

## Installation

You can install `pyrage` with `pip`:

```console
$ python -m pip install pyrage
```

[PEP 561](https://peps.python.org/pep-0561/)-style type stubs are also available:

```console
$ python -m pip install pyrage-stubs
```

See the [development instructions](#development) below for manual installations.

## Usage

### Identity generation (x25519 only)

```python
from pyrage import x25519

ident = x25519.Identity.generate()

# returns the public key
ident.to_public()

# returns the private key
str(ident)
```

### Identity-based encryption and decryption

```python
from pyrage import encrypt, decrypt, ssh, x25519

# load some identities
alice = x25519.Identity.from_str("AGE-SECRET-KEY-...")
bob = ssh.Identity.from_buffer(b"---BEGIN OPENSSH PRIVATE KEY----...")

# load some recipients
carol = x25519.Recipient.from_str("age1z...")
dave = ssh.Recipient.from_str("ssh-ed25519 ...")

# encryption
encrypted = encrypt(b"bob can't be trusted", [carol, dave, alice.to_public()])

# decryption
decrypted = decrypt(encrypted, [alice, bob])
```

### Passphrase encryption and decryption

```python
from pyrage import passphrase

encrypted = passphrase.encrypt(b"something secret", "my extremely secure password")
decrypted = passphrase.decrypt(encrypted, "my extremely secure password")
```

## Development

```console
$ source env/bin/activate
$ make develop
```

## Licensing

`pyrage` is released and distributed under the terms of the [MIT License](./LICENSE).