Skip to main content

Python SDK to make bots for Wokki Chat

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Wokki Chat SDK

Python SDK to make bots for Wokki Chat easily and asynchronously.
This library lets you create bots that can send and receive messages, respond to events, and interact with the Wokki Chat platform programmatically.

Features

  • Connect to Wokki Chat using WebSockets.
  • Send and receive messages in real-time.
  • Async-friendly, built on Python asyncio.
  • Easy integration into Python projects.
  • Designed to simplify bot creation for developers.

Installation

Install via pip:

pip install wokki-chat-sdk python-dotenv

We include python-dotenv because it helps you securely manage your bot token and other environment variables.

Using Environment Variables

Sensitive data like your bot token should not be hardcoded. Use a .env file instead:

  1. Create a file named .env in the same folder as your script.
  2. Add your bot token:
TOKEN=your_bot_token_here
  1. Load it in python
import dotenv, os
dotenv.load_dotenv()

Now you can access your token securely using os.environ["TOKEN"].

Quick Start

import dotenv, os
from wokkichat import Bot, ctx

dotenv.load_dotenv()
bot = Bot(os.environ["TOKEN"])

@bot.command()
async def echo(c: ctx, text: str):
    await c.reply(f"Echoed: {text}")

bot.connect()

With just a few lines, your bot can respond to commands like echo on Wokki Chat.

Creating a Bot

Before using the SDK, you need to create a bot on Wokki Chat:

  1. Go to Wokki Chat Developer Bots.
  2. Log in if prompted.
  3. Click the Create New Bot button.
  4. Enter a name for your bot and optionally choose an icon.
  5. After creation, click the Copy Token button to get your bot token.
  6. Save this token - you’ll use it in your code as the bot’s authentication token.

License

This project is licensed under the Apache-2.0 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

wokki_chat_sdk-1.0.1.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

wokki_chat_sdk-1.0.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wokki_chat_sdk-1.0.1.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for wokki_chat_sdk-1.0.1.tar.gz
Algorithm Hash digest
SHA256 cb5a108c0f14e73706c9d26dde9b6f782cef2580396580c4f38191b45deab080
MD5 92f34b29a2571466d37247e019f70843
BLAKE2b-256 84733eb57532d43af1689ed51ec0703f0bb85e34feafc2190c7dea7d16bf9514

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wokki_chat_sdk-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for wokki_chat_sdk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ec6b6e1b13ca04122e1fb0e84369274309b9def9ca0f21c0f4d4faabaf386d0
MD5 a1558c01fbf3be51815b4c14a35f2ece
BLAKE2b-256 e5b7312701ae821383ea31ea46f7919f77255e40d65c01fdb04af30b1526c907

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