Created on 08.04.2011
@author: joe
Bases: cloudfusion.store.store.Store
config can be obtained from the function cloudfusion.store.dropbox.dropbox_store.DropboxStore.get_config(), but you need to add user and password:
config = DropboxStore.get_config()
config['user'] = 'me@emailserver.com' #your account username/e-mail address
config['password'] = 'MySecret!23$' #your account password
You may add a cache id, so that you can continue previous sessions. If you use the same cache id in a later session, the store will remember some metadata and does not need to rely on auto-login (since the auto-login feature often breaks because Dropbox changes their interface):
config['cache_id'] = 'dropbox_db'
You can also choose between full access to dropbox or to a single subfolder by setting the value for ‘root’:
config['root'] = 'dropbox' #for full dropbox access (this is the default) or
config['root'] = 'app_folder' #for restricted access to one subfolder
Or you can use a configuration file that already has password and username set by specifying a path:
path_to_my_config_file = '/home/joe/MyDropbox.ini'
config = DropboxStore.get_config(path_to_my_config_file)
Parameters: | config – dictionary with key value pairs |
---|
Store path in the directory ‘/overwritten’ and rename the new file resp_path to path. If a new file is stored to path, the response from dropbox may say it was stored in to resp_path, instead. This means there has already been a file stored to path and instead of overwriting it, the new file was stored to resp_path, instead.
Used by retry decorator to react to errors.
Get initial dropbox configuration to initialize cloudfusion.store.dropbox.dropbox_store.DropboxStore :param path_to_configfile: path to a configuration file or None, which will use the default configuration file
Return maximum number of bytes per file
Bases: object
Created on 23.04.2011
@author: joe
Bases: file
Create a file like object with data. :param mem_size: Data is written to disk if it is bigger than mem_size bytes
Bases: object
Bases: object