When to use the Python API
The CLI YAML format remains the primary way to describe jobs, but the same capabilities are exposed through the Python package. Use it when you want to:- Generate tasks dynamically inside your own tooling.
- Share a reusable Python helper that sets up common resources or file mounts.
- Launch quick experiments without writing YAML files.
Available entry points
konduktor.Task
task.set_resources(konduktor.Resources(...))task.set_file_mounts({"/remote/path": "./local"})task.set_serving(konduktor.Serving(...))when serving deployments.
konduktor.Resources
konduktor.Serving
konduktor.launch
dryrun=True, Konduktor prints the rendered spec instead
of launching. detach_run=True returns immediately after submission; otherwise
logs stream until completion. The return value is the job ID when available.
Example
launch_from_python.py) and run: