Skip to main content

🐱 The embedding client that always lands on its feet 🚀

Project description

Catsu Logo

🌐 catsu 🐱

PyPI version Python versions License Documentation Stars

A unified, batteries-included client for embedding APIs that actually works.

The world of embedding API clients is broken.

  • Everyone defaults to OpenAI's client for embeddings, even though it wasn't designed for that purpose
  • Provider-specific libraries (VoyageAI, Cohere, etc.) are inconsistent, poorly maintained, or outright broken
  • Universal clients like LiteLLM and any-llm-sdk don't focus on embeddings at all—they rely on native client libraries, inheriting all their problems
  • Every provider has different capabilities—some support dimension changes, others don't—with no standardized way to discover what's available
  • Most clients lack basic features like retry logic, proper error handling, and usage tracking
  • There's no single source of truth for model metadata, pricing, or capabilities

Catsu fixes this. It's a lightweight, unified client built specifically for embeddings with:

🎯 A clean, consistent API across all providers
🔄 Built-in retry logic with exponential backoff
💰 Automatic usage and cost tracking
📚 Rich model metadata and capability discovery
⚠️ Proper error handling and type hints
⚡ First-class support for both sync and async

📦 Install

Install with pip:

pip install catsu

Or with uv (recommended):

uv pip install catsu

🚀 Quick Start

Get started in seconds! Just import catsu, create a client, and start embedding:

import catsu

# Initialize the client
client = catsu.Client()

# Generate embeddings (auto-detects provider from model name)
response = client.embed(
    model="voyage-3",
    input="Hello, embeddings!"
)

# Access your results
print(f"Dimensions: {response.dimensions}")
print(f"Tokens used: {response.usage.tokens}")
print(f"Cost: ${response.usage.cost:.6f}")
print(f"Embedding: {response.embeddings[0][:5]}...")  # First 5 dims

That's it! No configuration needed—catsu picks up your API keys from environment variables automatically (VOYAGE_API_KEY, OPENAI_API_KEY, etc.).

Want more control? Specify the provider explicitly:

# Method 1: Separate parameters
response = client.embed(provider="voyageai", model="voyage-3", input="Hello!")

# Method 2: Provider prefix
response = client.embed(model="voyageai:voyage-3", input="Hello!")

Need async? Just use aembed:

response = await client.aembed(model="voyage-3", input="Hello, async world!")

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

catsu-0.0.1a0.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

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

catsu-0.0.1a0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file catsu-0.0.1a0.tar.gz.

File metadata

  • Download URL: catsu-0.0.1a0.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for catsu-0.0.1a0.tar.gz
Algorithm Hash digest
SHA256 86527b22acf938a588a4ef1c82d3d6578441f5dc8f2cbd467207591e06b9aeca
MD5 a53601ad6688ac0c04328cd61fbc5136
BLAKE2b-256 fd641e2ddfafcc1343de0ae981ca7bb0ed04cb08da77e2acb42f41dc9bb208d5

See more details on using hashes here.

File details

Details for the file catsu-0.0.1a0-py3-none-any.whl.

File metadata

  • Download URL: catsu-0.0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for catsu-0.0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea9ea551076c570d5f9ed923370516f8fcad14da89d9eaa5675f674614e8bc09
MD5 bb5cd558ba699890b1514c4461d5a034
BLAKE2b-256 8255fc669cd44f9aaba4639145e9a042f02780f0f948ab722b578cc803300015

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