fin-insight-extract extracts and structures key business and financial insights from unstructured text for analysts and investors.
Project description
fin-insight-extract
Overview
A new package that extracts and structures key business and financial insights from news articles or reports. The package takes unstructured text input, such as news headlines or summaries, and uses llmatch-messages to parse and extract specific details like company names, financial figures, market impacts, and strategic moves. It returns a structured output that includes the key entities involved, the nature of the announcement, potential market implications, and any notable figures or metrics mentioned.
Installation
Installation can be done via pip:
pip install fin_insight_extract
Usage
Extract financial and business insights from unstructured text:
from fin_insight_extract import fin_insight_extract
user_input = "The company has announced a 20% increase in revenue for the quarter"
response = fin_insight_extract(user_input=user_input)
print(response)
Parameters
user_input: The unstructured text to process. (str)llm: A LangChain LLM instance to use. If not provided, the defaultChatLLM7will be used. (Optional[BaseChatModel])api_key: The API key for LLM7. If not provided, the defaultChatLLM7will be used. If provided, it will also be used for the defaultChatLLM7. (Optional[str])
Using Custom LLMs
You can safely pass your own LLM instance (based on https://docs(langchain.io)) if you want to use another LLM. For example, to use OpenAI:
from langchain_openai import ChatOpenAI
from fin_insight_extract import fin_insight_extract
llm = ChatOpenAI()
response = fin_insight_extract(user_input="The company has announced a 20% increase in revenue for the quarter", llm=llm)
print(response)
Similarly, you can use Anthropics:
from langchain_anthropic import ChatAnthropic
from fin_insight_extract import fin_insight_extract
llm = ChatAnthropic()
response = fin_insight_extract(user_input="The company has announced a 20% increase in revenue for the quarter", llm=llm)
print(response)
or Google:
from langchain_google_genai import ChatGoogleGenerativeAI
from fin_insight_extract import fin_insight_extract
llm = ChatGoogleGenerativeAI()
response = fin_insight_extract(user_input="The company has announced a 20% increase in revenue for the quarter", llm=llm)
print(response)
Rate Limits
The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you need higher rate limits, you can pass your own API key via environment variable LLM7_API_KEY or directly:
from fin_insight_extract import fin_insight_extract
response = fin_insight_extract(user_input="The company has announced a 20% increase in revenue for the quarter", api_key="your_api_key")
print(response)
Get a free API key at https://token.llm7.io/
Contributing
Report issues at: https://github.com/chigwell/fin-insight-extract
Author
authored by Eugene Evstafev (hi@eugevstfev.plus)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fin_insight_extract-2025.12.22075142.tar.gz.
File metadata
- Download URL: fin_insight_extract-2025.12.22075142.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b3dabb09b7b591ea1538f303a63ef385d0013b8cb5fd4fdb1991f17730f3bff
|
|
| MD5 |
1c5a9971dff1014d2650bf30db3bc396
|
|
| BLAKE2b-256 |
5bf29174e36599e83a00237b93f9c87459142bb98a5e005715688ef95e12ea19
|
File details
Details for the file fin_insight_extract-2025.12.22075142-py3-none-any.whl.
File metadata
- Download URL: fin_insight_extract-2025.12.22075142-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2847ca3012c17c514a94ff23c48bc4fb3f7b12064519820875f8f5872521d823
|
|
| MD5 |
394196e4205b5c8d3df6b93ee319fd7e
|
|
| BLAKE2b-256 |
58a13dd944a4ed6c2e6389af02b8eb6a1b7c2f573eceb6409e229807cc02954f
|