Installation
Requirements​
- Python 3.12+
- Server or worker runtime with outbound HTTPS access
Install​
pip install mappa-conduit
Environment​
export CONDUIT_API_KEY="your_api_key_here"
export CONDUIT_WEBHOOK_SECRET="your_webhook_secret_here"
Create the client​
import os
from conduit import Conduit
conduit = Conduit(
api_key=os.environ["CONDUIT_API_KEY"],
base_url="https://api.mappa.ai",
timeout_ms=300_000,
max_retries=2,
)
Options​
| Option | Type | Default |
|---|---|---|
api_key | str | required |
base_url | str | https://api.mappa.ai |
timeout_ms | int | 300000 |
max_retries | int | 2 |
max_source_bytes | int | SDK default guard |
user_agent | `str | None` |
http_client | `httpx.Client | None` |
telemetry | `TelemetryHooks | None` |
Request shape conventions​
- Use snake_case request dictionaries:
media_id,entity_id,template_params,time_range,idempotency_key. - The stable templates are
general_reportandsales_playbook. - Keep the API key server-side.
- Use webhooks for production completion.
Choose a workflow​
- Use
conduit.reports.create(...)for one-speaker analysis from a file, URL, path, or existingmedia_id. - Use
conduit.matching.create(...)for closed-context comparison withcontext="behavioral_compatibility". - Use
conduit.primitives.media.upload(...)when you want to upload once and reuse media later.