Netflix Conductor Python SDK
Project description
Netflix Conductor SDK - Python
The conductor-python repository provides the client SDKs to build task workers in Python.
Building the task workers in Python mainly consists of the following steps:
- Setup conductor-python package
- Create and run task workers
- Create workflows using code
Setup Conductor Python Package
- Create a virtual environment to build your package
virtualenv conductor
source conductor/bin/activate
- Get Conductor Python SDK
python3 -m pip install conductor-python
Server Settings
Everything related to server settings should be done within the Configuration class by setting the required parameter (when initializing an object) like this:
configuration = Configuration(
server_api_url='https://play.orkes.io/api',
debug=True
)
- server_api_url : Conductor server address. For example, if you are running locally, it would look like;
http://localhost:8000/api. - debug: It can take the values true/false.
truefor verbose loggingfalseto display only the errors
Authentication Settings (Optional)
Configure the authentication settings if your Conductor server requires authentication.
Access Control Setup
See Access Control for more details on role-based access control with Conductor and generating API keys for your environment.
configuration = Configuration(
authentication_settings=AuthenticationSettings(
key_id='key',
key_secret='secret'
)
)
Metrics Settings (Optional)
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
- example:
update_interval: Time interval in seconds to refresh metrics into the file.- example:
0.1means metrics are updated every 0.1s or 100ms.
- example:
Create and Run Task Workers
The next step is to create and run task workers.
Create Workflows using Code
Finally, you can create workflows using code.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file conductor-python-1.0.63.tar.gz.
File metadata
- Download URL: conductor-python-1.0.63.tar.gz
- Upload date:
- Size: 80.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eedd51e22a7489f9370ca3a11645a4d643a12cb62a33dfabcd9e3e5056c7754f
|
|
| MD5 |
11b43f89433195536e68d83cea91b2cb
|
|
| BLAKE2b-256 |
02649f3dfae1d84a35aa6606dd5390a47f99a283bd29add6e25a0bdfbeb3a1d5
|
File details
Details for the file conductor_python-1.0.63-py3-none-any.whl.
File metadata
- Download URL: conductor_python-1.0.63-py3-none-any.whl
- Upload date:
- Size: 157.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b270cfc7059ee8b6f3625fbc4269339ebe06fa8d63172c36f355d69b45cf356b
|
|
| MD5 |
3332892a512e880692be3a674576b0c0
|
|
| BLAKE2b-256 |
cd4daeafe850556ddea52c50a9bb9be36b27384986386ef970005336dd9d8213
|