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

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.1.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.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wakumo_ai-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 d7f2bb587baf30964061b8b58043f8890e3e6874e6a61f442959f8e51b3cc18a
MD5 fbe380f7ddb241d93746981931b2070d
BLAKE2b-256 5cd62425c59213f2baa8965fe9c4dbc22e71b20c9ceb3c8e341f12ed500a9b08

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wakumo_ai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c737aefb04c35522026bfedc77dfe0f967aa7f795e1774e26075e48b39ca229
MD5 3123a55d4f7097d4b4e27a46e2fc2a66
BLAKE2b-256 3fb0529e5ce9d04dff35b4de258c8c573127186d147c76b093334e40ccd3b6df

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