TokenCredentialsFromFile.

token_from_file

token_from_file( file_path: Union[str, Path], base64_encode: bool ) -> str

Reads a token from a file and optionally base64 encodes it.

Parameters

nametypedescription
file_pathUnion[str, Path]The path to the file containing the token.
base64_encodeboolWhether to base64 encode the token. Defaults to True.

Returns

typedescription
strThe token, optionally base64 encoded.