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.4.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.4-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chatady-1.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 53e9ff753217b87202d516527dc4507901e03de1d6453a531c271bd765887fc5
MD5 8d83d41aca13a9ebbf7fc687b934f05f
BLAKE2b-256 11693376934d98dd277e22b770f1d48bd11e17c398ea968a6ed9a8a0073e4f3f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chatady-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4adb77c485b8395322923be62a63b92b932c580219fb8afd54201140c8f39eb5
MD5 39f233673a13f8529cbe741866e9156a
BLAKE2b-256 90a4df6b156014a2dca741c7b130da36163686bf31dc029255551ccf1f88592b

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