privaterag
Python client SDK facade for PrivateRAG.
The package provides lightweight public API types, public-cache initialization, native Rust retrieval primitives, and end-to-end HTTP PIR retrieval:
PrivateRAGClientClientConfigRetrievalOptionsRetrievalResultRetrievedChunkSearchHitPreparedRetrievalQuery- typed SDK exceptions
PrivateRAGClient.from_manifest(...) downloads and validates the public
client cache from a v0 retrieval server. It requests only manifest.json,
checksums.json, index/*, pir/scheme.json, and pir/client_hint.bin.
Install:
pip install privaterag
Prebuilt wheels include the Rust/PyO3 native extension as
privaterag._native, so normal installs do not need Rust when a wheel is
available for the target platform.
For local workspace development, native operations can be built with PyO3/maturin:
cd python/privaterag
maturin develop
After the native extension is installed, PrivateRAGClient.search_by_embedding(...), PrivateRAGClient.prepare_retrieval_query_by_embedding(...), and PrivateRAGClient.decode_retrieval_response(...) call the Rust public-cache client. PrivateRAGClient.retrieve(...) embeds locally, prepares a padded BatchedPirQuery, posts only that JSON envelope to /pir/query, and decodes the BatchedPirResponse locally.
from privaterag import PrivateRAGClient
client = PrivateRAGClient.from_manifest(
"http://127.0.0.1:8080/manifest.json",
embed_query=embed_query,
)
results = client.retrieve("What is the policy?", top_k=2)
context = results.to_context()
top_k must be positive. Configured or per-call retrieval_count must be
positive and greater than or equal to top_k; otherwise retrieval fails before
the SDK posts a PIR request. For the supported simplepir-rs-v0-1000-1k
profile, the supported v0 shape is exactly top_k=2 and
retrieval_count=4; other shapes fail closed until fresh evidence expands the
profile. See ../../docs/padding_policy.md.
See ../../docs/client_api.md for the client API and privacy boundary.
Metadata
Release files for privaterag 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| privaterag-0.1.0.tar.gz | 103.0 kB | With provenance | Details for privaterag-0.1.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| privaterag-0.1.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for privaterag-0.1.0-cp310-abi3-win_amd64.whl |
| privaterag-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for privaterag-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| privaterag-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details for privaterag-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| privaterag-0.1.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for privaterag-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
| privaterag-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details for privaterag-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl |
Total release size: 2.6 MB
Release files / privaterag-0.1.0.tar.gz
| Download URL | privaterag-0.1.0.tar.gz |
|---|---|
| Size | 103.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b1f481811748151d659ada713690348df0c847c1f9deebfaf199c196449e9b2
|
|
BLAKE2b-256 checksum How to use checksums |
43b35f7a5bd5b6cd1d32500607fb6672e1ce2e02ef212b290e080ecf4dd0b3ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency logRelease files / privaterag-0.1.0-cp310-abi3-win_amd64.whl
| Download URL | privaterag-0.1.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 395.5 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
08582b921b737e6856dc6683f658cb76fa04589a11391ccaec33f489f47bbd92
|
|
BLAKE2b-256 checksum How to use checksums |
069c56d4c867912337370d1101f308e22641ea48ba4da7576d6e9caaf6ae3a6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency logRelease files / privaterag-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | privaterag-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 558.8 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dfc8213d3802db15a662a288c0dfc5ce3284e7d35c03bac3bb7e4203c5f6aa73
|
|
BLAKE2b-256 checksum How to use checksums |
df5b8e32abca219e2c6ee3fc06f56e594b220450834b2ed15ec562349d47e550
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency logRelease files / privaterag-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | privaterag-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 543.2 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
1b9c0b28ca8e68b9835663092b89e3e2f30ebab3128dedbfd4dd5bd42a029249
|
|
BLAKE2b-256 checksum How to use checksums |
3de0f0755fa906e9497b12f15d8da9f537e583ad3a828b2341cde266a85e1752
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency logRelease files / privaterag-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | privaterag-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 498.9 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
097c36ef671557c84a02336cccf152355a403a4b4dd3bfd2493287169bff27cb
|
|
BLAKE2b-256 checksum How to use checksums |
a9bd754f22fe10dd19d6cb66a18db6ff9e589b74747f37d2d98ed153b6774130
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency logRelease files / privaterag-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | privaterag-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 503.6 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
ad08a1e63886db0fd9aa97e690b1bf4917989326cc4026c0fce1b09e078bcd85
|
|
BLAKE2b-256 checksum How to use checksums |
2f334f56005df6bdc4a6b04dc9b7e53e88dc53200da20face8c738a66d8afbba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency logSecurity for privaterag 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for privaterag-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.