mantik.authentication.authยถ

Attributesยถ

logger

Functionsยถ

get_valid_access_token(โ†’ย str)

Authenticate at Mantik.

Module Contentsยถ

mantik.authentication.auth.get_valid_access_token() โ†’ str[source]ยถ

Authenticate at Mantik.

Returns:

Access Token

Return type:

str

Notes

Mantik prioritizes the username and password environment variables over the token variable, causing an Unauthorized error. As a consequence, these have to be unset before setting the token variable.

The tokens will be stored in a file ~/.mantik/tokens.json to reuse tokens and refresh them only if they have expired.

mantik.authentication.auth.logger[source]ยถ