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
requestslibrary
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
ccai_python-1.0.0.tar.gz
(8.6 kB
view details)
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78aa46f1624aec67efe34a349abb78f6e89e01b4c64c73025cade956021ac4b7
|
|
| MD5 |
3ca6160b22325041020b6a50f423432d
|
|
| BLAKE2b-256 |
3ef54c770a6fa70518a38d0c3488b81957f7bf59e0ea9a1467b01c0fb6476e48
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65570e50e51e6e97831e07328e8e20949e8a965525e282a06e2b9ffc145da72b
|
|
| MD5 |
9d417eef3b8a36edbe7b83dfd5023aae
|
|
| BLAKE2b-256 |
b419f8679c578456b0a142bcfb529270fa0297d0919108fab798645abdbaac7e
|