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(publisher_id='your_publisher_id', key='your_api_key')

# Send in messages
response = client.new_chat(chat_id='unique_id_identifying_conversation', entry='your_entry_message', human='boolean_human_or_bot')
print(response)

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

Initializing the Client

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

client = ChatADy(publisher_id='your_publisher_id', key='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(publisher_id='your_publisher_id', key='your_api_key', options=options)

Retrieving Ad Contents

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

response = client.get_contents(chat_id='unique_id_identifying_conversation', options={'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(chat_id='unique_id_identifying_conversation', entry='Hello, ChatADy!', human='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.1.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.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chatady-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 54b439534dcc67643c9121acf52847c1fe7b80f0f589fa35b5e58714f88c3056
MD5 7b1f55bf203edd29680e3e4aded4a90d
BLAKE2b-256 86bd65c1fbcf57ca9fb13f5ea934c596f08c26fa3001a89b8a8e5dbb89b6ce57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chatady-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8469081ef7406c32fae5f195943bb3fbb0ef2227b6f9cdcf068bc533aa020d1
MD5 586f20f0a7425b5b114bf2cf881bff1a
BLAKE2b-256 6811fd07d6b4e3bae9de818d9cdc7ce9d186c1665de7c8d68ff263882f5f2157

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