Python SDK & CLI for Wakumo AI
Project description
Wakumo AI CLI & Python SDK
A modern Python library and CLI tool to interact with the Wakumo AI backend (API & WebSocket).
Features
- Interact with Wakumo AI backend via REST API and WebSocket
- Unified authentication (WAKUMO_API_KEY)
- Modular, extensible structure for all API logic (conversation, file, ...)
- Usable as both a Python library and a CLI tool
Installation
1. Install Poetry (if not already installed)
pip install poetry
2. Install dependencies
poetry install
3. (Optional) Activate Poetry virtual environment
poetry shell
Configuration
Set your API key and endpoint (via environment variable or .env file):
WAKUMO_API_KEY=your_api_key_here
WAKUMO_API_URL=https://api.wakumo.ai
WAKUMO_WS_URL=wss://api.wakumo.ai
Usage as Python Library
1. Create a conversation (REST API)
from wakumo_ai import WakumoAIClient
client = WakumoAIClient() # Auto-loads config from env/.env
response = client.conversation.create(
selected_repository="username/repo",
selected_branch="main",
initial_user_msg="Hello, let's start!",
image_urls=[]
)
print("Conversation created:", response.conversation_id)
2. Listen to conversation events (WebSocket)
from wakumo_ai import WakumoAIClient
client = WakumoAIClient()
def on_message(event):
print("New event:", event)
ws = client.conversation.ws_connect(conversation_id="abc123", on_message=on_message)
ws.run_forever()
Usage as CLI
wakumo-ai conversation create --repo "username/repo" --branch "main" --msg "Hello"
wakumo-ai conversation listen --id abc123
Project Structure
wakumo_ai/
├── __init__.py # WakumoAIClient, public API
├── cli.py # CLI entrypoint
├── config.py # Config management
├── exceptions.py # Custom exceptions
├── utils.py # Utilities
│
├── api/
│ ├── __init__.py
│ ├── conversation.py # ConversationAPI: REST + ws_connect
│ ├── file.py # FileAPI: REST + ws_connect
│ └── ...
│
├── ws/
│ ├── __init__.py
│ └── base.py # BaseWebSocket logic
│
├── models/
│ ├── __init__.py
│ ├── conversation.py
│ └── ...
│
├── commands/
│ ├── __init__.py
│ ├── conversation.py # CLI commands
│ └── ...
└── auth.py # Auth logic
Testing
poetry run pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wakumo_ai-0.1.0.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wakumo_ai-0.1.0.tar.gz.
File metadata
- Download URL: wakumo_ai-0.1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.11.12 Darwin/24.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2590173b542f50e707f4821541d4cffd81630442e3f3a73d5f18ab0ba4701b9
|
|
| MD5 |
806dca6eeb0e48f8cd4d98d10c4351a1
|
|
| BLAKE2b-256 |
8e0c9f85d95c5126acd7a69ad617face44aaa0f05603ba679b10c890dcbe0e48
|
File details
Details for the file wakumo_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wakumo_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.11.12 Darwin/24.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7b1076cbe13088d16d353a57853a2ed4e6db18cb696bcec33d8c7a60e92042e
|
|
| MD5 |
121cfdae19101ab85b9cb69f7fd9bef5
|
|
| BLAKE2b-256 |
4f30693222d5a0a72a5dce73bdc9742894c2f12d41f1a80cec526ff1501aeed1
|