Skip to main content

Substra CLI for interacting with substra-backend

Project description

Substra

CLI and SDK for interacting with Substra platform.

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

You can run the Substra platform locally on your machine using one of the two following methods:

Usage

Credentials are required for using this tool.

CLI

substra --help

SDK

import substra

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

Documentation

Interacting with the Substra platform:

Implementing your assets in python:

Learning about the Substra platform:

Examples

Compatibility table

These sets of versions have been tested for compatilibility:

substra substra-chaincode substra-backend substra-tests hlf-k8s substra-frontend
0.4.0-alpha.3 0.0.8-alpha.6 0.0.12-alpha.13 0.2.0-alpha.1 0.0.11-alpha.1
0.4.0-alpha.4 0.0.8-alpha.9 0.0.12-alpha.20 0.2.0-alpha.2 0.0.11-alpha.1
0.4.0 0.0.8 0.0.12 0.2.0 0.0.11

Adding entries to the compatibility table

$ cd substra-tests
$ make test

Contributing

Setup

To setup the project in development mode, run:

pip install -e .[test]

To run all tests, use the following command:

python setup.py test

Documentation

To generate the command line interface documentation, run the following command:

python bin/generate_cli_documentation.py

Use the following command to generate the python sdk documentation:

pydocmd simple substra.sdk+ substra.sdk.Client+ > references/sdk.md

Documentation will be available in docs/ 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.4.0.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

substra-0.4.0-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

File details

Details for the file substra-0.4.0.tar.gz.

File metadata

  • Download URL: substra-0.4.0.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1

File hashes

Hashes for substra-0.4.0.tar.gz
Algorithm Hash digest
SHA256 b19c3d9afa172cf24ef55e9e923dc27ed94ef45f40ed4131e47f13ed9c929b0b
MD5 1dee09d7133cadd7b0e6779f1096c28c
BLAKE2b-256 db548f8f32929a825cd070a69c372a3c66a083e97e7a9c5401864787bcf748a9

See more details on using hashes here.

File details

Details for the file substra-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: substra-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 38.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.1

File hashes

Hashes for substra-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6126568de5361ecab1e55c8eb8238f41b4ea380420eaa0d4c8110a5ab3194016
MD5 65a3a90a1cca3a35cb2539685602395e
BLAKE2b-256 b7c163331b63aab6983bc92189560d71e625c3bfc19d931d7dc087a1c255e9f1

See more details on using hashes here.

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