Skip to content

Command Line Interface and Python classes for interacting with MyTardis's API.

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
LICENSE.txt
Notifications You must be signed in to change notification settings

mytardis/mytardisclient

 
 

Repository files navigation

mytardisclient

travis codecov Documentation Status Updates Python 3

Command Line Interface and Python classes for interacting with MyTardis's REST API.

Install:

pip install mytardisclient

Install latest development version:

pip install git+https://github.com/mytardis/mytardisclient.git@master#egg=mytardisclient

Example

Determine the location of the configuration file where the MyTardis URL is specified:

>>> from mtclient.conf import config
>>> config.path
'/Users/james/.config/mytardisclient/mytardisclient.cfg'
>>> config.url
'https://mytardis.example.com'

Use mytardisclient's Dataset model class to look up a public dataset (with ID 125) from the MyTardis server, using its RESTful API:

>>> from mtclient.models.dataset import Dataset
>>> Dataset.objects.get(id=125)
<Dataset: Test Public Dataset1>

The syntax is intended to be similar to Django ORM syntax, however it is not nearly as powerful yet.

Tests

Tests can be run with:

pytest --cov=mtclient

or:

pytest --cov=mtclient --cov-report=html

Building Documentation

Documentation can be built with:

cd docs/
make html

About

Command Line Interface and Python classes for interacting with MyTardis's API.

Resources

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
LICENSE.txt

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%