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.
Release files for conductor-python 1.0.62
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| conductor-python-1.0.62.tar.gz | 80.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| conductor_python-1.0.62-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 238.6 kB
Release files / conductor-python-1.0.62.tar.gz
| Download URL | conductor-python-1.0.62.tar.gz |
|---|---|
| Size | 80.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
133d5543e5d85e7719f41a853051495a5fe28746413d7b0c32dbf589ebbd30b6
|
|
BLAKE2b-256 checksum How to use checksums |
d2be61f9d4672ad0820b4ea778582746114571299c55b8dc93ec98dacf691be2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / conductor_python-1.0.62-py3-none-any.whl
| Download URL | conductor_python-1.0.62-py3-none-any.whl |
|---|---|
| Size | 157.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8f6c981a0a3d6afc0d2d10f0bec26324e6d93f5cb91adeb48b01903d3a9030f
|
|
BLAKE2b-256 checksum How to use checksums |
686d72a8a964f417559fd3361dc452fb16ee985927d7e5cf9df4c8d82c286e03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|