Skip to content

Commit

Permalink
Merge pull request #6 from shrutimantri/generate-output-file
Browse files Browse the repository at this point in the history
feat: add blueprint to generate output file using Python
  • Loading branch information
wrussell1999 authored Nov 6, 2024
2 parents 93c48c4 + c8b9b6c commit 11376ea
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions python-generate-output-file.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
id: python-generate-output-file
namespace: company.team

tasks:
- id: generate_output_file
type: io.kestra.plugin.scripts.python.Script
script: |
f = open("my_file.txt", "w")
f.write("This file is created using Python script in Kestra.")
f.close()
outputFiles:
- my_file.txt

- id: log_file_contents
type: io.kestra.plugin.core.log.Log
message: "{{ read(outputs.generate_output_file.outputFiles['my_file.txt']) }}"
extend:
title: Generate an output file using Python script
description: >-
This flow generates an output file using Python script, and then reads the same.
The flow has two tasks:
1. Generate an output file using Python script
2. Read the generated output file and log its contents
tags:
- Python
- Outputs
ee: false
demo: true
meta_description: Generate an output file using Python

0 comments on commit 11376ea

Please sign in to comment.