A Python wrapper for the ChatADy API.
Project description
ChatADy Package for Python
The ChatADy package is a Python wrapper for the ChatADy API, facilitating easy interaction with ChatADy's services from Python applications. It offers methods to send in messages and retrieve AD content.
Installation
To install ChatADy, run this command in your terminal:
pip install chatady
This is the preferred method to install ChatADy, as it will always install the most recent stable release.
If you don't have pip installed, this Python installation guide can guide you through the process.
Usage
To use the ChatADy package, you first need to import the ChatADy class from the package and then initialize it with your publisher ID and key.
Quick Start
Here's a quick example to get you started:
from chatady.chatady import ChatADy
# Initialize the ChatADy client
client = ChatADy('your_publisher_id', 'your_api_key')
# Send in messages
response = client.new_chat('unique_id_conversation', 'unique_id_speaker', 'speaker_message', 'request_ad_type')
print(response)
### Initializing the Client
To interact with the API, you need to create an instance of `ChatADy`:
```python
client = ChatADy('your_publisher_id', 'your_api_key')
You can also pass additional options as a dictionary to configure the client further:
options = {'environment': 'production', 'noDelay': True, 'timeout': 1000}
client = ChatADy('your_publisher_id', 'your_api_key', options)
Sending in a new chat message
To start a new chat, use the new_chat method with the chat ID, speaker ID and speaker message:
response = client.new_chat('conversation_id_1', 'speaker_id_1', 'Hello, ChatADy!')
print(response)
Sending in a new chat message & retrieve AD content
To start a new chat, use the new_chat method with the chat ID, speaker ID and speaker message:
response = client.new_chat('conversation_id_1', 'speaker_id_1', 'Hello, ChatADy!', 'PPC-TEXTLINK')
print(response)
Support
For issues, questions, or contributions, please open an issue on the GitHub repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
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 chatady-4.0.0.tar.gz.
File metadata
- Download URL: chatady-4.0.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
015fa084cfe0b874ad82e433aca4562d9b25512ab091eadc0a68007f81d53383
|
|
| MD5 |
3cce422ea6178336821ba9d71973d541
|
|
| BLAKE2b-256 |
c006a78fec69a202280517da862607ad90a79532c83256a58d6bc6852384ae1a
|
File details
Details for the file chatady-4.0.0-py3-none-any.whl.
File metadata
- Download URL: chatady-4.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb3f77459ae5c46b26a1ee5e391918e5e0d8da84575f271e680903c0e9da6cad
|
|
| MD5 |
1815c4bcd4bf79672242fd47d37d9338
|
|
| BLAKE2b-256 |
e5e638bf1b201d83699f4d35a2caf1a513c2ea83607f8ba843793b9a791cec3c
|