Repository navigation
Closed
Closed
Feature
Copy link
Labels
area:clientdecdn-client SDK: paid pull, lanes, buyer poolkind:featureNew capability or a change to current behaviorprio:mediumScheduled
Description
Component
client (decdn-client SDK)
Who it affects
publisher (someone importing content or sponsoring downloads), client (someone running decdn get or the gateway), contributor (developer experience)
Problem
The SDK is a Rust crate. The customer for model and dataset delivery lives in pip: training scripts, notebooks, huggingface_hub, datasets, vllm. For them, a Rust crate is not an SDK. There is no pip install decdn, and the name is free on PyPI as of 2026-10-24.
Proposed solution
A decdn package on PyPI, built from decdn-client with pyo3/maturin, wheels for Linux x86_64/aarch64, macOS and Windows, Python 3.10+:
import decdn
path = decdn.get("decdn:9194…69e5/?ns=1") # sponsored or local keystore
for chunk in decdn.stream("decdn:…/model.safetensors"): # verified bytes as they land
...
decdn.quote("decdn:…") # size, rates, estimate- Payment follows the CLI's rules: a
dcap1:capability (sponsored, no wallet) or the local keystore, resolved from the same~/.decdnconfig sopip installand the one-liner installer share state. huggingface_hubtransport. Adecdn.hfmodule that registers as the download backend (the same hookhf_transferuses,HF_HUB_ENABLE_HF_TRANSFER-style, or anHF_ENDPOINTpointed at the hosted gateway gateway: hosted public HTTP gateway at<ns>.decdn.linkthat pays a pool behind the scenes #2593) sosnapshot_download("org/model")pulls from the network for repos published to a namespace, with the SHA-256 alias table (ingress: accept SHA-256, CID and infohash identifiers and map them to BLAKE3 internally #2595) doing the lookup. Fallback to the Hub for files not published.- Streaming and ranges expose
open_progressive_pullso asafetensorsreader can seek without downloading the file. - Async variants (
await decdn.aget(...)) over the same Tokio runtime. - Published from this repo's release pipeline, version-locked to the CLI release, docs on docs.decdn.org under the Deliver tab (docs: add a "Deliver" tab for publishers (publish, gateway, SDK, pricing) website#335).
Alternatives considered
- Subprocess the CLI from Python. Works today (
subprocess.run(["decdn","get",…])) and is what a shim would do first; it cannot stream into memory, has no progress API, and needs the binary installed separately. Acceptable as the first commit behind the same API, replaced by bindings. - Node/JS first. The browser demo and the installers cover JS users' first run; the model/dataset customer is in Python.
Design scope
- This proposal changes the protocol, the economics, or the contract surface.
Related
- Hosted gateway (
HF_ENDPOINT): gateway: hosted public HTTP gateway at<ns>.decdn.linkthat pays a pool behind the scenes #2593 - SHA-256 alias table: ingress: accept SHA-256, CID and infohash identifiers and map them to BLAKE3 internally #2595
- Quote and receipts the package exposes: cli:
decdn quote <URI>prices a pull from signed probe rates before any paid byte #2600, client:decdn getends with a signed receipt (hash, bytes, nodes, USDC paid, settlement once it lands) #2599
Metadata
Metadata
Assignees
Labels
area:clientdecdn-client SDK: paid pull, lanes, buyer poolkind:featureNew capability or a change to current behaviorprio:mediumScheduled
Type
Fields
Priority
None yet
Projects
- StatusShow more project fieldsDone
Activity
thiras commentedon Nov 10, 2026
Shipped as the
decdnPyPI package: https://github.com/decdn/sdk-python (pip install decdn) — a syncClient+AsyncClientover the gateway's HTTP API, at parity with@decdn/client.