Skip to main content

worthune

Zero-dependency SDK for the Worthune Model API — verified financial calculation models you can cite, audit, and trust. No API keys. Free with attribution.

Every model has a published spec, an independent second implementation that must agree with the first on 250 fuzzed cases before anything ships, and IRS/SSA constants traced to primary sources. Model changes are never silent: responses pin specVersion, and the changelog is public.

pip install worthune
from worthune import Worthune, verify_record

client = Worthune()

result = client.run("relocation", {
    "currentSalary": 95000, "newSalary": 108000,
    "currentMonthlyExpenses": 4200, "newMonthlyExpenses": 4900,
    "movingCosts": 6000, "currentSavings": 40000,
    "annualReturn": 0.07, "yearsHorizon": 10,
})

result["outputs"]["breakEvenMonths"]  # 16
result["specVersion"]                 # pinned contract version
result["facts"]                       # IRS/SSA constants used, with sources
result["sentinels"]                   # special values, explained
verify_record(result)                 # True — audit fingerprint checks out

API

  • client.list_models() — catalog with spec versions
  • client.get_contract(model) — machine-readable inputs/domains/sentinels
  • client.get_spec(model) — the full published spec (markdown)
  • client.run(model, inputs) — run; validation failures return {"ok": False, "errors": [...]} instead of raising
  • client.get_eval_dataset(model) — 250 verified input/expected-output pairs, the exact cases Worthune's dual-implementation CI verifies (ground truth for financial AI testing)
  • client.get_facts() — the sourced IRS/SSA constants registry
  • verify_record(response) — recompute the SHA-256 decision record to prove where numbers came from (byte-exact ECMAScript-compatible canonical JSON)

Retirement, FIRE, rent vs. buy, loans and credit, retirement tax (RMDs, Roth ladders, capital gains), and startup finance (SAFE dilution, burn rate, SBA loan cost) — the catalog grows in verified packs; client.list_models() or the live catalog is always current.

Fair use: 5,000 runs/month per app (a guideline, not a meter) — the free tier, in writing.

MIT licensed. The models, specs, and verification harness live behind the API at worthune.com.

Households: stateful planning resources (v0.2)

Beyond one-shot model runs, an API key opens the household engine — persistent, organization-owned household resources you create once, keep updated, and project on demand:

const client = new Worthune({ apiKey: "wk_…" });
const { household } = await client.createHousehold(doc, "The Alvarez family");
const run = await client.projectHousehold(household.id, {
  horizon: { startYear: 2027, years: 40 },
  monteCarlo: { seed: 42 },           // same seed, same result
});
// run.assumptionsSource names where the assumptions came from;
// run.projection.assumptionsApplied lists every simplification that fired.
client = Worthune(api_key="wk_…")
created = client.create_household(doc, label="The Alvarez family")
run = client.project_household(created["household"]["id"],
                               horizon={"startYear": 2027, "years": 40},
                               monte_carlo={"seed": 42})

Replaces use optimistic concurrency (pass expectedVersion and a stale write loses cleanly with the current version), deletes archive rather than destroy, and webhook endpoints (createWebhookEndpoint) deliver signed household.computed / household.updated / household.archived events — HMAC-SHA256 over ${timestamp}.${body}, secret shown once at create.

Metadata

Release files for worthune 0.6.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 worthune 0.6.0
File Size Uploaded Provenance Actions
worthune-0.6.0.tar.gz 10.3 kB With provenance Details for worthune-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for worthune 0.6.0
File Interpreter ABI Platform Actions
worthune-0.6.0-py3-none-any.whl Python 3 none any Details for worthune-0.6.0-py3-none-any.whl

Total release size: 19.3 kB

Release files / worthune-0.6.0.tar.gz

Download URL worthune-0.6.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d5d22a98ee899a0f513c9a13d9a000fd6ecd2f616b574dcb418620ae1a16f83e
BLAKE2b-256 checksum
How to use checksums
8f9a1035b138d65098bf5983dba83cae99bdf0db79e358f5f01344e8ee1a561e
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 Sep 2, 2026.

Transparency log

Release files / worthune-0.6.0-py3-none-any.whl

Download URL worthune-0.6.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afe21dc846bbfd5de0dc940cd57fe3193156f4832b0eeb330e9c900d82ab9211
BLAKE2b-256 checksum
How to use checksums
cc23290b8ec68e8fb4439073fd29fc9587b28180a23088d9986c30356ba3ae03
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 Sep 2, 2026.

Transparency log

Security for worthune 0.6.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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for worthune-0.6.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 Sep 2, 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.

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