Skip to main content

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 portalAPI & 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clawpro-0.2.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clawpro-0.2.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

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

Hashes for clawpro-0.2.0.tar.gz
Algorithm Hash digest
SHA256 75b847ac20e445d3325f2bea39e4b8026bda0c9b446fd17ef2dff64dae93879b
MD5 fa60c90daa04b73afcf70f0c4fde27bd
BLAKE2b-256 dd31e38d132daeefdd37ed8a1c6551a1295c21adbf020a8b2e89d5940448c585

See more details on using hashes here.

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

Hashes for clawpro-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad4a4c477352562a233639dc560e4832d6f301bcd4e0a924588404415cd84774
MD5 0474bb97f8469dc2cb8fb7a33de50319
BLAKE2b-256 f30a9460f6fe85bde6ad858d812c9d4865c49b8d87670d228ca9d7699d10facd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page