Skip to main content

Seamslesly connect your apps with Alquimia Runtime API

Project description

🧪 Alquimia Python Client

AlquimiaClient is an asynchronous HTTP client for interacting with the Alquimia Runtime API, providing convenient methods for inferences, streaming responses, and uploading/downloading binary data (blobs), and extending tool capabilities on client side. It uses httpx for async HTTP operations and SSE (Server-Sent Events) for event streaming.


🚀 Installation

# Create virtual environment and install dependencies
make venv

# Build the package
make build

# Format code with ruff
make format

🧠 Quick Start

import asyncio
from alquimia_client import AlquimiaClient

API_URL = "https://api.alquimia.ai"
API_KEY = "your_api_key_here"


async def main():
    async with AlquimiaClient(base_url=API_URL, api_key=API_KEY) as client:
        # Run an inference
        result = await client.infer(
            assistant_id="assistant-123",
            session_id="session-xyz",
            query="Summarize this text",
        )
        print(result)

        # Stream live responses
        async for event in client.stream(stream_id="stream-123"):
            print("Received:", event)

asyncio.run(main())

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

alquimia_client-0.1.1.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

alquimia_client-0.1.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file alquimia_client-0.1.1.tar.gz.

File metadata

  • Download URL: alquimia_client-0.1.1.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for alquimia_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e8ecb2621f438be175e4dfa294a15711a917a487970b2fff6868ecfab33ec8c1
MD5 18098a4b1e3ad19114ffe7eeb72fe0a6
BLAKE2b-256 97bbdc8a87bbe0e8ca8492ce8445fad9aa3027b1a1b99cec364864145265181f

See more details on using hashes here.

File details

Details for the file alquimia_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for alquimia_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29f3c815069ee59a1632df3a50cef093fd8214b033f95e07b34aa3abe9865dd9
MD5 0e39808540db32dea0930262fc7be3b2
BLAKE2b-256 415455f1a1db6e80e5b9cc5b8c86aaf5f484c59d8a9ea1d8a2f75d3cd842dd2e

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