Skip to main content

Substra CLI for interacting with substra-backend

Project description

substra

CLI and SDK for interacting with Substra platform.

Documentation website

Table of contents

Install

To install the command line interface and the python sdk, run the following command:

pip install substra

To enable Bash completion, you need to put into your .bashrc:

eval "$(_SUBSTRA_COMPLETE=source substra)"

For zsh users add this to your .zshrc:

eval "$(_SUBSTRA_COMPLETE=source_zsh substra)"

From this point onwards, substra command line interface will have autocompletion enabled.

Running the Substra platform locally

Check out the open source setup guide or the close source setup guide

Before installing the different components of the platform, please have a look to the compatibility table

Usage

Credentials are required for using this tool.

CLI

substra --help

SDK

import substra

client = substra.Client()
# enjoy...

Open Source Documentation

Interacting with the Substra platform:

Implementing your assets in python (thanks to the substratools library)

Examples

Contributing

Setup

To setup the project in development mode, run:

pip install -e ".[dev]"

To run all tests, use the following command:

python setup.py test

Code formatting

You can opt into auto-formatting of code on pre-commit using Black.

This relies on hooks managed by pre-commit, which you can set up as follows.

Install pre-commit, then run:

pre-commit install

Documentation

To generate the command line interface documentation, sdk and schemas documentation, the python version must be 3.7. Run the following command:

make doc

Documentation will be available in the references/ directory.

Deploy

Deployment to pypi.org should be automatic thanks to Travis but if you need to do it manually, here is what you need to do:

rm -rf dist/*
python3 setup.py sdist bdist_wheel
twine upload dist/* --verbose

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

substra-0.29.2.tar.gz (81.9 kB view hashes)

Uploaded Source

Built Distribution

substra-0.29.2-py3-none-any.whl (78.3 kB view hashes)

Uploaded 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