Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

thehyve/transmart-api-client-py

Repository files navigation

Python client for retrieving data from tranSMART

Build Status codecov Binder

This is meant to work with Python 3.x only.

Installation

pip3 install transmart for minimal dependencies, but only administrative calls are available.

pip3 install transmart[full] for the full thing.

Demo

Launch the live demo notebook using Binder

Usage

Main client

See the notebook in ./examples or go live via the binder link above.

Entry points

After installing via pip there should be a CLI tool available to add necessary roles to KeyCloak.

$ transmart-keycloak --help
Usage: transmart-keycloak [OPTIONS]

Options:
  -t, --transmart TEXT      tranSMART host url, e.g. https://transmart-
                            dev.thehyve.net.  [required]
  -k, --kc-url TEXT         KeyCloak host, e.g. https://keycloak-dwh-
                            test.thehyve.net.  [required]
  -r, --realm TEXT          KeyCloak realm.  [required]
  -o, --offline-token TEXT  KeyCloak offline token, will be asked for if not provided.
  -s, --study TEXT          Add roles for this study IDs. If not provided, add all
                            studies.
  --version                 Show the version and exit.
  --help                    Show this message and exit.