Atgenomix SeqsLab CLI for Python
Project description
Contributors Stargazers Issues License
Atgenomix SeqsLab V3 platform CLI
Command Line Interface application in the Atgenomix SeqsLab platform, a cloud-first and enterprise BioMed-IT infrastructure.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
About The Project
SeqsLab CLI is the advanced user facing interface to interactively and automatically access SeqsLab cloud platform via SeqsLab RESTful APIs. Complementary with the web-based SeqsLab Console, the command line application allows bioinformaticians and investigators to easily build custom scripts and automate own workflows powered by the SeqsLab platform infrastructure technologies.
Typical use cases:
- Build automated data production that uploads and downloads sequencing datasets to/from the SeqsLab Data Hub cloud storage.
- Submit workflow runs on demand via SeqsLab WES APIs and integrate with local downstream analysis.
- Use as audit log device to view platform use activities.
SeqsLab CLI shall be the standard framework to develop command toolkits and provide as the SeqsLab platform utility.
Built With
SeqsLab CLI is built with the following major frameworks:
Security information protection is secured and built with a system keyring service:
Getting Started
To get a local copy up and running, follow these simple steps.
Prerequisites
These recommended keyring backends are supported in this package:
- macOS Keychain
- Freedesktop Secret Service supports many DE including GNOME ( requires secretstorage)
- KDE4 & KDE5 KWallet ( requires dbus)
- Windows Credential Locker
MacOS
For MacOS devices, you should first install the following packages:
or
# install packages:
brew install dbus
brew install pkg-config
brew install glib
The following is an example of how to list the things you need to use the software and how to install them.
-
Using Keyring on headless Linux systems in a Docker container
Check out Keyring for information on how to use Keyring on a headless Linux system as well as in a Docker container.
-
Python Version 3.8+
-
Python virtual environment
pip3 install seqslab-cli
Run interactive mode
- Display available commands
seqslab> help
Run non-interactive mode
The non-interactive mode works exactly like any traditional Linux-based command line utility.
Authenticate with SeqsLab API
-
Set platform backend to use when launching SeqsLab CLI. The default value is "azure".
seqslab --backend azure
-
Single command to sign in to SeqsLab API and obtain API tokens. By default, signin command uses device code flow for browserless system.
auth signin
Set
device-code
argument to True for device authorization grant flow. By default, signin uses the auth code flow.auth signin device-code=True
-
Get API access token to interact with SeqsLab API apps in your commands.
from seqslab.auth.commands import Auth token = Auth.get_token() access = token.get("tokens").get("access") # use token in your request header, ex: Authorization: Bearer {access} attrs = token.get("attrs") # attrs is a dictionary containing the information about the signing-in user.
Auth.get_token()
will automatically refresh the access token if expired. When refresh token expires, the function returns None if users need to sign back in to SeqsLab API.The tokens are persistently cached in the system-supported secret service, such as Freedesktop Secret Service and macOS Keychain. As a result, the valid access token can be used across multiple CLI sessions.
Roadmap
See the open issues for a list of proposed features (and known issues) .
Contributing
We don't currently open to the community for contribution, but will in the future.
License
See LICENSE
for more information.
Contact
Allen Chang - LinkedIn - allen.chang@atgenomix.com
Project Link: https://github.com/atgenomix
Acknowledgements
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for seqslab_cli-3.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27d288805ecc34ff704c01a3de54d1b10b4d411bd8cac1a176c69454113b0e43 |
|
MD5 | d446674305caf041df029161de48c398 |
|
BLAKE2b-256 | 1243d13340be989c9a1c61e7e985080175cf9e923b342234705d9f8b1f26e5ff |