Computational-Plant-Science / pycyapi

unofficial Python CyVerse API client
https://pycyapi.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link
client cyverse cyverse-discovery-environment http python
# PyCyAPI unofficial Python/CLI client for the [CyVerse](https://www.cyverse.org/) [Science](https://cyverse.org/Science-APIs) (a.k.a. [Terrain](https://de.cyverse.org/terrain/docs/index.html)) APIs [![PyPI Version](https://img.shields.io/pypi/v/pycyapi.png)](https://pypi.python.org/pypi/pycyapi) [![PyPI Status](https://img.shields.io/pypi/status/pycyapi.png)](https://pypi.python.org/pypi/pycyapi) [![PyPI Versions](https://img.shields.io/pypi/pyversions/pycyapi.png)](https://pypi.python.org/pypi/pycyapi) ![CI](https://github.com/Computational-Plant-Science/pycyapi/workflows/CI/badge.svg) [![Documentation Status](https://readthedocs.org/projects/pycyapi/badge/?version=latest)](https://pycyapi.readthedocs.io/en/latest/?badge=latest)

Status

API coverage is still sparse, focusing mainly on data and fileio endpoints. It will likely stay this way as this project exists predominantly for consumption by plantit and plantit-action.

Requirements

Installation

This project is available on the Python Package Index. To install with pip:

pip install pycyapi

Quickstart

Generally, the CLI is invoked with pycyapi <command>. You will first need an authentication token. To obtain one, provide your CyVerse username and password to the token command:

pycyapi token --username <username> --password <password>

The token is printed and can be used with the --token option to authenticate subsequent commands.

Note: the token command is the only one to return plain text — all other commands return JSON.

Now, to list the contents of your home folder in the Data Store:

pycyapi list --path /iplant/home/<username> --token <token>

Documentation

Documentation is available at pycyapi.readthedocs.io.

Disclaimer

This project is not affiliated with CyVerse and cannot guarantee compatibility.