Metadata-Version: 2.4
Name: hevlayer
Version: 0.4.0
Summary: Typed async Python client for the hevlayer gateway
License-Expression: Apache-2.0
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2
Description-Content-Type: text/markdown

# hevlayer Python SDK

Generated by `scripts/sdk-harness generate --lang python` from
`apps/layer-gateway/openapi.yaml`.

## Quickstart

```python
import asyncio
import os

from hevlayer import AsyncHevlayer, QueryRequest


async def main() -> None:
    client = AsyncHevlayer(
        api_key=os.environ["HEVLAYER_API_KEY"],
        base_url="https://aws-us-east-1.hevlayer.com",
    )
    async with client:
        response = await client.query_namespace(
            "products",
            QueryRequest(vector=[0.1, 0.2, 0.3], top_k=5, include_attributes=True),
            raw_query="wireless headphones",
            tags=["app:hev-shop", "surface:storefront", "route:search", "page:first"],
            with_perf=True,
        )
        print(response.perf.latency_ms, response.perf.cache_status)
        print(response.data.rows)

        history = await client.list_search_history(
            "products",
            tags=["app:hev-shop", "route:search", "page:first"],
            limit=20,
        )
        print(history.entries)


asyncio.run(main())
```

## Generated Operations

- `authenticate_key`
- `batch_query_namespace`
- `branch_namespace`
- `claim_documents`
- `claim_udf_items`
- `complete_udf_items`
- `copy_namespace`
- `create_checkpoint`
- `create_pipeline`
- `create_scan`
- `create_snapshot`
- `create_udf`
- `delete_key`
- `delete_namespace`
- `delete_pipeline`
- `delete_scan`
- `delete_udf`
- `discover_udf`
- `evaluate_turbopuffer_recall`
- `explain_turbopuffer_query`
- `fail_udf_items`
- `fetch_document`
- `fetch_documents`
- `get_blob`
- `get_checkpoint`
- `get_cost_rate_card`
- `get_cost_snapshot`
- `get_cost_timeseries`
- `get_key`
- `get_license`
- `get_metric_catalog_entry`
- `get_namespace_metadata`
- `get_namespace_snapshot`
- `get_pipeline_document_chunks`
- `get_pipeline_status`
- `get_scan`
- `get_scan_results`
- `get_snapshot_job`
- `get_snapshot_policy`
- `get_turbopuffer_namespace_schema`
- `get_turbopuffer_v1_namespace_metadata`
- `get_udf`
- `get_udf_status`
- `get_vectorstore`
- `get_warehouse`
- `get_warm_job`
- `heartbeat_documents`
- `heartbeat_udf_items`
- `hint_cache_warm`
- `import_namespace`
- `init_namespace`
- `list_checkpoints`
- `list_clickstream`
- `list_keys`
- `list_metrics_catalog`
- `list_namespace_history`
- `list_namespaces`
- `list_pipelines`
- `list_scans`
- `list_search_history`
- `list_snapshot_activity`
- `list_snapshot_jobs`
- `list_turbopuffer_namespaces`
- `list_udfs`
- `list_vectorstores`
- `list_warehouses`
- `list_warm_jobs`
- `mint_key`
- `pause_udf`
- `put_blob`
- `put_pipeline_document_chunks`
- `put_pipeline_document_vectors`
- `put_snapshot_policy`
- `query`
- `query_agent`
- `query_metrics`
- `query_metrics_api_v1`
- `query_metrics_range`
- `query_metrics_range_api_v1`
- `query_namespace`
- `query_turbopuffer_namespace`
- `reset_failed_udf`
- `resume_udf`
- `revoke_key`
- `set_documents_stage`
- `update_turbopuffer_namespace_metadata`
- `update_turbopuffer_namespace_schema`
- `upsert_udf`
- `warm_cache`
- `write_namespace`
