pydrive2 package¶
pydrive2.apiattr module¶
- class pydrive2.apiattr.ApiAttribute(name)¶
Bases:
object
A data descriptor that sets and returns values.
- class pydrive2.apiattr.ApiAttributeMixin¶
Bases:
object
Mixin to initialize required global variables to use ApiAttribute.
- class pydrive2.apiattr.ApiResource(*args, **kwargs)¶
Bases:
dict
Super class of all api resources.
Inherits and behaves as a python dictionary to handle api resources. Save clean copy of metadata in self.metadata as a dictionary. Provides changed metadata elements to efficiently update api resources.
- GetChanges()¶
Returns changed metadata elements to update api resources efficiently.
- Returns:
dict – changed metadata elements.
- UpdateMetadata(metadata=None)¶
Update metadata and mark all of them to be clean.
- auth¶
A data descriptor that sets and returns values.
- update(*args, **kwargs)¶
Overwritten method of dictionary.
- class pydrive2.apiattr.ApiResourceList(auth=None, metadata=None)¶
Bases:
ApiAttributeMixin
,ApiResource
Abstract class of all api list resources.
Inherits ApiResource and builds iterator to list any API resource.
- GetList()¶
Get list of API resources.
If ‘maxResults’ is not specified, it will automatically iterate through every resources available. Otherwise, it will make API call once and update ‘pageToken’.
- Returns:
list – list of API resources.
- Reset()¶
Resets current iteration
- metadata¶
A data descriptor that sets and returns values.
pydrive2.auth module¶
pydrive2.drive module¶
pydrive2.files module¶
pydrive2.settings module¶
- exception pydrive2.settings.InvalidConfigError¶
Bases:
OSError
Error trying to read client configuration.
- pydrive2.settings.LoadSettingsFile(filename='settings.yaml')¶
Loads settings file in yaml format given file name.
- Parameters:
filename (str.) – path for settings file. ‘settings.yaml’ by default.
- Raises:
SettingsError
- exception pydrive2.settings.SettingsError¶
Bases:
OSError
Error while loading/saving settings
- pydrive2.settings.ValidateSettings(data)¶
Validates if current settings is valid.
- Parameters:
data (dict.) – dictionary containing all settings.
- Raises:
InvalidConfigError