-
Notifications
You must be signed in to change notification settings - Fork 0
Command Line Tools
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.