autodrive._conn
Module Contents
Classes
Base class of more specific Connection objects. |
Attributes
- autodrive._conn.SCOPES = ['https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/spreadsheets']
- class autodrive._conn.Connection(*, api_name, api_version, auth_config=None)
Base class of more specific Connection objects.
- Parameters
api_name (Literal["sheets", "drive"]) – The name of the api to connect to.
api_version (str) – The version of the api to connect to.
api_scopes (List[str]) – A list of the scope strings to connect with (will fail if credentials don’t grant those scopes).
auth_config (AuthConfig, optional) – Optional custom AuthConfig object, defaults to None
- property auth: autodrive.interfaces.AuthConfig
Returns: AuthConfig: The AuthConfig passed to this Connection object, or the AuthConfig that was generated automatically upon this Connection’s instantiation.
- Return type
- google_obj_types
- static get_creds_from_env()
Checks if necessary credential and token information has been specified in environment variables and uses that information to generate a Credentials object. Can be used to bypass needing credentials files saved locally.
- Returns
A prepped Credentials object, ready to be slotted into more specific connections, if appropriate environment variables were found, otherwise None.
- Return type
Credentials, optional