# searchSDK for Python

Python 3.11+. 14 normalized web-search adapters and 493 retained native bindings across 13 providers; gateway client.

Canonical: https://searchsdk.dev/docs/sdks/python
Markdown: https://searchsdk.dev/docs/sdks/python.md

<a id="install"></a>

## Install from source

Package: `searchsdk`, version `0.1.0a0`. This is an alpha source/local-artifact installation. No public registry release or release tag is assumed.

**Get the source**

```bash
git clone https://github.com/Belweave/searchSDK.git
cd searchSDK
# Record this revision with your application's dependency lock.
git rev-parse HEAD
```

**Build or install the local package**

```bash
python3 -m venv .venv
.venv/bin/python -m pip install ./packages/python
```

Run from the source checkout. pip builds and installs the local Python package. Its build tools are separate from the dependency-free package runtime. Use this virtual environment for the example.

<a id="first-search"></a>

## Make a server-side search

Set provider keys in your application's server environment or secret store. The example below makes a real provider request when invoked and can incur charges. Use the package's fixture consumer for a key-free check.

**search.py**

```python
import os
from searchsdk import SearchClient, SearchRequest, exa

search = SearchClient(
    exa(os.environ["EXA_API_KEY"]),
    timeout_ms=10_000,
)
response = search.search(SearchRequest(
    "SQLite write concurrency", limit=3,
))
for result in response.results:
    print(result.url, result.provenance.provider)
```

Set EXA_API_KEY in the server environment, then run .venv/bin/python search.py. Async search and batches are also available. A real request can incur provider charges.

<a id="scope"></a>

## Supported surface and limits

14 normalized web-search adapters and 493 retained native bindings across 13 providers; gateway client.

- No successful-result cache, in-flight deduplication or durable workflow store in this alpha.
- Async methods use standard-library workers. Cancellation cannot forcibly terminate custom providers that ignore it.

Preserve result order, provider-native scores and source provenance. Unknown usage is not zero cost. Cancellation and deadlines cannot undo a request already accepted by a remote system or guarantee exactly-once effects.

<a id="verify"></a>

## Verify without provider keys

**Repository checkout · local checks**

```bash
python3 -m venv packages/python/.build/verify
packages/python/.build/verify/bin/python -m pip install -r packages/python/requirements-dev.txt
packages/python/.build/verify/bin/python packages/python/scripts/verify.py
```

Python 3.11 and 3.15, generated types, fixtures, wheel and source-distribution consumers.

These are deterministic contract and artifact checks. They do not establish live-provider or account-entitlement verification. Read the package README for precise commands, dependencies and runtime coverage.

<a id="next"></a>

## Continue in your language

- [Python package reference](https://github.com/Belweave/searchSDK/tree/main/packages/python#readme): Complete API, errors, streaming, packaging and platform boundaries.
- [Compare SDKs](https://searchsdk.dev/docs/sdks)
- [Choose a provider](https://searchsdk.dev/docs/providers)
