🚀 New! Kestra raises $3 million to grow Learn more

Home / Solutions / Blueprints

Add a parametrized Python script as a Namespace File and run it in parallel in Docker containers

Plugins Used in this Blueprints

About this blueprint

Add a parametrized Python script as a Namespace File and run it in parallel in Docker containers

Add a Python script called parametrized.py as a Namespace File and run it in parallel with different parameter values using a Python script added as a Namespace File.

Here is the content of the parametrized.py script:

python
import argparse

parser = argparse.ArgumentParser()

parser.add_argument("--num", type=int, default=42, help="Enter an integer")

args = parser.parse_args()
result = args.num * 2
print(result)

You can add that file directly from the embedded Visual Studio Code Editor in the Kestra UI.

New to Kestra?

Use blueprints to kickstart your first workflows.