Skip to main content

Meowdel Python SDK

Official Python client for the Meowdel AI API.

Installation

pip install meowdel

Or install from source:

git clone https://github.com/afterdarksystems/meowdel-python
cd meowdel-python
pip install -e .

Quick Start

from meowdel import MeowdelClient

# Initialize client
client = MeowdelClient(api_key="mdl_your_key_here")

# Simple chat
response = client.chat("How do I fix this TypeScript error?")
print(response.message)

# Chat with personality and Brain context
response = client.chat(
    message="Explain quantum computing",
    personality="professor",
    use_brain_context=True
)
print(response.message)

# Combine multiple operations
response = client.combine(
    query="What is machine learning?",
    operations=["search", "explain", "visualize"],
    primary_personality="professor"
)
print(response.result)

Configuration

API Key

Set your API key via environment variable:

export MEOWDEL_API_KEY="mdl_your_key_here"

Or pass it directly:

client = MeowdelClient(api_key="mdl_your_key_here")

Get your API key from: https://meowdel.ai/profile

Custom Base URL

client = MeowdelClient(
    api_key="mdl_your_key_here",
    base_url="https://api.meowdel.ai"  # Custom endpoint
)

API Reference

Chat

response = client.chat(
    message="Your question here",
    personality="mittens",  # mittens, luna, professor, ninja, zoomies
    use_brain_context=False,
    conversation_history=[
        {"role": "user", "content": "Previous message"},
        {"role": "assistant", "content": "Previous response"}
    ]
)

print(response.message)
print(response.personality)
print(response.tokens_used)

Combine Operations

response = client.combine(
    query="What is recursion?",
    operations=["search", "explain", "code_example"],
    primary_personality="professor",
    secondary_personality="mittens"
)

print(response.result)
print(response.operations)

Context Manager

with MeowdelClient(api_key="mdl_your_key") as client:
    response = client.chat("Hello!")
    print(response.message)
# Session automatically closed

Available Personalities

  • mittens - Playful and friendly
  • luna - Elegant and sophisticated
  • professor - Scholarly and analytical
  • ninja - Stealthy and mysterious
  • zoomies - Hyper and energetic
  • And more!

Error Handling

from meowdel import MeowdelClient, AuthenticationError, RateLimitError, APIError

try:
    client = MeowdelClient(api_key="mdl_invalid")
    response = client.chat("Hello")
except AuthenticationError:
    print("Invalid API key")
except RateLimitError:
    print("Rate limit exceeded")
except APIError as e:
    print(f"API error: {e}")

Examples

Chat with conversation history

from meowdel import MeowdelClient, Message

client = MeowdelClient()

history = [
    Message(role="user", content="What is Python?"),
    Message(role="assistant", content="Python is a programming language..."),
]

response = client.chat(
    message="Can you give me an example?",
    conversation_history=history
)

Using Brain context

# Query with knowledge graph context
response = client.chat(
    message="What did we discuss about Docker?",
    use_brain_context=True,
    personality="professor"
)

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black meowdel/

# Type checking
mypy meowdel/

License

MIT

Support

Release files for meowdel 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meowdel 0.1.0
File Size Uploaded
meowdel-0.1.0.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for meowdel 0.1.0
File Interpreter ABI Platform
meowdel-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / meowdel-0.1.0.tar.gz

Download URL meowdel-0.1.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
64d9c586e15d7a6483f156c0f869a6ff123826e77129b693b0960330d275e67a
BLAKE2b-256 checksum
How to use checksums
bb1e2cf2dce438892a595949f4a3886a696271302de6b2c9308e48c12127d4f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / meowdel-0.1.0-py3-none-any.whl

Download URL meowdel-0.1.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8df109f9a9680f297b6a6bc998d5841eca55542c02a3beb2df65409b943c5a0
BLAKE2b-256 checksum
How to use checksums
f70905e35460a7e2ef341c4926cbf23389a15e5f86f8adb9a23a38367665b95e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page