Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Command Line Tools

Patrick Michaud edited this page May 8, 2017 · 3 revisions

SQLShare-Client comes with a set of command line tools to let you manage your datasets outside of a browser. To install the SQLShare client, run the following command:

sudo pip install sqlshare_client

There is some configuration you'll need to do to get started:

  • Register an "application" with the SQLShare server.

For the UW's production server, you can do so at https://rest.sqlshare.uw.edu/o/applications/register/ You can use any name you'd like, but something like "<your name>'s command line tools" is suggested.

The Client type should be "Confidential"

The Authorization grant type should "client-credentials"

The Redirect URIs can be empty.

  • Create a credentials file on the computer you'll be running the scripts. This should be a file named .sqlshare-rest-credentials.conf in your home directory.

The file should look like this:

OAUTH_ID: <the Client id for the application you just registered>

OAUTH_SECRET: <the Client secret for the application you just registered>

SERVER:https://rest.sqlshare.uw.edu

REDIRECT_URI:oob://oob

GRANT_TYPE:client-credentials

At this point, you should be able to use the client. You can test it by running sqlshare_whoami. It should print the username you registered the application with.

Clone this wiki locally