dropbox.file_requests – File Requests

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

class dropbox.file_requests.CreateFileRequestArgs(title=None, destination=None, deadline=None, open=None)

Bases: dropbox.stone_base.Struct

Arguments for dropbox.dropbox.Dropbox.file_requests_create().

Variables:
__init__(title=None, destination=None, deadline=None, open=None)

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

deadline

The deadline for the file request. Deadlines can only be set by Professional and Business accounts.

Return type:file_requests.FileRequestDeadline
destination

The path of the folder in the Dropbox where uploaded files will be sent. For apps with the app folder permission, this will be relative to the app folder.

Return type:str
open

Whether or not the file request should be open. If the file request is closed, it will not accept any file submissions, but it can be opened later.

Return type:bool
title

The title of the file request. Must not be empty.

Return type:str
class dropbox.file_requests.CreateFileRequestError(tag, value=None)

Bases: dropbox.file_requests.FileRequestError

There was an error creating the file request.

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:
invalid_location = CreateFileRequestError('invalid_location', None)
is_invalid_location()

Check if the union tag is invalid_location.

Return type:bool
is_rate_limit()

Check if the union tag is rate_limit.

Return type:bool
rate_limit = CreateFileRequestError('rate_limit', None)
class dropbox.file_requests.FileRequest(id=None, url=None, title=None, created=None, is_open=None, file_count=None, destination=None, deadline=None)

Bases: dropbox.stone_base.Struct

A file request for receiving files into the user’s Dropbox account.

Variables:
__init__(id=None, url=None, title=None, created=None, is_open=None, file_count=None, destination=None, deadline=None)

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

created

When this file request was created.

Return type:datetime.datetime
deadline

The deadline for this file request. Only set if the request has a deadline.

Return type:file_requests.FileRequestDeadline
destination

The path of the folder in the Dropbox where uploaded files will be sent. This can be None if the destination was removed. For apps with the app folder permission, this will be relative to the app folder.

Return type:str
file_count

The number of files this file request has received.

Return type:int
id

The ID of the file request.

Return type:str
is_open

Whether or not the file request is open. If the file request is closed, it will not accept any more file submissions.

Return type:bool
title

The title of the file request.

Return type:str
url

The URL of the file request.

Return type:str
class dropbox.file_requests.FileRequestDeadline(deadline=None, allow_late_uploads=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(deadline=None, allow_late_uploads=None)

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

allow_late_uploads

If set, allow uploads after the deadline has passed. These uploads will be marked overdue.

Return type:file_requests.GracePeriod
deadline

The deadline for this file request.

Return type:datetime.datetime
class dropbox.file_requests.FileRequestError(tag, value=None)

Bases: dropbox.file_requests.GeneralFileRequestsError

There is an error with the file request.

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:
app_lacks_access = FileRequestError('app_lacks_access', None)
email_unverified = FileRequestError('email_unverified', None)
is_app_lacks_access()

Check if the union tag is app_lacks_access.

Return type:bool
is_email_unverified()

Check if the union tag is email_unverified.

Return type:bool
is_no_permission()

Check if the union tag is no_permission.

Return type:bool
is_not_a_folder()

Check if the union tag is not_a_folder.

Return type:bool
is_not_found()

Check if the union tag is not_found.

Return type:bool
is_validation_error()

Check if the union tag is validation_error.

Return type:bool
no_permission = FileRequestError('no_permission', None)
not_a_folder = FileRequestError('not_a_folder', None)
not_found = FileRequestError('not_found', None)
validation_error = FileRequestError('validation_error', None)
class dropbox.file_requests.GeneralFileRequestsError(tag, value=None)

Bases: dropbox.stone_base.Union

There is an error accessing the file requests functionality.

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_requests.GeneralFileRequestsError.disabled_for_team – This user’s Dropbox Business team doesn’t allow file requests.
disabled_for_team = GeneralFileRequestsError('disabled_for_team', None)
is_disabled_for_team()

Check if the union tag is disabled_for_team.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = GeneralFileRequestsError('other', None)
class dropbox.file_requests.GetFileRequestArgs(id=None)

Bases: dropbox.stone_base.Struct

Arguments for dropbox.dropbox.Dropbox.file_requests_get().

Variables:file_requests.GetFileRequestArgs.id – The ID of the file request to retrieve.
__init__(id=None)

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

id

The ID of the file request to retrieve.

Return type:str
class dropbox.file_requests.GetFileRequestError(tag, value=None)

Bases: dropbox.file_requests.FileRequestError

There was an error retrieving the specified file request.

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.file_requests.GracePeriod(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.

always = GracePeriod('always', None)
is_always()

Check if the union tag is always.

Return type:bool
is_one_day()

Check if the union tag is one_day.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_seven_days()

Check if the union tag is seven_days.

Return type:bool
is_thirty_days()

Check if the union tag is thirty_days.

Return type:bool
is_two_days()

Check if the union tag is two_days.

Return type:bool
one_day = GracePeriod('one_day', None)
other = GracePeriod('other', None)
seven_days = GracePeriod('seven_days', None)
thirty_days = GracePeriod('thirty_days', None)
two_days = GracePeriod('two_days', None)
class dropbox.file_requests.ListFileRequestsError(tag, value=None)

Bases: dropbox.file_requests.GeneralFileRequestsError

There was an error retrieving the file requests.

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.file_requests.ListFileRequestsResult(file_requests=None)

Bases: dropbox.stone_base.Struct

Result for dropbox.dropbox.Dropbox.file_requests_list().

Variables:file_requests.ListFileRequestsResult.file_requests – The file requests owned by this user. Apps with the app folder permission will only see file requests in their app folder.
__init__(file_requests=None)

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

file_requests

The file requests owned by this user. Apps with the app folder permission will only see file requests in their app folder.

Return type:list of [file_requests.FileRequest]
class dropbox.file_requests.UpdateFileRequestArgs(id=None, title=None, destination=None, deadline=None, open=None)

Bases: dropbox.stone_base.Struct

Arguments for dropbox.dropbox.Dropbox.file_requests_update().

Variables:
__init__(id=None, title=None, destination=None, deadline=None, open=None)

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

deadline

The new deadline for the file request. Deadlines can only be set by Professional and Business accounts.

Return type:file_requests.UpdateFileRequestDeadline
destination

The new path of the folder in the Dropbox where uploaded files will be sent. For apps with the app folder permission, this will be relative to the app folder.

Return type:str
id

The ID of the file request to update.

Return type:str
open

Whether to set this file request as open or closed.

Return type:bool
title

The new title of the file request. Must not be empty.

Return type:str
class dropbox.file_requests.UpdateFileRequestDeadline(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_requests.UpdateFileRequestDeadline.no_update – Do not change the file request’s deadline.
:ivar Optional[file_requests.FileRequestDeadline]
file_requests.UpdateFileRequestDeadline.update: If :val:`null`, the file request’s deadline is cleared.
get_update()

If None, the file request’s deadline is cleared.

Only call this if is_update() is true.

Return type:file_requests.FileRequestDeadline
is_no_update()

Check if the union tag is no_update.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_update()

Check if the union tag is update.

Return type:bool
no_update = UpdateFileRequestDeadline('no_update', None)
other = UpdateFileRequestDeadline('other', None)
classmethod update(val)

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

Parameters:val (file_requests.FileRequestDeadline) –
Return type:file_requests.UpdateFileRequestDeadline
class dropbox.file_requests.UpdateFileRequestError(tag, value=None)

Bases: dropbox.file_requests.FileRequestError

There is an error updating the file request.

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.