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.1.1.tar.gz (5.9 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.1.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file clawpro-0.1.1.tar.gz.

File metadata

  • Download URL: clawpro-0.1.1.tar.gz
  • Upload date:
  • Size: 5.9 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.1.1.tar.gz
Algorithm Hash digest
SHA256 b9849f7e3b3ad2d4d8eb544632916b04365b4c6da49054c4f7eaadbed8323c3a
MD5 a19e7e086447cbe397dd62e2f8f685cc
BLAKE2b-256 91ade1733286da4731cd259daa8ea2dd3249814925d40896474ae34ed1e0e8b1

See more details on using hashes here.

File details

Details for the file clawpro-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: clawpro-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d7ec6edbed671a25326c649b263e0d5b03de2025ffd164371b266c47dd0c805
MD5 2886f5ecb43f2d2ec12d962306ceea4c
BLAKE2b-256 7731f465be69a1430c998396154c126d2ca0ddc919a9dde51c144c159feea834

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