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.1.2.tar.gz (270.7 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.1.2-py3-none-any.whl (297.0 kB view details)

Uploaded Python 3

File details

Details for the file auntie_sounds-1.1.2.tar.gz.

File metadata

  • Download URL: auntie_sounds-1.1.2.tar.gz
  • Upload date:
  • Size: 270.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.8

File hashes

Hashes for auntie_sounds-1.1.2.tar.gz
Algorithm Hash digest
SHA256 f11e807a832c6cd875dede91832ba38ef75696c38b6f07767e0f90fbe591e481
MD5 11c1e06fd63f42ec653ef86bbada8fbf
BLAKE2b-256 cdf7ba58be4c05c08bb4df11ea4659260d4108a11a590fc5a8f3b0691e0783c3

See more details on using hashes here.

File details

Details for the file auntie_sounds-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for auntie_sounds-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5bf0261b234176d172a5a93f15798277c5f431e38108b301f6a28317e2fa288d
MD5 a7494eb134bd703df3c21835257979cb
BLAKE2b-256 f598836db34114e422f35913ce090e68fdc1f86434380c5136d34eb30b1be338

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