Python2/3 client SDK

Syndeia Cloud 3.5 has an official Python2/3 client to Intercax’s Syndeia Cloud v3.5 REST API.

Syndeia Cloud REST API - Python SDK

Official Python2/3 client to Intercax’s Syndeia Cloud v3.5 SP1 REST API.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 3.5 SP1

  • Package version: 3.5.1

  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements

  • (Ana)conda Package Manager

  • Python 2.7 and 3.5+ (natively or via Conda)

  • Connection details of Intercax Syndeia Cloud v3.5 SP1 server

  • Credentials to access Intercax Syndeia Cloud v3.5 SP1 server

Installation & Uninstallation

Currently only available via conda (wheel and egg can be made available upon request)

conda install

If you do not have the Conda package manager, first get it by installing Anaconda or Miniconda (see details here)

To install via a conda channel:

conda install syndeia_cloud_35x_client_sdk

To install into a specific environment:

conda install -name myenv syndeia_cloud_35x_client_sdk

To install from a local file (ie: if you downloaded the package directly):

conda install /some/path/syndeia_cloud_35x_client_sdk-3.5.1-py_0.tar.bz2 # ex: for v3.5.1, update as appropriate

conda uninstall

To uninstall the package:

Usage

The general pattern is to:

  1. Instantiate the configuration (once) with the Syndeia Cloud URL, your username, and password (see STEPs 2-3 in Quickstart below)

  2. Instantiate the API client using the configuration from previous step (see STEP 4 in Quickstart below)

  3. Use the API client object to instantiate other main API classes, such as:

    • AuthAPI for sign-in and other authentication calls (see STEP 5 in Quickstart below).

    • UserAPI for create, read, update, delete operations on users

    • RepositoryAPI for create, read, update, delete operations on repositories (see STEP 6 in Quickstart below)

    • ContainerAPI for create, read, update, delete operations on containers (see STEP 7 in Quickstart below)

    • ArtifactAPI for create, read, update, delete operations on artifacts (see STEP 8 in Quickstart below)

    • RelationAPI for create, read, update, delete operations on relations (see STEP 9 in Quickstart below)

(Strictly speaking, steps 6+ are optional but it will show you how to make sample calls to some of the core endpoint concepts, ie: Repositories, Containers, Artifacts, and Relations)

For more information on the Python API functions, see Documentation for API Endpoints and Documentation for Models.
For an interactive way to explore the REST API, see the Swagger UI at: http(s)://mySyndeiaCloudServer.domain.tld:port/docs/swagger-ui/index.html?url=/assets/swagger/swagger.json, ex: <https://mySyndeiaServer.domain.com:9443/docs/swagger-ui/index.html?url=/assets/swagger/swagger.json>

Usage in Jupyter Notebook

Jupyter Noterbook / Lab is an interactive computing environment spun off of iPython that allows one to execute a variety of languages in an interactive fashion for scientific computing & data analysis. The interactive environment is similar to the commercial product MATLAB.

To use the Syndeia Cloud python3 client SDK in Jupyter Notebook:

  1. Ensure that you have already installed the SDK (see conda install section above) & JupyterLab/Notebook (conda install jupyterlab or conda install notebook).

  2. Launch JupyterLab/Notebook (ex: via Anaconda-Navigator or the CLI) and open the provided example iPython Notebook file (syndeia_cloud_3.5.0_client_sdk_example.ipynb) from the accompanying syndeia_cloud_35x_client_sdk...-py_0_docs package:

  3. Edit the 3rd cell to specify your deployment’s Syndeia Cloud’s configuration.host and configuration.username values as described in the comments.

  4. Click in the side area of the editing area and select all cells via Command-A (on Mac) or CTRL-A (on Windows)

  5. Run the selected cells by hitting Shift-Enter.

  6. You will be prompted for your specified user’s password, enter it in.

  7. After submitting it, you should get results similar to the below for some of the cells ( the exact results will differ depending on what data you have, if any, on the server)

    If one of the outputs is too verbose, you can encapsulate results in a scrollable area by R-clicking the side area next to a cell and selecting Enable Scrolling for Outputs to make navigating the Jupyter notebook easier.

Authorization

  • Syndeia Cloud 3.5 currently supports Basic Auth + an LDAP(S) + SAML2 authentication provider

  • Syndeia Cloud 3.5 repositories currently support Basic + OAuth

UserSecurity

  • Type: API key

  • API key parameter name: X-Auth-Token

  • Location: HTTP header

Quickstart

Unzip the syndeia_cloud_35x_client_sdk-3.5.1-py_0_docs.zip , you should see the following file listing:

Open README.html and to see the HTML version of the docs as show below:

Note, for those that prefer Markdown (.MD), an MD version of the docs have been provided as well

Documentation for API Endpoints

In this section you will see a list of endpoints as shown below. Depending on your client, the links should be clickable to take you to the function/method definition:

Note, all URIs are relative to http://<your_SC_server_FQDN>