You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Dropbox believes that an inclusive development environment fosters greater technical achievement. To encourage a diverse group of contributors we've adopted this code of conduct.*
4
+
5
+
Please read the Official Dropbox [Code of Conduct](https://opensource.dropbox.com/coc/) before contributing.
We value and rely on the feedback from our community. This comes in the form of bug reports, feature requests, and general guidance. We welcome your issues and pull requests and try our hardest to be timely in both response and resolution. Please read through this document before submitting issues or pull requests to ensure we have the necessary information to help you resolve your issue.
3
+
4
+
## Filing Bug Reports
5
+
You can file a bug report on the [GitHub Issues][issues] page.
6
+
7
+
1. Search through existing issues to ensure that your issue has not been reported. If it is a common issue, there is likely already an issue.
8
+
9
+
2. Please ensure you are using the latest version of the SDK. While this may be a valid issue, we only will fix bugs affecting the latest version and your bug may have been fixed in a newer version.
10
+
11
+
3. Provide as much information as you can regarding the language version, SDK version, and any other relevant information about your environment so we can help resolve the issue as quickly as possible.
12
+
13
+
## Submitting Pull Requests
14
+
15
+
We are more than happy to recieve pull requests helping us improve the state of our SDK. You can open a new pull request on the [GitHub Pull Requests][pr] page.
16
+
17
+
1. Please ensure that you have read the [License][license], [Code of Conduct][coc] and have signed the [Contributing License Agreement (CLA)][cla].
18
+
19
+
2. Please add tests confirming the new functionality works. Pull requests will not be merged without passing continuous integration tests unless the pull requests aims to fix existing issues with these tests.
20
+
21
+
## Updating Generated Code
22
+
23
+
Generated code can be updated by running the following code:
24
+
25
+
```
26
+
$ pip install -r requirements.txt
27
+
$ git submodule init
28
+
$ git submodule update --remote --recursive
29
+
$ python generate_base_client.py
30
+
```
31
+
32
+
Note: Stone updates must be made by updating `requirements.txt` as it is no longer a submodule.
33
+
34
+
## Testing the Code
35
+
36
+
We use the [`tox`](https://tox.readthedocs.org/) package to run tests. To install and run the unit tests, you can use:
37
+
38
+
```
39
+
$ pip install tox
40
+
$ tox
41
+
```
42
+
43
+
Or if you would like to specify a specific target to run you can run this:
44
+
45
+
```
46
+
$ tox -e {TARGET}
47
+
```
48
+
49
+
If you want to run the integration tests, you can use the following:
50
+
51
+
```
52
+
$ export DROPBOX_REFRESH_TOKEN={fill in refresh token}
53
+
$ export DROPBOX_APP_KEY={fill in app key}
54
+
$ export DROPBOX_APP_SECRET={fill in app secret}
55
+
$ export DROPBOX_TEAM_TOKEN={fill in team token}
56
+
$ export DROPBOX_TOKEN={fill in access token}
57
+
$ tox -e test_integration
58
+
```
59
+
Note: If you do not have all of these tokens available, we run integration tests as a part of pull request validation and you are able to rely on those if you are unable to obtain yourself.
60
+
61
+
We do recommend developing in a virtual environment in order to ensure you have a clean testing environment.
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/>`_.
15
+
Documentation can be found on `Read The Docs`_.
32
16
33
17
Installation
34
-
------------
18
+
============
35
19
36
-
Create an app at https://dropbox.com/developers/apps
20
+
Create an app via the `Developer Console`_.
37
21
38
22
Install via `pip <https://pip.pypa.io/>`_:
39
23
@@ -49,30 +33,41 @@ Install from source:
49
33
$ cd dropbox-sdk-python
50
34
$ python setup.py install
51
35
52
-
After installation, to get started, follow one of our examples or read the documentation on `Read the Docs <http://dropbox-sdk-python.readthedocs.org/>`_.
53
-
54
-
Authentication
55
-
--------------
56
-
57
-
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
58
-
token for your own Dropbox account for development. You can also find a variety of examples outlining different authorization flows under:
36
+
After installation, follow one of our `Examples`_ or read the documentation on `Read The Docs`_.
You can also view our OAuth `guide <https://www.dropbox.com/lp/developers/reference/oauth-guide>`_
40
+
Examples
41
+
========
63
42
64
-
Example Applications
65
-
--------------------
43
+
We provide `Examples`_ to help get you started with a lot of the basic functionality in the SDK.
66
44
67
-
- `updown <http://github.com/dropbox/dropbox-sdk-python/tree/master/example/updown.py>`_ - A sample application that demonstrates simple file upload and download
45
+
- **OAuth**
46
+
- `Commandline OAuth Basic <https://github.com/dropbox/dropbox-sdk-python/blob/master/example/oauth/commandline-oauth.py>`_ - Shows a simple example of commandline oauth (no redirect).
47
+
- `Commandline OAuth Scopes <https://github.com/dropbox/dropbox-sdk-python/blob/master/example/oauth/commandline-oauth-scopes.py>`_ - Shows a simple example of commandline oauth using scopes.
48
+
- `Commandline OAuth PKCE <https://github.com/dropbox/dropbox-sdk-python/blob/master/example/oauth/commandline-oauth-pkce.py>`_ - Shows a simple example of commandline oauth using PKCE.
49
+
- **Other Examples**
50
+
- `Updown <https://github.com/dropbox/dropbox-sdk-python/blob/master/example/updown.py>`_ - Sample application that uploads the contents of your ``Downloads`` folder to Dropbox.
51
+
- `Backup and Restore <https://github.com/dropbox/dropbox-sdk-python/tree/master/example/back-up-and-restore>`_ - Sample application that shows how you can backup a file and restore previous versions if the file was modified/corrupted in any way.
68
52
69
-
Contributing
70
-
------------
53
+
Getting Help
54
+
============
71
55
72
-
Contributions to this SDK are always welcome and encouraged!
56
+
If you find a bug, please see `CONTRIBUTING.md`_ for information on how to report it.
73
57
74
-
See the `CONTRIBUTING <http://github.com/dropbox/dropbox-sdk-python/blob/master/CONTRIBUTING.rst>`_ doc for more information
58
+
If you need help that is not specific to this SDK, please reach out to `Dropbox Support`_.
75
59
76
60
License
77
-
-------
78
-
MIT - See the `LICENSE <http://github.com/dropbox/dropbox-sdk-python/blob/master/LICENSE>`_ for more information
61
+
=======
62
+
63
+
This SDK is distributed under the MIT license, please see `LICENSE`_ for more information.
0 commit comments