dropbox.async_ – Async

As of Python 3.5, async is a reserved keyword. For versions of Python prior to 3.5, the objects documented can be imported from either dropbox.async or dropbox.async_. For Python 3.5+, only dropbox.async_ is supported.
class dropbox.async_.LaunchEmptyResult(tag, value=None)

Bases: dropbox.async_.LaunchResultBase

Result returned by methods that may either launch an asynchronous job or complete synchronously. Upon synchronous completion of the job, no additional information is returned.

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:async.LaunchEmptyResult.complete – The job finished synchronously and successfully.
complete = LaunchEmptyResult(u'complete', None)
is_complete()

Check if the union tag is complete.

Return type:bool
class dropbox.async_.LaunchResultBase(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

Result returned by methods that launch an asynchronous job. A method who may either launch an asynchronous job, or complete the request synchronously, can use this union by extending it, and adding a ‘complete’ field with the type of the synchronous response. See LaunchEmptyResult for an example.

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:async.LaunchResultBase.async_job_id (str) – This response indicates that the processing is asynchronous. The string is an id that can be used to obtain the status of the asynchronous job.
classmethod async_job_id(val)

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

Parameters:val (str) –
Return type:LaunchResultBase
get_async_job_id()

This response indicates that the processing is asynchronous. The string is an id that can be used to obtain the status of the asynchronous job.

Only call this if is_async_job_id() is true.

Return type:str
is_async_job_id()

Check if the union tag is async_job_id.

Return type:bool
class dropbox.async_.PollArg(async_job_id=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Arguments for methods that poll the status of an asynchronous job.

Variables:async.PollArg.async_job_id – Id of the asynchronous job. This is the value of a response returned from the method that launched the job.
__init__(async_job_id=None)

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

async_job_id
class dropbox.async_.PollEmptyResult(tag, value=None)

Bases: dropbox.async_.PollResultBase

Result returned by methods that poll for the status of an asynchronous job. Upon completion of the job, no additional information is returned.

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:async.PollEmptyResult.complete – The asynchronous job has completed successfully.
complete = PollEmptyResult(u'complete', None)
is_complete()

Check if the union tag is complete.

Return type:bool
class dropbox.async_.PollError(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

Error returned by methods for polling the status of asynchronous job.

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:
  • async.PollError.invalid_async_job_id – The job ID is invalid.
  • async.PollError.internal_error – Something went wrong with the job on Dropbox’s end. You’ll need to verify that the action you were taking succeeded, and if not, try again. This should happen very rarely.
internal_error = PollError(u'internal_error', None)
invalid_async_job_id = PollError(u'invalid_async_job_id', None)
is_internal_error()

Check if the union tag is internal_error.

Return type:bool
is_invalid_async_job_id()

Check if the union tag is invalid_async_job_id.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = PollError(u'other', None)
class dropbox.async_.PollResultBase(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

Result returned by methods that poll for the status of an asynchronous job. Unions that extend this union should add a ‘complete’ field with a type of the information returned upon job completion. See PollEmptyResult for an example.

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:async.PollResultBase.in_progress – The asynchronous job is still in progress.
in_progress = PollResultBase(u'in_progress', None)
is_in_progress()

Check if the union tag is in_progress.

Return type:bool