Station SFTP User Helper

class AzuracastPy.models.helpers.SFTPUserHelper(_station)

Provides a set of functions to interact with SFTP users.

__call__(id: int) SFTPUser

Retrieves a specific SFTP user from the station.

Parameters:

id – The numerical ID of the SFTP user to be retrieved.

Returns:

A SFTPUser object.

Usage:

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

Initializes a SFTPUserHelper instance.

Note

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

create(username: str, password: str, public_keys: List[str] | None = None) SFTPUser

Adds an SFTP user to the station.

Parameters:
  • username – The username of the user.

  • password – The password of the user.

  • public_keys – (Optional) A list of public keys to be assigned to the user. Default: None.

Returns:

A SFTPUser object for the newly created SFTP user.

Usage:

sftp_user = station.sftp_user.create(
    username="Username",
    password="Password",
    public_keys=['key1', 'key2']
)