This creates a client class for a better api experience.
[x] client with basic functionalities
[x] notebook with basic examples
Modification to be aware: I substituted the .mat for .json to store credentials locally. It helps getting rid of the unnecessary dependency of scipy. There’s no need to store the credentials in a local file though, since it will be stored in the client object, I kept the functionality just in case it is important for you guys
Example usage:
from client import StemClient
import os
# Setup client, user email and password will be requested if not present as ENV vars
username = os.environ.get("STEM_USERNAME")
password = os.environ.get("STEM_PASSWORD")
client = StemClient(
username=username,
password=password,
)
# Get dataset info
r = client.load_datasets(id='5867209b-c483-4a08-9135-d6b6aadf075e')
Thank you very much for your contributions, we really like the client class approach for the API. I'm merging the PR into a development branch so I can also work over this.
This creates a client class for a better api experience.
Modification to be aware: I substituted the .mat for .json to store credentials locally. It helps getting rid of the unnecessary dependency of scipy. There’s no need to store the credentials in a local file though, since it will be stored in the client object, I kept the functionality just in case it is important for you guys
Example usage: