ntro.accounting is the domain layer — typed models for the things fund accountants care about (chart of accounts, journal lines, proposals) plus validation helpers and one reference proposal algorithm. It’s deliberately thin: most fund-ops calculation logic is tenant-specific and lives in the runbook itself.
Heads up: the trial-balance type moved toThree submodules ship today:ntro.capabilities.gl.reports.TrialBalanceReportin N-70. It’s a typed read-only view of external GL state — fits the GL capability, not the legacy accounting kitchen-sink. The old import (from ntro.accounting.models import TrialBalance) still works for one release as a deprecated alias.
| Submodule | Purpose |
|---|---|
ntro.accounting.models | Pydantic types — ChartOfAccounts, JournalLine, JournalProposal |
ntro.accounting.proposal | Reference algorithms — propose_allocation_journal() |
ntro.accounting.validation | Pure validation — validate_journal_balance(), validate_required_accounts() |
Install
Models — ntro.accounting.models
Strict Pydantic models for the fund-ops domain. They give your runbook type safety, JSON-serialisable shapes, and a model_validate round-trip you can rely on at activity boundaries.
TrialBalanceReport (moved to ntro.capabilities.gl.reports)
A balanced TB at a point in time. Lifted from nav-monthly-journals:
ChartOfAccounts
The list of accounts the entity uses, with their hierarchy and types:
JournalLine and JournalProposal
A JournalProposal is a list of JournalLine objects assembled into a single journal entry — the artifact of nav-monthly-journals that an accountant approves before it posts back to Xero / SAP / whatever the authoritative GL is.
Proposal — ntro.accounting.proposal
One reference algorithm ships today: propose_allocation_journal. It takes a parsed TB plus the ingested period documents and produces a balanced journal that allocates the activity to the right GL codes.
Lifted from nav-monthly-journals:
LOADING UI surface — but the maths itself is just a function call.
propose_allocation_journal is the reference implementation for real-estate SPV monthly NAV. The proposal logic for other domains (private credit, infrastructure, capital calls) is tenant-specific and lives in the runbook itself, not the SDK.Validation — ntro.accounting.validation
Pure validation helpers that return a ValidationResult with passed: bool and findings: list[str]. You either short-circuit on failure (raise_if_failed()) or surface the findings to a human.
nav-monthly:
What’s not in the SDK
The Notion structure plan calls out a roadmap of accounting calculations — NAV calculation, fee / waterfall / equalisation, FX translation, valuation adjustments. None of those are inntro.accounting today. If your runbook needs them, you write them in the runbook itself (or in your own private accounting library that the runbook imports).
The reason is twofold: (1) most of these calculations are tenant-specific in their detail, and (2) they’re commercially valuable enough that we’d rather not ship reference implementations that might lock customers into ours. The SDK gives you the primitives (typed TB, balanced journal validation, COA shape) and stays out of the calculations.
Related
General ledgers
Post proposals to the customer GL via
ntro.capabilities.gl.Private AI
ai.extract() is what produces the ExtractionResult TrialBalanceReport.from_extraction() consumes.Quality checks
Pair
validate_journal_balance with a quality check for stronger HITL routing.