Station File Helper

class AzuracastPy.models.helpers.FileHelper(_station)

Provides a set of functions to interact with station files.

__call__(id: int) StationFile

Retrieves a specific uploaded music file from the station.

Parameters:

id – The numerical ID of the file to be retrieved.

Returns:

A StationFile object.

Usage:

file = station.file(1)
__init__(_station)

Initializes a FileHelper instance.

Note

This class should not be initialized directly. Instead, obtain an instance via: file.

upload(path: str, file: str) StationFile

Uploads a media file to the station.

Parameters:
  • path – the/relative/path/to/file.mp3.

  • file – The system path of the file to be uploaded.

Returns:

A StationFile object for the newly uploaded file.

Usage:

file = station.file.upload(
    path="song/on/station.mp3",
    file="file/path/on/local/system.mp3"
)