2224 lines
64 KiB
HTML
2224 lines
64 KiB
HTML
|
|
<!doctype html>
|
|
<html lang="en" class="no-js">
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="icon" href="../../../../assets/images/favicon.png">
|
|
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.23">
|
|
|
|
|
|
|
|
<title>Tabular - Khata App — Library Reference</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../../../assets/stylesheets/main.84d31ad4.min.css">
|
|
|
|
|
|
<link rel="stylesheet" href="../../../../assets/stylesheets/palette.06af60db.min.css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,300i,400,400i,700,700i%7CJetBrains+Mono:400,400i,700,700i&display=fallback">
|
|
<style>:root{--md-text-font:"Inter";--md-code-font:"JetBrains Mono"}</style>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../../../assets/_mkdocstrings.css">
|
|
|
|
<link rel="stylesheet" href="https://unpkg.com/dracula-prism/dist/css/dracula-prism.css">
|
|
|
|
<script>__md_scope=new URL("../../../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<body dir="ltr" data-md-color-scheme="slate" data-md-color-primary="deep-purple" data-md-color-accent="cyan">
|
|
|
|
|
|
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
|
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
|
<label class="md-overlay" for="__drawer"></label>
|
|
<div data-md-component="skip">
|
|
|
|
|
|
<a href="#tabular" class="md-skip">
|
|
Skip to content
|
|
</a>
|
|
|
|
</div>
|
|
<div data-md-component="announce">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<header class="md-header md-header--shadow" data-md-component="header">
|
|
<nav class="md-header__inner md-grid" aria-label="Header">
|
|
<a href="../../../.." title="Khata App — Library Reference" class="md-header__button md-logo" aria-label="Khata App — Library Reference" data-md-component="logo">
|
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 8c0 2.21-1.79 4-4 4s-4-1.79-4-4 1.79-4 4-4 4 1.79 4 4m0 6.72V20H0v-2c0-2.21 3.13-4 7-4 1.5 0 2.87.27 4 .72M24 20H13V3h11zm-8-8.5a2.5 2.5 0 0 1 5 0 2.5 2.5 0 0 1-5 0M22 7a2 2 0 0 1-2-2h-3c0 1.11-.89 2-2 2v9a2 2 0 0 1 2 2h3c0-1.1.9-2 2-2z"/></svg>
|
|
|
|
</a>
|
|
<label class="md-header__button md-icon" for="__drawer">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
|
|
</label>
|
|
<div class="md-header__title" data-md-component="header-title">
|
|
<div class="md-header__ellipsis">
|
|
<div class="md-header__topic">
|
|
<span class="md-ellipsis">
|
|
Khata App — Library Reference
|
|
</span>
|
|
</div>
|
|
<div class="md-header__topic" data-md-component="header-topic">
|
|
<span class="md-ellipsis">
|
|
|
|
Tabular
|
|
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<form class="md-header__option" data-md-component="palette">
|
|
|
|
|
|
|
|
|
|
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="deep-purple" data-md-color-accent="cyan" aria-hidden="true" type="radio" name="__palette" id="__palette_0">
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
|
|
|
|
|
|
|
|
|
|
|
|
<label class="md-header__button md-icon" for="__search">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
|
|
</label>
|
|
<div class="md-search" data-md-component="search" role="dialog">
|
|
<label class="md-search__overlay" for="__search"></label>
|
|
<div class="md-search__inner" role="search">
|
|
<form class="md-search__form" name="search">
|
|
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
|
|
<label class="md-search__icon md-icon" for="__search">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
|
|
</label>
|
|
<nav class="md-search__options" aria-label="Search">
|
|
|
|
<a href="javascript:void(0)" class="md-search__icon md-icon" title="Share" aria-label="Share" data-clipboard data-clipboard-text="" data-md-component="search-share" tabindex="-1">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.15c-.05.21-.08.43-.08.66 0 1.61 1.31 2.91 2.92 2.91s2.92-1.3 2.92-2.91A2.92 2.92 0 0 0 18 16.08"/></svg>
|
|
</a>
|
|
|
|
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
|
|
</button>
|
|
</nav>
|
|
|
|
<div class="md-search__suggest" data-md-component="search-suggest"></div>
|
|
|
|
</form>
|
|
<div class="md-search__output">
|
|
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
|
|
<div class="md-search-result" data-md-component="search-result">
|
|
<div class="md-search-result__meta">
|
|
Initializing search
|
|
</div>
|
|
<ol class="md-search-result__list" role="presentation"></ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
<div class="md-container" data-md-component="container">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<main class="md-main" data-md-component="main">
|
|
<div class="md-main__inner md-grid">
|
|
|
|
|
|
|
|
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
|
|
<div class="md-sidebar__scrollwrap">
|
|
<div class="md-sidebar__inner">
|
|
|
|
|
|
|
|
|
|
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
|
<label class="md-nav__title" for="__drawer">
|
|
<a href="../../../.." title="Khata App — Library Reference" class="md-nav__button md-logo" aria-label="Khata App — Library Reference" data-md-component="logo">
|
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 8c0 2.21-1.79 4-4 4s-4-1.79-4-4 1.79-4 4-4 4 1.79 4 4m0 6.72V20H0v-2c0-2.21 3.13-4 7-4 1.5 0 2.87.27 4 .72M24 20H13V3h11zm-8-8.5a2.5 2.5 0 0 1 5 0 2.5 2.5 0 0 1-5 0M22 7a2 2 0 0 1-2-2h-3c0 1.11-.89 2-2 2v9a2 2 0 0 1 2 2h3c0-1.1.9-2 2-2z"/></svg>
|
|
|
|
</a>
|
|
Khata App — Library Reference
|
|
</label>
|
|
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../.." class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Home
|
|
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
|
|
|
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_2" >
|
|
|
|
|
|
<div class="md-nav__link md-nav__container">
|
|
<a href="../../../../domain/" class="md-nav__link ">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Domain
|
|
|
|
</span>
|
|
|
|
|
|
</a>
|
|
|
|
|
|
<label class="md-nav__link " for="__nav_2" id="__nav_2_label" tabindex="">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_2">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Domain
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../../domain/enrichment/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Enrichment
|
|
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../../domain/fetch_pipeline/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Fetch Pipeline
|
|
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../../domain/fetch_request/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Fetch Request
|
|
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
|
|
|
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_3" >
|
|
|
|
|
|
<div class="md-nav__link md-nav__container">
|
|
<a href="../../../../infra/" class="md-nav__link ">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Infra
|
|
|
|
</span>
|
|
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_3">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Infra
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
|
|
|
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_4" >
|
|
|
|
|
|
<div class="md-nav__link md-nav__container">
|
|
<a href="../../../../interfaces/" class="md-nav__link ">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Interfaces
|
|
|
|
</span>
|
|
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_4">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Interfaces
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
|
|
|
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_5" >
|
|
|
|
|
|
<div class="md-nav__link md-nav__container">
|
|
<a href="../../../" class="md-nav__link ">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Pipelines
|
|
|
|
</span>
|
|
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Pipelines
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
|
|
<div class="md-sidebar__scrollwrap">
|
|
<div class="md-sidebar__inner">
|
|
|
|
|
|
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__title" for="__toc">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Table of contents
|
|
</label>
|
|
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
tabular
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="tabular">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular--summary" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Summary
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular-classes" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Classes
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Classes">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.ImplObjectsTxnDictsPort" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ImplObjectsTxnDictsPort
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="ImplObjectsTxnDictsPort">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.ImplObjectsTxnDictsPort-functions" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Functions
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Functions">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.ImplObjectsTxnDictsPort.build" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
build
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.ImplTabularTxnDictsPort" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ImplTabularTxnDictsPort
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="ImplTabularTxnDictsPort">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.ImplTabularTxnDictsPort-functions" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Functions
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Functions">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.ImplTabularTxnDictsPort.build" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
build
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.ObjectsTxnDictsPort" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ObjectsTxnDictsPort
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="ObjectsTxnDictsPort">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.ObjectsTxnDictsPort-functions" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Functions
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Functions">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.ObjectsTxnDictsPort.build" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
build
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.TableParserMixin" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
TableParserMixin
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.TableReaderPort" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
TableReaderPort
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="TableReaderPort">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.TableReaderPort-functions" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Functions
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Functions">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.TableReaderPort.read" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
read
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.TabularExtractionPipeline" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
TabularExtractionPipeline
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="TabularExtractionPipeline">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.TabularExtractionPipeline-functions" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Functions
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Functions">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.TabularExtractionPipeline.run" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
run
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.TabularTxnDictsPort" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
TabularTxnDictsPort
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="TabularTxnDictsPort">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.TabularTxnDictsPort-functions" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Functions
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Functions">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.TabularTxnDictsPort.build" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
build
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular-functions" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Functions
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Functions">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.adjust_balances" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
adjust_balances
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.objects_to_txn_dict" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
objects_to_txn_dict
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.signed_amount" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
signed_amount
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pipelines.extraction.shared.tabular.tabular_to_txn_dict" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
tabular_to_txn_dict
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="md-content" data-md-component="content">
|
|
<article class="md-content__inner md-typeset">
|
|
|
|
|
|
|
|
|
|
|
|
<h1 id="tabular">Tabular</h1>
|
|
|
|
|
|
<div class="doc doc-object doc-module">
|
|
|
|
|
|
|
|
<h2 id="pipelines.extraction.shared.tabular" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-module"></code> <span class="doc doc-object-name doc-module-name">pipelines.extraction.shared.tabular</span>
|
|
|
|
|
|
</h2>
|
|
|
|
<div class="doc doc-contents first">
|
|
|
|
<h3 id="pipelines.extraction.shared.tabular--summary">Summary</h3>
|
|
<p>Shared tabular extraction core (csv + xlsx families).</p>
|
|
<hr />
|
|
<p>Both the csv and xlsx families are "direct table" pipelines: the bank parser
|
|
emits the exact typed table and the pipeline owns all policy — signs come from
|
|
the withdrawal/deposit columns and balances are adjusted as we go so the emitted
|
|
sequence is always balance-chained. No number extraction, bucket finding,
|
|
splitting, or ambiguity resolution occurs (unlike the pdf family).</p>
|
|
<p>Shared here (both families import from this module):</p>
|
|
<ul>
|
|
<li><code>TableReaderPort</code> : abstract contract, implemented per format/bank.</li>
|
|
<li><code>TabularTxnDictsPort</code> : abstract contract for records -> txn dicts.</li>
|
|
<li><code>TabularExtractionPipeline</code>: the graph root (ingest -> table_reader ->
|
|
txn_dicts -> raw_expense) with a concrete
|
|
<code>run</code> driving the three shared stages.</li>
|
|
<li><code>signed_amount</code> / <code>adjust_balances</code> / <code>tabular_to_txn_dict</code> : the
|
|
balance-chain policy, ported from OG <code>domain.extraction.pipelines.tabular</code>.</li>
|
|
<li><code>objects_to_txn_dict</code> / <code>ObjectsTxnDictsPort</code> : the llama-family
|
|
variant — already-structured statement objects map straight to txn dicts
|
|
with their STATED balances trusted (no re-chaining), ported from OG
|
|
<code>domain.extraction.pipelines.llama_parser.to_txn_dict</code>.</li>
|
|
<li><code>TableParserMixin</code> : format-agnostic header/alias/typing logic,
|
|
ported from OG <code>IciciTableParserMixin</code> (homed with the icici xlsx parser);
|
|
the axis csv reader overrides its <code>column_aliases</code> (DR/CR inversion).</li>
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 id="pipelines.extraction.shared.tabular-classes">Classes</h3>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h4 id="pipelines.extraction.shared.tabular.ImplObjectsTxnDictsPort" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">ImplObjectsTxnDictsPort</span>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code><a class="autorefs autorefs-internal" title="pipelines.extraction.shared.tabular.ObjectsTxnDictsPort" href="#pipelines.extraction.shared.tabular.ObjectsTxnDictsPort">ObjectsTxnDictsPort</a></code></p>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5 id="pipelines.extraction.shared.tabular.ImplObjectsTxnDictsPort-functions">Functions</h5>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h6 id="pipelines.extraction.shared.tabular.ImplObjectsTxnDictsPort.build" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">build</span>
|
|
|
|
|
|
</h6>
|
|
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">build</span><span class="p">(</span><span class="n">objects</span><span class="p">)</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Build txn dicts from already-structured objects (impl).</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Parameters:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code>objects</code></td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Structured statement objects.</p>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<em>required</em>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<p><span class="doc-section-title">Returns:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>List of txn dicts.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h4 id="pipelines.extraction.shared.tabular.ImplTabularTxnDictsPort" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">ImplTabularTxnDictsPort</span>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code><a class="autorefs autorefs-internal" title="pipelines.extraction.shared.tabular.TabularTxnDictsPort" href="#pipelines.extraction.shared.tabular.TabularTxnDictsPort">TabularTxnDictsPort</a></code></p>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5 id="pipelines.extraction.shared.tabular.ImplTabularTxnDictsPort-functions">Functions</h5>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h6 id="pipelines.extraction.shared.tabular.ImplTabularTxnDictsPort.build" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">build</span>
|
|
|
|
|
|
</h6>
|
|
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">build</span><span class="p">(</span><span class="n">records</span><span class="p">)</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Build balance-chained txn dicts from typed records (impl).</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Parameters:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code>records</code></td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Typed table records.</p>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<em>required</em>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<p><span class="doc-section-title">Returns:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>List of txn dicts.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h4 id="pipelines.extraction.shared.tabular.ObjectsTxnDictsPort" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">ObjectsTxnDictsPort</span>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code><span title="abc.ABC">ABC</span></code></p>
|
|
|
|
|
|
<p>already-structured objects → list of txn dicts (stated balances trusted).</p>
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5 id="pipelines.extraction.shared.tabular.ObjectsTxnDictsPort-functions">Functions</h5>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h6 id="pipelines.extraction.shared.tabular.ObjectsTxnDictsPort.build" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">build</span>
|
|
|
|
|
|
<span class="doc doc-labels">
|
|
<small class="doc doc-label doc-label-abstractmethod"><code>abstractmethod</code></small>
|
|
</span>
|
|
|
|
</h6>
|
|
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">build</span><span class="p">(</span>
|
|
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">objects</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]],</span>
|
|
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]]</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Build txn dicts from already-structured objects.</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Parameters:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code>objects</code></td>
|
|
<td>
|
|
<code><span title="typing.List">List</span>[<span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Structured statement objects.</p>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<em>required</em>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<p><span class="doc-section-title">Returns:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td>
|
|
<code><span title="typing.List">List</span>[<span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>List[Dict[str, Any]]: Txn dicts.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h4 id="pipelines.extraction.shared.tabular.TableParserMixin" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">TableParserMixin</span>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
|
|
<p>Format-agnostic typed table reading shared by csv and xlsx readers.</p>
|
|
<p>Default aliases/required columns model the icici export; the axis csv
|
|
reader overrides <code>column_aliases</code> (with the DR/CR inversion).</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Attributes:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code><span title="pipelines.extraction.shared.tabular.TableParserMixin.column_aliases">column_aliases</span></code></td>
|
|
<td>
|
|
<code><span title="typing.Dict">Dict</span>[str, <span title="typing.List">List</span>[str]]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Alias lookup for header matching.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="doc-section-item">
|
|
<td><code><span title="pipelines.extraction.shared.tabular.TableParserMixin.max_header_scan">max_header_scan</span></code></td>
|
|
<td>
|
|
<code>int</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Max rows scanned for the header row.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="doc-section-item">
|
|
<td><code><span title="pipelines.extraction.shared.tabular.TableParserMixin.required_columns">required_columns</span></code></td>
|
|
<td>
|
|
<code><span title="typing.Tuple">Tuple</span>[str, ...]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Columns that must be present.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h4 id="pipelines.extraction.shared.tabular.TableReaderPort" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">TableReaderPort</span>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code><span title="abc.ABC">ABC</span></code></p>
|
|
|
|
|
|
<p>content → list of typed table records (in sheet/file order).</p>
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5 id="pipelines.extraction.shared.tabular.TableReaderPort-functions">Functions</h5>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h6 id="pipelines.extraction.shared.tabular.TableReaderPort.read" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">read</span>
|
|
|
|
|
|
<span class="doc doc-labels">
|
|
<small class="doc doc-label doc-label-abstractmethod"><code>abstractmethod</code></small>
|
|
</span>
|
|
|
|
</h6>
|
|
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">read</span><span class="p">(</span><span class="n">content</span><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]]</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Read typed table records from content.</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Parameters:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code>content</code></td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Materialized content payload.</p>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<em>required</em>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<p><span class="doc-section-title">Returns:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td>
|
|
<code><span title="typing.List">List</span>[<span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>List[Dict[str, Any]]: Typed table records in source order.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h4 id="pipelines.extraction.shared.tabular.TabularExtractionPipeline" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">TabularExtractionPipeline</span>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code><span title="abc.ABC">ABC</span></code></p>
|
|
|
|
|
|
<p>Root — direct-table chain: ingest → table_reader → txn_dicts → raw_expense.</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Attributes:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code><span title="pipelines.extraction.shared.tabular.TabularExtractionPipeline.source">source</span></code></td>
|
|
<td>
|
|
<code><a class="autorefs autorefs-internal" title="pipelines.extraction.shared.ports.ExtractionSource" href="../ports/#pipelines.extraction.shared.ports.ExtractionSource">ExtractionSource</a></code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>The extraction source descriptor.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="doc-section-item">
|
|
<td><code><span title="pipelines.extraction.shared.tabular.TabularExtractionPipeline.pipeline">pipeline</span></code></td>
|
|
<td>
|
|
<code>str</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Pipeline tag; defaults to "tabular".</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="doc-section-item">
|
|
<td><code><span title="pipelines.extraction.shared.tabular.TabularExtractionPipeline.ingest">ingest</span></code></td>
|
|
<td>
|
|
<code><a class="autorefs autorefs-internal" title="pipelines.extraction.shared.ports.IngestPort" href="../ports/#pipelines.extraction.shared.ports.IngestPort">IngestPort</a></code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Ingest stage.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="doc-section-item">
|
|
<td><code><span title="pipelines.extraction.shared.tabular.TabularExtractionPipeline.table_reader">table_reader</span></code></td>
|
|
<td>
|
|
<code><a class="autorefs autorefs-internal" title="pipelines.extraction.shared.tabular.TableReaderPort" href="#pipelines.extraction.shared.tabular.TableReaderPort">TableReaderPort</a></code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Table reading stage.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="doc-section-item">
|
|
<td><code><span title="pipelines.extraction.shared.tabular.TabularExtractionPipeline.txn_dicts">txn_dicts</span></code></td>
|
|
<td>
|
|
<code><a class="autorefs autorefs-internal" title="pipelines.extraction.shared.tabular.TabularTxnDictsPort" href="#pipelines.extraction.shared.tabular.TabularTxnDictsPort">TabularTxnDictsPort</a></code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Txn-dict building stage.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="doc-section-item">
|
|
<td><code><span title="pipelines.extraction.shared.tabular.TabularExtractionPipeline.raw_expense">raw_expense</span></code></td>
|
|
<td>
|
|
<code><a class="autorefs autorefs-internal" title="pipelines.extraction.shared.ports.RawExpensePort" href="../ports/#pipelines.extraction.shared.ports.RawExpensePort">RawExpensePort</a></code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Terminal raw-expense stage.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5 id="pipelines.extraction.shared.tabular.TabularExtractionPipeline-functions">Functions</h5>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h6 id="pipelines.extraction.shared.tabular.TabularExtractionPipeline.run" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">run</span>
|
|
|
|
|
|
</h6>
|
|
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">run</span><span class="p">(</span><span class="n">source</span><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="n">Any</span><span class="p">]</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Run the direct-table extraction chain.</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Parameters:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code>source</code></td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Raw extraction source.</p>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<em>required</em>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<p><span class="doc-section-title">Returns:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td>
|
|
<code><span title="typing.List">List</span>[<span title="typing.Any">Any</span>]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>List[Any]: Raw expense records.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h4 id="pipelines.extraction.shared.tabular.TabularTxnDictsPort" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">TabularTxnDictsPort</span>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code><span title="abc.ABC">ABC</span></code></p>
|
|
|
|
|
|
<p>records → list of txn dicts, balance-chained (terminal rules live here).</p>
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5 id="pipelines.extraction.shared.tabular.TabularTxnDictsPort-functions">Functions</h5>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h6 id="pipelines.extraction.shared.tabular.TabularTxnDictsPort.build" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">build</span>
|
|
|
|
|
|
<span class="doc doc-labels">
|
|
<small class="doc doc-label doc-label-abstractmethod"><code>abstractmethod</code></small>
|
|
</span>
|
|
|
|
</h6>
|
|
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">build</span><span class="p">(</span>
|
|
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">records</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]],</span>
|
|
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]]</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Build balance-chained txn dicts from typed records.</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Parameters:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code>records</code></td>
|
|
<td>
|
|
<code><span title="typing.List">List</span>[<span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Typed table records.</p>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<em>required</em>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<p><span class="doc-section-title">Returns:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td>
|
|
<code><span title="typing.List">List</span>[<span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>List[Dict[str, Any]]: Txn dicts.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<h3 id="pipelines.extraction.shared.tabular-functions">Functions</h3>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h4 id="pipelines.extraction.shared.tabular.adjust_balances" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">adjust_balances</span>
|
|
|
|
|
|
</h4>
|
|
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">adjust_balances</span><span class="p">(</span>
|
|
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">records</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]],</span>
|
|
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]]</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Walk records in table order, correcting balances to the running chain.</p>
|
|
<p>The first record anchors on its stated balance. Every subsequent record
|
|
keeps its stated balance only when it continues the chain exactly;
|
|
otherwise the balance is adjusted to <code>prev + amount</code>.</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Parameters:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code>records</code></td>
|
|
<td>
|
|
<code><span title="typing.List">List</span>[<span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Records in table order to chain.</p>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<em>required</em>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<p><span class="doc-section-title">Returns:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td>
|
|
<code><span title="typing.List">List</span>[<span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>List[Dict[str, Any]]: The same records with corrected balances.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h4 id="pipelines.extraction.shared.tabular.objects_to_txn_dict" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">objects_to_txn_dict</span>
|
|
|
|
|
|
</h4>
|
|
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">objects_to_txn_dict</span><span class="p">(</span><span class="n">obj</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">])</span> <span class="o">-></span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Map an already-structured statement object onto the txn-dict shape.</p>
|
|
<p>Faithful port of OG <code>domain.extraction.pipelines.llama_parser.to_txn_dict</code>:
|
|
the object already carries a signed-able amount plus an explicit
|
|
direction (DEBIT/CREDIT), so the balance is TRUSTED as stated — no
|
|
re-chaining, unlike the tabular policy. Direction handling accepts the
|
|
enum instance, <code>"Direction.CREDIT"</code>-style prefixed strings, and any
|
|
casing, mirroring the OG helper.</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Parameters:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code>obj</code></td>
|
|
<td>
|
|
<code><span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Structured statement object.</p>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<em>required</em>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<p><span class="doc-section-title">Returns:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td>
|
|
<code><span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Dict[str, Any]: Txn dict with txn_date, particulars, amount, balance,</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="doc-section-item">
|
|
<td>
|
|
<code><span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>and direction keys.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h4 id="pipelines.extraction.shared.tabular.signed_amount" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">signed_amount</span>
|
|
|
|
|
|
</h4>
|
|
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">signed_amount</span><span class="p">(</span><span class="n">record</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">])</span> <span class="o">-></span> <span class="nb">float</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Compute the signed amount from deposit minus withdrawal.</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Parameters:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code>record</code></td>
|
|
<td>
|
|
<code><span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Typed table record.</p>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<em>required</em>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<p><span class="doc-section-title">Returns:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th> <th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code>float</code></td> <td>
|
|
<code>float</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Deposit minus withdrawal, rounded to 2 places.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h4 id="pipelines.extraction.shared.tabular.tabular_to_txn_dict" class="doc doc-heading">
|
|
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">tabular_to_txn_dict</span>
|
|
|
|
|
|
</h4>
|
|
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">tabular_to_txn_dict</span><span class="p">(</span>
|
|
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">record</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">],</span>
|
|
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-></span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Map a typed table record onto the standard txn-dict shape.</p>
|
|
|
|
|
|
<p><span class="doc-section-title">Parameters:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td><code>record</code></td>
|
|
<td>
|
|
<code><span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Typed, balance-chained table record.</p>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<em>required</em>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<p><span class="doc-section-title">Returns:</span></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="doc-section-item">
|
|
<td>
|
|
<code><span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>Dict[str, Any]: Txn dict with txn_date, particulars, amount, balance,</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="doc-section-item">
|
|
<td>
|
|
<code><span title="typing.Dict">Dict</span>[str, <span title="typing.Any">Any</span>]</code>
|
|
</td>
|
|
<td>
|
|
<div class="doc-md-description">
|
|
<p>and direction keys.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
</div>
|
|
|
|
|
|
<script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>
|
|
|
|
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
|
|
</div>
|
|
|
|
<button type="button" class="md-top md-icon" data-md-component="top" hidden>
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
|
|
Back to top
|
|
</button>
|
|
|
|
</main>
|
|
|
|
<footer class="md-footer">
|
|
|
|
<div class="md-footer-meta md-typeset">
|
|
<div class="md-footer-meta__inner md-grid">
|
|
<div class="md-copyright">
|
|
|
|
|
|
Made with
|
|
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
|
Material for MkDocs
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
</div>
|
|
<div class="md-dialog" data-md-component="dialog">
|
|
<div class="md-dialog__inner md-typeset"></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script id="__config" type="application/json">{"base": "../../../..", "features": ["navigation.sections", "navigation.expand", "navigation.top", "navigation.instant", "navigation.tracking", "navigation.indexes", "content.code.copy", "content.code.annotate", "content.tabs.link", "content.action.edit", "search.highlight", "search.share", "search.suggest"], "search": "../../../../assets/javascripts/workers/search.973d3a69.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
|
|
|
|
|
|
<script src="../../../../assets/javascripts/bundle.f55a23d4.min.js"></script>
|
|
|
|
|
|
</body>
|
|
</html> |