metadrive package¶
Submodules¶
metadrive.api module¶
-
class
metadrive.api.
Drive
(scope: MutableMapping[str, Any])¶ Bases:
starlette.endpoints.HTTPEndpoint
-
post
(request)¶ summary: /drive/{name}/{method} description: |
Calls driver’s methods with parameters. If method is part of class, then it has ‘.’
Example: requests.post(url, params={‘a’: ‘data’}, json={‘some’: ‘data’})
-
-
class
metadrive.api.
Driver
(scope: MutableMapping[str, Any])¶ Bases:
starlette.endpoints.HTTPEndpoint
-
get
(request)¶ summary: /driver/{name}/ description: Provides description (schema) of driver’s methods
-
-
metadrive.api.
drivers
(request)¶ summary: /drivers description: Lists the drivers available in API. responses:
- 200:
description: A list of drivers. schema:
‘$ref’: ‘#/definitions/DriverItem’
-
metadrive.api.
drives
(request)¶ summary: /drives description: Lists the drives available in API. responses:
- 200:
description: A list of drives.
-
metadrive.api.
index
(request)¶
-
metadrive.api.
not_found
(request, exc)¶ Return an HTTP 404 page.
-
metadrive.api.
schema
(request)¶
-
metadrive.api.
server_error
(request, exc)¶ Return an HTTP 500 page.
metadrive.auth module¶
metadrive.cli module¶
metadrive.config module¶
-
metadrive.config.
ENSURE_DATA
()¶
-
metadrive.config.
ENSURE_GPG
()¶
-
metadrive.config.
ENSURE_PROXIES
()¶
-
metadrive.config.
ENSURE_REPO
()¶
-
metadrive.config.
ENSURE_SESSIONS
()¶
metadrive.drivers module¶
metadrive.drives module¶
-
metadrive.drives.
all
()¶ second coordinate uniquely identifies drives second item in tuples uniquely identifies drives, without the first.
-
metadrive.drives.
close
(drive_obj)¶
-
metadrive.drives.
get
(driver_or_drive, latest_or_new=True)¶
-
metadrive.drives.
next_string
(s)¶
-
metadrive.drives.
remove
(drive_obj)¶
metadrive.helpers module¶
-
metadrive.helpers.
get_actions
(cls)¶ Convenience function to create summaries of actions.
-
metadrive.helpers.
print_actions
(cls)¶
metadrive.mixins module¶
-
metadrive.mixins.
init_profile
(profile, porfiles_dir, recreate_profile)¶
-
metadrive.mixins.
set_proxies
(proxies)¶
metadrive.tasks module¶
metadrive.ui module¶
metadrive.utils module¶
-
metadrive.utils.
ensure_driver_installed
(driver_name)¶
-
metadrive.utils.
find_drivers
()¶
-
metadrive.utils.
get_credential
(namespace)¶ namespace: – service name, by directory
Example: >>> get_credential(‘gmail’)
-
metadrive.utils.
get_metaname
(namespace, anchor=None)¶ A default place to store authentication information, like passwords, encrypted with user’s public key, in user’s github.
By default, the auth data is stored in the markdown file, under the main anchor.
-
metadrive.utils.
get_or_ask_credentials
(namespace, variables, ask_refresh=False)¶
-
metadrive.utils.
load_session_data
(namespace)¶
-
metadrive.utils.
save_session_data
(namespace, session_data)¶
-
metadrive.utils.
set_credential
(namespace, credential)¶ namespace: – service name, by directory
Example: >>> set_credential(‘gmail’, {‘username’: ‘’, ‘password’: ‘’})