Skip to main content

A library for interacting with BBC Radio stations and streams

Project description

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 but exists as a standalone library.

Features

✅ Signing into a BBC Sounds account
✅ Listing current station programming
✅ Obtaining a stream to listen to a station
✅ Getting the current and previous segments (typically songs) on a station

Not implemented

❌ Pausing or rewinding live radio
❌ Displaying and listening to previous shows

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

import asyncio
from sounds import exceptions
from sounds.client import SoundsClient

async def main():
    try:
        async with SoundsClient() as client:
            if await client.auth.authenticate(username, password):
                stations = await client.stations.get_stations()
                bbc_6music = await client.stations.get_station("bbc_6music", include_stream=True)
                stream = bbc_6music.stream.uri
                schedule = bbc_6music.schedule
    except exceptions.LoginFailedError:
        ...
    except exceptions.APIResponseError:
        ...
    except exceptions.NetworkError:
        ...

asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auntie_sounds-1.0.0b3.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auntie_sounds-1.0.0b3-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file auntie_sounds-1.0.0b3.tar.gz.

File metadata

  • Download URL: auntie_sounds-1.0.0b3.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for auntie_sounds-1.0.0b3.tar.gz
Algorithm Hash digest
SHA256 f97d5a6669809fde68bf00286aa1ddb931338a9f25c17d6fef21e7043449a0c3
MD5 ac96b4f12fe7efebf84fcdbc50d05a5b
BLAKE2b-256 6876fbebb9ab93a292ad95648b11fa1a2a25d4212018b0becb6c054327539040

See more details on using hashes here.

File details

Details for the file auntie_sounds-1.0.0b3-py3-none-any.whl.

File metadata

File hashes

Hashes for auntie_sounds-1.0.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 d9886a09a53ac4db4191aeed3a215c41b27c2c0e3bcea68ddc15d31b27815e01
MD5 8bdc3f01c4865286859753118f0839d4
BLAKE2b-256 f83d701639b35f37adeadfe8225048b2067f12d7533e19345b2960eb92b45e35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page