Metadata-Version: 2.4
Name: systo-search
Version: 0.2.1
Summary: Python SDK for Systo semantic search (RAG) - ingest any files, search and ask.
Author: Systo
License: MIT
Project-URL: Homepage, http://localhost:8000
Project-URL: API docs, http://localhost:8000/docs
Keywords: search,rag,semantic-search,embeddings,llm
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.0
Requires-Dist: tqdm>=4.66
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"

# systo-search

Python SDK for Systo semantic search (RAG). Point it at your Systo backend,
index office files once, then search and ask over them.

Works with any backend running Systo API v1 (see `backend/` in the Systo repo).

## Install

```bash
pip install systo-search
```

Requires Python 3.9+.

## Quickstart

```python
from systo_search import SystoClient

client = SystoClient(api_key="systo_sk_...", base_url="https://your-server")
client.create_project("hr-docs")

job = client.ingest_file("./policy.pdf", project="hr-docs")
client.wait(job.id)  # background parse -> chunk -> embed -> index

hits = client.search("leave policy 2024?", project="hr-docs", top_k=5)
for h in hits:
    print(h.score, h.source, h.text[:200])

answer = client.ask("Summarize the leave policy?", project="hr-docs", top_k=5)
print(answer.answer)
for s in answer.sources:
    print("-", s.source)
```

Index a whole folder:

```python
jobs = client.ingest_folder("./my-docs", project="hr-docs", recursive=True)
for j in jobs:
    client.wait(j.id)
```

## Backend compatibility

```python
print(client.server_version())  # {"backend": ..., "api": "v1", "min_sdk": ...}
print(client.llm_status())       # {"provider": "openai|gemini|extractive", ...}
```

Needs backend >= `min_sdk`. API is versioned under `/v1/*`; v1 fields are frozen.

## Auth

Pass your key as `api_key`. Mint keys server-side via `POST /v1/keys`
(admin-gated in production). A `dev` key works only when the backend runs
in dev mode on your laptop.

## Limits

Default quota is 100 GB per project. Uploads stream from disk and index in a
background worker; use `client.wait(job.id)` after ingest. `ask()` returns
`answer` plus `sources` with citations, and a `provider` field telling you
which LLM (if any) wrote the answer.
