Skip to main content

ftern for Python

ftern ("eff-tern") is an open, exact finance engine for FP&A. It provides:

  • dimensional driver models written in the Tern language;
  • versions and scenarios;
  • a double-entry ledger;
  • three-statement plans;
  • FX and consolidation.

Everything is stored in an embedded DuckDB workspace. Every amount is an exact decimal. Every operator either satisfies its accounting identity or fails with a structured FTERN_* error. Nothing is plugged silently.

pip install ftern
pip install "ftern[pandas]"   # adds QueryResult.to_pandas()

# or with uv
uv add ftern                  # in a uv project; `uv pip install ftern` in any environment
uv add "ftern[pandas]"
import ftern

ftern.init("model", "saas")                    # write a sector starter model
ws = ftern.open("plan.ftern")                  # or ftern.memory()
ws.load_model("model")

r = ws.query("query Revenue by Product where Time = @FY26", versions=["Budget"])
r.rows[0]["Revenue"]          # Money(amount=Decimal('…'), currency='USD')

run = ws.run("balance_sheet_v1", book="mgmt", period="2026-12", version="Budget")
run.identity_ok               # True, or the call raised ftern.FternError
  • Money is ftern.Money (a decimal.Decimal and a currency). Quantities are ftern.Quantity. Plain numbers are Decimal. Floats are refused as inputs.
  • Every method maps onto one ftern agent verb, so Python, the ftern CLI, MCP and HTTP all behave the same.
  • Wheels are built for CPython 3.9 and later (abi3) on macOS, Linux (glibc) and Windows. On other platforms pip builds from the source distribution. That needs a Rust toolchain and a C++ compiler, and the bundled DuckDB takes several minutes to compile.

The documentation, the CLI and the Rust crates are at https://github.com/arsalanpardesi/ftern. Licensed under Apache-2.0.

Metadata

Release files for ftern 0.1.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 ftern 0.1.0
File Size Uploaded Provenance Actions
ftern-0.1.0.tar.gz 456.6 kB Without provenance Details for ftern-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ftern 0.1.0
File Actions
ftern-0.1.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for ftern-0.1.0-cp39-abi3-win_amd64.whl
ftern-0.1.0-cp39-abi3-manylinux_2_35_x86_64.whl CPython 3.9 abi3 Linux glibc 2.35+ x86-64 Details for ftern-0.1.0-cp39-abi3-manylinux_2_35_x86_64.whl
ftern-0.1.0-cp39-abi3-manylinux_2_35_aarch64.whl CPython 3.9 abi3 Linux glibc 2.35+ ARM64 Details for ftern-0.1.0-cp39-abi3-manylinux_2_35_aarch64.whl
ftern-0.1.0-cp39-abi3-macosx_11_0_x86_64.whl CPython 3.9 abi3 macOS 11.0+ x86-64 Details for ftern-0.1.0-cp39-abi3-macosx_11_0_x86_64.whl
ftern-0.1.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for ftern-0.1.0-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 125.8 MB

Release files / ftern-0.1.0.tar.gz

Download URL ftern-0.1.0.tar.gz
Size 456.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8078fb8115fc77991f096637cb46438f9f0636314ec9c4b776a95725aeba0815
BLAKE2b-256 checksum
How to use checksums
5053ea17c306da94048dc9bca8f50570fa8333c2ac80ff5ab02adf73b31b8858
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / ftern-0.1.0-cp39-abi3-win_amd64.whl

Download URL ftern-0.1.0-cp39-abi3-win_amd64.whl
Size 22.4 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4b51b0a4f9d27dbf2c7a3a1322dbbab0a64d360a78779f09dc6bcaa8c178df41
BLAKE2b-256 checksum
How to use checksums
47f558856530083a1e0a822124ff0e70731da3b30e3ab908f16350305c4b8e9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / ftern-0.1.0-cp39-abi3-manylinux_2_35_x86_64.whl

Download URL ftern-0.1.0-cp39-abi3-manylinux_2_35_x86_64.whl
Size 28.0 MB
Tags CPython 3.9 Linux glibc 2.35+ x86-64 abi3
SHA-256 checksum
How to use checksums
2ad7b2e7504af2e9b1c0ea8b27203a16758ab5518f9927b17f07d9fbdbef3479
BLAKE2b-256 checksum
How to use checksums
d20c0b68e3eee701948233e4981ee09b4b3f25ec6afbf34e17e446604081c37f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / ftern-0.1.0-cp39-abi3-manylinux_2_35_aarch64.whl

Download URL ftern-0.1.0-cp39-abi3-manylinux_2_35_aarch64.whl
Size 25.9 MB
Tags CPython 3.9 Linux glibc 2.35+ ARM64 abi3
SHA-256 checksum
How to use checksums
188c60a6c4fc3e80804b056e8d489e39860472fca20cf86c932f73b667551d32
BLAKE2b-256 checksum
How to use checksums
cc74116e33fb52f8641293f3ce0ab22c5b3d22f69f106ed3965c74abc67283a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / ftern-0.1.0-cp39-abi3-macosx_11_0_x86_64.whl

Download URL ftern-0.1.0-cp39-abi3-macosx_11_0_x86_64.whl
Size 25.3 MB
Tags CPython 3.9 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
67305fd6e6bbbc45a2c49be7df8cb1b3d773d8ba4b3f0d1fb04a4473c28a9fba
BLAKE2b-256 checksum
How to use checksums
b9b1a5142f351e9e6f3e0b9e43e053c35aeec11dedfb9294c57888681b82f39a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / ftern-0.1.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL ftern-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Size 23.7 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4725fa7e60b68c7fc10d382d9cc341decb02c8d6335a71d17332b64be5771266
BLAKE2b-256 checksum
How to use checksums
4ae5d7ecdb9b8d8a396ff2fab32e924f1725531a7ab0a88528821146d2b836ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Security for ftern 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 release files No 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