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 don't focus on embeddings—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
Catsu fixes this. It's a high-performance, 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
⚡ Rust core with Python bindings for maximum performance
Installation
pip install catsu
Quick Start
from catsu import Client
# Create client (reads API keys from environment)
client = Client()
# Generate embeddings
response = client.embed(
"openai:text-embedding-3-small",
["Hello, world!", "How are you?"]
)
print(f"Dimensions: {response.dimensions}")
print(f"Tokens used: {response.usage.tokens}")
print(f"Embedding: {response.embeddings[0][:5]}")
Async Support
import asyncio
from catsu import Client
async def main():
client = Client()
response = await client.aembed(
"openai:text-embedding-3-small",
"Hello, async world!"
)
print(response.embeddings[0][:5])
asyncio.run(main())
With Options
response = client.embed(
"openai:text-embedding-3-small",
["Search query"],
input_type="query", # "query" or "document"
dimensions=256, # output dimensions (if supported)
)
Model Catalog
# List all available models
models = client.list_models()
# Filter by provider
openai_models = client.list_models("openai")
for m in openai_models:
print(f"{m.name}: {m.dimensions} dims, ${m.cost_per_million_tokens}/M tokens")
Configuration
client = Client(
max_retries=5, # Default: 3
timeout=60, # Default: 30 seconds
)
NumPy Integration
# Convert embeddings to numpy array
arr = response.to_numpy()
print(arr.shape) # (2, 1536)
Context Manager
# Sync
with Client() as client:
response = client.embed("openai:text-embedding-3-small", "Hello!")
# Async
async with Client() as client:
response = await client.aembed("openai:text-embedding-3-small", "Hello!")
If you found this helpful, consider giving it a ⭐!
made with ❤️ by chonkie, inc.
Metadata
Release files for catsu 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| catsu-0.1.8.tar.gz | 50.0 kB | Without provenance | Details for catsu-0.1.8.tar.gz |
Built distributions (wheels)
Total release size: 35.0 MB
Release files / catsu-0.1.8.tar.gz
| Download URL | catsu-0.1.8.tar.gz |
|---|---|
| Size | 50.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
961cbc239e77b32ee08e5498a7ddcb83a3c08b025fb3fc504f97c14569e9aa74
|
|
BLAKE2b-256 checksum How to use checksums |
855484b62d54afe2695a9170f6f434dc8912976a57bf6680aa99557eadb3676f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp313-cp313-win_amd64.whl
| Download URL | catsu-0.1.8-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
50ff392f5b9f0ad18fc11496f62079e36bb57270b5bca966feda220744139fa5
|
|
BLAKE2b-256 checksum How to use checksums |
4bce254323b237e230e5534b3226551172357751c9633438327a939104b56551
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | catsu-0.1.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
97b84a6412562370ac42270c965ea065d4f8a8f66eb706ac8d4ab5544fbe38fd
|
|
BLAKE2b-256 checksum How to use checksums |
7672edb51405083f3c9e87c0c30498b5ade0950eec8968d986c0baf1723ebb02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | catsu-0.1.8-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e1a81d2098e5dfb1e2394c7eeb594fe349451ebe4b51994e54dde5e4f06ecdb9
|
|
BLAKE2b-256 checksum How to use checksums |
bad55f8e90bfcd5b5c3b9e9e51fa644856fa89fb5f4e1f2cefd9e87be05d2e2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp313-cp313-macosx_10_12_x86_64.whl
| Download URL | catsu-0.1.8-cp313-cp313-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.13 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
6805074bbfb0c9df144834a02af14573ab423d822207d735b297fb5bed74dee4
|
|
BLAKE2b-256 checksum How to use checksums |
5ba43542483167e1a98998a2d5fb39a50978200c703d8f5fc9ac63acb529ee29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp312-cp312-win_amd64.whl
| Download URL | catsu-0.1.8-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
87f179efa920f10b7d3f8ef4c54d18c53f827d9ee2fc3b4e919b4c1a005d2758
|
|
BLAKE2b-256 checksum How to use checksums |
8feb3376890cf51b4bdd283db654d6d3b2fb98d6d26cc97c2a8af2097be1eb65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | catsu-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
2629b7a0827574426761575fe549754628d023db7be3b9450a6c05f91e6d249f
|
|
BLAKE2b-256 checksum How to use checksums |
bbbdbfc3d49cb8ca68e08521eea0fd61c120e80f8d52b25beeed39d058e383cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | catsu-0.1.8-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7a27211d2b0a8bc449c7bf8f553c3add438bf9a2e48cc7a5176e39c103fe8369
|
|
BLAKE2b-256 checksum How to use checksums |
f5dd057b3a4591d65fc42605ed6a955dd68797dcc8aea0e02f4ca5990e5edc86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp312-cp312-macosx_10_12_x86_64.whl
| Download URL | catsu-0.1.8-cp312-cp312-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.12 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
4fa79883486405b81a1eb79081505a69c3c0f4a782b7199724fc2c15eb6b0274
|
|
BLAKE2b-256 checksum How to use checksums |
78e8e337d7d95f58bb950e0dd5a969b36b7188fa79e4c4341a3da9e36e3ea1ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp311-cp311-win_amd64.whl
| Download URL | catsu-0.1.8-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f361bed7fd96ccca79cf32d0954da65cb8ea2e40cf1debc25cfb7b1974aa4d9f
|
|
BLAKE2b-256 checksum How to use checksums |
560c24530d03d26294007a6bd24d0471820aef2b511cab2ba1148c00b007d023
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | catsu-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
662ca297cd6c0a3b192bca49db9849ae72d8c91b44c9c02333f96889375a038a
|
|
BLAKE2b-256 checksum How to use checksums |
24ad9b2fca366f11f8fe26105ff923b3e44f4f8e7b2cb31cbaa0540a0dd6f331
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | catsu-0.1.8-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
037e67c4356686bcaed278dcc3628b00155af26d22b136937890df1834c3a96d
|
|
BLAKE2b-256 checksum How to use checksums |
b1599a79127ec5be65dcd94dc2a45e01514c78a517879fdec93de465d6a22bd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp311-cp311-macosx_10_12_x86_64.whl
| Download URL | catsu-0.1.8-cp311-cp311-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.11 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
01b7c7091ad2f50d478c0ee92f3823f6593310bc444853f3b1096955f0595542
|
|
BLAKE2b-256 checksum How to use checksums |
c50395c1b55e35ccaeeb71e85bf0f1387fa8a934c22de00a7c206b2227d370e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp310-cp310-win_amd64.whl
| Download URL | catsu-0.1.8-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e9056b30518b1ec7406198a84ef6e38b3ee094a5876fcd0167147edee82b2970
|
|
BLAKE2b-256 checksum How to use checksums |
f427e5cabfdfebdd23faf28a7b64c9deae204680e9df4bdd587155579e872178
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | catsu-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
099e029352e4d593813cfd634b35b190d09447e2e3ea50034af9913592c73a53
|
|
BLAKE2b-256 checksum How to use checksums |
f3d541883a746e63a37726401b42e4119fe82745df453bbf51a7aa36654a221f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | catsu-0.1.8-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c80d2bb4e83235ac3979a8d1e49384f06fea63ed800269729023ffd6484711c2
|
|
BLAKE2b-256 checksum How to use checksums |
47eee203be16bc147adc8ef32430bbbbdae277c16baf72142593c17b51d16348
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / catsu-0.1.8-cp310-cp310-macosx_10_12_x86_64.whl
| Download URL | catsu-0.1.8-cp310-cp310-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.10 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
e3a7f06ea7881733595df48dfe33f03b8e0c560d66c1846ddbb28ccc4d49b220
|
|
BLAKE2b-256 checksum How to use checksums |
9635d4ba15f62b6c8d6ad06d36b865a2bb7149e6932ca6d80ae7a5647693c60e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for catsu 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.