semvec/pypi-packages huggingface dataset:
mopidy-homeassistant-mixer 0.1.3
Mopidy mixer for Home Assistant media player control


# Mopidy Home Assistant Mixer

The **Mopidy Home Assistant Mixer** is an extension that allows Mopidy to interface with Home Assistant's media player entities for volume control. By using the power of Home Assistant and its WebSocket API, this mixer extension ensures that volume changes made in Home Assistant are reflected in Mopidy and vice versa.

With this extension, Mopidy can seamlessly control the volume of any Home Assistant-supported media player entity, such as smart speakers, AV receivers, or TV audio systems, allowing full integration between the two platforms.

## Features

- **Two-Way Volume Sync**: Mopidy automatically syncs its volume with the volume level of the specified media player entity in Home Assistant.
- **Real-Time Volume Updates**: Any volume changes in Home Assistant are instantly reflected in Mopidy via WebSocket updates.
- **Mopidy Volume Control**: Changes made in Mopidy are sent to Home Assistant to adjust the volume of the specified media player.
- **Easy Configuration**: Just point the mixer to a Home Assistant media player entity, and you're ready to go.

## Demo

Home Assistant entity (media_player) is on the left and Mopidy web interface (IRIS) on the right.

![Demo GIF](https://github.com/gorzelak/mopidy-homeassistant-mixer/raw/main/demo.gif)


## Requirements

- **Mopidy >= 3.0**
- **Home Assistant (with a configured media player entity)**
- **Python >= 3.6**

## Installation

To install the Mopidy Home Assistant Mixer, run:

```bash
pip install mopidy-homeassistant-mixer
```

## Configuration

Once the extension is installed, you need to configure it by adding the following section to your Mopidy configuration file (`mopidy.conf`):

```ini
[homeassistant]
enabled = true
api_url = http://your-homeassistant-url:8123
api_token = your-long-lived-access-token
media_player_entity = media_player.your_entity_id

api_url: The URL of your Home Assistant instance, including the port.
api_token: A long-lived access token generated in Home Assistant. You can create one by going to Profile > Long-Lived Access Tokens.
media_player_entity: The entity ID of the media player in Home Assistant that you want to control (e.g., media_player.onkyo_receiver).
```

### Usage

Once configured, Mopidy will automatically sync its volume with the specified Home Assistant media player entity. Volume changes made in either Mopidy or Home Assistant will be reflected in both systems.

- **To control volume from Mopidy**: Use Mopidy's normal volume control commands (e.g., via MPD, Iris, or another front-end). Mopidy will send the new volume level to Home Assistant.
- **To control volume from Home Assistant**: Adjust the volume in Home Assistant's UI for the specified media player. The change will be sent to Mopidy, and the volume will sync in real-time.

### Changelog

## v0.1.3
- Incremented version to fix failing pipeline.

## v0.1.2
- Initial release of the Mopidy Home Assistant Mixer.
- Support for real-time volume sync between Mopidy and Home Assistant media players.
- Added WebSocket-based communication for efficient updates.
chembl-sqlalchemy 1.0.35
SQLAlchemy ORM schema for ChEMBL.
Requires Python: >=3.9

# chembl-sqlalchemy

SQLAlchemy ORM models for the [ChEMBL](https://www.ebi.ac.uk/chembl/) database, enabling programmatic access to ChEMBL data using Python.

This package allows you to query and explore ChEMBL bioactivity data using SQLAlchemy, without having to manually define the table schemas yourself.

---

## Installation

Install via pip:

```bash
pip install chembl-sqlalchemy
```

---

## Usage

```python
from chembl_sqlalchemy import Activities
from sqlalchemy import create_engine, select, sessionmaker

# Connect to a local ChEMBL SQLite database
engine = create_engine("sqlite:///chembl_35.db")
Session = sessionmaker(bind=engine)
session = Session()

# Example query: Get first 1000 non-null pChEMBL values
query = (
    select(Activities.molregno, Activities.pchembl_value, Activities.standard_type)
    .where(Activities.pchembl_value.isnot(None))
    .limit(1000)
)

results = session.execute(query).fetchall()

for molregno, pchembl_value, standard_type in results:
    print(molregno, pchembl_value, standard_type)
```

---

## Versioning

The versioning scheme is:

```
MAJOR.MINOR.CHEMBL_VERSION
```

For example:

* `1.0.35` → First release of the ORM wrapper
* `1.1.35` → Minor enhancements to the ORM wrapper

Each package version explicitly corresponds to a specific ChEMBL database version to avoid compatibility issues.

---

## Database Files

The package does **not** include the ChEMBL database file itself. You can download the corresponding SQLite file from the [ChEMBL downloads page](https://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/latest/).

Place it in your project directory or reference it by path when creating the SQLAlchemy engine.

---

## License

This project is licensed under the MIT License.