Skip to main content

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://praw.readthedocs.io/.

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

azuracastpy-0.0.1.tar.gz (84.7 kB view details)

Uploaded Source

Built Distribution

AzuracastPy-0.0.1-py3-none-any.whl (96.8 kB view details)

Uploaded Python 3

File details

Details for the file azuracastpy-0.0.1.tar.gz.

File metadata

  • Download URL: azuracastpy-0.0.1.tar.gz
  • Upload date:
  • Size: 84.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for azuracastpy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 94dc5aa147c88813fdd17773b38cee68b9b6a8f9bc1aff09fd8417cf239c6114
MD5 ebd32c367a84a8f442ea2a90c8361911
BLAKE2b-256 549048208c00435f82dddaaeb106583e90bb721a680db0d1d9a7c095f3c30e35

See more details on using hashes here.

File details

Details for the file AzuracastPy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: AzuracastPy-0.0.1-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

Hashes for AzuracastPy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abb211e07421d1e908584d2490abaafddad8cd1d4a701b3c6fea0113865a91a3
MD5 e95f0848731c2f721ef40a4aad5ee32b
BLAKE2b-256 320695b02d4fa5fc629ceae84e2de27cfe3b20e27fd3e14ba81217f55bb28b7e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page