Skip to main content

fin-summary

PyPI version License: MIT Downloads LinkedIn

fin-summary is a lightweight Python package that extracts structured, actionable information from user‑provided text describing financial transaction issues (e.g., processing fees, settlement delays). It uses pattern matching combined with a language model to identify key details such as issue type, amount, timeline, and recommended steps, returning a concise summary that can be directly acted upon.

Features

  • Simple one‑function API (fin_summary)
  • Works out‑of‑the‑box with the default ChatLLM7 model from langchain_llm7
  • Plug‑in friendly – you can provide any LangChain‑compatible LLM (OpenAI, Anthropic, Google, etc.)
  • Returns a list of extracted strings that match the supplied regex pattern

Installation

pip install fin_summary

Quick Start

from fin_summary import fin_summary

# Example user description of a problem
user_input = """
I was charged an extra $15 processing fee on my $200
transfer that should have settled yesterday, but it still shows
as pending. What should I do?
"""

# Use the default ChatLLM7 model (requires an API key)
summary = fin_summary(user_input)

print(summary)
# -> ['Issue type: processing fee', 'Amount: $15', 'Original amount: $200', ...]

Parameters

Parameter Type Description
user_input str The free‑form text describing the financial issue.
llm Optional[BaseChatModel] A LangChain LLM instance. If omitted, the package creates a ChatLLM7 instance using the provided api_key or the LLM7_API_KEY environment variable.
api_key Optional[str] API key for LLM7. If not supplied, the package reads LLM7_API_KEY from the environment.

Using a Custom LLM

You can pass any LangChain LLM that implements BaseChatModel. Below are examples with popular providers.

OpenAI

from langchain_openai import ChatOpenAI
from fin_summary import fin_summary

llm = ChatOpenAI()
response = fin_summary(user_input, llm=llm)

Anthropic

from langchain_anthropic import ChatAnthropic
from fin_summary import fin_summary

llm = ChatAnthropic()
response = fin_summary(user_input, llm=llm)

Google Generative AI

from langchain_google_genai import ChatGoogleGenerativeAI
from fin_summary import fin_summary

llm = ChatGoogleGenerativeAI()
response = fin_summary(user_input, llm=llm)

API Key & Rate Limits

  • Default LLM: ChatLLM7 (from langchain_llm7)
    Documentation: https://pypi.org/project/langchain-llm7/
  • Free‑tier rate limits are sufficient for typical usage of this package.
  • To increase limits, provide your own API key:
export LLM7_API_KEY="your_api_key"

or directly in code:

response = fin_summary(user_input, api_key="your_api_key")

You can obtain a free API key by registering at https://token.llm7.io/.

Contributing & Issues

If you encounter any problems or have feature requests, please open an issue on GitHub:

https://github.com/chigwell/fin-summary/issues

Author

Eugene Evstafev
Email: hi@euegne.plus
GitHub: chigwell


Happy summarizing! 🚀

Metadata

Release files for fin-summary 2025.12.21235235

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fin-summary 2025.12.21235235
File Size Uploaded
fin_summary-2025.12.21235235.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fin-summary 2025.12.21235235
File Interpreter ABI Platform
fin_summary-2025.12.21235235-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / fin_summary-2025.12.21235235.tar.gz

Download URL fin_summary-2025.12.21235235.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0b4929ea3b55c2465ae4ddd952d03441b63a3d381be575b299cd35445852365d
BLAKE2b-256 checksum
How to use checksums
ff7c9d3a8e79e9f17929c4df6f0fa26fe86c9b79181d7105349345f406877e1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / fin_summary-2025.12.21235235-py3-none-any.whl

Download URL fin_summary-2025.12.21235235-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66d7e8d3e97ac1852c130782ddf090209fd37bc16837352a371b5689bc3f52f6
BLAKE2b-256 checksum
How to use checksums
7ce8985a4e4c026da0265b7f359adeb704573ce7180281e01fe3f5d4ac4b81a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

2025.12.21235235 This release

2 release files

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