Skip to main content

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:

  1. Setup conductor-python package
  2. Create and run task workers
  3. 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. true for verbose logging false to 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
  • update_interval: Time interval in seconds to refresh metrics into the file.
    • example: 0.1 means metrics are updated every 0.1s or 100ms.

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

conductor-python-1.0.72.tar.gz (82.5 kB view details)

Uploaded Source

Built Distribution

conductor_python-1.0.72-py3-none-any.whl (159.9 kB view details)

Uploaded Python 3

File details

Details for the file conductor-python-1.0.72.tar.gz.

File metadata

  • Download URL: conductor-python-1.0.72.tar.gz
  • Upload date:
  • Size: 82.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for conductor-python-1.0.72.tar.gz
Algorithm Hash digest
SHA256 6f1cce26ce7a9282f042403581bbe1c7fb857ffb7462758d48206f76a395d407
MD5 e119535dc39139ab6d2cc942e81aedfa
BLAKE2b-256 458df1dd2ee8832aa0db2a4e622ef0b112642ab2cb881a4bec0f0a833b67a7d2

See more details on using hashes here.

File details

Details for the file conductor_python-1.0.72-py3-none-any.whl.

File metadata

File hashes

Hashes for conductor_python-1.0.72-py3-none-any.whl
Algorithm Hash digest
SHA256 fc0b1c653171de5fcbc3a2020998dee8f10fcc973783a7c4d6e38f94a47ce4cb
MD5 7e5399cfce3615435a5e75f4533f64a2
BLAKE2b-256 895b971c2cc51bfbc4f92e402d28b91f2faa25c6567df3fd53b9348e65b3452f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page