Coder Social home page Coder Social logo

arandomboiisme / azuracastpy Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 558 KB

An unofficial Python library for the AzuraCast API

Home Page: https://azuracastpy.readthedocs.io/

License: GNU Affero General Public License v3.0

Python 100.00%
azuracast python api api-client-python library python-client tagsarefun

azuracastpy's Introduction

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/.

azuracastpy's People

Contributors

arandomboiisme avatar

Stargazers

slyderc avatar Mason Daugherty avatar Oluwajoba Akinduko avatar Zach avatar Joey ๐Ÿ˜Ž avatar

Watchers

slyderc avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.