Skip to main content

High-performance embeddings client for multiple providers

Project description

Catsu

High-performance embeddings client for multiple providers, powered by Rust.

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}")

Async Support

import asyncio
from catsu import Client

async def main():
    client = Client()
    response = await client.aembed("openai:text-embedding-3-small", "Hello!")
    print(response.embeddings[0][:5])

asyncio.run(main())

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
)

Supported Providers

  • OpenAI (OPENAI_API_KEY)
  • VoyageAI (VOYAGE_API_KEY)
  • Cohere (COHERE_API_KEY)
  • Jina (JINA_API_KEY)
  • Mistral (MISTRAL_API_KEY)
  • Gemini (GOOGLE_API_KEY or GEMINI_API_KEY)
  • Together (TOGETHER_API_KEY)
  • Mixedbread (MIXEDBREAD_API_KEY)
  • Nomic (NOMIC_API_KEY)
  • DeepInfra (DEEPINFRA_API_KEY)
  • Cloudflare (CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID)

Features

  • 11 providers with unified API
  • Async support with aembed()
  • Model catalog with 64+ models
  • Automatic retry with exponential backoff
  • Cost tracking per request
  • High performance - Rust core with Python bindings

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.1.4.tar.gz (47.4 kB view details)

Uploaded Source

Built Distributions

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

catsu-0.1.4-cp313-cp313-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.13Windows x86-64

catsu-0.1.4-cp313-cp313-manylinux_2_24_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64

catsu-0.1.4-cp313-cp313-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

catsu-0.1.4-cp313-cp313-macosx_10_12_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

catsu-0.1.4-cp312-cp312-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.12Windows x86-64

catsu-0.1.4-cp312-cp312-manylinux_2_24_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64

catsu-0.1.4-cp312-cp312-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

catsu-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

catsu-0.1.4-cp311-cp311-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.11Windows x86-64

catsu-0.1.4-cp311-cp311-manylinux_2_24_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64

catsu-0.1.4-cp311-cp311-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

catsu-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

catsu-0.1.4-cp310-cp310-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.10Windows x86-64

catsu-0.1.4-cp310-cp310-manylinux_2_24_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64

catsu-0.1.4-cp310-cp310-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

catsu-0.1.4-cp310-cp310-macosx_10_12_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file catsu-0.1.4.tar.gz.

File metadata

  • Download URL: catsu-0.1.4.tar.gz
  • Upload date:
  • Size: 47.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.1.4.tar.gz
Algorithm Hash digest
SHA256 116b7a0ece8b866e405c9f4030571c89d23037d916b6ecd5d122886b77a11862
MD5 60827a1ff3072e1bc6d5b8ade8f7ecef
BLAKE2b-256 f0b70a6d100698c908e02b006a729408f7be7b1c55a14e9d94f52f2f27e3626b

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: catsu-0.1.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for catsu-0.1.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8f60f9e8f59878e1c701fbba20fd5fbed7a30660fe9485165c35f08771ac0d39
MD5 331ffbd5a320b0153c6e1a3c99d51a4f
BLAKE2b-256 d35889ac642add51c2e5a5dc1685c4bb0c90f8b20dba5548c3cbc20e9ec32b2d

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp313-cp313-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp313-cp313-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 86b6d246a8deec4952327ff216b26c7c32f0defba13c5cb58a84f6dc8945d054
MD5 9cb1a84e557f58c1064d90b5ea45ebd2
BLAKE2b-256 8294bb2bd3722bb1cd7eedc197f4b21dff115c698d48b9017518c067b16cc90e

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 864f45a36ea6bf7980d0ac926502a0188cbe8cb8c878f4e7fe96ada02d20027f
MD5 c2588b2c81e0d79d780f5830bfd4fb23
BLAKE2b-256 8d82bb05cd8c3039ad899285f9244cef740f0aa3ac683a38de34b7cc39d4742c

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 bc1272f4336e649cfea5ad277bb5f047e587c3e7f706a9b02bd4cb096966b583
MD5 44d0c448ba5f36a4ce6f1abcfbd91a64
BLAKE2b-256 abf2b94ba0e4bc15f5018867962ae9ca6c0b9f32ef57a3b1e49411cb3df4b231

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: catsu-0.1.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for catsu-0.1.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e574b1b9fb1937ca871ad869d264bbce9656ff99178c28557d1af7428356d655
MD5 933423cd8b665e35a0d83662f449424b
BLAKE2b-256 937a4b78d9366eded60e1a2899185a78ce60146403ef4cd19120153141b466db

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp312-cp312-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp312-cp312-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 5738c003b2f061dc6a7d92a13503a698c2493ade5351059d7a7059cfb9d4e0c0
MD5 a549c74a56616b50676780be99395452
BLAKE2b-256 7ab50746ccfb0db11e212b89192ff2449b9009bce83ba40703d4f4c298c4b3b5

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9de03ff9adc4193ed094840e57a9b7ed3172a8838e8d7ec41615ad62b1caa013
MD5 8d977904612b3ca5cb519d6333f1a200
BLAKE2b-256 6fdf2d1843e0449f5681d6afe2e4616ffdc926e2b9ee9ac93cec42d126dd216b

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c2cd7df0a0a55ec6338ed541292c57d024f72e99685ced67b2c5f9f029e398c4
MD5 0a10faabe09013fcf6d037e78c2bbc73
BLAKE2b-256 af8f261c4801439f2d01bfdd79fba7524d8bef5cbeeb3523344476907eaad126

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: catsu-0.1.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for catsu-0.1.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3a8aa243e6a87ac0d6a4f95d37747758a169ba7881cfd0bb27faf568dc507ee1
MD5 e959af9f72f84a3568a6fd5a66afa8e9
BLAKE2b-256 46e3960117ca33b0808e61c906ac3eb72b2a9761f0128e846cb20762155ce73f

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp311-cp311-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp311-cp311-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 40d53d4ae48868ac78d9816ec6892391dc40fd2e4622814c5575efd69838e393
MD5 2d9d3de6663b65f2b73c47e7c809acc1
BLAKE2b-256 70fdb9f3f98a5a282aa699d5f8e5927e6dc2a2aa3eceea01a77b6e5d681c5e8d

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 01f3dd80c58bfaa9555b84c235d63c431bed7cf4ed4283f1f0806211a8712180
MD5 4be4a1f9b763787cf3edd614b463a4f1
BLAKE2b-256 bd3c1da39700a2fc9bd3f4701a86f3a9eb0212bf73a39c60d75472d01e591e85

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c64aca34cfaf894e979f0f168980bbc96087ff0e34ec197f5586c89e9de68b0d
MD5 65834f4b7728a664bdf3e84758ab29c2
BLAKE2b-256 f71415a767f0ca82cd6f68fa6656bbc80ddb8d971e494b30637ad39706f70445

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: catsu-0.1.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for catsu-0.1.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f40ea4cfa2b3a2e6d7b4da4fc0c499820c3b2d3c821a2ad7f56959200f4bcdd7
MD5 7bbeed2fc5b444bf2b2f5e99184beabb
BLAKE2b-256 df49588fc4cd5474efcc1001f9a52d0f58890ae1ffc000cfdea18447e1a5005d

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp310-cp310-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 4f60c66f2d6ea64c9937558178a012823ab01b02b97fbb635f71335fc1fbef36
MD5 f31fcfdef7ba347957d81c03e308065d
BLAKE2b-256 006a0c1fee5a41c282bac3c5be85b1e3dc5324913892caf73023e1e25f4c292b

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2c757ef9ee18aaa1b726e8c3d4b2dbf88e28e318b1d345129c34b002c09ec9cf
MD5 e4ae52d930c599e1284c376765e34876
BLAKE2b-256 04542057d97a8b7a95a707f94a5af5a3d6dd3ef55b21f325b46dab923aecb94e

See more details on using hashes here.

File details

Details for the file catsu-0.1.4-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for catsu-0.1.4-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 38abf442488ddd21b20cd8cf61cfd5c66ed36b3e7499c5cbc43f17759d1e1d89
MD5 92baaeeb440e09ebc7778561d030df58
BLAKE2b-256 a74ce9668bdd68f00d5e86833d2c58a34e95e6f3fbd91240abcef4a6cb4f2f8c

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