Metadata-Version: 2.1
Name: AzuracastPy
Version: 0.0.2
Summary: A Python wrapper for the AzuraCast API
Author-email: Abah Olotuche Gabriel <gabrielabah38@gmail.com>
Project-URL: Homepage, https://github.com/ARandomBoiIsMe/AzuracastPy
Project-URL: Issues, https://github.com/ARandomBoiIsMe/AzuracastPy/issues
Keywords: azuracast,api,wrapper
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE.md
Requires-Dist: certifi>=2024.2.2
Requires-Dist: charset-normalizer>=3.3.2
Requires-Dist: idna>=3.7
Requires-Dist: lxml>=5.2.1
Requires-Dist: requests>=2.31.0
Requires-Dist: urllib3>=2.2.1

AzuracastPy: The Unofficial Python Wrapper for the Azuracast API
================================================================

AzuracastPy is a Python package that allows for straightforward access
to `AzuraCast <https://www.azuracast.com/>`_'s API.

Installation
------------

AzuracastPy can be installed using `pip <https://pypi.python.org/pypi/pip>`_.

.. code-block:: console

    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 <https://www.azuracast.com/docs/developers/apis/>`_
is needed for more sensitive requests):

.. code-block:: python

    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:

.. code-block:: python

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