Skip to content

config

These configuration classes define how to connect to a Zeebe instance.

Keys given in description must be used if you prefer to set up connection using environmental variables.

In addition, you must set CAMUNDA_CONNECTION_TYPE to either SECURE, INSECURE or CAMUNDA_CLOUD.

Example Cloud config:

from python_camunda_sdk import CloudConfig

config = CloudConfig(
    client_id='jYsgv.SryJYQlcpobk-tZZP~2R60xpNY',
    client_secret='55kddTbk~yZBFb2NH5GtebWHkSoK1z.TG7G1Hn-n.mH_f4ihpZAUop1-sryxHnyV',
    cluster_id='7bc802fc-7bf4-4800-b84a-596628d1ed08',
    region='bru-2'
)

Example Insecure config:

from python_camunda_sdk import InsecureConfig

config = InsecureConfig(
    host='127.0.0.1',
    port=26500
)

Example secure config:

config = SecureConfig(
    host='127.0.0.1',
    port=26500,
    root_certificates='''
    -----BEGIN CERTIFICATE-----
    xxx
    -----BEGIN CERTIFICATE-----
    '''
    private_key='''
    -----BEGIN RSA PRIVATE KEY-----
    xxx
    -----BEGIN RSA PRIVATE KEY-----
    '''
    certificate_chain=''
)

ConnectionConfig

Bases: BaseModel

Base class for connection configuration.

Source code in python_camunda_sdk/runtime/config.py
class ConnectionConfig(BaseModel):
    """Base class for connection configuration."""

    pass

CloudConfig

Bases: ConnectionConfig

Configuration for connection to Camunda SaaS.

Attributes:

Name Type Description
client_id str

CAMUNDA_CLIENT_ID

client_secret str

CAMUNDA_CLIENT_SECRET

cluster_id str

CAMUNDA_CLUSTER_ID

region str

CAMUNDA_REGION

Source code in python_camunda_sdk/runtime/config.py
class CloudConfig(ConnectionConfig):
    """Configuration for connection to Camunda SaaS.

    Attributes:
        client_id: `CAMUNDA_CLIENT_ID`
        client_secret: `CAMUNDA_CLIENT_SECRET`
        cluster_id: `CAMUNDA_CLUSTER_ID`
        region: `CAMUNDA_REGION`
    """

    client_id: str = Field(
        json_schema_extra={
            "env_var": "CAMUNDA_CLIENT_ID"
        }
    )
    client_secret: str = Field(
        json_schema_extra={
            "env_var": "CAMUNDA_CLIENT_SECRET"
        }
    )
    cluster_id: str = Field(
        json_schema_extra={
            "env_var": "CAMUNDA_CLUSTER_ID"
        }
    )
    region: str = Field(
        json_schema_extra={
            "env_var": "CAMUNDA_REGION"
        }
    )

InsecureConfig

Bases: ConnectionConfig

Configuration for connecting insecurely to self-hosted Zeebe instance.

Attributes:

Name Type Description
hostname str

ZEBEE_HOSTNAME

port Optional[int]

ZEBEE_PORT

Source code in python_camunda_sdk/runtime/config.py
class InsecureConfig(ConnectionConfig):
    """Configuration for connecting insecurely to self-hosted Zeebe
    instance.

    Attributes:
        hostname: `ZEBEE_HOSTNAME`
        port: `ZEBEE_PORT`
    """

    hostname: str = Field(
        json_schema_extra={
            "env_var": "ZEBEE_HOSTNAME"
        }
    )
    port: Optional[int] = Field(
        default=26500,
        json_schema_extra={
            "env_var": "ZEBEE_PORT"
        }
    )

SecureConfig

Bases: InsecureConfig

Configuration for connecting securely to self-hosted Zeebe instance.

Warning

In addition should have hostname and port set.

Attributes:

Name Type Description
root_certificates str

SSL_ROOT_CA

private_key str

SSL_PRIVATE_KEY

certificate_chain Optional[str]

SSL_CERTIFICATE_CHAIN

Source code in python_camunda_sdk/runtime/config.py
class SecureConfig(InsecureConfig):
    """Configuration for connecting securely to self-hosted Zeebe
    instance.

    !!! warning
        In addition should have hostname and port set.

    Attributes:
        root_certificates: `SSL_ROOT_CA`
        private_key: `SSL_PRIVATE_KEY`
        certificate_chain: `SSL_CERTIFICATE_CHAIN`
    """

    root_certificates: str = Field(
        json_schema_extra={
            "env_var": "SSL_ROOT_CA"
        }
    )
    private_key: str = Field(
        json_schema_extra={
            "env_var": "SSL_PRIVATE_KEY"
        }
    )
    certificate_chain: Optional[str] = Field(
        default=None,
        json_schema_extra={
            "env_var": "SSL_CERTIFICATE_CHAIN"
        }
    )