Python SDK v2
A typed client for the v2 REST API, for Python 3.9+.
Install
terminal
bash
pip install kmp-sdk
Create a client
client.py
python
from kmp import KMP
kmp = KMP(api_key=os.environ["KMP_API_KEY"])
Create a pipeline
Maps directly onto the Pipelines endpoint — see the Building your first pipeline guide for the concepts.
create_pipeline.py
python
pipeline = kmp.pipelines.create(
name="ingest-orders",
source_connector_id="conn_pg_orders",
destination_connector_id="conn_snowflake_dw",
)
Replaying dead-lettered events
Wraps the replay action described in Handling errors & retries:
replay.py
python
kmp.events.replay("evt_8f2c1a90")
Async support
Every method has an async counterpart under kmp.aio for use with asyncio-based applications.