ucsschool.kelvin.client.session module

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

Bases: ucsschool.kelvin.client.session.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: str = None, request_id_header: str = 'X-Request-ID', language: str = None, **kwargs)[source]

Bases: object

client
close() → None[source]
delete(url: str, **kwargs) → None[source]
get(url: str, **kwargs) → Union[Dict[str, Any], List[Dict[str, Any]]][source]
head(url: str, **kwargs) → bool[source]
json_headers[source]
open() → httpx.AsyncClient[source]
post(url: str, **kwargs) → Dict[str, Any][source]
put(url: str, **kwargs) → Dict[str, Any][source]
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

classmethod from_str(token_str: str) → ucsschool.kelvin.client.session.Token[source]
is_valid() → bool[source]