Metadata-Version: 2.3
Name: auntie-sounds
Version: 3.0.0
Summary: A library for interacting with BBC Radio stations and streams
Requires-Dist: aiohttp>=3.14
Requires-Dist: appdirs
Requires-Dist: beautifulsoup4
Requires-Dist: mashumaro
Requires-Dist: yarl>=1.25.1
Requires-Python: >=3.14
Description-Content-Type: text/markdown

<img src="assets/logo.png" height="200">

# Auntie Sounds

A library for interacting with BBC radio stations via an interface to BBC Sounds. It was written to be used for the BBC Sounds provider for [Music Assistant](https://music-assistant.io/) but exists as a standalone library.

## Features

✅ Signing into a BBC Sounds account<br />
✅ Listing current station programming<br />
✅ Obtaining a stream to listen to a local, national, or international radio station<br />
✅ Getting the current and previous segments (typically songs) on a station<br />
✅ Displaying and getting streams for previous catch-up radio or podcast content
✅ Searching the Sounds catalogue

## Notes
- It is written as an async library
- A BBC account is not required for most actions, but as BBC region-locks streams and is turning off non-UK access soon, is it the supported way to use it

## Example Usage

```python
import asyncio
from auntie_sounds import exceptions
from auntie_sounds.client import SoundsClient

async def main():
    try:
        # As a logged-in context manager:
        async with SoundsClient(username="username", password="password") as client:
            if await client.login():
                stations = await client.stations.get_stations()
                schedule = await client.schedules.get_schedule(
                    "bbc_6music", date="2025-10-26"
                )
                bbc_6music = await client.stations.get_station(
                    "bbc_6music", include_stream=True
                )

    except exceptions.LoginFailedError:
        ...
    except exceptions.APIResponseError:
        ...
    except exceptions.NetworkError:
        ...
    except exceptions.SoundsException:
        ...

    # Or, without a context manager and not logged in:
    client = await SoundsClient.create()
    try:
        episodes = await client.content.get_podcast_episodes("example_pid")
        print(episodes)
    finally:
        await client.close()


asyncio.run(main())
```

### Documentation

Further documentation can be found in the documentation: https://auntie-sounds.readthedocs.io/en/main/