Skip to main content

azuracast-sse-client

An SSE-driven Azuracast metadata client

Why this app

This client connects to an Azuracast SSE client and captures the high-frequency metadata updates from the Azuracast server. You supply a callback that will be given the current metadata. The client runs continuously until stopped.

Configuration

client = build_sse_client(servername, shortcode, downtimeDJName)
client.run(callback)
  • servername: the target Azuracast server name as a string.
  • shortcode: the radio station ID, from the station's profile page on the Azuracast server.
  • downtimeDJName: if you play tracks automatically from the library, this "DJ" name will be supplied as the default DJ.
  • callback: your processing code. You will receive a NowPlayingResponse object (q.v.).

Environment variables

  • AZ_CLIENT_DEBUG: Set this to any non-null value to enable logging of the extracted metadata as it arrives.

NowPlayingResponse

The NowPlayingResponse object contains the parsed metadata from the current SSE event. The 0.1.x version of this module returns the current song info and any available streamer data only. The SSE event contains quite a lot more information, but I only needed a subset of the fields:

  • artist: artist name for current song
  • track: track name for current song
  • album: album name of current song
  • dj: current streamer's name, or the default DJ name if Azuracast is playing from the media library
  • live: True if there is a live streamer, False if not
  • duration: length of the current track in hh:mm:ss format
  • elapsed: how long the track has been playing
  • start: datetime that the track started playing
  • artURL: a URL pointing to the track artwork, or a generic cover image supplied by Azuracast if no track artwork is available

Using the client

The client works best if you are setting up a long-running monitor to watch the SSE data and update a display (e.g., sending the data to a Discord channel). It can be run in bursts to fetch the current data, but the AzuracastPy library is a better fit for one-off requests.

Metadata

Release files for azuracast-sse-client 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for azuracast-sse-client 0.1.0
File Size Uploaded Provenance Actions
azuracast_sse_client-0.1.0.tar.gz 5.5 kB Without provenance Details for azuracast_sse_client-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for azuracast-sse-client 0.1.0
File Interpreter ABI Platform Actions
azuracast_sse_client-0.1.0-py3-none-any.whl Python 3 none any Details for azuracast_sse_client-0.1.0-py3-none-any.whl

Total release size: 11.1 kB

Release files / azuracast_sse_client-0.1.0.tar.gz

Download URL azuracast_sse_client-0.1.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8489ffa09c1185bf2ef5a3973819a5c4d31bf4b7fd159d17e847776187dcc666
BLAKE2b-256 checksum
How to use checksums
19636e93052ef98d85bab1e41104ef8149a3c159f7c98157d855aa53196594a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.13

Release files / azuracast_sse_client-0.1.0-py3-none-any.whl

Download URL azuracast_sse_client-0.1.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae15a8c522fb8cf9db4360804fe8205f7b806dddb4281060742dfa1bc23ae995
BLAKE2b-256 checksum
How to use checksums
4519a19ee4a2cd0a157c591a3036d45da9f79bc27ce73b0b40b23360b64912ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.13

Security for azuracast-sse-client 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page