A Python wrapper for the AzuraCast API
Project description
AzuracastPy is a Python package that allows for straightforward access to AzuraCast’s API.
Installation
AzuracastPy can be installed using pip.
pip install AzuracastPy
Quickstart
With the url of a radio hosted on AzuraCast, an instance of the AzuracastClient class can be created like so (An API Key is needed for more sensitive requests):
from AzuracastPy import AzuracastClient
client = AzuracastClient(
radio_url="radio_url",
api_key="(Optional) api_key"
)
With this instance, radio stations can be interacted with and queried:
# Get all stations served from the hosted radio.
stations = client.stations()
print(stations)
# Get data of a specific station.
station = client.station(1)
print(station.name, station.description, station.requestable_songs())
# Create a podcast on a station (API Key required).
from AzuracastPy.enums import Languages, PodcastCategories
station = client.station(1)
new_podcast = station.podcast.create(
title="New podcast",
description="This is a random description",
language=Languages.ARABIC,
categories=[
PodcastCategories.Arts.DESIGN,
PodcastCategories.Comedy.COMEDY_INTERVIEWS
]
)
Documentation
AzuracastPy’s documentation is located at https://azuracastpy.readthedocs.io/en/latest/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
azuracastpy-0.0.2.tar.gz
(84.8 kB
view details)
Built Distribution
File details
Details for the file azuracastpy-0.0.2.tar.gz
.
File metadata
- Download URL: azuracastpy-0.0.2.tar.gz
- Upload date:
- Size: 84.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d5104a85ed29ea4abb402eef4197ede3a2ce7544be385c147783785e1298765 |
|
MD5 | 766128c0078f1f0c55a21e3b77c2f30d |
|
BLAKE2b-256 | 591cc010497bf370a95f94b1f7958c523e9d2382e31a34a69f431122b398e853 |
File details
Details for the file AzuracastPy-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: AzuracastPy-0.0.2-py3-none-any.whl
- Upload date:
- Size: 96.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b32bb8283876a67ff7685f230835e3b6c9439061afa76ee97ffd8ce1e2151d9 |
|
MD5 | 45a10b9700305014be667d7ba44aaad3 |
|
BLAKE2b-256 | 373728dd96e326eefa06398ff66dc1eba078e87c992950110b0a858780f450a3 |