Knowledge base van het KE-chain platform

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Once you have started to understand Pykechain and build your own scripts, the next step is how to add them to KE-chain. The easiest answer is through kecpkg-tools, a python package developed with the purpose of making the building and uploading of scripts easier and faster. Below, you will find a small tutorial on how to use kecpkg-tools. The tutorial is shown in Windows 10, however, we will be using the Git Bash command line, which is Linux-based. Not shown in this tutorial is the creation of a virtual environment called venv_kecpkg  Please be aware of the fact that you do require some basic knowledge of programming in order to follow this tutorial.

First you need to install kecpkg-tools. Activate your virtual environment and run the pip install kecpkg-tools command, as shown in the video below.

Expand
titleInstalling kecpkg-tools

Multimedia
nameinstall_kecpkg.mp4
width900
height507


Afterwards, you need to run kecpkg new command. This will prompt you to give a new package name, set the python version you would like to use and choose a few other options. Once this is completed, you will have a new package ready to be filled in with a script.

Expand
titleCreating new kecpkg

Multimedia
namekecpkg_new.mp4
width900
height507


You will see that the package has been created at the location you desired. Use the file script.py to write your script in. Once you are positive the script will run correctly, it is time to build and upload the package to KE-chain. First run the kecpkg build command. This will build the package based on the settings you provided in the previous step. Then, you can run kecpkg upload, which will prompt you to provide an url, authentication credentials and project (scope) id.

Expand
titleBuilding and uploading kecpkg

Multimedia
namekecpkg_build_upload.mp4
width900
height507


You can now go to the project where the kecpkg has been uploaded and you can now use it inside a Script Widget.

Image RemovedImage Added

Content by Label
showLabelsfalse
max5
spacesKECKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("script","developer","API","kecpkg","pykechain") AND label != "kecpkgpage" and type = "page" and space = "KECKB"
labelsproject scope create


Page properties
hiddentrue
Related issues