Quickstart

This page gives a good introduction to Decanter AI Core SDK. It assumes you already have Decanter AI Core SDK installed. Follow Installation to set up a project and install Decanter AI Core SDK first.

Clone the repository from GitLab:

$ git clone https://github.com/MoBagel/decanter-ai-core-sdk.git
$ cd decanter-ai-core-sdk

Python Script

Set the username, password, and host at function core.Context.create() in file examples/example.py

core.Context.create(
    username='{usr}', password='{pwd}', host='{http://host:port}')

Run the command below: sh

$ python -m examples.example

Jupyter

Jupyter Notebook

Install Jupyter Notebook.

$ pip install jupyter notebook

Install ipywidgets for progress bar.

$ pip install ipywidgets
$ jupyter nbextension enable --py widgetsnbextension

Add virtual environment to Jupyter Notebook. Make sure ipykernel is installed in the virtual environment.

$ pip install --user ipykernel
$ python -m ipykernel install --user --name=myenv
# following output
# Installed kernelspec myenv in
# /home/user/.local/share/jupyter/kernels/myenv

Open jupyter notebook

$ jupyter notebook

Open the notebook in examples/example.ipynb, and select the kernel of your environment in the above tool bar Kernal/Change kernel/myenv

Jupyter Lab

Install Jupyter Lab.

$ pip install jupyterlab

Install extension for Progress Bar

$ jupyter labextension install @jupyter-widgets/jupyterlab-manager

Open Jupyter Lab

$ jupyter lab