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.

Model runs are never metered. The three sample models need no key; the rest of the catalog and the household resources take a paid wk_ key — pricing, 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.7.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.7.0
File Size Uploaded Provenance Actions
worthune-0.7.0.tar.gz 18.9 kB With provenance Details for worthune-0.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 30.4 kB

Release files / worthune-0.7.0.tar.gz

Download URL worthune-0.7.0.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f3cf1b3ba9ac9f6ca9f4c4917797fef860419ce10167aec88ad4da5a6aa27462
BLAKE2b-256 checksum
How to use checksums
c49633b35ab3e948867e0198fb788aba1c91e6ab80451fba5aa60c6c65890c55
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 7, 2026.

Transparency log

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

Download URL worthune-0.7.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
137759fb7ed210808a182e8bca7bb4b1bed473be3dfcb9cabec30bdaca6e32e3
BLAKE2b-256 checksum
How to use checksums
f45f4618d1afd30d360c71020306b92dd477a9018ca300901abfd298145c2f37
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 7, 2026.

Transparency log

Security for worthune 0.7.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.7.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 7, 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