Datastore API Examples
----------------------

Here are three demos for the Datastore API.  All use the same data
model: a simple task list, also used by the tutorial examples for the
other platform/language SDKs.

tasks.py: A web app written using Flask (http://flask.pocoo.org/)

shtasks.py: A simple command line script that displays the current
            contents of the datastore.

tktasks.py: A desktop UI app written using Tkinter.

How to run the Flask app
------------------------

0. To create an app, go to https://www.dropbox.com/developers/apps

1. Edit the configuration in the tasks.py file. You'll need to set the
   DROPBOX_APP_KEY and DROPBOX_APP_SECRET to the app key and app
   secret of your Dropbox app.  Make sure to add
   http://localhost:5000/dropbox-auth-finish to the OAuth redirect
   URLs in your Dropbox app configuration.

2. Now you can run the tasks.py file with your python interpreter and
   the application will greet you on http://localhost:5000/.  Be sure
   to install the dropbox package, or set PYTHONPATH to include the
   directory up two levels, for example:

       PYTHONPATH=../.. python tasks.py

How to run the command line script
----------------------------------

Instead of editing the script, you pass it the app key and secret on
the command line.  It will then guide you through the login procedure
using your web browser.  The script will print the access token which
you can pass on the command line instead of the app key and secret on
subsequent runs, to avoid the login flow.

    PYTHONPATH=../.. python shtasks.py APP_KEY APP_SECRET
    PYTHONPATH=../.. python shtasks.py ACCESS_TOKEN

How to run the Tkinter app
--------------------------

Use command line script to obtain an access token.  Then pass the
access token to the tktasks.py command line.

    PYTHONPATH=../.. python tktasks.py ACCESS_TOKEN
