dropbox.files – Files

This namespace contains endpoints and data types for basic file operations.

class dropbox.files.AlphaGetMetadataArg(path=None, include_media_info=None, include_deleted=None, include_has_explicit_shared_members=None, include_property_groups=None, include_property_templates=None)

Bases: dropbox.files.GetMetadataArg

Variables:files.AlphaGetMetadataArg.include_property_templates – If set to a valid list of template IDs, FileMetadata.property_groups is set for files with custom properties.
__init__(path=None, include_media_info=None, include_deleted=None, include_has_explicit_shared_members=None, include_property_groups=None, include_property_templates=None)

x.__init__(…) initializes x; see help(type(x)) for signature

include_property_templates

If set to a valid list of template IDs, FileMetadata.property_groups is set for files with custom properties.

Return type:list of [str]
class dropbox.files.AlphaGetMetadataError(tag, value=None)

Bases: dropbox.files.GetMetadataError

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_properties_error()

Only call this if is_properties_error() is true.

Return type:file_properties.LookUpPropertiesError
is_properties_error()

Check if the union tag is properties_error.

Return type:bool
classmethod properties_error(val)

Create an instance of this class set to the properties_error tag with value val.

Parameters:val (file_properties.LookUpPropertiesError) –
Return type:files.AlphaGetMetadataError
class dropbox.files.CommitInfo(path=None, mode=None, autorename=None, client_modified=None, mute=None, property_groups=None, strict_conflict=None)

Bases: dropbox.stone_base.Struct

Variables:
  • files.CommitInfo.path – Path in the user’s Dropbox to save the file.
  • files.CommitInfo.mode – Selects what to do if the file already exists.
  • files.CommitInfo.autorename – If there’s a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict.
  • files.CommitInfo.client_modified – The value to store as the client_modified timestamp. Dropbox automatically records the time at which the file was written to the Dropbox servers. It can also record an additional timestamp, provided by Dropbox desktop clients, mobile clients, and API apps of when the file was actually created or modified.
  • files.CommitInfo.mute – Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. If True, this tells the clients that this modification shouldn’t result in a user notification.
  • files.CommitInfo.property_groups – List of custom properties to add to file.
  • files.CommitInfo.strict_conflict – Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = WriteMode.update and the given “rev” doesn’t match the existing file’s “rev”, even if the existing file has been deleted.
__init__(path=None, mode=None, autorename=None, client_modified=None, mute=None, property_groups=None, strict_conflict=None)

x.__init__(…) initializes x; see help(type(x)) for signature

autorename

If there’s a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict.

Return type:bool
client_modified

The value to store as the client_modified timestamp. Dropbox automatically records the time at which the file was written to the Dropbox servers. It can also record an additional timestamp, provided by Dropbox desktop clients, mobile clients, and API apps of when the file was actually created or modified.

Return type:datetime.datetime
mode

Selects what to do if the file already exists.

Return type:files.WriteMode
mute

Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. If True, this tells the clients that this modification shouldn’t result in a user notification.

Return type:bool
path

Path in the user’s Dropbox to save the file.

Return type:str
property_groups

List of custom properties to add to file.

Return type:list of [file_properties.PropertyGroup]
strict_conflict

Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = WriteMode.update and the given “rev” doesn’t match the existing file’s “rev”, even if the existing file has been deleted.

Return type:bool
class dropbox.files.CommitInfoWithProperties(path=None, mode=None, autorename=None, client_modified=None, mute=None, property_groups=None, strict_conflict=None)

Bases: dropbox.files.CommitInfo

__init__(path=None, mode=None, autorename=None, client_modified=None, mute=None, property_groups=None, strict_conflict=None)

x.__init__(…) initializes x; see help(type(x)) for signature

class dropbox.files.ContentSyncSetting(id=None, sync_setting=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(id=None, sync_setting=None)

x.__init__(…) initializes x; see help(type(x)) for signature

id

Id of the item this setting is applied to.

Return type:str
sync_setting

Setting for this item.

Return type:files.SyncSetting
class dropbox.files.ContentSyncSettingArg(id=None, sync_setting=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(id=None, sync_setting=None)

x.__init__(…) initializes x; see help(type(x)) for signature

id

Id of the item this setting is applied to.

Return type:str
sync_setting

Setting for this item.

Return type:files.SyncSettingArg
dropbox.files.CopyBatchArg

alias of dropbox.files.RelocationBatchArgBase

class dropbox.files.CreateFolderArg(path=None, autorename=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(path=None, autorename=None)

x.__init__(…) initializes x; see help(type(x)) for signature

autorename

If there’s a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.

Return type:bool
path

Path in the user’s Dropbox to create.

Return type:str
class dropbox.files.CreateFolderBatchArg(paths=None, autorename=None, force_async=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(paths=None, autorename=None, force_async=None)

x.__init__(…) initializes x; see help(type(x)) for signature

autorename

If there’s a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.

Return type:bool
force_async

Whether to force the create to happen asynchronously.

Return type:bool
paths

List of paths to be created in the user’s Dropbox. Duplicate path arguments in the batch are considered only once.

Return type:list of [str]
class dropbox.files.CreateFolderBatchError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:files.CreateFolderBatchError.too_many_files – The operation would involve too many files or folders.
is_other()

Check if the union tag is other.

Return type:bool
is_too_many_files()

Check if the union tag is too_many_files.

Return type:bool
other = CreateFolderBatchError('other', None)
too_many_files = CreateFolderBatchError('too_many_files', None)
class dropbox.files.CreateFolderBatchJobStatus(tag, value=None)

Bases: dropbox.async_.PollResultBase

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.CreateFolderBatchResult) –
Return type:files.CreateFolderBatchJobStatus
classmethod failed(val)

Create an instance of this class set to the failed tag with value val.

Parameters:val (files.CreateFolderBatchError) –
Return type:files.CreateFolderBatchJobStatus
get_complete()

The batch create folder has finished.

Only call this if is_complete() is true.

Return type:files.CreateFolderBatchResult
get_failed()

The batch create folder has failed.

Only call this if is_failed() is true.

Return type:files.CreateFolderBatchError
is_complete()

Check if the union tag is complete.

Return type:bool
is_failed()

Check if the union tag is failed.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = CreateFolderBatchJobStatus('other', None)
class dropbox.files.CreateFolderBatchLaunch(tag, value=None)

Bases: dropbox.async_.LaunchResultBase

Result returned by dropbox.dropbox.Dropbox.files_create_folder_batch() that may either launch an asynchronous job or complete synchronously.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.CreateFolderBatchResult) –
Return type:files.CreateFolderBatchLaunch
get_complete()

Only call this if is_complete() is true.

Return type:files.CreateFolderBatchResult
is_complete()

Check if the union tag is complete.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = CreateFolderBatchLaunch('other', None)
class dropbox.files.CreateFolderBatchResult(entries=None)

Bases: dropbox.files.FileOpsResult

Variables:files.CreateFolderBatchResult.entries – Each entry in CreateFolderBatchArg.paths will appear at the same position inside CreateFolderBatchResult.entries.
__init__(entries=None)

x.__init__(…) initializes x; see help(type(x)) for signature

entries

Each entry in CreateFolderBatchArg.paths will appear at the same position inside CreateFolderBatchResult.entries.

Return type:list of [files.CreateFolderBatchResultEntry]
class dropbox.files.CreateFolderBatchResultEntry(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

classmethod failure(val)

Create an instance of this class set to the failure tag with value val.

Parameters:val (files.CreateFolderEntryError) –
Return type:files.CreateFolderBatchResultEntry
get_failure()

Only call this if is_failure() is true.

Return type:files.CreateFolderEntryError
get_success()

Only call this if is_success() is true.

Return type:files.CreateFolderEntryResult
is_failure()

Check if the union tag is failure.

Return type:bool
is_success()

Check if the union tag is success.

Return type:bool
classmethod success(val)

Create an instance of this class set to the success tag with value val.

Parameters:val (files.CreateFolderEntryResult) –
Return type:files.CreateFolderBatchResultEntry
class dropbox.files.CreateFolderEntryError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_path()

Only call this if is_path() is true.

Return type:files.WriteError
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
other = CreateFolderEntryError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.WriteError) –
Return type:files.CreateFolderEntryError
class dropbox.files.CreateFolderEntryResult(metadata=None)

Bases: dropbox.stone_base.Struct

Variables:files.CreateFolderEntryResult.metadata – Metadata of the created folder.
__init__(metadata=None)

x.__init__(…) initializes x; see help(type(x)) for signature

metadata

Metadata of the created folder.

Return type:files.FolderMetadata
class dropbox.files.CreateFolderError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_path()

Only call this if is_path() is true.

Return type:files.WriteError
is_path()

Check if the union tag is path.

Return type:bool
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.WriteError) –
Return type:files.CreateFolderError
class dropbox.files.CreateFolderResult(metadata=None)

Bases: dropbox.files.FileOpsResult

Variables:files.CreateFolderResult.metadata – Metadata of the created folder.
__init__(metadata=None)

x.__init__(…) initializes x; see help(type(x)) for signature

metadata

Metadata of the created folder.

Return type:files.FolderMetadata
class dropbox.files.DeleteArg(path=None, parent_rev=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(path=None, parent_rev=None)

x.__init__(…) initializes x; see help(type(x)) for signature

parent_rev

Perform delete if given “rev” matches the existing file’s latest “rev”. This field does not support deleting a folder.

Return type:str
path

Path in the user’s Dropbox to delete.

Return type:str
class dropbox.files.DeleteBatchArg(entries=None)

Bases: dropbox.stone_base.Struct

__init__(entries=None)

x.__init__(…) initializes x; see help(type(x)) for signature

entries
Return type:list of [files.DeleteArg]
class dropbox.files.DeleteBatchError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:files.DeleteBatchError.too_many_write_operations – Use DeleteError.too_many_write_operations. dropbox.dropbox.Dropbox.files_delete_batch() now provides smaller granularity about which entry has failed because of this.
is_other()

Check if the union tag is other.

Return type:bool
is_too_many_write_operations()

Check if the union tag is too_many_write_operations.

Return type:bool
other = DeleteBatchError('other', None)
too_many_write_operations = DeleteBatchError('too_many_write_operations', None)
class dropbox.files.DeleteBatchJobStatus(tag, value=None)

Bases: dropbox.async_.PollResultBase

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.DeleteBatchResult) –
Return type:files.DeleteBatchJobStatus
classmethod failed(val)

Create an instance of this class set to the failed tag with value val.

Parameters:val (files.DeleteBatchError) –
Return type:files.DeleteBatchJobStatus
get_complete()

The batch delete has finished.

Only call this if is_complete() is true.

Return type:files.DeleteBatchResult
get_failed()

The batch delete has failed.

Only call this if is_failed() is true.

Return type:files.DeleteBatchError
is_complete()

Check if the union tag is complete.

Return type:bool
is_failed()

Check if the union tag is failed.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = DeleteBatchJobStatus('other', None)
class dropbox.files.DeleteBatchLaunch(tag, value=None)

Bases: dropbox.async_.LaunchResultBase

Result returned by dropbox.dropbox.Dropbox.files_delete_batch() that may either launch an asynchronous job or complete synchronously.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.DeleteBatchResult) –
Return type:files.DeleteBatchLaunch
get_complete()

Only call this if is_complete() is true.

Return type:files.DeleteBatchResult
is_complete()

Check if the union tag is complete.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = DeleteBatchLaunch('other', None)
class dropbox.files.DeleteBatchResult(entries=None)

Bases: dropbox.files.FileOpsResult

Variables:files.DeleteBatchResult.entries – Each entry in DeleteBatchArg.entries will appear at the same position inside DeleteBatchResult.entries.
__init__(entries=None)

x.__init__(…) initializes x; see help(type(x)) for signature

entries

Each entry in DeleteBatchArg.entries will appear at the same position inside DeleteBatchResult.entries.

Return type:list of [files.DeleteBatchResultEntry]
class dropbox.files.DeleteBatchResultData(metadata=None)

Bases: dropbox.stone_base.Struct

Variables:files.DeleteBatchResultData.metadata – Metadata of the deleted object.
__init__(metadata=None)

x.__init__(…) initializes x; see help(type(x)) for signature

metadata

Metadata of the deleted object.

Return type:files.Metadata
class dropbox.files.DeleteBatchResultEntry(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

classmethod failure(val)

Create an instance of this class set to the failure tag with value val.

Parameters:val (files.DeleteError) –
Return type:files.DeleteBatchResultEntry
get_failure()

Only call this if is_failure() is true.

Return type:files.DeleteError
get_success()

Only call this if is_success() is true.

Return type:files.DeleteBatchResultData
is_failure()

Check if the union tag is failure.

Return type:bool
is_success()

Check if the union tag is success.

Return type:bool
classmethod success(val)

Create an instance of this class set to the success tag with value val.

Parameters:val (files.DeleteBatchResultData) –
Return type:files.DeleteBatchResultEntry
class dropbox.files.DeleteError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_path_lookup()

Only call this if is_path_lookup() is true.

Return type:files.LookupError
get_path_write()

Only call this if is_path_write() is true.

Return type:files.WriteError
is_other()

Check if the union tag is other.

Return type:bool
is_path_lookup()

Check if the union tag is path_lookup.

Return type:bool
is_path_write()

Check if the union tag is path_write.

Return type:bool
is_too_many_files()

Check if the union tag is too_many_files.

Return type:bool
is_too_many_write_operations()

Check if the union tag is too_many_write_operations.

Return type:bool
other = DeleteError('other', None)
classmethod path_lookup(val)

Create an instance of this class set to the path_lookup tag with value val.

Parameters:val (files.LookupError) –
Return type:files.DeleteError
classmethod path_write(val)

Create an instance of this class set to the path_write tag with value val.

Parameters:val (files.WriteError) –
Return type:files.DeleteError
too_many_files = DeleteError('too_many_files', None)
too_many_write_operations = DeleteError('too_many_write_operations', None)
class dropbox.files.DeleteResult(metadata=None)

Bases: dropbox.files.FileOpsResult

Variables:files.DeleteResult.metadata – Metadata of the deleted object.
__init__(metadata=None)

x.__init__(…) initializes x; see help(type(x)) for signature

metadata

Metadata of the deleted object.

Return type:files.Metadata
class dropbox.files.DeletedMetadata(name=None, path_lower=None, path_display=None, parent_shared_folder_id=None)

Bases: dropbox.files.Metadata

Indicates that there used to be a file or folder at this path, but it no longer exists.

__init__(name=None, path_lower=None, path_display=None, parent_shared_folder_id=None)

x.__init__(…) initializes x; see help(type(x)) for signature

class dropbox.files.Dimensions(height=None, width=None)

Bases: dropbox.stone_base.Struct

Dimensions for a photo or video.

Variables:
__init__(height=None, width=None)

x.__init__(…) initializes x; see help(type(x)) for signature

height

Height of the photo/video.

Return type:int
width

Width of the photo/video.

Return type:int
class dropbox.files.DownloadArg(path=None, rev=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(path=None, rev=None)

x.__init__(…) initializes x; see help(type(x)) for signature

path

The path of the file to download.

Return type:str
rev

Please specify revision in path instead.

Return type:str
class dropbox.files.DownloadError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_path()

Only call this if is_path() is true.

Return type:files.LookupError
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
other = DownloadError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.DownloadError
class dropbox.files.DownloadZipArg(path=None)

Bases: dropbox.stone_base.Struct

Variables:files.DownloadZipArg.path – The path of the folder to download.
__init__(path=None)

x.__init__(…) initializes x; see help(type(x)) for signature

path

The path of the folder to download.

Return type:str
class dropbox.files.DownloadZipError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_path()

Only call this if is_path() is true.

Return type:files.LookupError
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
is_too_large()

Check if the union tag is too_large.

Return type:bool
is_too_many_files()

Check if the union tag is too_many_files.

Return type:bool
other = DownloadZipError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.DownloadZipError
too_large = DownloadZipError('too_large', None)
too_many_files = DownloadZipError('too_many_files', None)
class dropbox.files.DownloadZipResult(metadata=None)

Bases: dropbox.stone_base.Struct

__init__(metadata=None)

x.__init__(…) initializes x; see help(type(x)) for signature

metadata
Return type:files.FolderMetadata
class dropbox.files.FileMetadata(name=None, id=None, client_modified=None, server_modified=None, rev=None, size=None, path_lower=None, path_display=None, parent_shared_folder_id=None, media_info=None, symlink_info=None, sharing_info=None, property_groups=None, has_explicit_shared_members=None, content_hash=None)

Bases: dropbox.files.Metadata

Variables:
__init__(name=None, id=None, client_modified=None, server_modified=None, rev=None, size=None, path_lower=None, path_display=None, parent_shared_folder_id=None, media_info=None, symlink_info=None, sharing_info=None, property_groups=None, has_explicit_shared_members=None, content_hash=None)

x.__init__(…) initializes x; see help(type(x)) for signature

client_modified

For files, this is the modification time set by the desktop client when the file was added to Dropbox. Since this time is not verified (the Dropbox server stores whatever the desktop client sends up), this should only be used for display purposes (such as sorting) and not, for example, to determine if a file has changed or not.

Return type:datetime.datetime
content_hash

A hash of the file content. This field can be used to verify data integrity. For more information see our Content hash page.

Return type:str
has_explicit_shared_members

This flag will only be present if include_has_explicit_shared_members is true in dropbox.dropbox.Dropbox.files_list_folder() or dropbox.dropbox.Dropbox.files_get_metadata(). If this flag is present, it will be true if this file has any explicit shared members. This is different from sharing_info in that this could be true in the case where a file has explicit members but is not contained within a shared folder.

Return type:bool
id

A unique identifier for the file.

Return type:str
media_info

Additional information if the file is a photo or video.

Return type:files.MediaInfo
property_groups

Additional information if the file has custom properties with the property template specified.

Return type:list of [file_properties.PropertyGroup]
rev

A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts.

Return type:str
server_modified

The last time the file was modified on Dropbox.

Return type:datetime.datetime
sharing_info

Set if this file is contained in a shared folder.

Return type:files.FileSharingInfo
size

The file size in bytes.

Return type:int

Set if this file is a symlink.

Return type:files.SymlinkInfo
class dropbox.files.FileOpsResult

Bases: dropbox.stone_base.Struct

__init__()

x.__init__(…) initializes x; see help(type(x)) for signature

class dropbox.files.FileSharingInfo(read_only=None, parent_shared_folder_id=None, modified_by=None)

Bases: dropbox.files.SharingInfo

Sharing info for a file which is contained by a shared folder.

Variables:
__init__(read_only=None, parent_shared_folder_id=None, modified_by=None)

x.__init__(…) initializes x; see help(type(x)) for signature

modified_by

The last user who modified the file. This field will be null if the user’s account has been deleted.

Return type:str
parent_shared_folder_id

ID of shared folder that holds this file.

Return type:str
class dropbox.files.FolderMetadata(name=None, id=None, path_lower=None, path_display=None, parent_shared_folder_id=None, shared_folder_id=None, sharing_info=None, property_groups=None)

Bases: dropbox.files.Metadata

Variables:
__init__(name=None, id=None, path_lower=None, path_display=None, parent_shared_folder_id=None, shared_folder_id=None, sharing_info=None, property_groups=None)

x.__init__(…) initializes x; see help(type(x)) for signature

id

A unique identifier for the folder.

Return type:str
property_groups

Additional information if the file has custom properties with the property template specified. Note that only properties associated with user-owned templates, not team-owned templates, can be attached to folders.

Return type:list of [file_properties.PropertyGroup]
shared_folder_id

Please use sharing_info instead.

Return type:str
sharing_info

Set if the folder is contained in a shared folder or is a shared folder mount point.

Return type:files.FolderSharingInfo
class dropbox.files.FolderSharingInfo(read_only=None, parent_shared_folder_id=None, shared_folder_id=None, traverse_only=None, no_access=None)

Bases: dropbox.files.SharingInfo

Sharing info for a folder which is contained in a shared folder or is a shared folder mount point.

Variables:
__init__(read_only=None, parent_shared_folder_id=None, shared_folder_id=None, traverse_only=None, no_access=None)

x.__init__(…) initializes x; see help(type(x)) for signature

no_access

Specifies that the folder cannot be accessed by the user.

Return type:bool
parent_shared_folder_id

Set if the folder is contained by a shared folder.

Return type:str
shared_folder_id

If this folder is a shared folder mount point, the ID of the shared folder mounted at this location.

Return type:str
traverse_only

Specifies that the folder can only be traversed and the user can only see a limited subset of the contents of this folder because they don’t have read access to this folder. They do, however, have access to some sub folder.

Return type:bool
class dropbox.files.GetCopyReferenceArg(path=None)

Bases: dropbox.stone_base.Struct

Variables:files.GetCopyReferenceArg.path – The path to the file or folder you want to get a copy reference to.
__init__(path=None)

x.__init__(…) initializes x; see help(type(x)) for signature

path

The path to the file or folder you want to get a copy reference to.

Return type:str
class dropbox.files.GetCopyReferenceError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_path()

Only call this if is_path() is true.

Return type:files.LookupError
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
other = GetCopyReferenceError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.GetCopyReferenceError
class dropbox.files.GetCopyReferenceResult(metadata=None, copy_reference=None, expires=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(metadata=None, copy_reference=None, expires=None)

x.__init__(…) initializes x; see help(type(x)) for signature

copy_reference

A copy reference to the file or folder.

Return type:str
expires

The expiration date of the copy reference. This value is currently set to be far enough in the future so that expiration is effectively not an issue.

Return type:datetime.datetime
metadata

Metadata of the file or folder.

Return type:files.Metadata
class dropbox.files.GetMetadataArg(path=None, include_media_info=None, include_deleted=None, include_has_explicit_shared_members=None, include_property_groups=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(path=None, include_media_info=None, include_deleted=None, include_has_explicit_shared_members=None, include_property_groups=None)

x.__init__(…) initializes x; see help(type(x)) for signature

include_deleted

If true, DeletedMetadata will be returned for deleted file or folder, otherwise LookupError.not_found will be returned.

Return type:bool
include_has_explicit_shared_members

If true, the results will include a flag for each file indicating whether or not that file has any explicit members.

Return type:bool
include_media_info

If true, FileMetadata.media_info is set for photo and video.

Return type:bool
include_property_groups

If set to a valid list of template IDs, FileMetadata.property_groups is set if there exists property data associated with the file and each of the listed templates.

Return type:file_properties.TemplateFilterBase
path

The path of a file or folder on Dropbox.

Return type:str
class dropbox.files.GetMetadataError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_path()

Only call this if is_path() is true.

Return type:files.LookupError
is_path()

Check if the union tag is path.

Return type:bool
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.GetMetadataError
class dropbox.files.GetTemporaryLinkArg(path=None)

Bases: dropbox.stone_base.Struct

Variables:files.GetTemporaryLinkArg.path – The path to the file you want a temporary link to.
__init__(path=None)

x.__init__(…) initializes x; see help(type(x)) for signature

path

The path to the file you want a temporary link to.

Return type:str
class dropbox.files.GetTemporaryLinkError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_path()

Only call this if is_path() is true.

Return type:files.LookupError
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
other = GetTemporaryLinkError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.GetTemporaryLinkError
class dropbox.files.GetTemporaryLinkResult(metadata=None, link=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(metadata=None, link=None)

x.__init__(…) initializes x; see help(type(x)) for signature

The temporary link which can be used to stream content the file.

Return type:str
metadata

Metadata of the file.

Return type:files.FileMetadata
class dropbox.files.GetTemporaryUploadLinkArg(commit_info=None, duration=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(commit_info=None, duration=None)

x.__init__(…) initializes x; see help(type(x)) for signature

commit_info

Contains the path and other optional modifiers for the future upload commit. Equivalent to the parameters provided to dropbox.dropbox.Dropbox.files_upload().

Return type:files.CommitInfo
duration

How long before this link expires, in seconds. Attempting to start an upload with this link longer than this period of time after link creation will result in an error.

Return type:float
class dropbox.files.GetTemporaryUploadLinkResult(link=None)

Bases: dropbox.stone_base.Struct

Variables:files.GetTemporaryUploadLinkResult.link – The temporary link which can be used to stream a file to a Dropbox location.
__init__(link=None)

x.__init__(…) initializes x; see help(type(x)) for signature

The temporary link which can be used to stream a file to a Dropbox location.

Return type:str
class dropbox.files.GetThumbnailBatchArg(entries=None)

Bases: dropbox.stone_base.Struct

Arguments for dropbox.dropbox.Dropbox.files_get_thumbnail_batch().

Variables:files.GetThumbnailBatchArg.entries – List of files to get thumbnails.
__init__(entries=None)

x.__init__(…) initializes x; see help(type(x)) for signature

entries

List of files to get thumbnails.

Return type:list of [files.ThumbnailArg]
class dropbox.files.GetThumbnailBatchError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:files.GetThumbnailBatchError.too_many_files – The operation involves more than 25 files.
is_other()

Check if the union tag is other.

Return type:bool
is_too_many_files()

Check if the union tag is too_many_files.

Return type:bool
other = GetThumbnailBatchError('other', None)
too_many_files = GetThumbnailBatchError('too_many_files', None)
class dropbox.files.GetThumbnailBatchResult(entries=None)

Bases: dropbox.stone_base.Struct

Variables:files.GetThumbnailBatchResult.entries – List of files and their thumbnails.
__init__(entries=None)

x.__init__(…) initializes x; see help(type(x)) for signature

entries

List of files and their thumbnails.

Return type:list of [files.GetThumbnailBatchResultEntry]
class dropbox.files.GetThumbnailBatchResultData(metadata=None, thumbnail=None)

Bases: dropbox.stone_base.Struct

Variables:files.GetThumbnailBatchResultData.thumbnail – A string containing the base64-encoded thumbnail data for this file.
__init__(metadata=None, thumbnail=None)

x.__init__(…) initializes x; see help(type(x)) for signature

metadata
Return type:files.FileMetadata
thumbnail

A string containing the base64-encoded thumbnail data for this file.

Return type:str
class dropbox.files.GetThumbnailBatchResultEntry(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:files.GetThumbnailBatchResultEntry.failure (ThumbnailError) – The result for this file if it was an error.
classmethod failure(val)

Create an instance of this class set to the failure tag with value val.

Parameters:val (files.ThumbnailError) –
Return type:files.GetThumbnailBatchResultEntry
get_failure()

The result for this file if it was an error.

Only call this if is_failure() is true.

Return type:files.ThumbnailError
get_success()

Only call this if is_success() is true.

Return type:files.GetThumbnailBatchResultData
is_failure()

Check if the union tag is failure.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_success()

Check if the union tag is success.

Return type:bool
other = GetThumbnailBatchResultEntry('other', None)
classmethod success(val)

Create an instance of this class set to the success tag with value val.

Parameters:val (files.GetThumbnailBatchResultData) –
Return type:files.GetThumbnailBatchResultEntry
class dropbox.files.GpsCoordinates(latitude=None, longitude=None)

Bases: dropbox.stone_base.Struct

GPS coordinates for a photo or video.

Variables:
__init__(latitude=None, longitude=None)

x.__init__(…) initializes x; see help(type(x)) for signature

latitude

Latitude of the GPS coordinates.

Return type:float
longitude

Longitude of the GPS coordinates.

Return type:float
class dropbox.files.ListFolderArg(path=None, recursive=None, include_media_info=None, include_deleted=None, include_has_explicit_shared_members=None, include_mounted_folders=None, limit=None, shared_link=None, include_property_groups=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(path=None, recursive=None, include_media_info=None, include_deleted=None, include_has_explicit_shared_members=None, include_mounted_folders=None, limit=None, shared_link=None, include_property_groups=None)

x.__init__(…) initializes x; see help(type(x)) for signature

include_deleted

If true, the results will include entries for files and folders that used to exist but were deleted.

Return type:bool
include_has_explicit_shared_members

If true, the results will include a flag for each file indicating whether or not that file has any explicit members.

Return type:bool
include_media_info

If true, FileMetadata.media_info is set for photo and video.

Return type:bool
include_mounted_folders

If true, the results will include entries under mounted folders which includes app folder, shared folder and team folder.

Return type:bool
include_property_groups

If set to a valid list of template IDs, FileMetadata.property_groups is set if there exists property data associated with the file and each of the listed templates.

Return type:file_properties.TemplateFilterBase
limit

The maximum number of results to return per request. Note: This is an approximate number and there can be slightly more entries returned in some cases.

Return type:int
path

A unique identifier for the file.

Return type:str
recursive

If true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders.

Return type:bool

A shared link to list the contents of. If the link is password-protected, the password must be provided. If this field is present, ListFolderArg.path will be relative to root of the shared link. Only non-recursive mode is supported for shared link.

Return type:files.SharedLink
class dropbox.files.ListFolderContinueArg(cursor=None)

Bases: dropbox.stone_base.Struct

Variables:files.ListFolderContinueArg.cursor – The cursor returned by your last call to dropbox.dropbox.Dropbox.files_list_folder() or dropbox.dropbox.Dropbox.files_list_folder_continue().
__init__(cursor=None)

x.__init__(…) initializes x; see help(type(x)) for signature

cursor

The cursor returned by your last call to dropbox.dropbox.Dropbox.files_list_folder() or dropbox.dropbox.Dropbox.files_list_folder_continue().

Return type:str
class dropbox.files.ListFolderContinueError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:files.ListFolderContinueError.reset – Indicates that the cursor has been invalidated. Call dropbox.dropbox.Dropbox.files_list_folder() to obtain a new cursor.
get_path()

Only call this if is_path() is true.

Return type:files.LookupError
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
is_reset()

Check if the union tag is reset.

Return type:bool
other = ListFolderContinueError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.ListFolderContinueError
reset = ListFolderContinueError('reset', None)
class dropbox.files.ListFolderError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_path()

Only call this if is_path() is true.

Return type:files.LookupError
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
other = ListFolderError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.ListFolderError
class dropbox.files.ListFolderGetLatestCursorResult(cursor=None)

Bases: dropbox.stone_base.Struct

Variables:files.ListFolderGetLatestCursorResult.cursor – Pass the cursor into dropbox.dropbox.Dropbox.files_list_folder_continue() to see what’s changed in the folder since your previous query.
__init__(cursor=None)

x.__init__(…) initializes x; see help(type(x)) for signature

cursor

Pass the cursor into dropbox.dropbox.Dropbox.files_list_folder_continue() to see what’s changed in the folder since your previous query.

Return type:str
class dropbox.files.ListFolderLongpollArg(cursor=None, timeout=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(cursor=None, timeout=None)

x.__init__(…) initializes x; see help(type(x)) for signature

cursor

A cursor as returned by dropbox.dropbox.Dropbox.files_list_folder() or dropbox.dropbox.Dropbox.files_list_folder_continue(). Cursors retrieved by setting ListFolderArg.include_media_info to True are not supported.

Return type:str
timeout

A timeout in seconds. The request will block for at most this length of time, plus up to 90 seconds of random jitter added to avoid the thundering herd problem. Care should be taken when using this parameter, as some network infrastructure does not support long timeouts.

Return type:int
class dropbox.files.ListFolderLongpollError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:files.ListFolderLongpollError.reset – Indicates that the cursor has been invalidated. Call dropbox.dropbox.Dropbox.files_list_folder() to obtain a new cursor.
is_other()

Check if the union tag is other.

Return type:bool
is_reset()

Check if the union tag is reset.

Return type:bool
other = ListFolderLongpollError('other', None)
reset = ListFolderLongpollError('reset', None)
class dropbox.files.ListFolderLongpollResult(changes=None, backoff=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(changes=None, backoff=None)

x.__init__(…) initializes x; see help(type(x)) for signature

backoff

If present, backoff for at least this many seconds before calling dropbox.dropbox.Dropbox.files_list_folder_longpoll() again.

Return type:int
changes

Indicates whether new changes are available. If true, call dropbox.dropbox.Dropbox.files_list_folder_continue() to retrieve the changes.

Return type:bool
class dropbox.files.ListFolderResult(entries=None, cursor=None, has_more=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(entries=None, cursor=None, has_more=None)

x.__init__(…) initializes x; see help(type(x)) for signature

cursor

Pass the cursor into dropbox.dropbox.Dropbox.files_list_folder_continue() to see what’s changed in the folder since your previous query.

Return type:str
entries

The files and (direct) subfolders in the folder.

Return type:list of [files.Metadata]
has_more

If true, then there are more entries available. Pass the cursor to dropbox.dropbox.Dropbox.files_list_folder_continue() to retrieve the rest.

Return type:bool
class dropbox.files.ListRevisionsArg(path=None, mode=None, limit=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(path=None, mode=None, limit=None)

x.__init__(…) initializes x; see help(type(x)) for signature

limit

The maximum number of revision entries returned.

Return type:int
mode

Determines the behavior of the API in listing the revisions for a given file path or id.

Return type:files.ListRevisionsMode
path

The path to the file you want to see the revisions of.

Return type:str
class dropbox.files.ListRevisionsError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_path()

Only call this if is_path() is true.

Return type:files.LookupError
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
other = ListRevisionsError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.ListRevisionsError
class dropbox.files.ListRevisionsMode(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
  • files.ListRevisionsMode.path – Returns revisions with the same file path as identified by the latest file entry at the given file path or id.
  • files.ListRevisionsMode.id – Returns revisions with the same file id as identified by the latest file entry at the given file path or id.
id = ListRevisionsMode('id', None)
is_id()

Check if the union tag is id.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
other = ListRevisionsMode('other', None)
path = ListRevisionsMode('path', None)
class dropbox.files.ListRevisionsResult(is_deleted=None, entries=None, server_deleted=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(is_deleted=None, entries=None, server_deleted=None)

x.__init__(…) initializes x; see help(type(x)) for signature

entries

The revisions for the file. Only revisions that are not deleted will show up here.

Return type:list of [files.FileMetadata]
is_deleted

If the file identified by the latest revision in the response is either deleted or moved.

Return type:bool
server_deleted

The time of deletion if the file was deleted.

Return type:datetime.datetime
class dropbox.files.LookupError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_malformed_path()

The given path does not satisfy the required path format. Please refer to the Path formats documentation for more information.

Only call this if is_malformed_path() is true.

Return type:Optional[str]
is_malformed_path()

Check if the union tag is malformed_path.

Return type:bool
is_not_file()

Check if the union tag is not_file.

Return type:bool
is_not_folder()

Check if the union tag is not_folder.

Return type:bool
is_not_found()

Check if the union tag is not_found.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_restricted_content()

Check if the union tag is restricted_content.

Return type:bool
classmethod malformed_path(val)

Create an instance of this class set to the malformed_path tag with value val.

Parameters:val (Optional[str]) –
Return type:files.LookupError
not_file = LookupError('not_file', None)
not_folder = LookupError('not_folder', None)
not_found = LookupError('not_found', None)
other = LookupError('other', None)
restricted_content = LookupError('restricted_content', None)
class dropbox.files.MediaInfo(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_metadata()

The metadata for the photo/video.

Only call this if is_metadata() is true.

Return type:files.MediaMetadata
is_metadata()

Check if the union tag is metadata.

Return type:bool
is_pending()

Check if the union tag is pending.

Return type:bool
classmethod metadata(val)

Create an instance of this class set to the metadata tag with value val.

Parameters:val (files.MediaMetadata) –
Return type:files.MediaInfo
pending = MediaInfo('pending', None)
class dropbox.files.MediaMetadata(dimensions=None, location=None, time_taken=None)

Bases: dropbox.stone_base.Struct

Metadata for a photo or video.

Variables:
__init__(dimensions=None, location=None, time_taken=None)

x.__init__(…) initializes x; see help(type(x)) for signature

dimensions

Dimension of the photo/video.

Return type:files.Dimensions
location

The GPS coordinate of the photo/video.

Return type:files.GpsCoordinates
time_taken

The timestamp when the photo/video is taken.

Return type:datetime.datetime
class dropbox.files.Metadata(name=None, path_lower=None, path_display=None, parent_shared_folder_id=None)

Bases: dropbox.stone_base.Struct

Metadata for a file or folder.

Variables:
  • files.Metadata.name – The last component of the path (including extension). This never contains a slash.
  • files.Metadata.path_lower – The lowercased full path in the user’s Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.
  • files.Metadata.path_display – The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user’s filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won’t be returned by dropbox.dropbox.Dropbox.files_list_folder_continue(). This field will be null if the file or folder is not mounted.
  • files.Metadata.parent_shared_folder_id – Please use FileSharingInfo.parent_shared_folder_id or FolderSharingInfo.parent_shared_folder_id instead.
__init__(name=None, path_lower=None, path_display=None, parent_shared_folder_id=None)

x.__init__(…) initializes x; see help(type(x)) for signature

name

The last component of the path (including extension). This never contains a slash.

Return type:str
parent_shared_folder_id

Please use FileSharingInfo.parent_shared_folder_id or FolderSharingInfo.parent_shared_folder_id instead.

Return type:str
path_display

The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user’s filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won’t be returned by dropbox.dropbox.Dropbox.files_list_folder_continue(). This field will be null if the file or folder is not mounted.

Return type:str
path_lower

The lowercased full path in the user’s Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.

Return type:str
class dropbox.files.MoveBatchArg(entries=None, autorename=None, allow_ownership_transfer=None)

Bases: dropbox.files.RelocationBatchArgBase

Variables:files.MoveBatchArg.allow_ownership_transfer – Allow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.
__init__(entries=None, autorename=None, allow_ownership_transfer=None)

x.__init__(…) initializes x; see help(type(x)) for signature

allow_ownership_transfer

Allow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.

Return type:bool
class dropbox.files.PhotoMetadata(dimensions=None, location=None, time_taken=None)

Bases: dropbox.files.MediaMetadata

Metadata for a photo.

__init__(dimensions=None, location=None, time_taken=None)

x.__init__(…) initializes x; see help(type(x)) for signature

class dropbox.files.PreviewArg(path=None, rev=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(path=None, rev=None)

x.__init__(…) initializes x; see help(type(x)) for signature

path

The path of the file to preview.

Return type:str
rev

Please specify revision in path instead.

Return type:str
class dropbox.files.PreviewError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_path()

An error occurs when downloading metadata for the file.

Only call this if is_path() is true.

Return type:files.LookupError
in_progress = PreviewError('in_progress', None)
is_in_progress()

Check if the union tag is in_progress.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
is_unsupported_content()

Check if the union tag is unsupported_content.

Return type:bool
is_unsupported_extension()

Check if the union tag is unsupported_extension.

Return type:bool
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.PreviewError
unsupported_content = PreviewError('unsupported_content', None)
unsupported_extension = PreviewError('unsupported_extension', None)
class dropbox.files.RelocationArg(from_path=None, to_path=None, allow_shared_folder=None, autorename=None, allow_ownership_transfer=None)

Bases: dropbox.files.RelocationPath

Variables:
__init__(from_path=None, to_path=None, allow_shared_folder=None, autorename=None, allow_ownership_transfer=None)

x.__init__(…) initializes x; see help(type(x)) for signature

allow_ownership_transfer

Allow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.

Return type:bool
allow_shared_folder

If true, dropbox.dropbox.Dropbox.files_copy() will copy contents in shared folder, otherwise RelocationError.cant_copy_shared_folder will be returned if from_path contains shared folder. This field is always true for dropbox.dropbox.Dropbox.files_move().

Return type:bool
autorename

If there’s a conflict, have the Dropbox server try to autorename the file to avoid the conflict.

Return type:bool
class dropbox.files.RelocationBatchArg(entries=None, autorename=None, allow_shared_folder=None, allow_ownership_transfer=None)

Bases: dropbox.files.RelocationBatchArgBase

Variables:
__init__(entries=None, autorename=None, allow_shared_folder=None, allow_ownership_transfer=None)

x.__init__(…) initializes x; see help(type(x)) for signature

allow_ownership_transfer

Allow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.

Return type:bool
allow_shared_folder

If true, dropbox.dropbox.Dropbox.files_copy_batch() will copy contents in shared folder, otherwise RelocationError.cant_copy_shared_folder will be returned if RelocationPath.from_path contains shared folder. This field is always true for dropbox.dropbox.Dropbox.files_move_batch().

Return type:bool
class dropbox.files.RelocationBatchArgBase(entries=None, autorename=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(entries=None, autorename=None)

x.__init__(…) initializes x; see help(type(x)) for signature

autorename

If there’s a conflict with any file, have the Dropbox server try to autorename that file to avoid the conflict.

Return type:bool
entries

List of entries to be moved or copied. Each entry is RelocationPath.

Return type:list of [files.RelocationPath]
class dropbox.files.RelocationBatchError(tag, value=None)

Bases: dropbox.files.RelocationError

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:files.RelocationBatchError.too_many_write_operations – There are too many write operations in user’s Dropbox. Please retry this request.
is_too_many_write_operations()

Check if the union tag is too_many_write_operations.

Return type:bool
too_many_write_operations = RelocationBatchError('too_many_write_operations', None)
class dropbox.files.RelocationBatchErrorEntry(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_relocation_error()

User errors that retry won’t help.

Only call this if is_relocation_error() is true.

Return type:files.RelocationError
internal_error = RelocationBatchErrorEntry('internal_error', None)
is_internal_error()

Check if the union tag is internal_error.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_relocation_error()

Check if the union tag is relocation_error.

Return type:bool
is_too_many_write_operations()

Check if the union tag is too_many_write_operations.

Return type:bool
other = RelocationBatchErrorEntry('other', None)
classmethod relocation_error(val)

Create an instance of this class set to the relocation_error tag with value val.

Parameters:val (files.RelocationError) –
Return type:files.RelocationBatchErrorEntry
too_many_write_operations = RelocationBatchErrorEntry('too_many_write_operations', None)
class dropbox.files.RelocationBatchJobStatus(tag, value=None)

Bases: dropbox.async_.PollResultBase

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.RelocationBatchResult) –
Return type:files.RelocationBatchJobStatus
classmethod failed(val)

Create an instance of this class set to the failed tag with value val.

Parameters:val (files.RelocationBatchError) –
Return type:files.RelocationBatchJobStatus
get_complete()

The copy or move batch job has finished.

Only call this if is_complete() is true.

Return type:files.RelocationBatchResult
get_failed()

The copy or move batch job has failed with exception.

Only call this if is_failed() is true.

Return type:files.RelocationBatchError
is_complete()

Check if the union tag is complete.

Return type:bool
is_failed()

Check if the union tag is failed.

Return type:bool
class dropbox.files.RelocationBatchLaunch(tag, value=None)

Bases: dropbox.async_.LaunchResultBase

Result returned by dropbox.dropbox.Dropbox.files_copy_batch() or dropbox.dropbox.Dropbox.files_move_batch() that may either launch an asynchronous job or complete synchronously.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.RelocationBatchResult) –
Return type:files.RelocationBatchLaunch
get_complete()

Only call this if is_complete() is true.

Return type:files.RelocationBatchResult
is_complete()

Check if the union tag is complete.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = RelocationBatchLaunch('other', None)
class dropbox.files.RelocationBatchResult(entries=None)

Bases: dropbox.files.FileOpsResult

__init__(entries=None)

x.__init__(…) initializes x; see help(type(x)) for signature

entries
Return type:list of [files.RelocationBatchResultData]
class dropbox.files.RelocationBatchResultData(metadata=None)

Bases: dropbox.stone_base.Struct

Variables:files.RelocationBatchResultData.metadata – Metadata of the relocated object.
__init__(metadata=None)

x.__init__(…) initializes x; see help(type(x)) for signature

metadata

Metadata of the relocated object.

Return type:files.Metadata
class dropbox.files.RelocationBatchResultEntry(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

classmethod failure(val)

Create an instance of this class set to the failure tag with value val.

Parameters:val (files.RelocationBatchErrorEntry) –
Return type:files.RelocationBatchResultEntry
get_failure()

Only call this if is_failure() is true.

Return type:files.RelocationBatchErrorEntry
get_success()

Only call this if is_success() is true.

Return type:files.Metadata
is_failure()

Check if the union tag is failure.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_success()

Check if the union tag is success.

Return type:bool
other = RelocationBatchResultEntry('other', None)
classmethod success(val)

Create an instance of this class set to the success tag with value val.

Parameters:val (files.Metadata) –
Return type:files.RelocationBatchResultEntry
class dropbox.files.RelocationBatchV2JobStatus(tag, value=None)

Bases: dropbox.async_.PollResultBase

Result returned by dropbox.dropbox.Dropbox.files_copy_batch() or dropbox.dropbox.Dropbox.files_move_batch() that may either launch an asynchronous job or complete synchronously.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:files.RelocationBatchV2JobStatus.complete (RelocationBatchV2Result) – The copy or move batch job has finished.
classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.RelocationBatchV2Result) –
Return type:files.RelocationBatchV2JobStatus
get_complete()

The copy or move batch job has finished.

Only call this if is_complete() is true.

Return type:files.RelocationBatchV2Result
is_complete()

Check if the union tag is complete.

Return type:bool
class dropbox.files.RelocationBatchV2Launch(tag, value=None)

Bases: dropbox.async_.LaunchResultBase

Result returned by dropbox.dropbox.Dropbox.files_copy_batch() or dropbox.dropbox.Dropbox.files_move_batch() that may either launch an asynchronous job or complete synchronously.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.RelocationBatchV2Result) –
Return type:files.RelocationBatchV2Launch
get_complete()

Only call this if is_complete() is true.

Return type:files.RelocationBatchV2Result
is_complete()

Check if the union tag is complete.

Return type:bool
class dropbox.files.RelocationBatchV2Result(entries=None)

Bases: dropbox.files.FileOpsResult

Variables:files.RelocationBatchV2Result.entries – Each entry in CopyBatchArg.entries or MoveBatchArg.entries will appear at the same position inside RelocationBatchV2Result.entries.
__init__(entries=None)

x.__init__(…) initializes x; see help(type(x)) for signature

entries

Each entry in CopyBatchArg.entries or MoveBatchArg.entries will appear at the same position inside RelocationBatchV2Result.entries.

Return type:list of [files.RelocationBatchResultEntry]
class dropbox.files.RelocationError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
cant_copy_shared_folder = RelocationError('cant_copy_shared_folder', None)
cant_move_folder_into_itself = RelocationError('cant_move_folder_into_itself', None)
cant_nest_shared_folder = RelocationError('cant_nest_shared_folder', None)
cant_transfer_ownership = RelocationError('cant_transfer_ownership', None)
duplicated_or_nested_paths = RelocationError('duplicated_or_nested_paths', None)
classmethod from_lookup(val)

Create an instance of this class set to the from_lookup tag with value val.

Parameters:val (files.LookupError) –
Return type:files.RelocationError
classmethod from_write(val)

Create an instance of this class set to the from_write tag with value val.

Parameters:val (files.WriteError) –
Return type:files.RelocationError
get_from_lookup()

Only call this if is_from_lookup() is true.

Return type:files.LookupError
get_from_write()

Only call this if is_from_write() is true.

Return type:files.WriteError
get_to()

Only call this if is_to() is true.

Return type:files.WriteError
insufficient_quota = RelocationError('insufficient_quota', None)
internal_error = RelocationError('internal_error', None)
is_cant_copy_shared_folder()

Check if the union tag is cant_copy_shared_folder.

Return type:bool
is_cant_move_folder_into_itself()

Check if the union tag is cant_move_folder_into_itself.

Return type:bool
is_cant_nest_shared_folder()

Check if the union tag is cant_nest_shared_folder.

Return type:bool
is_cant_transfer_ownership()

Check if the union tag is cant_transfer_ownership.

Return type:bool
is_duplicated_or_nested_paths()

Check if the union tag is duplicated_or_nested_paths.

Return type:bool
is_from_lookup()

Check if the union tag is from_lookup.

Return type:bool
is_from_write()

Check if the union tag is from_write.

Return type:bool
is_insufficient_quota()

Check if the union tag is insufficient_quota.

Return type:bool
is_internal_error()

Check if the union tag is internal_error.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_to()

Check if the union tag is to.

Return type:bool
is_too_many_files()

Check if the union tag is too_many_files.

Return type:bool
other = RelocationError('other', None)
classmethod to(val)

Create an instance of this class set to the to tag with value val.

Parameters:val (files.WriteError) –
Return type:files.RelocationError
too_many_files = RelocationError('too_many_files', None)
class dropbox.files.RelocationPath(from_path=None, to_path=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(from_path=None, to_path=None)

x.__init__(…) initializes x; see help(type(x)) for signature

from_path

Path in the user’s Dropbox to be copied or moved.

Return type:str
to_path

Path in the user’s Dropbox that is the destination.

Return type:str
class dropbox.files.RelocationResult(metadata=None)

Bases: dropbox.files.FileOpsResult

Variables:files.RelocationResult.metadata – Metadata of the relocated object.
__init__(metadata=None)

x.__init__(…) initializes x; see help(type(x)) for signature

metadata

Metadata of the relocated object.

Return type:files.Metadata
class dropbox.files.RestoreArg(path=None, rev=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(path=None, rev=None)

x.__init__(…) initializes x; see help(type(x)) for signature

path

The path to save the restored file.

Return type:str
rev

The revision to restore.

Return type:str
class dropbox.files.RestoreError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_path_lookup()

An error occurs when downloading metadata for the file.

Only call this if is_path_lookup() is true.

Return type:files.LookupError
get_path_write()

An error occurs when trying to restore the file to that path.

Only call this if is_path_write() is true.

Return type:files.WriteError
invalid_revision = RestoreError('invalid_revision', None)
is_invalid_revision()

Check if the union tag is invalid_revision.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_path_lookup()

Check if the union tag is path_lookup.

Return type:bool
is_path_write()

Check if the union tag is path_write.

Return type:bool
other = RestoreError('other', None)
classmethod path_lookup(val)

Create an instance of this class set to the path_lookup tag with value val.

Parameters:val (files.LookupError) –
Return type:files.RestoreError
classmethod path_write(val)

Create an instance of this class set to the path_write tag with value val.

Parameters:val (files.WriteError) –
Return type:files.RestoreError
class dropbox.files.SaveCopyReferenceArg(copy_reference=None, path=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(copy_reference=None, path=None)

x.__init__(…) initializes x; see help(type(x)) for signature

copy_reference

A copy reference returned by dropbox.dropbox.Dropbox.files_copy_reference_get().

Return type:str
path

Path in the user’s Dropbox that is the destination.

Return type:str
class dropbox.files.SaveCopyReferenceError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_path()

Only call this if is_path() is true.

Return type:files.WriteError
invalid_copy_reference = SaveCopyReferenceError('invalid_copy_reference', None)
is_invalid_copy_reference()

Check if the union tag is invalid_copy_reference.

Return type:bool
is_no_permission()

Check if the union tag is no_permission.

Return type:bool
is_not_found()

Check if the union tag is not_found.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
is_too_many_files()

Check if the union tag is too_many_files.

Return type:bool
no_permission = SaveCopyReferenceError('no_permission', None)
not_found = SaveCopyReferenceError('not_found', None)
other = SaveCopyReferenceError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.WriteError) –
Return type:files.SaveCopyReferenceError
too_many_files = SaveCopyReferenceError('too_many_files', None)
class dropbox.files.SaveCopyReferenceResult(metadata=None)

Bases: dropbox.stone_base.Struct

Variables:files.SaveCopyReferenceResult.metadata – The metadata of the saved file or folder in the user’s Dropbox.
__init__(metadata=None)

x.__init__(…) initializes x; see help(type(x)) for signature

metadata

The metadata of the saved file or folder in the user’s Dropbox.

Return type:files.Metadata
class dropbox.files.SaveUrlArg(path=None, url=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(path=None, url=None)

x.__init__(…) initializes x; see help(type(x)) for signature

path

The path in Dropbox where the URL will be saved to.

Return type:str
url

The URL to be saved.

Return type:str
class dropbox.files.SaveUrlError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
download_failed = SaveUrlError('download_failed', None)
get_path()

Only call this if is_path() is true.

Return type:files.WriteError
invalid_url = SaveUrlError('invalid_url', None)
is_download_failed()

Check if the union tag is download_failed.

Return type:bool
is_invalid_url()

Check if the union tag is invalid_url.

Return type:bool
is_not_found()

Check if the union tag is not_found.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
not_found = SaveUrlError('not_found', None)
other = SaveUrlError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.WriteError) –
Return type:files.SaveUrlError
class dropbox.files.SaveUrlJobStatus(tag, value=None)

Bases: dropbox.async_.PollResultBase

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:files.SaveUrlJobStatus.complete (FileMetadata) – Metadata of the file where the URL is saved to.
classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.FileMetadata) –
Return type:files.SaveUrlJobStatus
classmethod failed(val)

Create an instance of this class set to the failed tag with value val.

Parameters:val (files.SaveUrlError) –
Return type:files.SaveUrlJobStatus
get_complete()

Metadata of the file where the URL is saved to.

Only call this if is_complete() is true.

Return type:files.FileMetadata
get_failed()

Only call this if is_failed() is true.

Return type:files.SaveUrlError
is_complete()

Check if the union tag is complete.

Return type:bool
is_failed()

Check if the union tag is failed.

Return type:bool
class dropbox.files.SaveUrlResult(tag, value=None)

Bases: dropbox.async_.LaunchResultBase

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:files.SaveUrlResult.complete (FileMetadata) – Metadata of the file where the URL is saved to.
classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.FileMetadata) –
Return type:files.SaveUrlResult
get_complete()

Metadata of the file where the URL is saved to.

Only call this if is_complete() is true.

Return type:files.FileMetadata
is_complete()

Check if the union tag is complete.

Return type:bool
class dropbox.files.SearchArg(path=None, query=None, start=None, max_results=None, mode=None)

Bases: dropbox.stone_base.Struct

Variables:
  • files.SearchArg.path – The path in the user’s Dropbox to search. Should probably be a folder.
  • files.SearchArg.query – The string to search for. The search string is split on spaces into multiple tokens. For file name searching, the last token is used for prefix matching (i.e. “bat c” matches “bat cave” but not “batman car”).
  • files.SearchArg.start – The starting index within the search results (used for paging).
  • files.SearchArg.max_results – The maximum number of search results to return.
  • files.SearchArg.mode – The search mode (filename, filename_and_content, or deleted_filename). Note that searching file content is only available for Dropbox Business accounts.
__init__(path=None, query=None, start=None, max_results=None, mode=None)

x.__init__(…) initializes x; see help(type(x)) for signature

max_results

The maximum number of search results to return.

Return type:int
mode

The search mode (filename, filename_and_content, or deleted_filename). Note that searching file content is only available for Dropbox Business accounts.

Return type:files.SearchMode
path

The path in the user’s Dropbox to search. Should probably be a folder.

Return type:str
query

The string to search for. The search string is split on spaces into multiple tokens. For file name searching, the last token is used for prefix matching (i.e. “bat c” matches “bat cave” but not “batman car”).

Return type:str
start

The starting index within the search results (used for paging).

Return type:int
class dropbox.files.SearchError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_path()

Only call this if is_path() is true.

Return type:files.LookupError
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
other = SearchError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.SearchError
class dropbox.files.SearchMatch(match_type=None, metadata=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(match_type=None, metadata=None)

x.__init__(…) initializes x; see help(type(x)) for signature

match_type

The type of the match.

Return type:files.SearchMatchType
metadata

The metadata for the matched file or folder.

Return type:files.Metadata
class dropbox.files.SearchMatchType(tag, value=None)

Bases: dropbox.stone_base.Union

Indicates what type of match was found for a given item.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
both = SearchMatchType('both', None)
content = SearchMatchType('content', None)
filename = SearchMatchType('filename', None)
is_both()

Check if the union tag is both.

Return type:bool
is_content()

Check if the union tag is content.

Return type:bool
is_filename()

Check if the union tag is filename.

Return type:bool
class dropbox.files.SearchMode(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
deleted_filename = SearchMode('deleted_filename', None)
filename = SearchMode('filename', None)
filename_and_content = SearchMode('filename_and_content', None)
is_deleted_filename()

Check if the union tag is deleted_filename.

Return type:bool
is_filename()

Check if the union tag is filename.

Return type:bool
is_filename_and_content()

Check if the union tag is filename_and_content.

Return type:bool
class dropbox.files.SearchResult(matches=None, more=None, start=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(matches=None, more=None, start=None)

x.__init__(…) initializes x; see help(type(x)) for signature

matches

A list (possibly empty) of matches for the query.

Return type:list of [files.SearchMatch]
more

Used for paging. If true, indicates there is another page of results available that can be fetched by calling dropbox.dropbox.Dropbox.files_search() again.

Return type:bool
start

Used for paging. Value to set the start argument to when calling dropbox.dropbox.Dropbox.files_search() to fetch the next page of results.

Return type:int

Bases: dropbox.stone_base.Struct

Variables:
__init__(url=None, password=None)

x.__init__(…) initializes x; see help(type(x)) for signature

password

Password for the shared link.

Return type:str
url

Shared link url.

Return type:str
class dropbox.files.SharingInfo(read_only=None)

Bases: dropbox.stone_base.Struct

Sharing info for a file or folder.

Variables:files.SharingInfo.read_only – True if the file or folder is inside a read-only shared folder.
__init__(read_only=None)

x.__init__(…) initializes x; see help(type(x)) for signature

read_only

True if the file or folder is inside a read-only shared folder.

Return type:bool
class dropbox.files.SymlinkInfo(target=None)

Bases: dropbox.stone_base.Struct

Variables:files.SymlinkInfo.target – The target this symlink points to.
__init__(target=None)

x.__init__(…) initializes x; see help(type(x)) for signature

target

The target this symlink points to.

Return type:str
class dropbox.files.SyncSetting(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
  • files.SyncSetting.default – On first sync to members’ computers, the specified folder will follow its parent folder’s setting or otherwise follow default sync behavior.
  • files.SyncSetting.not_synced – On first sync to members’ computers, the specified folder will be set to not sync with selective sync.
  • files.SyncSetting.not_synced_inactive – The specified folder’s not_synced setting is inactive due to its location or other configuration changes. It will follow its parent folder’s setting.
default = SyncSetting('default', None)
is_default()

Check if the union tag is default.

Return type:bool
is_not_synced()

Check if the union tag is not_synced.

Return type:bool
is_not_synced_inactive()

Check if the union tag is not_synced_inactive.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
not_synced = SyncSetting('not_synced', None)
not_synced_inactive = SyncSetting('not_synced_inactive', None)
other = SyncSetting('other', None)
class dropbox.files.SyncSettingArg(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
  • files.SyncSettingArg.default – On first sync to members’ computers, the specified folder will follow its parent folder’s setting or otherwise follow default sync behavior.
  • files.SyncSettingArg.not_synced – On first sync to members’ computers, the specified folder will be set to not sync with selective sync.
default = SyncSettingArg('default', None)
is_default()

Check if the union tag is default.

Return type:bool
is_not_synced()

Check if the union tag is not_synced.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
not_synced = SyncSettingArg('not_synced', None)
other = SyncSettingArg('other', None)
class dropbox.files.SyncSettingsError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_path()

Only call this if is_path() is true.

Return type:files.LookupError
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
is_unsupported_combination()

Check if the union tag is unsupported_combination.

Return type:bool
is_unsupported_configuration()

Check if the union tag is unsupported_configuration.

Return type:bool
other = SyncSettingsError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.SyncSettingsError
unsupported_combination = SyncSettingsError('unsupported_combination', None)
unsupported_configuration = SyncSettingsError('unsupported_configuration', None)
class dropbox.files.ThumbnailArg(path=None, format=None, size=None, mode=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(path=None, format=None, size=None, mode=None)

x.__init__(…) initializes x; see help(type(x)) for signature

format

The format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.

Return type:files.ThumbnailFormat
mode

How to resize and crop the image to achieve the desired size.

Return type:files.ThumbnailMode
path

The path to the image file you want to thumbnail.

Return type:str
size

The size for the thumbnail image.

Return type:files.ThumbnailSize
class dropbox.files.ThumbnailError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
conversion_error = ThumbnailError('conversion_error', None)
get_path()

An error occurs when downloading metadata for the image.

Only call this if is_path() is true.

Return type:files.LookupError
is_conversion_error()

Check if the union tag is conversion_error.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
is_unsupported_extension()

Check if the union tag is unsupported_extension.

Return type:bool
is_unsupported_image()

Check if the union tag is unsupported_image.

Return type:bool
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.LookupError) –
Return type:files.ThumbnailError
unsupported_extension = ThumbnailError('unsupported_extension', None)
unsupported_image = ThumbnailError('unsupported_image', None)
class dropbox.files.ThumbnailFormat(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

is_jpeg()

Check if the union tag is jpeg.

Return type:bool
is_png()

Check if the union tag is png.

Return type:bool
jpeg = ThumbnailFormat('jpeg', None)
png = ThumbnailFormat('png', None)
class dropbox.files.ThumbnailMode(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
bestfit = ThumbnailMode('bestfit', None)
fitone_bestfit = ThumbnailMode('fitone_bestfit', None)
is_bestfit()

Check if the union tag is bestfit.

Return type:bool
is_fitone_bestfit()

Check if the union tag is fitone_bestfit.

Return type:bool
is_strict()

Check if the union tag is strict.

Return type:bool
strict = ThumbnailMode('strict', None)
class dropbox.files.ThumbnailSize(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
is_w1024h768()

Check if the union tag is w1024h768.

Return type:bool
is_w128h128()

Check if the union tag is w128h128.

Return type:bool
is_w2048h1536()

Check if the union tag is w2048h1536.

Return type:bool
is_w256h256()

Check if the union tag is w256h256.

Return type:bool
is_w32h32()

Check if the union tag is w32h32.

Return type:bool
is_w480h320()

Check if the union tag is w480h320.

Return type:bool
is_w640h480()

Check if the union tag is w640h480.

Return type:bool
is_w64h64()

Check if the union tag is w64h64.

Return type:bool
is_w960h640()

Check if the union tag is w960h640.

Return type:bool
w1024h768 = ThumbnailSize('w1024h768', None)
w128h128 = ThumbnailSize('w128h128', None)
w2048h1536 = ThumbnailSize('w2048h1536', None)
w256h256 = ThumbnailSize('w256h256', None)
w32h32 = ThumbnailSize('w32h32', None)
w480h320 = ThumbnailSize('w480h320', None)
w640h480 = ThumbnailSize('w640h480', None)
w64h64 = ThumbnailSize('w64h64', None)
w960h640 = ThumbnailSize('w960h640', None)
class dropbox.files.UploadError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_path()

Unable to save the uploaded contents to a file.

Only call this if is_path() is true.

Return type:files.UploadWriteFailed
get_properties_error()

The supplied property group is invalid. The file has uploaded without property groups.

Only call this if is_properties_error() is true.

Return type:file_properties.InvalidPropertyGroupError
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
is_properties_error()

Check if the union tag is properties_error.

Return type:bool
other = UploadError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.UploadWriteFailed) –
Return type:files.UploadError
classmethod properties_error(val)

Create an instance of this class set to the properties_error tag with value val.

Parameters:val (file_properties.InvalidPropertyGroupError) –
Return type:files.UploadError
class dropbox.files.UploadErrorWithProperties(tag, value=None)

Bases: dropbox.files.UploadError

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

class dropbox.files.UploadSessionAppendArg(cursor=None, close=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(cursor=None, close=None)

x.__init__(…) initializes x; see help(type(x)) for signature

close

If true, the current session will be closed, at which point you won’t be able to call dropbox.dropbox.Dropbox.files_upload_session_append() anymore with the current session.

Return type:bool
cursor

Contains the upload session ID and the offset.

Return type:files.UploadSessionCursor
class dropbox.files.UploadSessionCursor(session_id=None, offset=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(session_id=None, offset=None)

x.__init__(…) initializes x; see help(type(x)) for signature

offset

The amount of data that has been uploaded so far. We use this to make sure upload data isn’t lost or duplicated in the event of a network error.

Return type:int
session_id

The upload session ID (returned by dropbox.dropbox.Dropbox.files_upload_session_start()).

Return type:str
class dropbox.files.UploadSessionFinishArg(cursor=None, commit=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(cursor=None, commit=None)

x.__init__(…) initializes x; see help(type(x)) for signature

commit

Contains the path and other optional modifiers for the commit.

Return type:files.CommitInfo
cursor

Contains the upload session ID and the offset.

Return type:files.UploadSessionCursor
class dropbox.files.UploadSessionFinishBatchArg(entries=None)

Bases: dropbox.stone_base.Struct

Variables:files.UploadSessionFinishBatchArg.entries – Commit information for each file in the batch.
__init__(entries=None)

x.__init__(…) initializes x; see help(type(x)) for signature

entries

Commit information for each file in the batch.

Return type:list of [files.UploadSessionFinishArg]
class dropbox.files.UploadSessionFinishBatchJobStatus(tag, value=None)

Bases: dropbox.async_.PollResultBase

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

:ivar UploadSessionFinishBatchResult
files.UploadSessionFinishBatchJobStatus.complete: The dropbox.dropbox.Dropbox.files_upload_session_finish_batch() has finished.
classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.UploadSessionFinishBatchResult) –
Return type:files.UploadSessionFinishBatchJobStatus
get_complete()

The dropbox.dropbox.Dropbox.files_upload_session_finish_batch() has finished.

Only call this if is_complete() is true.

Return type:files.UploadSessionFinishBatchResult
is_complete()

Check if the union tag is complete.

Return type:bool
class dropbox.files.UploadSessionFinishBatchLaunch(tag, value=None)

Bases: dropbox.async_.LaunchResultBase

Result returned by dropbox.dropbox.Dropbox.files_upload_session_finish_batch() that may either launch an asynchronous job or complete synchronously.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

classmethod complete(val)

Create an instance of this class set to the complete tag with value val.

Parameters:val (files.UploadSessionFinishBatchResult) –
Return type:files.UploadSessionFinishBatchLaunch
get_complete()

Only call this if is_complete() is true.

Return type:files.UploadSessionFinishBatchResult
is_complete()

Check if the union tag is complete.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = UploadSessionFinishBatchLaunch('other', None)
class dropbox.files.UploadSessionFinishBatchResult(entries=None)

Bases: dropbox.stone_base.Struct

Variables:files.UploadSessionFinishBatchResult.entries – Each entry in UploadSessionFinishBatchArg.entries will appear at the same position inside UploadSessionFinishBatchResult.entries.
__init__(entries=None)

x.__init__(…) initializes x; see help(type(x)) for signature

entries

Each entry in UploadSessionFinishBatchArg.entries will appear at the same position inside UploadSessionFinishBatchResult.entries.

Return type:list of [files.UploadSessionFinishBatchResultEntry]
class dropbox.files.UploadSessionFinishBatchResultEntry(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

classmethod failure(val)

Create an instance of this class set to the failure tag with value val.

Parameters:val (files.UploadSessionFinishError) –
Return type:files.UploadSessionFinishBatchResultEntry
get_failure()

Only call this if is_failure() is true.

Return type:files.UploadSessionFinishError
get_success()

Only call this if is_success() is true.

Return type:files.FileMetadata
is_failure()

Check if the union tag is failure.

Return type:bool
is_success()

Check if the union tag is success.

Return type:bool
classmethod success(val)

Create an instance of this class set to the success tag with value val.

Parameters:val (files.FileMetadata) –
Return type:files.UploadSessionFinishBatchResultEntry
class dropbox.files.UploadSessionFinishError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
:ivar InvalidPropertyGroupError
files.UploadSessionFinishError.properties_error: The supplied property group is invalid. The file has uploaded without property groups.
Variables:
get_lookup_failed()

The session arguments are incorrect; the value explains the reason.

Only call this if is_lookup_failed() is true.

Return type:files.UploadSessionLookupError
get_path()

Unable to save the uploaded contents to a file. Data has already been appended to the upload session. Please retry with empty data body and updated offset.

Only call this if is_path() is true.

Return type:files.WriteError
get_properties_error()

The supplied property group is invalid. The file has uploaded without property groups.

Only call this if is_properties_error() is true.

Return type:file_properties.InvalidPropertyGroupError
is_lookup_failed()

Check if the union tag is lookup_failed.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_path()

Check if the union tag is path.

Return type:bool
is_properties_error()

Check if the union tag is properties_error.

Return type:bool
is_too_many_shared_folder_targets()

Check if the union tag is too_many_shared_folder_targets.

Return type:bool
is_too_many_write_operations()

Check if the union tag is too_many_write_operations.

Return type:bool
classmethod lookup_failed(val)

Create an instance of this class set to the lookup_failed tag with value val.

Parameters:val (files.UploadSessionLookupError) –
Return type:files.UploadSessionFinishError
other = UploadSessionFinishError('other', None)
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (files.WriteError) –
Return type:files.UploadSessionFinishError
classmethod properties_error(val)

Create an instance of this class set to the properties_error tag with value val.

Parameters:val (file_properties.InvalidPropertyGroupError) –
Return type:files.UploadSessionFinishError
too_many_shared_folder_targets = UploadSessionFinishError('too_many_shared_folder_targets', None)
too_many_write_operations = UploadSessionFinishError('too_many_write_operations', None)
class dropbox.files.UploadSessionLookupError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:files.UploadSessionLookupError.not_found – The upload session ID was not found or has expired. Upload sessions are valid for 48 hours.
:ivar UploadSessionOffsetError
files.UploadSessionLookupError.incorrect_offset: The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and processed successfully but the client did not receive the response, e.g. due to a network error.
Variables:
closed = UploadSessionLookupError('closed', None)
get_incorrect_offset()

The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and processed successfully but the client did not receive the response, e.g. due to a network error.

Only call this if is_incorrect_offset() is true.

Return type:files.UploadSessionOffsetError
classmethod incorrect_offset(val)

Create an instance of this class set to the incorrect_offset tag with value val.

Parameters:val (files.UploadSessionOffsetError) –
Return type:files.UploadSessionLookupError
is_closed()

Check if the union tag is closed.

Return type:bool
is_incorrect_offset()

Check if the union tag is incorrect_offset.

Return type:bool
is_not_closed()

Check if the union tag is not_closed.

Return type:bool
is_not_found()

Check if the union tag is not_found.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_too_large()

Check if the union tag is too_large.

Return type:bool
not_closed = UploadSessionLookupError('not_closed', None)
not_found = UploadSessionLookupError('not_found', None)
other = UploadSessionLookupError('other', None)
too_large = UploadSessionLookupError('too_large', None)
class dropbox.files.UploadSessionOffsetError(correct_offset=None)

Bases: dropbox.stone_base.Struct

Variables:files.UploadSessionOffsetError.correct_offset – The offset up to which data has been collected.
__init__(correct_offset=None)

x.__init__(…) initializes x; see help(type(x)) for signature

correct_offset

The offset up to which data has been collected.

Return type:int
class dropbox.files.UploadSessionStartArg(close=None)

Bases: dropbox.stone_base.Struct

Variables:files.UploadSessionStartArg.close – If true, the current session will be closed, at which point you won’t be able to call dropbox.dropbox.Dropbox.files_upload_session_append() anymore with the current session.
__init__(close=None)

x.__init__(…) initializes x; see help(type(x)) for signature

close

If true, the current session will be closed, at which point you won’t be able to call dropbox.dropbox.Dropbox.files_upload_session_append() anymore with the current session.

Return type:bool
class dropbox.files.UploadSessionStartResult(session_id=None)

Bases: dropbox.stone_base.Struct

Variables:files.UploadSessionStartResult.session_id – A unique identifier for the upload session. Pass this to dropbox.dropbox.Dropbox.files_upload_session_append() and dropbox.dropbox.Dropbox.files_upload_session_finish().
__init__(session_id=None)

x.__init__(…) initializes x; see help(type(x)) for signature

session_id

A unique identifier for the upload session. Pass this to dropbox.dropbox.Dropbox.files_upload_session_append() and dropbox.dropbox.Dropbox.files_upload_session_finish().

Return type:str
class dropbox.files.UploadWriteFailed(reason=None, upload_session_id=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(reason=None, upload_session_id=None)

x.__init__(…) initializes x; see help(type(x)) for signature

reason

The reason why the file couldn’t be saved.

Return type:files.WriteError
upload_session_id

The upload session ID; data has already been uploaded to the corresponding upload session and this ID may be used to retry the commit with dropbox.dropbox.Dropbox.files_upload_session_finish().

Return type:str
class dropbox.files.VideoMetadata(dimensions=None, location=None, time_taken=None, duration=None)

Bases: dropbox.files.MediaMetadata

Metadata for a video.

Variables:files.VideoMetadata.duration – The duration of the video in milliseconds.
__init__(dimensions=None, location=None, time_taken=None, duration=None)

x.__init__(…) initializes x; see help(type(x)) for signature

duration

The duration of the video in milliseconds.

Return type:int
class dropbox.files.WriteConflictError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
file = WriteConflictError('file', None)
file_ancestor = WriteConflictError('file_ancestor', None)
folder = WriteConflictError('folder', None)
is_file()

Check if the union tag is file.

Return type:bool
is_file_ancestor()

Check if the union tag is file_ancestor.

Return type:bool
is_folder()

Check if the union tag is folder.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = WriteConflictError('other', None)
class dropbox.files.WriteError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
classmethod conflict(val)

Create an instance of this class set to the conflict tag with value val.

Parameters:val (files.WriteConflictError) –
Return type:files.WriteError
disallowed_name = WriteError('disallowed_name', None)
get_conflict()

Couldn’t write to the target path because there was something in the way.

Only call this if is_conflict() is true.

Return type:files.WriteConflictError
get_malformed_path()

The given path does not satisfy the required path format. Please refer to the Path formats documentation for more information.

Only call this if is_malformed_path() is true.

Return type:Optional[str]
insufficient_space = WriteError('insufficient_space', None)
is_conflict()

Check if the union tag is conflict.

Return type:bool
is_disallowed_name()

Check if the union tag is disallowed_name.

Return type:bool
is_insufficient_space()

Check if the union tag is insufficient_space.

Return type:bool
is_malformed_path()

Check if the union tag is malformed_path.

Return type:bool
is_no_write_permission()

Check if the union tag is no_write_permission.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_team_folder()

Check if the union tag is team_folder.

Return type:bool
is_too_many_write_operations()

Check if the union tag is too_many_write_operations.

Return type:bool
classmethod malformed_path(val)

Create an instance of this class set to the malformed_path tag with value val.

Parameters:val (Optional[str]) –
Return type:files.WriteError
no_write_permission = WriteError('no_write_permission', None)
other = WriteError('other', None)
team_folder = WriteError('team_folder', None)
too_many_write_operations = WriteError('too_many_write_operations', None)
class dropbox.files.WriteMode(tag, value=None)

Bases: dropbox.stone_base.Union

Your intent when writing a file to some path. This is used to determine what constitutes a conflict and what the autorename strategy is. In some situations, the conflict behavior is identical: (a) If the target path doesn’t refer to anything, the file is always written; no conflict. (b) If the target path refers to a folder, it’s always a conflict. (c) If the target path refers to a file with identical contents, nothing gets written; no conflict. The conflict checking differs in the case where there’s a file at the target path with contents different from the contents you’re trying to write.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
  • files.WriteMode.add – Do not overwrite an existing file if there is a conflict. The autorename strategy is to append a number to the file name. For example, “document.txt” might become “document (2).txt”.
  • files.WriteMode.overwrite – Always overwrite the existing file. The autorename strategy is the same as it is for add.
  • files.WriteMode.update (str) – Overwrite if the given “rev” matches the existing file’s “rev”. The autorename strategy is to append the string “conflicted copy” to the file name. For example, “document.txt” might become “document (conflicted copy).txt” or “document (Panda’s conflicted copy).txt”.
add = WriteMode('add', None)
get_update()

Overwrite if the given “rev” matches the existing file’s “rev”. The autorename strategy is to append the string “conflicted copy” to the file name. For example, “document.txt” might become “document (conflicted copy).txt” or “document (Panda’s conflicted copy).txt”.

Only call this if is_update() is true.

Return type:str
is_add()

Check if the union tag is add.

Return type:bool
is_overwrite()

Check if the union tag is overwrite.

Return type:bool
is_update()

Check if the union tag is update.

Return type:bool
overwrite = WriteMode('overwrite', None)
classmethod update(val)

Create an instance of this class set to the update tag with value val.

Parameters:val (str) –
Return type:files.WriteMode