This project provides an example client application for the ESGF SLCS Server using the Flask library to provide a light-weight web application and the OAuthLib extensions for the Requests library for the OAuth interactions.
NOTE: The following assumes Python 3.
To run the example client, you first need to create an OAuth application via the
admin interface on your ESGF SLCS Server (https://<slcs_service_ip>/admin
).
The callback URL should be http://localhost:5000/oauth_callback
.
Take a note of the generated client ID and secret.
TODO: more infos about configuring an OAuth application.
Open esgf_slcs_client_example.py
and modify the 'settings' to reflect your setup
(including the client ID and secret from above). Then run:
$ pyvenv venv
$ venv/bin/pip install flask requests-oauthlib pyopenssl
$ venv/bin/python esgf_slcs_client_example.py
You can also use a conda environment:
$ conda env create -f environment.yml
$ source activate slcs-demo