local-decision-store (Python)
Status: alpha preview (pre-1.0). Inference (lite and embed tiers), the server, training of lite packs, evaluation, data generation and the
ldsCLI work and are tested; APIs may still change before 1.0. The package is not on PyPI yet (install from a checkout:pip install ./python), and catalog packs are not published yet. Seedesign/roadmap.md.
This package provides the Python SDK, the lds CLI and the reference server for
Local Decision Store. It runs typed decision models locally on CPU, and its request and response
shapes are compatible with the OpenAI/Cloudflare Decisions API (/v1/decisions) and
TypeSafe System One (/v1/systemone).
pip install local-decision-store # core (numpy only): lite tier inference
pip install "local-decision-store[embed]" # + ONNX embedders (embed tier)
pip install "local-decision-store[yaml]" # + PyYAML: lds.yaml and YAML question specs
pip install "local-decision-store[train]" # + scikit-learn / LightGBM (gbdt heads)
pip install "local-decision-store[server]" # + HTTP server (`lds serve`)
pip install "local-decision-store[wasm]" # + custom WebAssembly featurizer ops (wasmtime)
pip install "local-decision-store[all]"
With a pack installed (for example the dev pack built by lds init quickstart && cd quickstart && lds train && lds pack build runs/quickstart && lds pull packs/quickstart-lite-0.1.0.ldspack):
import lds
client = lds.Client() # in-process, packs from $LDS_HOME (~/.lds)
r = client.decisions.create(
model="lds/lite",
input="The checkout page is down, please fix this immediately",
questions=[{"type": "predicate", "name": "quickstart.is_urgent", "instructions": "Urgent?"}],
)
print(r.answers[0].probability)
Training follows the scikit-learn style:
from lds import Choice, DecisionClassifier
q = Choice("support.department", ["billing", "shipping", "technical", "other"], "Which team?")
clf = DecisionClassifier(q, tier="lite", head="linear").fit(texts, labels)
clf.save_pack("packs/support-department", version="0.1.0")
Featurizers
Every kind of feature (TF-IDF, rule detectors, image statistics, embeddings, custom ops) goes through
one interface: a typed JSON graph that Python and TypeScript both run
(spec/featurizer.md §10). Build graphs with lds.fx. They are type-checked
when loaded, and lds featurizer lint runs the same check from the command line.
from lds import Featurizer, fx
text = fx.normalize(fx.TEXT)
words = fx.hash(fx.word_ngrams(fx.word_tokens(text), n_min=1, n_max=2), bits=18)
f = Featurizer(words) # scikit-learn transformer: fit / transform / fit_transform
f.transform(["Call me at 090-1234-5678"])
f.to_json() # the same graph loads in TypeScript: Featurizer.fromJSON(...)
lite = Featurizer.from_preset("lite") # presets: lite, lite-image, embed, embed-hybrid, embed-image
Custom logic is shipped as a sandboxed WebAssembly module, so one binary runs in both runtimes
(spec/wasm-ops.md). This needs the wasm extra:
f = Featurizer(fx.wasm("ops/acme.jp_address.wasm", text), modules={"ops/acme.jp_address.wasm": wasm_bytes})
lds op inspect module.wasm validates a module and prints its op info.
Development
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev,wasm]"
pytest && ruff check . && mypy
The normative behavior is defined in spec/. This package must pass the shared
conformance fixtures in spec/conformance/.
Metadata
Release files for local-decision-store 0.1.7
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 |
|---|---|---|---|---|
| local_decision_store-0.1.7.tar.gz | 797.5 kB | With provenance | Details for local_decision_store-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| local_decision_store-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for local_decision_store-0.1.7-py3-none-any.whl |
Total release size: 1.4 MB
Release files / local_decision_store-0.1.7.tar.gz
| Download URL | local_decision_store-0.1.7.tar.gz |
|---|---|
| Size | 797.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20ef61e72b1530b5f7c49c6fabf531617798ab96ff2c1af741d092e708f29542
|
|
BLAKE2b-256 checksum How to use checksums |
a6cd50865a696efadfae97a78ebf500f9485bd59c7a8c15f1fc039a4c896242d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logRelease files / local_decision_store-0.1.7-py3-none-any.whl
| Download URL | local_decision_store-0.1.7-py3-none-any.whl |
|---|---|
| Size | 568.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b01cb34481d9ca0bc7a842694c6255c294d802e4f60f8b0f673fd048aa85c98
|
|
BLAKE2b-256 checksum How to use checksums |
b9b346a3bc9642dbfd431970eba2648effbea94b9d98e1015109b5a3425bd9ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logSecurity for local-decision-store 0.1.7
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
Both files in this release have been uploaded with provenance metadata.
Attestation for local_decision_store-0.1.7.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 Nov 24, 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.