codebots.bots.drivebot.DriveBot#
- class codebots.bots.drivebot.DriveBot(authentication, save_credentials=True)[source]#
Bot to help with handling your Google Drive.
- Parameters:
- authenticationstr
defines the authentication type. it can be either: - web : open the browser to sign in - local : uses previously stored credentials - path-to-credential-file: you can provide the full path to specific credentials
- save_credentials: bool, optional
if True stores the credentials in the .tokens folder for future use.
- Attributes:
- authenticationstr
defines the authentication type. it can be either: - web : open the browser to sign in - local : uses previously stored credentials - path-to-credential-file: you can provide the full path to specific credentials
- save_credentials: bool, optional
if True stores the credentials in the .tokens folder for future use, by default True.
Methods
create_and_upload
([name, content])create a file with some content and upload it to your Google Drive.
upload_local_file
(path_to_file, name)upload a file to your Google Drive.