Skip to main content

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 provides methods to retrieve contents and initiate new chats.

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_identifying_conversation', 'your_entry_message', 'boolean_human_or_bot')
print(response)

# Get ad contents
response = client.get_contents('unique_id_identifying_conversation')
print(response)

Initializing the Client

To interact with the API, you need to create an instance of ChatADy:

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)

Retrieving Ad Contents

To retrieve contents, use the get_contents method with the chat ID. You can also specify options for better targeting:

response = client.get_contents('unique_id_identifying_conversation', {'humansex': 'male', 'botsex': 'female'})
print(response)

Sending in a New Message

To start a new chat, use the new_chat method with the chat ID, entry message, and human identifier:

response = client.new_chat('unique_id_identifying_conversation', 'Hello, ChatADy!', 'boolean_human_or_bot')
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

chatady-1.0.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

chatady-1.0.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file chatady-1.0.3.tar.gz.

File metadata

  • Download URL: chatady-1.0.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for chatady-1.0.3.tar.gz
Algorithm Hash digest
SHA256 af0f1277318b0921512ae9ca879830bd8511f532eaccbae1d3c3352d65d528f2
MD5 367c681a8cf72aec21ac7dd1793c1a1c
BLAKE2b-256 131ed3f3174f91d3b428c7e5bf570294132fb9bdbdcdc117d5cbbf9dfafd42c6

See more details on using hashes here.

File details

Details for the file chatady-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: chatady-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for chatady-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5b4b765a6ace54c326644a43524d1751055887c2da7c3377a49333ddf95919fa
MD5 0148220127e3dba204553bd8f08687a3
BLAKE2b-256 f3a5ce6e14e18686ca764f6738828e678acb23feeeee82115d8e6f7829c76757

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