Python3 client SDK

Syndeia Cloud 3.6 offers a convenient python3 client to Intercax’s Syndeia Cloud v3.6 REST API.

If you are using python2, you likely have the python expertise to translate from python3 back to legacy python2 syntax and idioms. You might find that the Swagger-generated SDK classes work within python2. We will answer questions about python2 - we know it - but if you want formal Support, please install a python3 environment to use the Syndeia python3 SDK client.

Syndeia Cloud REST API - Python SDK

OpenAPI-generated Python3 client to Intercax’s Syndeia Cloud v3.6 REST API.

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

  • API version: 3.6

  • Package version: 3.6.0

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

Requirements

  • (Ana)conda Package Manager

  • Python 3.5+ (natively or via Conda)

  • Connection details of Intercax Syndeia Cloud v3.6 server

  • Credentials to access Intercax Syndeia Cloud v3.6 server

Installation & Uninstallation

Please use Anaconda “conda”.

There are other python package installers. We can answer your questions about those. For formal Support, please install and use Anaconda.

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_36x_client_sdk

To install into a specific “conda env” environment, such as “sdk36_env”:

conda create -n sdk36 python=3.9.11 conda activate sdk36 conda install -name sdk36 syndeia_cloud_36x_client_sdk

To install from a local file (for example, if you downloaded the package directly):

conda install /some/path/syndeia_cloud_36x_client_sdk-3.6-py_0.tar.bz2 # ex: for v3.6, update as appropriate

Your choice of python version might also lead to the need to install the following python libraries:

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 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. Configure conda and the python kernel to offer your conda env as a Python Kernel choice

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

  4. image-20240430-121612.png

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

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

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

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

    image-20240430-122813.png
    Using just one of many JupyterLab user-interaction capabilities

     

  9. 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)

     

  10. If one of the outputs is too verbose, you can encapsulate results in a scrollable area by right-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.6 currently supports Basic Auth + an LDAP(S) + SAML2 authentication provider

  • Syndeia Cloud 3.6 repositories currently support Basic + OAuth

UserSecurity

  • Type: API key

  • API key parameter name: X-Auth-Token

  • Location: HTTP header

Quickstart

Unzip the syndeia_cloud_36x_client_sdk-3.6-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 URLs are relative to your actual location of your Syndeia’s fully-qualified domain name and port, for example https://yourSyndeia.yourCompany.yourOrg:9443