Documentation Index
Fetch the complete documentation index at: https://docs.ntropii.com/llms.txt
Use this file to discover all available pages before exploring further.
ntro.accounting is the domain layer — typed models for the things fund accountants care about (trial balance, 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.
Three submodules ship today:
| Submodule | Purpose |
|---|---|
ntro.accounting.models | Pydantic types — TrialBalance, 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.
TrialBalance
A balanced TB at a point in time. Lifted from nav-monthly-journals:
TrialBalance carries a list of TBLine rows (one per account) plus the period and any metadata. from_extraction() builds it from the structured ExtractionResult returned by ai.extract() — saves you a manual mapping pass.
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
Private AI
ai.extract() is what produces the ExtractionResult TrialBalance.from_extraction() consumes.Quality checks
Pair
validate_journal_balance with a quality check for stronger HITL routing.