sounds.client

Attributes

COOKIE_FILE

Classes

SoundsClient

A client to interact with the Sounds API

Module Contents

sounds.client.COOKIE_FILE
class sounds.client.SoundsClient(username: str | None = None, password: str | None = None, session: aiohttp.ClientSession | None = None, cookie_file_location: str | pathlib.Path = COOKIE_FILE, timezone: datetime.tzinfo | None = None, logger: logging.Logger | None = None, log_level: int | None = None, mock_session: bool = False, **kwargs)

A client to interact with the Sounds API

username = None
password = None
login_details_provided = False
current_station: sounds.models.Station | None = None
current_stream: sounds.models.Stream | None = None
current_segment: sounds.models.Segment | None = None
timeout
mock_session = False
managing_session
cookie_store
auth
schedules
user
requests
streaming
stations
personal
setLogger(log_level=None)
async login() bool

Signs into BBC Sounds.

Parameters:
  • username – The username or email address to sign in with

  • password – The password to sign in with

Returns:

True if successfully logged in, False otherwise

Return type:

bool

Raises:
save_cookies()
load_cookies()

Check if we have a cookie present.

async get_menu(include_local_stations: bool = False, recommendations: sounds.personal.MenuRecommendationOptions = MenuRecommendationOptions.INCLUDE)

Get the main Sounds menu.

async logout()
async close()