Skip to main content

Tetrascience CLI

Project description

ts-cli

Tetrascience CLI

Version

v1.3.1

Table of Contents

Show

Intro

ts-cli allows you to interface with the Tetrascience Data Platform from the comfort of your shell

Example

Create and publish a new task script:

ts-cli config save ~/Downloads/ts-cfg.json
ts-cli init task-script
ts-cli publish

Install

pip install tetrascience-cli

Usage

Create an artifact

Using an IDS, Protocol, Task Script or "All-in-one" template

ts-cli init <template-type>

To set up the artifact's configuration interactively, use the --interactive or -i flag.

ts-cli init --interactive

Publish an artifact

Including IDS, Protocol, and Task Script artifacts from their source code

ts-cli publish

The artifact's type, namespace, slug and version are automatically read from its manifest.json file if it exists.
To set up the artifact's configuration interactively, use the --interative or -i flag. Examples:

ts-cli publish --interactive

An example of publishing an artifact using interactive mode

API Configuration

An API configuration is required. This can be the API configuration JSON file (cfg.json) found on the Tetra Data Platform.

{
	"api_url": "https://api.tetrascience.com/v1",
	"auth_token": "your-token",
	"org": "your-org",
	"ignore_ssl": false
}

This configuration can be referred to explicitly in the command line. Example:

ts-cli publish --config cfg.json

Or saved to a specific profile.

ts-cli config save cfg.json --profile dev
ts-cli publish --profile dev

To apply the API configuration to all your projects automatically, save your configuration file globally

ts-cli config save cfg.json --global
ts-cli publish

IDS Validation

When uploading IDS artifact, validation will be performed using ts-ids-validator package. Validation failures for IDS will be printed to the console.

Documentation

Click here for --help and a development guide

Changelog

Show

v1.3.1

  • output {namespace, slug, version} when monitored build (via CodeBuild) completes

v1.3.0

  • Rename the delete command to unpublish
  • Display the number of other artifacts that depend on artifact that is to be unpublished
    • Example: warning: This protocol artifact is used by at least 1 pipeline

v1.2.0

  • Allow publishing of connectors artifacts

v1.1.0

  • Adjust publish to support Codebuild build_id in response for all artifact types

v1.0.5

  • Fix incorrect messages to console when using ts-cli init --interactive

v1.0.4

  • Add a delete command
  • Remove extra <unset> strings in task script configurations

v1.0.3

  • Rename the nodeType field to category in the tetraflow template
  • Fix a crash on ts-cli config {save,set}
  • Fix broken IDS schemas generated from non-existent manifest.json

v1.0.2

  • Adds the dry-run flag to the publish cli

v1.0.1

  • Fix a crash on startup

v1.0.0

  • Initial release
  • Includes the init, publish and config commands

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

tetrascience_cli-1.3.1.tar.gz (34.8 kB view details)

Uploaded Source

Built Distribution

tetrascience_cli-1.3.1-py3-none-any.whl (52.2 kB view details)

Uploaded Python 3

File details

Details for the file tetrascience_cli-1.3.1.tar.gz.

File metadata

  • Download URL: tetrascience_cli-1.3.1.tar.gz
  • Upload date:
  • Size: 34.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tetrascience_cli-1.3.1.tar.gz
Algorithm Hash digest
SHA256 16c7379fd20fc46b976ae9a480c8a30c9329742715ec67b7bad61ddd5b3e057c
MD5 f825b36550ec1e522268366dface5f6c
BLAKE2b-256 bbe9d521fc548bec5b6314ab1cbf2c216452dcc97613ac9ebf8fc6f9a1a8df05

See more details on using hashes here.

File details

Details for the file tetrascience_cli-1.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tetrascience_cli-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73fce28bcf56beb03afccd16b5ab9d9818a46e3d37c428896d0237d410bdd759
MD5 b0bd45ebd187402446280dd6f2e5bd56
BLAKE2b-256 459026a138ca34a18207c513143fff8a6d053b7cfb3abe5598464c242aaa2acf

See more details on using hashes here.

Supported by

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