Skip to main content

docforge-sdk

A typed Python client for the DocForge REST API. It ships both an asynchronous and a synchronous client with an identical surface, is fully type-hinted (py.typed), and has zero dependency on the DocForge server tree — it is a clean-room client that talks to the API over HTTP only (httpx + pydantic + hand-written models that mirror the public REST contract), so it can be vendored or published independently.

Install

pip install docforge-sdk

Async usage

import asyncio

from docforge_sdk import AsyncClient, SearchRequest


async def main() -> None:
    async with AsyncClient("http://localhost:10040", api_token="df_root_...") as client:
        collections = await client.collections.list()
        for collection in collections:
            print(collection.id, collection.name)

        hits = await client.search.search(
            collections[0].id,
            SearchRequest(query="quarterly revenue", limit=5),
        )
        for hit in hits.hits:
            print(hit.score, hit.text)


asyncio.run(main())

Sync usage

from docforge_sdk import Client, SearchRequest

with Client("http://localhost:10040", api_token="df_root_...") as client:
    collections = client.collections.list()
    hits = client.search.search(
        collections[0].id,
        SearchRequest(query="quarterly revenue", limit=5),
    )
    for hit in hits.hits:
        print(hit.score, hit.text)

The two clients expose the same resources and method signatures; the sync methods are the async ones without await. Available resource groups: auth, health, collections, documents, explorer, search, jobs, blobs, pipelines.

License

MIT — see LICENSE. This SDK is deliberately licensed MIT even though the parent DocForge repository is GPLv3: it is a standalone, clean-room client (HTTP models only, no server code), so a permissive per-directory license is intentional and lets any project depend on it freely.

Publishing (maintainers)

Releases publish to PyPI via Trusted Publishing (OIDC) — there is no API token stored in the repo. To cut a release, tag a commit with the sdk-v<version> prefix (the version must match docforge_sdk/_version.py) and push the tag:

git tag sdk-v0.1.0
git push origin sdk-v0.1.0

The .github/workflows/release-sdk.yml workflow then builds and uploads the sdist + wheel.

One-time PyPI setup (done once by the maintainer, before the first release):

  1. Reserve the project name docforge-sdk on PyPI.
  2. Under the project's Publishing settings, add a GitHub trusted publisher with:
    • Owner: Florian-BARRE
    • Repository: docforge
    • Workflow name: release-sdk.yml
    • Environment: pypi

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docforge_sdk-0.1.0.tar.gz (94.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docforge_sdk-0.1.0-py3-none-any.whl (47.2 kB view details)

Uploaded Python 3

File details

Details for the file docforge_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: docforge_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 94.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for docforge_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fcb39fda3d3120e1e688493aed5965e392a56f5a3b38080451de3c16c601b92c
MD5 7b132d19c3916c52fd650ccd5922f70c
BLAKE2b-256 67ecc04c5084293ed3641e9856da4dec64e861004fb26064dfb416777731b88f

See more details on using hashes here.

Provenance

The following attestation bundles were made for docforge_sdk-0.1.0.tar.gz:

Publisher: release-sdk.yml on Florian-BARRE/DocForge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file docforge_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: docforge_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 47.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for docforge_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 feb2e74ba87a968926e20594d0772e2973e3059815e9c683ca0bac346fc97b3e
MD5 ff1b26d3189e83a14ff976d8ef0d3110
BLAKE2b-256 78167bf1b244c5d33aa447567a1177d1c15e7450d49c915d1dbccc0bc2cac65b

See more details on using hashes here.

Provenance

The following attestation bundles were made for docforge_sdk-0.1.0-py3-none-any.whl:

Publisher: release-sdk.yml on Florian-BARRE/DocForge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.14.10

2 files

0.14.9

2 files

0.14.8

2 files

0.14.7

2 files

0.14.6

2 files

0.14.4

2 files

0.14.3

2 files

0.14.0

2 files

0.13.0

2 files

0.12.1

2 files

0.9.12

2 files

0.9.11

2 files

0.9.9

2 files

0.9.0

2 files

0.8.1

2 files

0.7.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page