Skip to main content

Python client for CloudContactAI API

Project description

CCAI Python Client

A Python client for interacting with the CloudContactAI API.

Installation

pip install ccai-python

Usage

from ccai_python import CCAI

# Initialize the client
ccai = CCAI(
    client_id="YOUR-CLIENT-ID",
    api_key="YOUR-API-KEY"
)

# Send a single SMS
response = ccai.sms.send_single(
    first_name="John",
    last_name="Doe",
    phone="+15551234567",
    message="Hello ${first_name}, this is a test message!",
    title="Test Campaign"
)

print(f"Message sent with ID: {response.id}")

# Send to multiple recipients
accounts = [
    {"first_name": "John", "last_name": "Doe", "phone": "+15551234567"},
    {"first_name": "Jane", "last_name": "Smith", "phone": "+15559876543"}
]

campaign_response = ccai.sms.send(
    accounts=accounts,
    message="Hello ${first_name} ${last_name}, this is a test message!",
    title="Bulk Test Campaign"
)

print(f"Campaign sent with ID: {campaign_response.campaign_id}")

Features

  • Send SMS messages to single or multiple recipients
  • Variable substitution in messages
  • Async support
  • Type hints for better IDE integration
  • Comprehensive error handling

Requirements

  • Python 3.10 or higher
  • requests library

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

ccai_python-1.0.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

ccai_python-1.0.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file ccai_python-1.0.0.tar.gz.

File metadata

  • Download URL: ccai_python-1.0.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for ccai_python-1.0.0.tar.gz
Algorithm Hash digest
SHA256 78aa46f1624aec67efe34a349abb78f6e89e01b4c64c73025cade956021ac4b7
MD5 3ca6160b22325041020b6a50f423432d
BLAKE2b-256 3ef54c770a6fa70518a38d0c3488b81957f7bf59e0ea9a1467b01c0fb6476e48

See more details on using hashes here.

File details

Details for the file ccai_python-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ccai_python-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for ccai_python-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65570e50e51e6e97831e07328e8e20949e8a965525e282a06e2b9ffc145da72b
MD5 9d417eef3b8a36edbe7b83dfd5023aae
BLAKE2b-256 b419f8679c578456b0a142bcfb529270fa0297d0919108fab798645abdbaac7e

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