semvec/pypi-packages huggingface dataset:
pybravia 0.4.1
Python async library for remote control of Sony Bravia TVs 2013 and newer.
License: MIT
Requires Python: >=3.10

# pybravia

<a href="https://pypi.org/project/pybravia/"><img src="https://img.shields.io/pypi/v/pybravia" alt="PyPi release"></a> <img src="https://img.shields.io/github/actions/workflow/status/Drafteed/pybravia/ci.yml?branch=master" alt="GitHub Workflow Status"> <img src="https://img.shields.io/github/license/Drafteed/pybravia" alt="MIT License">

Python Bravia provides an easy-to-use async interface for controlling of Sony Bravia TVs 2013 and newer.

This library primarily being developed with the intent of supporting [Home Assistant](https://www.home-assistant.io/integrations/braviatv/).

For more information, take a look at [BRAVIA Professional Display Knowledge Center](https://pro-bravia.sony.net/develop/).

## Requirements

This library supports Python 3.10 and higher.

## Installation

```sh
pip install pybravia
```

## Connect and API usage

### With PSK (recommended)

```py
import asyncio
import logging

from pybravia import BraviaClient, BraviaError

HOST = "192.168.1.20"
PSK = "sony"

logging.basicConfig(level=logging.DEBUG)


async def main():
    """Example of connect with PSK."""
    async with BraviaClient(HOST) as client:
        try:
            connected = await client.connect(psk=PSK)
            info = await client.get_system_info()

            print(info)

            await client.volume_up()
        except BraviaError:
            print("Could not connect")


loop = asyncio.new_event_loop()
loop.run_until_complete(main())
loop.close()
```

### With PIN code

#### Start pairing process and display PIN on the TV

```py
import asyncio
import logging

from pybravia import BraviaClient, BraviaError

HOST = "192.168.1.20"
CLIENTID = "MyClientID"
NICKNAME = "MyNicknameID"

logging.basicConfig(level=logging.DEBUG)


async def main():
    """Pairing process initialization example."""
    async with BraviaClient(HOST) as client:
        try:
            await client.pair(CLIENTID, NICKNAME)
        except BraviaError:
            print("Could not connect")


loop = asyncio.new_event_loop()
loop.run_until_complete(main())
loop.close()
```

#### Connect and usage

```py
import asyncio
import logging

from pybravia import BraviaClient, BraviaError

HOST = "192.168.1.20"
CLIENTID = "MyClientID"
NICKNAME = "MyNicknameID"
PIN = "2170"

logging.basicConfig(level=logging.DEBUG)


async def main():
    """Example of connect with PIN."""
    async with BraviaClient(HOST) as client:
        try:
            connected = await client.connect(pin=PIN, clientid=CLIENTID, nickname=NICKNAME)
            info = await client.get_system_info()

            print(info)

            await client.volume_up()
        except BraviaError:
            print("Could not connect")


loop = asyncio.new_event_loop()
loop.run_until_complete(main())
loop.close()
```

## License

[The MIT License (MIT)](LICENSE)
gepa-dapo-grn 0.1.0
GEPA-aware DAPO reinforcement learning with optional Global Response Normalization
License: MIT
Requires Python: >=3.9

# gepa-dapo-grn

`gepa-dapo-grn` is a standalone reinforcement learning engine for research workflows. It is
GEPA-shaped but GEPA-agnostic, providing DAPO optimization, curriculum tracking, safety
controls, and optional Global Response Normalization (GRN) without coupling to any external
GEPA repositories.

## What this library is

- **Standalone RL engine** with a stable public API under `gepa_dapo_grn.*`.
- **GEPA-shaped but GEPA-agnostic**: feedback is just structured reward/tag dictionaries.
- **Supports DAPO + curriculum + safety + GRN** with conservative defaults and GRN disabled
  unless explicitly enabled.

## Install

```bash
pip install gepa-dapo-grn
```

Optional extras:

- `gepa-dapo-grn[hf]` adds HuggingFace integration helpers.
- `gepa-dapo-grn[dev]` installs test and formatting tools.

## Minimal example (CPU-safe)

```python
from gepa_dapo_grn import (
    DAPOTrainer,
    DAPOConfig,
    RewardMixerConfig,
    GEPAFeedback,
)

# minimal fake feedback example
fb = GEPAFeedback(
    rewards={"truth": 1.0, "harm": -0.5},
    tags={},
    meta={"task_id": "demo"},
    abstained=False,
)
```

## Public API

Public API is defined by `__init__.py` exports. Anything not exported there is considered
internal and may change without notice.

## What this library intentionally does NOT do

- ship datasets
- provide prompt logic
- implement scoring logic
- encode opinions on ethics or safety policy

## Versioning policy

This project follows semantic versioning:

- `0.x.y` while interfaces are still evolving
- bump **minor** for interface changes
- bump **patch** for bugfixes only

See [CHANGELOG.md](CHANGELOG.md) for release notes.

## PyPI publishing checklist

1. Install build and upload tooling:

   ```bash
   pip install build twine
   ```

2. Build artifacts:

   ```bash
   python -m build
   ```

3. Check distributions:

   ```bash
   twine check dist/*
   ```

4. Upload to TestPyPI first:

   ```bash
   twine upload --repository testpypi dist/*
   ```

5. Install from TestPyPI to validate:

   ```bash
   pip install -i https://test.pypi.org/simple/ gepa-dapo-grn
   ```

6. Upload to PyPI:

   ```bash
   twine upload dist/*
   ```

## License

MIT (see [LICENSE](LICENSE)).