Official Python SDK for the ClawPro Instagram outbound API.
Project description
clawpro
Official Python SDK for the ClawPro Instagram outbound API — connect sending accounts, run competitor-audience campaigns, score leads, manage webhooks, and read usage.
pip install clawpro
Python 3.8+. Get an API key from the developer portal → API & Developers → API Keys.
Quick start
import os
from clawpro import ClawPro, ClawProError
clawpro = ClawPro(api_key=os.environ["CLAWPRO_API_KEY"])
account = clawpro.accounts.create(username="burner_account", country="gb")
campaign = clawpro.campaigns.create(
account_id=account["id"],
name="Founders engaging with X",
targets=["@influencer1"],
offer="We help B2B founders book demos via Instagram outbound.",
daily_dm_target=20,
)
clawpro.campaigns.run(campaign["id"])
# Warm replies → mark a lead booked (fires the lead.booked webhook)
inbox = clawpro.campaigns.inbox(campaign["id"])
if inbox:
clawpro.leads.update(inbox[0]["id"], status="booked")
print(clawpro.usage.summary())
# Auto-paginate the request log
for log in clawpro.usage.iterate_logs(page_size=100):
...
Resources
accounts, campaigns, leads, webhooks, keys, usage — mirroring the REST API. Requests authenticate with X-API-Key; transient failures (network, 429 honoring Retry-After, 5xx) are retried with exponential backoff for idempotent calls.
Errors
try:
clawpro.accounts.create(username="taken_handle")
except ClawProError as err:
print(err.status, err, err.request_id) # 409 "@taken_handle is already connected"
Configuration
ClawPro(api_key="...", base_url="https://api.tryclawpro.com", max_retries=3, timeout=30.0)
It's also a context manager (with ClawPro(...) as clawpro: ...) and exposes .close().
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clawpro-0.2.0.tar.gz.
File metadata
- Download URL: clawpro-0.2.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75b847ac20e445d3325f2bea39e4b8026bda0c9b446fd17ef2dff64dae93879b
|
|
| MD5 |
fa60c90daa04b73afcf70f0c4fde27bd
|
|
| BLAKE2b-256 |
dd31e38d132daeefdd37ed8a1c6551a1295c21adbf020a8b2e89d5940448c585
|
File details
Details for the file clawpro-0.2.0-py3-none-any.whl.
File metadata
- Download URL: clawpro-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad4a4c477352562a233639dc560e4832d6f301bcd4e0a924588404415cd84774
|
|
| MD5 |
0474bb97f8469dc2cb8fb7a33de50319
|
|
| BLAKE2b-256 |
f30a9460f6fe85bde6ad858d812c9d4865c49b8d87670d228ca9d7699d10facd
|