Metadata-Version: 2.4
Name: chatady
Version: 4.0.0
Summary: A Python wrapper for the ChatADy API.
Author-email: Jernej Pregelj <contact@chatady.com>
License: MIT License
        
        Copyright (c) 2026 ARCLOOP LIMITED
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/ChatADy/chatady-python
Keywords: chatady,api,wrapper
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: bumpver; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: pip-tools; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Dynamic: license-file

# 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:

```bash
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](https://pip.pypa.io) installed, this [Python installation guide](http://docs.python-guide.org/en/latest/starting/installation/) 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:

```python
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:

```python
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:

```python
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:

```python
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.
