Skip to main content

Python SDK & CLI for Wakumo AI

Project description

Wakumo AI CLI & Python SDK

PyPI version

A modern Python library and CLI tool to interact with the Wakumo AI backend (API & WebSocket).


Latest version available on PyPI: wakumo-ai


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(
    initial_user_msg="Hello, let's start!",
    image_urls=[],
    file_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

Wakumo

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

wakumo_ai-0.1.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

wakumo_ai-0.1.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file wakumo_ai-0.1.2.tar.gz.

File metadata

  • Download URL: wakumo_ai-0.1.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.12 Darwin/24.4.0

File hashes

Hashes for wakumo_ai-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0168b07547552dc95879b3914c0ece7dc6410e8228f544c4c3f7c79165193834
MD5 6fa538a9d2039daf2667eb5c8da946a4
BLAKE2b-256 246d41e85cc6cf2ec2acb2b69e7bcd6b3b02e1b7550e3464f35814beb7fb9adf

See more details on using hashes here.

File details

Details for the file wakumo_ai-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: wakumo_ai-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 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

Hashes for wakumo_ai-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a9f86e2e1e4e8072104d4f7328ba4b6f9dc4a7b8e22092d62d154a1737b70208
MD5 33b06602b29dcea2c9a7d646dd8b4a23
BLAKE2b-256 c4495333757d1adf62ab13c2b61c7b76d29116b795ebad2eb2a9d23bf4d9889f

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