A client library for accessing the CloudReactor API, which monitors and manages Tasks and Workflows.
Project description
cloudreactor-python-api-client
Python client for the CloudReactor API
Overview
This python package allows python applications to programmatically create, monitor, and manage Tasks and Workflows in CloudReactor. Most notably, you can start and stop Tasks and Workflows by creating Task Executions and Workflow Executions.
See the CloudReactor landing page to see the benefits of monitoring and managing your tasks with CloudReactor.
Installation
Get this package from PyPI:
pip install cloudreactor_api_client
Usage
First, create a client:
from cloudreactor_api_client import AuthenticatedClient
client = AuthenticatedClient(base_url="https://api.cloudreactor.io/api/v1",
token="YOUR_API_KEY")
To start a Task, create a Task Execution:
from cloudreactor_api_client.api.task_executions import (
task_executions_create
)
from cloudreactor_api_client.models import (
TaskExecution,
TaskExecutionStatus
)
# Identify the Task by name. Alternatively, you can specifiy the "uuid".
task_dict = {"name": "HappyTask"}
task_execution = TaskExecution.from_dict({
"task": task_dict,
"status": TaskExecutionStatus.MANUALLY_STARTED
})
response = task_executions_create.sync_detailed(client=client,
json_body=task_execution)
parsed_task_execution = response.parsed
print(f"Task Execution {parsed_task_execution.uuid} started!")
More details on how to use API clients in general (async mode, disabling SSL) can be found in the generated README.
License
This software is licensed under the BSD 2-Clause License.
See LICENSE
for details.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Jeff Tsay 💻 📖 🚇 🚧 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Credits
Code generated by openapi-python-client
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cloudreactor-api-client-0.3.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9eb0f38644ebbc6713c0b906c2e3785460e914de791b83ce2cc97b7240aeae1 |
|
MD5 | f32711051a44887d84db6706dbdfabd7 |
|
BLAKE2b-256 | a850eb074eb40aa0c2a4ab9805515fc4e6950e920fd5466fe8985e57b6ef8bb6 |
Hashes for cloudreactor_api_client-0.3.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4505111a9e6087c0105fc4007753494d0d3d0b290d1261f93a03e88dddfe1bdf |
|
MD5 | 1269c2935b77c050c8882cbbba48312d |
|
BLAKE2b-256 | 1a3e6739609b34f3abfdeab03a7046bda47d3ae1daf0c1905ff7e17bae5fe894 |