Swift Conductor Client SDK for Python
Project description
Swift Conductor Client SDK for Python
⭐ Swift Conductor
Show support for Swift Conductor. Please help spread the awareness by starring Swift Conductor repo.
Install:
pip install swift-conductor-client
Create Tasks and Workflows
Create task and workflow definitions.
Create Task Workers
Testing Workflows
Error Handling
Handle errors returned Client SDK methods
Configuration
Configure Swift Conductor API URL like this:
from swift_conductor.configuration import Configuration
configuration = Configuration(
server_api_url='http://localhost:8080/api',
debug=True
)
- server_api_url : Swift Conductor API URL. For example, if you are running a local server the URL will look like this
http://localhost:8080/api
. - debug: Set to
True
for verbose logging andFalse
to print only errors.
Metrics Configuration for WorkerHost (Optional)
Swift Conductor uses Prometheus to collect metrics.
metrics_settings = MetricsSettings(
directory='/path/to/folder',
file_name='metrics_file_name.extension',
update_interval=0.1,
)
directory
: Directory to store the metrics. Ensure that you have already created this folder, or the program should have permission to create it for you.file_name
: File where the metrics are stored. Example:metrics.log
update_interval
: Time interval in seconds to refresh metrics into the file. Example:0.1
means metrics are updated every 0.1s or 100ms.
Pass the MetricsSettings
object to the WorkerHost
constructor.
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
Close
Hashes for swift-conductor-client-0.1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b3c98f9a389f80aedfce3a69c76962b620cff8368154abf6452724020adc42e |
|
MD5 | 4cb7acb59ab5bf632618a2997f82127d |
|
BLAKE2b-256 | 0dca593d2eb75f7f9ab1de20369e6acbf5c777ecdce0fc551b49039fa2447c26 |
Close
Hashes for swift_conductor_client-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0be8a2162f8c4936847e77abb035b9315dc0398f473d20c32a48466e98db204f |
|
MD5 | 369881d3713488f433a7a84f2b86e5ea |
|
BLAKE2b-256 | 58620e601635e3cf1daaa3c0589823ea37f6ac22dead718c6debbfb388cb3f20 |