Skip to content

Computational-Plant-Science/pycyapi

Repository files navigation

PyCyAPI

unofficial Python/CLI client for the CyVerse Science (a.k.a. Terrain) APIs

PyPI Version PyPI Status PyPI Versions

CI Documentation Status

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

  • Python 3.8+

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.