This release is a pre-release and may not be stable for production use.
SyftHub Python SDK
syfthub is the Python client for SyftHub: log in once, pick the sources you
want to search, see what each one will cost and need before anything is sent, then run the search.
This is v2. It replaces the earlier syfthub_sdk package under the same distribution name,
syfthub-sdk. The 0.x line stays on PyPI for existing pins.
Status
First cut, under construction: headless and search-only. Chat, metadata filters and the Aggregator come in later cuts.
Install
pip install --pre syfthub-sdk # 2.x is a pre-release until the first stable tag
pip install --pre 'syfthub-sdk[http2]' # with HTTP/2, for Options(http2=True)
Quick start
import syfthub
async with syfthub.AsyncHub(token="...", budget=1.00) as hub: # or SYFTHUB_TOKEN; caps 1.00 USD
plan = hub.search("adverse events in phase 3", ["erin/trials", "carol/papers"])
pre = await plan.preflight() # rows + actions; nothing sent, nothing spent
for action in pre.actions: # TopUp, OverBudget, AccessDenied, CircuitOpen
plan = plan.skip(*action.paths) # the one decision verb
results = await plan.execute() # one POST per Space, in parallel
for path, doc in results.documents: # best-scored chunks across sources
print(path, doc.score, doc.content[:80])
Budgets are optional and per currency: budget=1.00 caps USD only, budget={"USD": 1.00, "IDR": 50000}
caps both, and a currency with no cap is not budgeted. The SDK never converts money.
The sync twin is the same API without await:
with syfthub.Hub(token="...") as hub:
results = hub.search("adverse events in phase 3", ["erin/trials"]).execute()
syfthub.testing.FakeHub stands in for a Hub and its Spaces in your own tests, with no extra
dependency. See examples/ for the reference chat app and tests/unit/test_testing.py for the fake.
Development
uv sync --all-extras
uv run ruff check src/ tests/
uv run mypy src/
uv run pytest tests/unit
uv run python scripts/gen_sync_stub.py # after changing a public async method or what it returns
src/syfthub/_sync.pyi and src/syfthub/sync.py are generated: they give the sync Hub the
types of the async package. A unit test fails until they are regenerated.
Metadata
Release files for syfthub-sdk 2.0.0a1
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 |
|---|---|---|---|---|
| syfthub_sdk-2.0.0a1.tar.gz | 163.6 kB | With provenance | Details for syfthub_sdk-2.0.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| syfthub_sdk-2.0.0a1-py3-none-any.whl | Python 3 | none | any | Details for syfthub_sdk-2.0.0a1-py3-none-any.whl |
Total release size: 233.4 kB
Release files / syfthub_sdk-2.0.0a1.tar.gz
| Download URL | syfthub_sdk-2.0.0a1.tar.gz |
|---|---|
| Size | 163.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
337c5340a46cc10b2f5996717a88c65668861043116368ad6c42d0052ff8732b
|
|
BLAKE2b-256 checksum How to use checksums |
6067dfb5485ef6d586c383e43562005e67c79382629db46b43b8b0459bb129ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 14, 2026.
Transparency logRelease files / syfthub_sdk-2.0.0a1-py3-none-any.whl
| Download URL | syfthub_sdk-2.0.0a1-py3-none-any.whl |
|---|---|
| Size | 69.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
46ea0aaaa3dfc800e3b48b1e4c809369a33f93b2767fd55140ed149883d51f6e
|
|
BLAKE2b-256 checksum How to use checksums |
11b975146866dee08f91a4f04f60ded8808847d95965a6c53411c279c3df3b0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 14, 2026.
Transparency logSecurity for syfthub-sdk 2.0.0a1
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 2 files in this release have been uploaded with provenance metadata.
Attestation for syfthub_sdk-2.0.0a1.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 Oct 14, 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.