Python API reference
project.http_connector() | grpc_connector() | kafka_connector() | ...Project connector factories
Create transport-specific Connector subclasses with language adapter defaults selected by the DSL.
When to use
Declare a connector once, then create its endpoints through the returned concrete object.
Behavior
- HTTP, gRPC, Kafka, Cron, Temporal, and Custom use different constructor parameters and endpoint methods.
- Per-language implementation parameters are typed DataConnectorImplementation values.
- Default implementations are populated for currently supported generator/runtime combinations.
Network connector factories properties
Transport configuration.
PropertyTypeDescription
http_connector(name, *, module=None, host=None, port=None, use_dedicated_listener=None, ...implementations)HttpConnectorHTTP listener/client adapter configuration.
grpc_connector(name, *, module=None, programming_language=None, address=None, connections_count=None, ...implementations)GrpcConnectorgRPC channel/server adapter configuration.
kafka_connector(name, *, cluster, security=None, use_partitioner=None, async_=None, ...implementations)KafkaConnectorKafkaCluster and optional KafkaSecurity configuration objects.
Scheduling connector factories properties
Cron and Temporal configuration.
PropertyTypeDescription
cron_connector(name, *, ...implementations)CronConnectorLocal schedule adapter per target language.
temporal_connector(name, *, address, namespace, identity=None, api_key=None, tls_*=None, worker_stop_timeout=None, ...implementations)TemporalConnectorTemporal client, TLS, identity, and worker shutdown configuration.
Custom connector properties
Function-defined integration.
PropertyTypeDescription
custom_connector(name, *, implementation=FUNCTION, module=None)CustomConnectorCustom endpoint adapter optionally owned by a Module.
Python example
kafka = project.kafka_connector(
"Order Events",
cluster=KafkaCluster(brokers="redpanda:9092", version="2.8.0"),
security=KafkaSecurity(protocol=KafkaSecurityProtocol.PLAINTEXT),
)
temporal = project.temporal_connector(
"Temporal",
address="temporal:7233",
namespace="default",
worker_stop_timeout=10_000,
)