Code Actions
The Blink platform enables running Python, Bash, PowerShell and Node.js scripts using the following actions:
These Actions are preserved between the different steps of the Workflow execution.
For example: if you create a file using Python, you can use it in a later Step using any programming language or CLI.
Run Bash Script
Executes a user provided bash script.
If there's an error in a command in the middle of the script and the last command succeeds, the entire action will succeed, not revealing that some command may have failed.
Parameter | Description |
---|---|
Code | Bash code to execute in the script. |
Installing apt-get packages
This is the Apt-get Install action, which allows you to install apt-get packages and use them with the Run Bash Script action. To use this action, specify which apt-get package you wish to install, and run the step.
Parameter | Description |
---|---|
Package | Name of the apt-get package to install. |
Run Node.js Script
Executes user provided JS code.
The NodeJS runtime is the latest LTS version.
Parameter | Description |
---|---|
Code | JS code to execute in the script. |
Installing npm packages
This is the Npm Install action, which allows you to install Node.js packages and use them with the Run Node.js Script action. To use this action, specify which Node package you wish to install, and run the step.
Parameter | Description |
---|---|
Package | Name of the Node.js package to install. |
Run Python
This Action allows you to run a python script and retrieve its output.
The following packages come pre-installed for immediate use:
- certifi==2022.12.7
- chardet==4.0.0
- idna==2.10
- protobuf==3.18.3
- requests==2.25.1
- six==1.15.0
- urllib3==1.26.5
- dotmap==1.3.25
- pandas==2.0.3
- tabulate==0.9.0
Parameter | Description |
---|---|
Code | Python code to execute in the script. |
Version | - |
Referencing inputs and step outputs in Python Actions
Option 1 - Variable picker: Use the usual Blink variable picker to select the wanted information
Option 2 - Reference Through the "context" object: Referencing of variables in Python steps can be performed using the automatically-created context object. For any Python Action, utilize the context object to fetch values of steps/input parameters/variables, or to set variables.
Installing pip packages
This is the Pip Install action, which allows you to install Python packages and use them with the Run Python action.To use this action, specify which python packages you wish to install, by writing a new line separated list of packages, and run the step. For git based packages use the following package name structure:
git+<protocol>://<git-provider>/<git-user>/<git-repo>.git
For Example:
requests
git+https://github.com/psf/requests.git
git+ssh://git@github.com/psf/requests.git
Use a connection when installing from a private repository, there is no need for a connection when installing from public repositories.
Parameter | Description |
---|---|
Package List | New line separated packages to install. |
Version | - |