Skip to main content

Atgenomix SeqsLab CLI for Python

Project description

Contributors Stargazers Issues License LinkedIn


Logo

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
  1. About The Project
  2. Getting Started
  3. Develop
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seqslab-cli-3.2.1.tar.gz (82.2 kB view hashes)

Uploaded Source

Built Distribution

seqslab_cli-3.2.1-py2.py3-none-any.whl (113.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page