Skip to content

mixpeek/python-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mixpeek Python SDK

The official Python SDK for the Mixpeek API - a multimodal search and data processing platform.

Installation

pip install mixpeek

Quick Start

from mixpeek import Mixpeek

# Initialize client (reads MIXPEEK_API_KEY from environment)
client = Mixpeek()

# Or pass the API key directly
client = Mixpeek(api_key="your_api_key")

# List collections
collections = client.collections.list()
for c in collections.collections:
    print(f"{c.alias}: {c.collection_id}")

# Create a collection
collection = client.collections.create(
    alias="my_collection",
    description="My data collection"
)

# Add documents
doc = client.documents.create(
    collection="my_collection",
    metadata={"title": "Hello", "content": "World"}
)

# Search with retrievers
results = client.retrievers.query(
    retriever="my_retriever",
    queries=[{"text": "search query"}],
    limit=10
)

Features

  • Simple API: Clean, intuitive interface following Stripe/OpenAI SDK patterns
  • Type Safe: Full type hints and Pydantic models for IDE support
  • Auto-configured: Reads MIXPEEK_API_KEY from environment automatically

Resources

Resource Description
client.collections Manage document collections
client.documents CRUD operations on documents
client.retrievers Search and retrieval operations
client.buckets Manage storage buckets
client.objects Manage objects in buckets
client.namespaces Data isolation namespaces
client.tasks Monitor async operations
client.taxonomies Classification and categorization
client.clusters Data clustering operations
client.feature_extractors Embedding models

Configuration

from mixpeek import Mixpeek

client = Mixpeek(
    api_key="your_api_key",           # Or set MIXPEEK_API_KEY env var
    base_url="https://api.mixpeek.com", # Default API URL
    namespace="production",            # Default namespace for requests
    timeout=30.0,                      # Request timeout in seconds
)

Error Handling

from mixpeek import Mixpeek, ApiException

client = Mixpeek()

try:
    collection = client.collections.get("non_existent")
except ApiException as e:
    print(f"Error {e.status}: {e.reason}")

Examples

See the examples/ directory for more detailed usage:

Requirements

  • Python 3.9+
  • Dependencies: pydantic>=2, urllib3>=1.25.3, python-dateutil>=2.8.2

Documentation

License

MIT


This SDK is auto-generated from the OpenAPI specification with a modern client wrapper.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •