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

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.1
File Size Uploaded Provenance Actions
ftern-0.1.1.tar.gz 459.0 kB Without provenance Details for ftern-0.1.1.tar.gz

Built distributions (wheels)

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

Total release size: 125.8 MB

Release files / ftern-0.1.1.tar.gz

Download URL ftern-0.1.1.tar.gz
Size 459.0 kB
Tags Source
SHA-256 checksum
How to use checksums
74cb2d67aee324eaa559c5fbe429c85f781a3f029e96cc2e9dae18fff9dde827
BLAKE2b-256 checksum
How to use checksums
cd5d41b3fd56aad2787db3b693834ae2e2ba16d09eb78a0da75001d7d6503f86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

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

Download URL ftern-0.1.1-cp39-abi3-win_amd64.whl
Size 22.4 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2073217e2bd8fd2235aa7017c19feb2828ab5ea5ac688028ae5b9e1fab8cfa30
BLAKE2b-256 checksum
How to use checksums
661b1641208c4056d451cd6a30b8aed4824ba40c2d43435253cb5b5f216092e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

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

Download URL ftern-0.1.1-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
58a110f27291c1526654f8b7cd6e2a2b2f2e3a632758b0765cf983637870e065
BLAKE2b-256 checksum
How to use checksums
4c92eab2b72b90e873a1aa859b562d11eefb9ba7a8cc63cf5ddf26e3c6d955f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

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

Download URL ftern-0.1.1-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
d8a09b495bd120b227444301fd557215dbf6bd563eb8705e0ba17a07c831370d
BLAKE2b-256 checksum
How to use checksums
c93e6af3484aa3d6e39d153367d8c34b353af59017fc89c6837d6f09698d1a68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

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

Download URL ftern-0.1.1-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
9fced92f1c8dd297866fd07a9c816c54ee503056316c4b85c941a7dbd7dabac9
BLAKE2b-256 checksum
How to use checksums
c5ea9dbd6db626a538d789ec45cb2fc9247153e0ed740bea840c9dc951d7fe71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

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

Download URL ftern-0.1.1-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
9959bb256dd6569aa1a42f56794f809135a79c7904cae6ec96b407e1e51e46cd
BLAKE2b-256 checksum
How to use checksums
d1e97b8e6b4eeab544fc6a4f9402bba54ac22a461de7dcac3f09434d6d27cce6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for ftern 0.1.1

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