Skip to content

nakamura196/grdm-tools

Repository files navigation

GakuNin RDM Tools

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.

from grdm_tools.api import GrdmClient
import os

client = GrdmClient(
   token=os.environ.get('GRDM_TOKEN')
)

Retrieve user information.

import json

profile = client.get_users_me()

if profile:
    data = profile["data"]
    attributes = data["attributes"]
    user = {
        'id': data['id'],
        'name': attributes['full_name'],
    }
    print(json.dumps(user, indent=2))
{
  "id": "hj3a6",
  "name": "Satoru Nakamura"
}

About

Tools to interact with the GakuNin RDM API

Topics

Resources

License

Stars

Watchers

Forks

Contributors