Skip to content

ARandomBoiIsMe/AzuracastPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AzuracastPy: The Unofficial Python Wrapper for the Azuracast API

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",
    x_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/.

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy