Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nakamura196/grdm-tools
Tools to interact with the GakuNin RDM API
https://github.com/nakamura196/grdm-tools
osf python rdm
Last synced: about 1 month ago
JSON representation
Tools to interact with the GakuNin RDM API
- Host: GitHub
- URL: https://github.com/nakamura196/grdm-tools
- Owner: nakamura196
- License: apache-2.0
- Created: 2024-11-15T09:06:03.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-15T21:12:44.000Z (2 months ago)
- Last Synced: 2024-11-15T22:18:30.036Z (2 months ago)
- Topics: osf, python, rdm
- Language: Jupyter Notebook
- Homepage: https://nakamura196.github.io/grdm-tools/
- Size: 664 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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
``` sh
# 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](https://github.com/nakamura196/grdm-tools):``` sh
$ pip install git+https://github.com/nakamura196/grdm-tools.git
```### Documentation
Documentation can be found hosted on this GitHub
[repository](https://github.com/nakamura196/grdm-tools)’s
[pages](https://nakamura196.github.io/grdm-tools/).## How to use
Initialize the `GakuNinRDM` class.
``` python
from grdm_tools.api import GrdmClient
import osclient = GrdmClient(
token=os.environ.get('GRDM_TOKEN')
)
```Retrieve user information.
``` python
import jsonprofile = 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"
}