Skip to content

Icici

pipelines.extraction.email.banks.icici

Summary

Icici bank-specific port implementations (email message path).


Faithful port of domain/extraction/banks/icici/email.py (IciciTransactionParserAdaptor.parse): INR amount, credited/refund/ reversal direction, on <Mon DD, YYYY> at <HH:MM:SS> date formatting to DD-MM-YYYY, and a description sliced between Info: and the available credit-limit footer.

Classes

IciciEmailExtractionPipeline

Bases: ImplEmailExtractionPipeline

Icici email graph root — pins the Icici message parser.

Attributes:

Name Type Description
message_parser IciciMessageParserPort

Icici message parser.

Functions
run
run(source)

Run the email extraction chain end-to-end.

Parameters:

Name Type Description Default
source

Raw extraction source.

required

Returns:

Type Description

List of raw expense records.

IciciMessageParserPort

Bases: ImplMessageParserPort

Icici email parser — credited/refund/reversal direction, DD-MM-YYYY.

Attributes:

Name Type Description
description_starts List[str]

Icici description start markers.

description_ends List[str]

Icici description end markers.

Functions
parse
parse(message: str)

Parse an Icici message into one txn dict.

Parameters:

Name Type Description Default
message str

Flattened message text.

required

Returns:

Type Description

Txn dict with txn_date, particulars, amount, balance, direction.

Raises:

Type Description
ValueError

When the amount or transaction date is not found.