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.2.tar.gz (14.1 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.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wokki_chat_sdk-1.0.2.tar.gz
  • Upload date:
  • Size: 14.1 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.2.tar.gz
Algorithm Hash digest
SHA256 cd775f3f7da71c5b5ce95d55c534bf3bc64c378fa739ea5418456d0852db00ae
MD5 b532dac1c79e11f1ce3f69809505688c
BLAKE2b-256 71eb01a57c7b5a55b594edf6ed8a615835d771f0ac46f6c83800a73db1019324

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wokki_chat_sdk-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 15.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f914ca722afb756d587024bc64e210b4824ef7289d23553a6ca5525fb168aa19
MD5 0c3a4250ac302827785ff383b16f7472
BLAKE2b-256 4628780941bcfe8b190bed4759a0b6e7e10d5639750fd7c4ac47dce1985e6259

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