Skip to main content

letsdecide (Python)

One request shape for every decision API (Jev, Clef, OpenAI, Gemini). The Rust core builds and parses; httpx sends. Returns plain dicts.

Install

pip install "letsdecide[httpx]"   # or bring your own client: pip install letsdecide

Python 3.10+. Prebuilt wheels for Linux (glibc and musl), macOS and Windows, so no Rust toolchain is needed.

Usage

from letsdecide import Client, LetsDecideError

# Settings per provider: a key only ever goes to its own provider.
client = Client(by_provider={"jev": {"api_key": "..."}})
# Entries also take access_token (string or callable, e.g. Clef OAuth), base_url,
# account_id, headers, options. Client also takes shared headers= and client=httpx.Client(...).
try:
    out = client.decide("jev/jev-latest", {
        "input": "Great product, arrived late.",
        "questions": {"positive": {"kind": "yesno", "instructions": "Is the review positive?"}},
    })
    print(out["answers"]["positive"])
except LetsDecideError as e:
    print(e.code, e.status, e.retryable, e.retry_after_ms, e.details)  # details: safe to log

Custom providers: providers={"acme": Acme()} (codecs with build and parse) and engines={"local": engine} (decide); mock_engine() for tests; letsdecide.conformance.check_provider to test them. See docs/custom-providers.md.

Async: AsyncClient(...) and await client.decide(...). Change the model string to change provider. Both clients default to a 60 s timeout; pass client= to control proxies, transport and timeouts.

More

Model strings, media input, the answer and error reference, and the other bindings (Rust, JavaScript): https://github.com/azoies1/letsdecide#readme. Apache-2.0.

Middleware (async)

letsdecide.middleware wraps AsyncClient.decide: retry, fallback, hedge, split, shadow, calibrate, observe, plus compare, fit_isotonic and brier_score. Same behaviour as the JS binding; see MIDDLEWARE.md.

from letsdecide import AsyncClient
from letsdecide.middleware import compose, fallback, retry, split

keys = {"clef": {"api_key": "...", "account_id": "..."}, "jev": {"api_key": "..."}}
decide = compose(AsyncClient(by_provider=keys), split(), fallback(["jev/jev-latest"]), retry())
out = await decide("clef/clef-flash", request)
out["attempts"], out.get("fell_back_from"), out.get("parts")

Build and test

python -m venv .venv && . .venv/bin/activate
pip install maturin pytest pytest-asyncio httpx
maturin develop
pytest

Metadata

Release files for letsdecide 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for letsdecide 0.3.0
File Size Uploaded Provenance Actions
letsdecide-0.3.0.tar.gz 117.8 kB With provenance Details for letsdecide-0.3.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for letsdecide 0.3.0
File Actions
letsdecide-0.3.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for letsdecide-0.3.0-cp310-abi3-win_amd64.whl
letsdecide-0.3.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for letsdecide-0.3.0-cp310-abi3-musllinux_1_2_x86_64.whl
letsdecide-0.3.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for letsdecide-0.3.0-cp310-abi3-musllinux_1_2_aarch64.whl
letsdecide-0.3.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for letsdecide-0.3.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
letsdecide-0.3.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for letsdecide-0.3.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
letsdecide-0.3.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for letsdecide-0.3.0-cp310-abi3-macosx_11_0_arm64.whl
letsdecide-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for letsdecide-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 3.7 MB

Release files / letsdecide-0.3.0.tar.gz

Download URL letsdecide-0.3.0.tar.gz
Size 117.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e124ae971079d8f8c88cb8095d6f6a961543104bca7c996108bcbd6df16bae02
BLAKE2b-256 checksum
How to use checksums
cc41aef8c063ae313c87b857414b1d5339a7b80362bb5cd5c0310e585862dc80
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 21, 2026.

Transparency log

Release files / letsdecide-0.3.0-cp310-abi3-win_amd64.whl

Download URL letsdecide-0.3.0-cp310-abi3-win_amd64.whl
Size 361.9 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ec8b263049e850db540b392722d6bef3c18c810d17a1e4991cef8f1d7e00651b
BLAKE2b-256 checksum
How to use checksums
4558ed7e30a5d341972a04d9b2696172a981939ab081d2dbd29446dcf5442ae9
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 21, 2026.

Transparency log

Release files / letsdecide-0.3.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL letsdecide-0.3.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 696.0 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
01fbd72736a0f230d4d0cb350c88307877fcee95699e437c0efef84cb815f3d6
BLAKE2b-256 checksum
How to use checksums
4cff5c16d0b00e934b8f25a3906a336153a3b4711f0395e6fcedab74a177ef98
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 21, 2026.

Transparency log

Release files / letsdecide-0.3.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL letsdecide-0.3.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 650.6 kB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
10dd4e960ea626d8e6af34455b033ff063297a3304ef43be9f553b1a942b1420
BLAKE2b-256 checksum
How to use checksums
156eebdc355406c20b504f0e3b27be2c35cf98bddc27dc6a4023cf0ae824ae89
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 21, 2026.

Transparency log

Release files / letsdecide-0.3.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL letsdecide-0.3.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 483.9 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
68a3a8c92f0865574a101151c904bb5bc04f78b98d08337d22f50062f3573876
BLAKE2b-256 checksum
How to use checksums
abf8b37fc6edc191e32fa7b06900dd32010d37dd87b60ed636e69b0e48e1b49e
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 21, 2026.

Transparency log

Release files / letsdecide-0.3.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL letsdecide-0.3.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 471.8 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
ca660f7915c4c269ecb6a0ab60cefdf9a4714769f96ede6b0f2b83715c6b316b
BLAKE2b-256 checksum
How to use checksums
9310e7581236fb0514e077818a7662e1591d568a0563d0dbbfda479811f8b093
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 21, 2026.

Transparency log

Release files / letsdecide-0.3.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL letsdecide-0.3.0-cp310-abi3-macosx_11_0_arm64.whl
Size 447.0 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
470b091abb926d21893ee4fe7a26c2a75ce706df89546a41fd6586f66b0471ea
BLAKE2b-256 checksum
How to use checksums
d7e6a67ebff702f387cc35d1042040aab78ea2a56138debf5cb71babf70ff5c8
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 21, 2026.

Transparency log

Release files / letsdecide-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL letsdecide-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 466.5 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
1fd7b2ba25950e6a864f081cfbb39f10f8f0a36fa69fce0b577bd2c9cfff5e01
BLAKE2b-256 checksum
How to use checksums
30d8cec120a9a9560098a28440e9289368a7956501287676272d76588b98aa0b
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 21, 2026.

Transparency log

Security for letsdecide 0.3.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 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for letsdecide-0.3.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 Nov 21, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.3.0 This release

8 release files Full provenance

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