A client for the Windmill API
Project description
windmill_client
Overview
windmill_client
is a Python package designed to interact with the Windmill API. It provides a convenient way to manage jobs, resources, and states within the Windmill environment, offering functionalities like job creation, execution, status tracking, and state management.
It's designed to remain api-compatible with the wmill
package, but with some added features and a more direct usage
of Windmill's REST API.
Installation
To install windmill_client
, run the following command:
pip install windmill-client
Usage
Basic Example
Here's a basic example of how to use windmill_client
:
import windmill_client as wmill
client = wmill.Windmill()
# Create a new job
job_id = client.create_job(path="path/to/script")
# Check job status
status = client.get_job_status(job_id)
print(f"Job Status: {status}")
# run a script synchronously
result = client.run_script(path="path/to/script")
print(f"Script Result: {result}")
Methods
create_job(self, path=None, hash_=None, args=None, scheduled_in_secs=None)
: Create a new job.get_job_status(self, job_id)
: Get the status of a specified job.run_script(self, path=None, hash_=None, args=None, timeout=None, verbose=False, cleanup=True, assert_result_is_not_none=True)
: Run a script synchronously.get_variable(self, path)
: Get a variable from Windmill.set_variable(self, path, value)
: Set a variable in Windmill.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
windmill_client-0.5.1.tar.gz
(7.6 kB
view hashes)
Built Distribution
Close
Hashes for windmill_client-0.5.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63c5244a68ca64252f5d574f8a6545ba180d16d025e4ec03f7346694f4f3ba52 |
|
MD5 | dfa8613bf32f0bf70acf56e9fd46f099 |
|
BLAKE2b-256 | c38e0d2a08400b8b8ad27dcf5be02c1f8d1607e3c048f5b2a1e85bbe5480222a |