from grdm_tools.api import GrdmClient
import os
= GrdmClient(
client =os.environ.get('GRDM_TOKEN')
token )
GakuNin RDM Tools
Tools for working with data in an instance of GakuNin RDM (OSF)
Developer Guide
If you are new to using nbdev
here are some useful pointers to get you started.
Install grdm_tools in Development mode
# make sure grdm_tools package is installed in development mode
$ pip install -e .
# make changes under nbs/ directory
# ...
# compile to have changes apply to grdm_tools
$ nbdev_prepare
Usage
Installation
Install latest from the GitHub repository:
$ pip install git+https://github.com/nakamura196/grdm-tools.git
Documentation
Documentation can be found hosted on this GitHub repository’s pages.
How to use
Initialize the GakuNinRDM
class.
Retrieve user information.
import json
= client.get_users_me()
profile
if profile:
= profile["data"]
data = data["attributes"]
attributes = {
user 'id': data['id'],
'name': attributes['full_name'],
}print(json.dumps(user, indent=2))
{
"id": "hj3a6",
"name": "Satoru Nakamura"
}