snap_python.utils module

class snap_python.utils.AbstractSnapsClient

Bases: ABC

abstract async get_changes_by_id(change_id: str) ChangesResponse
abstract async request(method: str, endpoint: str, **kwargs) Response
abstract async request_raw(method: str, endpoint: str, **kwargs) Response
exception snap_python.utils.SnapdAPIError

Bases: Exception

General Exception raised for errors in the Snapd API.

snap_python.utils.going_to_reload_daemon(changes: ChangesResponse | None) bool

Determines if a daemon reload is required based on the provided changes.

Parameters:

changes (ChangesResponse | None) – An instance of ChangesResponse or None.

Returns:

True if a daemon reload or restart is required, False otherwise.

Return type:

bool