![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Kestra is an infinitely scalable orchestration and scheduling platform, creating, running, scheduling, and monitoring millions of complex pipelines.
This Python client provides functionality to interact with the Kestra server for sending metrics, outputs, and logs, as well as executing/polling flows.
pip install kestra
The Kestra
class is responsible for sending metrics, outputs, and logs to the Kestra server.
The Flow
class is used to execute a Kestra flow and optionally wait for its completion. It can also be used to get the status of an execution and the logs of an execution.
flow = Flow(
wait_for_completion=True, # default is True
poll_interval=1, # seconds. default is 1
labels_from_inputs=False, # default is False
tenant=None # default is None
)
You can also set the hostname and authentication credentials using environment variables:
export KESTRA_HOSTNAME=http://localhost:8080
export KESTRA_USER=admin
export KESTRA_PASSWORD=admin
export KESTRA_API_TOKEN=my_api_token
It is worth noting that the KESTRA_API_TOKEN or KESTRA_USER and KESTRA_PASSWORD need to be used, you do not need all at once. The possible Authentication patterns are:
Trigger a flow and wait for its completion:
from kestra import Flow
flow = Flow()
flow.execute('mynamespace', 'myflow', {'param': 'value'})
Set labels from inputs:
from kestra import Flow
flow = Flow(labels_from_inputs=True)
flow.execute('mynamespace', 'myflow', {'param': 'value'})
Pass a text file to an input of type FILE named 'myfile':
from kestra import Flow
flow = Flow()
with open('example.txt', 'rb') as fh:
flow.execute('mynamespace', 'myflow', {'files': ('myfile', fh, 'text/plain')})
Fire and forget:
from kestra import Flow
flow = Flow(wait_for_completion=False)
flow.execute('mynamespace', 'myflow', {'param': 'value'})
Overwrite the username and password:
from kestra import Flow
flow = Flow()
flow.user = 'admin'
flow.password = 'admin'
flow.execute('mynamespace', 'myflow')
Set the hostname, username, and password using environment variables:
from kestra import Flow
import os
os.environ["KESTRA_HOSTNAME"] = "http://localhost:8080"
os.environ["KESTRA_USER"] = "admin"
os.environ["KESTRA_PASSWORD"] = "admin"
flow = Flow()
flow.execute('mynamespace', 'myflow', {'param': 'value'})
The client includes retry logic with exponential backoff for certain HTTP status codes, and raises a FailedExponentialBackoff
exception if the request fails after multiple retries.
The Kestra
class provides a logger that formats logs in JSON format, making it easier to integrate with log management systems.
from kestra import Kestra
Kestra.logger().info("Hello, world!")
The Kestra
class provides a method to send key-value-based outputs to
the Kestra server. If you want to output large objects, write them to a
file and specify them within the outputFiles
property of the Python
script task.
Kestra.outputs({"my_output": "my_value"})
The Kestra
class provides a method to send counter metrics to the Kestra server.
Kestra.counter("my_counter", 1)
The Kestra
class provides a method to send timer metrics to the Kestra server.
Kestra.timer("my_timer", 1)
FAQs
Kestra is an infinitely scalable orchestration and scheduling platform, creating, running, scheduling, and monitoring millions of complex pipelines.
We found that kestra demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.