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.5.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.5.0
File Size Uploaded Provenance Actions
worthune-0.5.0.tar.gz 9.8 kB Without provenance Details for worthune-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 18.2 kB

Release files / worthune-0.5.0.tar.gz

Download URL worthune-0.5.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5cd1b66f2894acc3bad9c7117cb3ad9af999c6438f64815ca9a63686f0b33c47
BLAKE2b-256 checksum
How to use checksums
dfba638d5de7b52a8df25896d7590ac2fca65c5331467c5bc4732bccbc7d1190
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

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

Download URL worthune-0.5.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bb8ba689e014b45a3f95c071823f7f2e29be5de0d0292a764ca74184566325a
BLAKE2b-256 checksum
How to use checksums
43c69283513235def7069c3e3c989ab143c4bce9f2cf9cc9fbb7c794c72f4212
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

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

No provenance found

None of the files in this release were uploaded with provenance metadata.

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