Blueprints

Run a simple Python script

Source

yaml
id: python-script
namespace: company.team

tasks:
  - id: script
    type: io.kestra.plugin.scripts.python.Script
    beforeCommands:
      - pip install requests
    script: |
      import requests

      res = requests.get('https://api.restful-api.dev/objects?id=3')
      print(res.json())

About this blueprint

pip Python Software Engineering

This flow runs a simple Python script. The script makes a GET REST API call to a sample API, and prints the response.

Script

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra