[Python-modules-commits] [python-dropbox] 01/02: import python-dropbox_8.0.0.orig.tar.gz

Michael Fladischer fladi at moszumanska.debian.org
Mon Jul 31 19:42:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch debian/master
in repository python-dropbox.

commit 9aa9619b05879c8752f4d4accff74c57bdd4f31e
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Mon Jul 31 09:54:55 2017 +0200

    import python-dropbox_8.0.0.orig.tar.gz
---
 LICENSE                               |    20 +
 MANIFEST.in                           |     4 +
 PKG-INFO                              |   152 +
 README.rst                            |   129 +
 dropbox.egg-info/PKG-INFO             |   152 +
 dropbox.egg-info/SOURCES.txt          |    38 +
 dropbox.egg-info/dependency_links.txt |     1 +
 dropbox.egg-info/not-zip-safe         |     1 +
 dropbox.egg-info/requires.txt         |     3 +
 dropbox.egg-info/top_level.txt        |     1 +
 dropbox/__init__.py                   |     4 +
 dropbox/async.py                      |   310 +
 dropbox/auth.py                       |   723 +
 dropbox/base.py                       |  3295 +++
 dropbox/base_team.py                  |  1452 ++
 dropbox/common.py                     |   319 +
 dropbox/dropbox.py                    |   515 +
 dropbox/exceptions.py                 |    89 +
 dropbox/files.py                      | 10393 +++++++++
 dropbox/oauth.py                      |   507 +
 dropbox/paper.py                      |  3651 +++
 dropbox/properties.py                 |   835 +
 dropbox/session.py                    |    52 +
 dropbox/sharing.py                    | 17671 ++++++++++++++
 dropbox/stone_base.py                 |    75 +
 dropbox/stone_serializers.py          |  1003 +
 dropbox/stone_validators.py           |   592 +
 dropbox/team.py                       | 16000 +++++++++++++
 dropbox/team_common.py                |   468 +
 dropbox/team_log.py                   | 39500 ++++++++++++++++++++++++++++++++
 dropbox/team_policies.py              |   534 +
 dropbox/trusted-certs.crt             |  1396 ++
 dropbox/users.py                      |  1670 ++
 dropbox/users_common.py               |    84 +
 ez_setup.py                           |   332 +
 setup.cfg                             |    13 +
 setup.py                              |    81 +
 test/requirements.txt                 |     0
 test/test_dropbox.py                  |   141 +
 39 files changed, 102206 insertions(+)

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..3e2fc66
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2015-2017 Dropbox Inc., http://www.dropbox.com/
+
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, sublicense, and/or sell copies of the Software, and to
+    permit persons to whom the Software is furnished to do so, subject to
+    the following conditions:
+
+    The above copyright notice and this permission notice shall be
+    included in all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+    LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+    OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..35332d8
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,4 @@
+include ez_setup.py
+include LICENSE
+include *.rst
+include test/requirements.txt
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..2cbfc5f
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,152 @@
+Metadata-Version: 1.1
+Name: dropbox
+Version: 8.0.0
+Summary: Official Dropbox API Client
+Home-page: http://www.dropbox.com/developers
+Author: Dropbox
+Author-email: dev-platform at dropbox.com
+License: MIT License
+Description: Dropbox for Python
+        ==================
+        
+        .. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.0.0
+            :target: https://travis-ci.org/dropbox/dropbox-sdk-python
+        
+        .. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable
+            :target: https://dropbox-sdk-python.readthedocs.org/en/stable/
+            :alt: [Latest Release Documentation]
+        
+        .. image:: https://img.shields.io/pypi/v/dropbox.svg
+            :target: https://pypi.python.org/pypi/dropbox
+            :alt: [Latest Release Version]
+        
+        .. image:: https://img.shields.io/pypi/l/dropbox.svg
+            :target: http://opensource.org/licenses/MIT
+            :alt: [Latest Release License]
+        
+        .. image:: https://img.shields.io/pypi/pyversions/dropbox.svg
+            :target: https://pypi.python.org/pypi/dropbox
+            :alt: [Latest Release Supported Python Versions]
+        
+        .. image:: https://img.shields.io/pypi/implementation/dropbox.svg
+            :target: https://pypi.python.org/pypi/dropbox
+            :alt: [Latest Release Supported Python Implementations]
+        
+        .. image:: https://img.shields.io/pypi/status/dropbox.svg
+            :target: https://pypi.python.org/pypi/dropbox
+            :alt: [Latest Release Development Stage]
+        
+        A Python SDK for integrating with the Dropbox API v2. Compatible with Python
+        2.7 and 3.4+. Documentation is available on `Read the Docs
+        <http://dropbox-sdk-python.readthedocs.org/>`_.
+        
+        Installation
+        ------------
+        
+        Install via ``pip``:
+        
+        .. code-block:: console
+        
+            $ pip install dropbox
+        
+        Install from source:
+        
+        .. code-block:: console
+        
+            $ git clone git://github.com/dropbox/dropbox-sdk-python.git
+            $ cd dropbox-sdk-python
+            $ python setup.py install
+        
+        After installation, to get started, open a Python console:
+        
+        .. code-block:: pycon
+        
+            >>> import dropbox
+            >>> dbx = dropbox.Dropbox("YOUR_ACCESS_TOKEN")
+            >>> dbx.users_get_current_account()
+        
+        Creating an Application
+        -----------------------
+        
+        You need to create an Dropbox Application to make API requests.
+        
+        - Go to https://dropbox.com/developers/apps.
+        
+        Obtaining an Access Token
+        -------------------------
+        
+        All requests need to be made with an OAuth 2 access token. To get started, once
+        you've created an app, you can go to the app's console and generate an access
+        token for your own Dropbox account.
+        
+        Examples
+        --------
+        
+        ``example/updown.py`` demonstrates how to sync a local directory with a Dropbox.
+        
+        Documentation
+        -------------
+        
+        Documentation can be compiled by running ``make html`` from the ``docs``
+        folder. After compilation, open ``docs/_build/html/index.html``. Alternatively,
+        you can read a hosted version from `Read the Docs`_.
+        
+        Updating API specification
+        --------------------------
+        
+        A good amount of this SDK is generated using `Stone
+        <https://www.github.com/dropbox/stone>`_. We use git submodules to pin to a
+        specific version of `Stone` since it's under active development, and we also
+        pin to a version of our `API spec
+        <https://www.github.com/dropbox/dropbox-api-spec>`_.
+        
+        To prepare the repo for generation, run these commands after cloning:
+        
+        .. code-block:: console
+        
+            $ git submodule init
+            $ git submodule update
+        
+        You can run ``git pull`` within these sub repositories to update the pinned
+        version.
+        
+        Now, run the included script:
+        
+        .. code-block:: console
+        
+            $ ./generate_base_client.py
+        
+        Testing
+        -------
+        
+        We use the `tox <https://tox.readthedocs.org/>`_ package to run tests in Python
+        2 and 3. To install, use :code:`pip install tox`. Once installed, run `tox` from the
+        root directory. You'll need to specify a working Dropbox OAuth2 token:
+        
+        .. code-block:: console
+        
+            $ DROPBOX_TOKEN=YOUR_TOKEN tox -- -k "'not test_team'"
+        
+        Note that we skip ``test_team`` which requires a team token with `Member File Access
+        <https://www.dropbox.com/developers/documentation/http/teams#teams-member-file-access>`_.
+        To test this functionality, specify a ``DROPBOX_TEAM_TOKEN`` environment
+        variable.
+        
+        .. code-block:: console
+        
+            $ DROPBOX_TOKEN=... DROPBOX_TEAM_TOKEN=... tox
+        
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..82259d8
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,129 @@
+Dropbox for Python
+==================
+
+.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.0.0
+    :target: https://travis-ci.org/dropbox/dropbox-sdk-python
+
+.. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable
+    :target: https://dropbox-sdk-python.readthedocs.org/en/stable/
+    :alt: [Latest Release Documentation]
+
+.. image:: https://img.shields.io/pypi/v/dropbox.svg
+    :target: https://pypi.python.org/pypi/dropbox
+    :alt: [Latest Release Version]
+
+.. image:: https://img.shields.io/pypi/l/dropbox.svg
+    :target: http://opensource.org/licenses/MIT
+    :alt: [Latest Release License]
+
+.. image:: https://img.shields.io/pypi/pyversions/dropbox.svg
+    :target: https://pypi.python.org/pypi/dropbox
+    :alt: [Latest Release Supported Python Versions]
+
+.. image:: https://img.shields.io/pypi/implementation/dropbox.svg
+    :target: https://pypi.python.org/pypi/dropbox
+    :alt: [Latest Release Supported Python Implementations]
+
+.. image:: https://img.shields.io/pypi/status/dropbox.svg
+    :target: https://pypi.python.org/pypi/dropbox
+    :alt: [Latest Release Development Stage]
+
+A Python SDK for integrating with the Dropbox API v2. Compatible with Python
+2.7 and 3.4+. Documentation is available on `Read the Docs
+<http://dropbox-sdk-python.readthedocs.org/>`_.
+
+Installation
+------------
+
+Install via ``pip``:
+
+.. code-block:: console
+
+    $ pip install dropbox
+
+Install from source:
+
+.. code-block:: console
+
+    $ git clone git://github.com/dropbox/dropbox-sdk-python.git
+    $ cd dropbox-sdk-python
+    $ python setup.py install
+
+After installation, to get started, open a Python console:
+
+.. code-block:: pycon
+
+    >>> import dropbox
+    >>> dbx = dropbox.Dropbox("YOUR_ACCESS_TOKEN")
+    >>> dbx.users_get_current_account()
+
+Creating an Application
+-----------------------
+
+You need to create an Dropbox Application to make API requests.
+
+- Go to https://dropbox.com/developers/apps.
+
+Obtaining an Access Token
+-------------------------
+
+All requests need to be made with an OAuth 2 access token. To get started, once
+you've created an app, you can go to the app's console and generate an access
+token for your own Dropbox account.
+
+Examples
+--------
+
+``example/updown.py`` demonstrates how to sync a local directory with a Dropbox.
+
+Documentation
+-------------
+
+Documentation can be compiled by running ``make html`` from the ``docs``
+folder. After compilation, open ``docs/_build/html/index.html``. Alternatively,
+you can read a hosted version from `Read the Docs`_.
+
+Updating API specification
+--------------------------
+
+A good amount of this SDK is generated using `Stone
+<https://www.github.com/dropbox/stone>`_. We use git submodules to pin to a
+specific version of `Stone` since it's under active development, and we also
+pin to a version of our `API spec
+<https://www.github.com/dropbox/dropbox-api-spec>`_.
+
+To prepare the repo for generation, run these commands after cloning:
+
+.. code-block:: console
+
+    $ git submodule init
+    $ git submodule update
+
+You can run ``git pull`` within these sub repositories to update the pinned
+version.
+
+Now, run the included script:
+
+.. code-block:: console
+
+    $ ./generate_base_client.py
+
+Testing
+-------
+
+We use the `tox <https://tox.readthedocs.org/>`_ package to run tests in Python
+2 and 3. To install, use :code:`pip install tox`. Once installed, run `tox` from the
+root directory. You'll need to specify a working Dropbox OAuth2 token:
+
+.. code-block:: console
+
+    $ DROPBOX_TOKEN=YOUR_TOKEN tox -- -k "'not test_team'"
+
+Note that we skip ``test_team`` which requires a team token with `Member File Access
+<https://www.dropbox.com/developers/documentation/http/teams#teams-member-file-access>`_.
+To test this functionality, specify a ``DROPBOX_TEAM_TOKEN`` environment
+variable.
+
+.. code-block:: console
+
+    $ DROPBOX_TOKEN=... DROPBOX_TEAM_TOKEN=... tox
diff --git a/dropbox.egg-info/PKG-INFO b/dropbox.egg-info/PKG-INFO
new file mode 100644
index 0000000..2cbfc5f
--- /dev/null
+++ b/dropbox.egg-info/PKG-INFO
@@ -0,0 +1,152 @@
+Metadata-Version: 1.1
+Name: dropbox
+Version: 8.0.0
+Summary: Official Dropbox API Client
+Home-page: http://www.dropbox.com/developers
+Author: Dropbox
+Author-email: dev-platform at dropbox.com
+License: MIT License
+Description: Dropbox for Python
+        ==================
+        
+        .. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.0.0
+            :target: https://travis-ci.org/dropbox/dropbox-sdk-python
+        
+        .. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable
+            :target: https://dropbox-sdk-python.readthedocs.org/en/stable/
+            :alt: [Latest Release Documentation]
+        
+        .. image:: https://img.shields.io/pypi/v/dropbox.svg
+            :target: https://pypi.python.org/pypi/dropbox
+            :alt: [Latest Release Version]
+        
+        .. image:: https://img.shields.io/pypi/l/dropbox.svg
+            :target: http://opensource.org/licenses/MIT
+            :alt: [Latest Release License]
+        
+        .. image:: https://img.shields.io/pypi/pyversions/dropbox.svg
+            :target: https://pypi.python.org/pypi/dropbox
+            :alt: [Latest Release Supported Python Versions]
+        
+        .. image:: https://img.shields.io/pypi/implementation/dropbox.svg
+            :target: https://pypi.python.org/pypi/dropbox
+            :alt: [Latest Release Supported Python Implementations]
+        
+        .. image:: https://img.shields.io/pypi/status/dropbox.svg
+            :target: https://pypi.python.org/pypi/dropbox
+            :alt: [Latest Release Development Stage]
+        
+        A Python SDK for integrating with the Dropbox API v2. Compatible with Python
+        2.7 and 3.4+. Documentation is available on `Read the Docs
+        <http://dropbox-sdk-python.readthedocs.org/>`_.
+        
+        Installation
+        ------------
+        
+        Install via ``pip``:
+        
+        .. code-block:: console
+        
+            $ pip install dropbox
+        
+        Install from source:
+        
+        .. code-block:: console
+        
+            $ git clone git://github.com/dropbox/dropbox-sdk-python.git
+            $ cd dropbox-sdk-python
+            $ python setup.py install
+        
+        After installation, to get started, open a Python console:
+        
+        .. code-block:: pycon
+        
+            >>> import dropbox
+            >>> dbx = dropbox.Dropbox("YOUR_ACCESS_TOKEN")
+            >>> dbx.users_get_current_account()
+        
+        Creating an Application
+        -----------------------
+        
+        You need to create an Dropbox Application to make API requests.
+        
+        - Go to https://dropbox.com/developers/apps.
+        
+        Obtaining an Access Token
+        -------------------------
+        
+        All requests need to be made with an OAuth 2 access token. To get started, once
+        you've created an app, you can go to the app's console and generate an access
+        token for your own Dropbox account.
+        
+        Examples
+        --------
+        
+        ``example/updown.py`` demonstrates how to sync a local directory with a Dropbox.
+        
+        Documentation
+        -------------
+        
+        Documentation can be compiled by running ``make html`` from the ``docs``
+        folder. After compilation, open ``docs/_build/html/index.html``. Alternatively,
+        you can read a hosted version from `Read the Docs`_.
+        
+        Updating API specification
+        --------------------------
+        
+        A good amount of this SDK is generated using `Stone
+        <https://www.github.com/dropbox/stone>`_. We use git submodules to pin to a
+        specific version of `Stone` since it's under active development, and we also
+        pin to a version of our `API spec
+        <https://www.github.com/dropbox/dropbox-api-spec>`_.
+        
+        To prepare the repo for generation, run these commands after cloning:
+        
+        .. code-block:: console
+        
+            $ git submodule init
+            $ git submodule update
+        
+        You can run ``git pull`` within these sub repositories to update the pinned
+        version.
+        
+        Now, run the included script:
+        
+        .. code-block:: console
+        
+            $ ./generate_base_client.py
+        
+        Testing
+        -------
+        
+        We use the `tox <https://tox.readthedocs.org/>`_ package to run tests in Python
+        2 and 3. To install, use :code:`pip install tox`. Once installed, run `tox` from the
+        root directory. You'll need to specify a working Dropbox OAuth2 token:
+        
+        .. code-block:: console
+        
+            $ DROPBOX_TOKEN=YOUR_TOKEN tox -- -k "'not test_team'"
+        
+        Note that we skip ``test_team`` which requires a team token with `Member File Access
+        <https://www.dropbox.com/developers/documentation/http/teams#teams-member-file-access>`_.
+        To test this functionality, specify a ``DROPBOX_TEAM_TOKEN`` environment
+        variable.
+        
+        .. code-block:: console
+        
+            $ DROPBOX_TOKEN=... DROPBOX_TEAM_TOKEN=... tox
+        
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/dropbox.egg-info/SOURCES.txt b/dropbox.egg-info/SOURCES.txt
new file mode 100644
index 0000000..6c30c75
--- /dev/null
+++ b/dropbox.egg-info/SOURCES.txt
@@ -0,0 +1,38 @@
+LICENSE
+MANIFEST.in
+README.rst
+ez_setup.py
+setup.cfg
+setup.py
+dropbox/__init__.py
+dropbox/async.py
+dropbox/auth.py
+dropbox/base.py
+dropbox/base_team.py
+dropbox/common.py
+dropbox/dropbox.py
+dropbox/exceptions.py
+dropbox/files.py
+dropbox/oauth.py
+dropbox/paper.py
+dropbox/properties.py
+dropbox/session.py
+dropbox/sharing.py
+dropbox/stone_base.py
+dropbox/stone_serializers.py
+dropbox/stone_validators.py
+dropbox/team.py
+dropbox/team_common.py
+dropbox/team_log.py
+dropbox/team_policies.py
+dropbox/trusted-certs.crt
+dropbox/users.py
+dropbox/users_common.py
+dropbox.egg-info/PKG-INFO
+dropbox.egg-info/SOURCES.txt
+dropbox.egg-info/dependency_links.txt
+dropbox.egg-info/not-zip-safe
+dropbox.egg-info/requires.txt
+dropbox.egg-info/top_level.txt
+test/requirements.txt
+test/test_dropbox.py
\ No newline at end of file
diff --git a/dropbox.egg-info/dependency_links.txt b/dropbox.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/dropbox.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/dropbox.egg-info/not-zip-safe b/dropbox.egg-info/not-zip-safe
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/dropbox.egg-info/not-zip-safe
@@ -0,0 +1 @@
+
diff --git a/dropbox.egg-info/requires.txt b/dropbox.egg-info/requires.txt
new file mode 100644
index 0000000..d7643c8
--- /dev/null
+++ b/dropbox.egg-info/requires.txt
@@ -0,0 +1,3 @@
+requests >= 2.5.1, != 2.6.1, !=2.16.0, !=2.16.1
+six >= 1.3.0
+urllib3
diff --git a/dropbox.egg-info/top_level.txt b/dropbox.egg-info/top_level.txt
new file mode 100644
index 0000000..c9fe58e
--- /dev/null
+++ b/dropbox.egg-info/top_level.txt
@@ -0,0 +1 @@
+dropbox
diff --git a/dropbox/__init__.py b/dropbox/__init__.py
new file mode 100644
index 0000000..c830bc3
--- /dev/null
+++ b/dropbox/__init__.py
@@ -0,0 +1,4 @@
+from __future__ import absolute_import
+
+from .dropbox import __version__, Dropbox, DropboxTeam, create_session  # noqa: F401
+from .oauth import DropboxOAuth2Flow, DropboxOAuth2FlowNoRedirect  # noqa: F401
diff --git a/dropbox/async.py b/dropbox/async.py
new file mode 100644
index 0000000..453d9e9
--- /dev/null
+++ b/dropbox/async.py
@@ -0,0 +1,310 @@
+# -*- coding: utf-8 -*-
+# Auto-generated by Stone, do not modify.
+# flake8: noqa
+# pylint: skip-file
+try:
+    from . import stone_validators as bv
+    from . import stone_base as bb
+except (SystemError, ValueError):
+    # Catch errors raised when importing a relative module when not in a package.
+    # This makes testing this file directly (outside of a package) easier.
+    import stone_validators as bv
+    import stone_base as bb
+
+class LaunchResultBase(bb.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 :class:`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.
+
+    :ivar str 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.
+    """
+
+    _catch_all = None
+
+    @classmethod
+    def async_job_id(cls, val):
+        """
+        Create an instance of this class set to the ``async_job_id`` tag with
+        value ``val``.
+
+        :param str val:
+        :rtype: LaunchResultBase
+        """
+        return cls('async_job_id', val)
+
+    def is_async_job_id(self):
+        """
+        Check if the union tag is ``async_job_id``.
+
+        :rtype: bool
+        """
+        return self._tag == 'async_job_id'
+
+    def get_async_job_id(self):
+        """
+        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 :meth:`is_async_job_id` is true.
+
+        :rtype: str
+        """
+        if not self.is_async_job_id():
+            raise AttributeError("tag 'async_job_id' not set")
+        return self._value
+
+    def __repr__(self):
+        return 'LaunchResultBase(%r, %r)' % (self._tag, self._value)
+
+LaunchResultBase_validator = bv.Union(LaunchResultBase)
+
+class LaunchEmptyResult(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.
+
+    :ivar complete: The job finished synchronously and successfully.
+    """
+
+    # Attribute is overwritten below the class definition
+    complete = None
+
+    def is_complete(self):
+        """
+        Check if the union tag is ``complete``.
+
+        :rtype: bool
+        """
+        return self._tag == 'complete'
+
+    def __repr__(self):
+        return 'LaunchEmptyResult(%r, %r)' % (self._tag, self._value)
+
+LaunchEmptyResult_validator = bv.Union(LaunchEmptyResult)
+
+class PollArg(object):
+    """
+    Arguments for methods that poll the status of an asynchronous job.
+
+    :ivar async_job_id: Id of the asynchronous job. This is the value of a
+        response returned from the method that launched the job.
+    """
+
+    __slots__ = [
+        '_async_job_id_value',
+        '_async_job_id_present',
+    ]
+
+    _has_required_fields = True
+
+    def __init__(self,
+                 async_job_id=None):
+        self._async_job_id_value = None
+        self._async_job_id_present = False
+        if async_job_id is not None:
+            self.async_job_id = async_job_id
+
+    @property
+    def async_job_id(self):
+        """
+        Id of the asynchronous job. This is the value of a response returned
+        from the method that launched the job.
+
+        :rtype: str
+        """
+        if self._async_job_id_present:
+            return self._async_job_id_value
+        else:
+            raise AttributeError("missing required field 'async_job_id'")
+
+    @async_job_id.setter
+    def async_job_id(self, val):
+        val = self._async_job_id_validator.validate(val)
+        self._async_job_id_value = val
+        self._async_job_id_present = True
+
+    @async_job_id.deleter
+    def async_job_id(self):
+        self._async_job_id_value = None
+        self._async_job_id_present = False
+
+    def __repr__(self):
+        return 'PollArg(async_job_id={!r})'.format(
+            self._async_job_id_value,
+        )
+
+PollArg_validator = bv.Struct(PollArg)
+
+class PollResultBase(bb.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 :class:`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.
+
+    :ivar in_progress: The asynchronous job is still in progress.
+    """
+
+    _catch_all = None
+    # Attribute is overwritten below the class definition
+    in_progress = None
+
+    def is_in_progress(self):
+        """
+        Check if the union tag is ``in_progress``.
+
+        :rtype: bool
+        """
+        return self._tag == 'in_progress'
+
+    def __repr__(self):
+        return 'PollResultBase(%r, %r)' % (self._tag, self._value)
+
+PollResultBase_validator = bv.Union(PollResultBase)
+
+class PollEmptyResult(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.
+
+    :ivar complete: The asynchronous job has completed successfully.
+    """
+
+    # Attribute is overwritten below the class definition
+    complete = None
+
+    def is_complete(self):
+        """
+        Check if the union tag is ``complete``.
+
+        :rtype: bool
+        """
+        return self._tag == 'complete'
+
+    def __repr__(self):
+        return 'PollEmptyResult(%r, %r)' % (self._tag, self._value)
+
+PollEmptyResult_validator = bv.Union(PollEmptyResult)
+
+class PollError(bb.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.
+
+    :ivar invalid_async_job_id: The job ID is invalid.
+    :ivar 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.
+    """
+
+    _catch_all = 'other'
+    # Attribute is overwritten below the class definition
+    invalid_async_job_id = None
+    # Attribute is overwritten below the class definition
+    internal_error = None
+    # Attribute is overwritten below the class definition
+    other = None
+
+    def is_invalid_async_job_id(self):
+        """
+        Check if the union tag is ``invalid_async_job_id``.
+
+        :rtype: bool
+        """
+        return self._tag == 'invalid_async_job_id'
+
+    def is_internal_error(self):
+        """
+        Check if the union tag is ``internal_error``.
+
+        :rtype: bool
+        """
+        return self._tag == 'internal_error'
+
+    def is_other(self):
+        """
+        Check if the union tag is ``other``.
+
+        :rtype: bool
+        """
+        return self._tag == 'other'
+
+    def __repr__(self):
+        return 'PollError(%r, %r)' % (self._tag, self._value)
+
+PollError_validator = bv.Union(PollError)
+
+AsyncJobId_validator = bv.String(min_length=1)
+LaunchResultBase._async_job_id_validator = AsyncJobId_validator
+LaunchResultBase._tagmap = {
+    'async_job_id': LaunchResultBase._async_job_id_validator,
+}
+
+LaunchEmptyResult._complete_validator = bv.Void()
+LaunchEmptyResult._tagmap = {
+    'complete': LaunchEmptyResult._complete_validator,
+}
+LaunchEmptyResult._tagmap.update(LaunchResultBase._tagmap)
+
+LaunchEmptyResult.complete = LaunchEmptyResult('complete')
+
+PollArg._async_job_id_validator = AsyncJobId_validator
+PollArg._all_field_names_ = set(['async_job_id'])
+PollArg._all_fields_ = [('async_job_id', PollArg._async_job_id_validator)]
+
+PollResultBase._in_progress_validator = bv.Void()
+PollResultBase._tagmap = {
+    'in_progress': PollResultBase._in_progress_validator,
+}
+
+PollResultBase.in_progress = PollResultBase('in_progress')
+
+PollEmptyResult._complete_validator = bv.Void()
+PollEmptyResult._tagmap = {
+    'complete': PollEmptyResult._complete_validator,
+}
+PollEmptyResult._tagmap.update(PollResultBase._tagmap)
+
+PollEmptyResult.complete = PollEmptyResult('complete')
+
+PollError._invalid_async_job_id_validator = bv.Void()
+PollError._internal_error_validator = bv.Void()
+PollError._other_validator = bv.Void()
+PollError._tagmap = {
+    'invalid_async_job_id': PollError._invalid_async_job_id_validator,
+    'internal_error': PollError._internal_error_validator,
+    'other': PollError._other_validator,
+}
+
+PollError.invalid_async_job_id = PollError('invalid_async_job_id')
+PollError.internal_error = PollError('internal_error')
+PollError.other = PollError('other')
+
+ROUTES = {
+}
+
diff --git a/dropbox/auth.py b/dropbox/auth.py
new file mode 100644
index 0000000..2dd5ef0
--- /dev/null
+++ b/dropbox/auth.py
@@ -0,0 +1,723 @@
+# -*- coding: utf-8 -*-
+# Auto-generated by Stone, do not modify.
+# flake8: noqa
+# pylint: skip-file
+try:
+    from . import stone_validators as bv
+    from . import stone_base as bb
+except (SystemError, ValueError):
+    # Catch errors raised when importing a relative module when not in a package.
+    # This makes testing this file directly (outside of a package) easier.
+    import stone_validators as bv
+    import stone_base as bb
+
+class AccessError(bb.Union):
+    """
+    Error occurred because the account doesn't have permission to access the
+    resource.
+
+    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 InvalidAccountTypeError invalid_account_type: Current account type
+        cannot access the resource.
+    :ivar PaperAccessError paper_access_denied: Current account cannot access
+        Paper.
+    """
+
+    _catch_all = 'other'
+    # Attribute is overwritten below the class definition
+    other = None
+
+    @classmethod
+    def invalid_account_type(cls, val):
+        """
+        Create an instance of this class set to the ``invalid_account_type`` tag
+        with value ``val``.
+
+        :param InvalidAccountTypeError val:
+        :rtype: AccessError
+        """
+        return cls('invalid_account_type', val)
+
+    @classmethod
+    def paper_access_denied(cls, val):
+        """
+        Create an instance of this class set to the ``paper_access_denied`` tag
+        with value ``val``.
+
+        :param PaperAccessError val:
+        :rtype: AccessError
+        """
+        return cls('paper_access_denied', val)
+
+    def is_invalid_account_type(self):
+        """
+        Check if the union tag is ``invalid_account_type``.
+
+        :rtype: bool
... 101485 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-dropbox.git



More information about the Python-modules-commits mailing list