Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Official Dropbox API Client

Project Description

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.

Installation

Install via pip:

$ pip install dropbox

Install from source:

$ 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:

>>> 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.

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. 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.

To prepare the repo for generation, run these commands after cloning:

$ 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:

$ ./generate_base_client.py

Testing

We use the tox package to run tests in Python 2 and 3. To install, use pip install tox. Once installed, run tox from the root directory. You’ll need to specify a working Dropbox OAuth2 token:

$ DROPBOX_TOKEN=YOUR_TOKEN tox -- -k "'not test_team'"

Note that we skip test_team which requires a team token with Member File Access. To test this functionality, specify a DROPBOX_TEAM_TOKEN environment variable.

$ DROPBOX_TOKEN=... DROPBOX_TEAM_TOKEN=... tox
Release History

Release History

This version
History Node

8.0.0

History Node

7.3.1

History Node

7.3.0

History Node

7.2.1

History Node

7.2.0

History Node

7.1.1

History Node

7.1.0

History Node

6.9.0

History Node

6.8.0

History Node

6.7.0

History Node

6.6.2

History Node

6.6.1

History Node

6.6.0

History Node

6.5.0

History Node

6.4.0

History Node

6.3.0

History Node

6.2

History Node

6.1

History Node

6.0

History Node

5.2.2

History Node

5.2.1

History Node

5.2

History Node

5.1

History Node

5.0.1

History Node

5.0

History Node

4.0

History Node

3.42

History Node

3.41

History Node

3.40

History Node

3.39

History Node

3.38

History Node

3.37

History Node

3.36

History Node

3.34

History Node

3.32

History Node

3.31

History Node

3.30

History Node

3.29

History Node

3.28

History Node

3.27

History Node

3.26

History Node

3.25

History Node

3.24

History Node

3.23

History Node

3.22

History Node

3.21

History Node

3.14

History Node

3.13

History Node

3.12

History Node

3.2

History Node

2.2.0

History Node

2.1.0

History Node

2.0.0

History Node

1.6

History Node

1.5.1

History Node

1.4

History Node

1.3

History Node

1.2

History Node

1.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dropbox-8.0.0-py2-none-any.whl (392.7 kB) Copy SHA256 Checksum SHA256 py2 Wheel Jun 23, 2017
dropbox-8.0.0-py3-none-any.whl (392.7 kB) Copy SHA256 Checksum SHA256 py3 Wheel Jun 23, 2017
dropbox-8.0.0.tar.gz (384.3 kB) Copy SHA256 Checksum SHA256 Source Jun 23, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting