ucsschool.kelvin.client.session module

exception ucsschool.kelvin.client.session.BadSettingsWarning[source]

Bases: KelvinClientWarning

exception ucsschool.kelvin.client.session.KelvinClientWarning[source]

Bases: Warning

class ucsschool.kelvin.client.session.Session(username: str, password: str, host: str, max_client_tasks: int = 10, request_id: Optional[str] = None, request_id_header: str = 'X-Request-ID', language: Optional[str] = None, **kwargs)[source]

Bases: object

property client: AsyncClient
async close() None[source]
async delete(url: str, **kwargs) None[source]
async get(url: str, **kwargs) Union[Dict[str, Any], List[Dict[str, Any]]][source]
async head(url: str, **kwargs) bool[source]
json_headers[source]
open() AsyncClient[source]
async post(url: str, **kwargs) Dict[str, Any][source]
async put(url: str, **kwargs) Dict[str, Any][source]
async request(async_request_method: Any, url: str, return_json: bool = True, **kwargs) Union[str, int, Dict[str, Any]][source]
token[source]
class ucsschool.kelvin.client.session.Token(expiry: datetime.datetime, value: str)[source]

Bases: object

expiry: datetime
classmethod from_str(token_str: str) Token[source]
is_valid() bool[source]
value: str