Metadata-Version: 2.4
Name: wokki-chat-sdk
Version: 1.0.2
Summary: Python SDK to make bots for Wokki Chat
Home-page: https://github.com/levkris/Wokki-Chat-Python-SDK
Author: Bjarnos & wokki20
License: Apache-2.0
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 4 - Beta
Classifier: Natural Language :: English
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: Developers
Classifier: Environment :: Web Environment
Classifier: Framework :: AsyncIO
Classifier: Operating System :: OS Independent
Classifier: Typing :: Typed
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-socketio[client]
Requires-Dist: aiohttp
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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:

```bash
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:
```env
TOKEN=your_bot_token_here
```
3. Load it in python
```python
import dotenv, os
dotenv.load_dotenv()
```
Now you can access your token securely using `os.environ["TOKEN"]`.

## Quick Start
```python
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](https://chat.wokki20.nl/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](https://github.com/levkris/Wokki-Chat-Python-SDK/blob/main/LICENSE) file for details.
