Financial-Parser
Financial-Parser is a Python package designed to analyze financial news headlines and extract key structured information such as company names, financial targets, timeframes, and goal updates from text inputs. It simplifies monitoring market sentiment and tracking financial forecasts by processing pre-extracted textual data, providing clear, structured summaries that facilitate automated analysis and decision-making.
Features
- Extracts structured information from financial news headlines.
- Supports custom language models (LLMs) from LangChain.
- Defaults to using ChatLLM7 from LangChain for ease of use.
- Allows custom API keys for higher rate limits.
Installation
You can install the package using pip:
pip install financial_parser
Usage
Basic Usage
from financial_parser import financial_parser
user_input = "Company XYZ announces Q4 earnings of $1.2 billion, up from $1.1 billion last year."
response = financial_parser(user_input)
print(response)
Using a Custom LLM
You can use a custom LLM from LangChain by passing it as an argument. For example, to use OpenAI:
from langchain_openai import ChatOpenAI
from financial_parser import financial_parser
llm = ChatOpenAI()
user_input = "Company XYZ announces Q4 earnings of $1.2 billion, up from $1.1 billion last year."
response = financial_parser(user_input, llm=llm)
print(response)
Similarly, you can use other LLMs like Anthropic or Google:
from langchain_anthropic import ChatAnthropic
from financial_parser import financial_parser
llm = ChatAnthropic()
user_input = "Company XYZ announces Q4 earnings of $1.2 billion, up from $1.1 billion last year."
response = financial_parser(user_input, llm=llm)
print(response)
from langchain_google_genai import ChatGoogleGenerativeAI
from financial_parser import financial_parser
llm = ChatGoogleGenerativeAI()
user_input = "Company XYZ announces Q4 earnings of $1.2 billion, up from $1.1 billion last year."
response = financial_parser(user_input, llm=llm)
print(response)
Using a Custom API Key
You can provide a custom API key for higher rate limits:
from financial_parser import financial_parser
user_input = "Company XYZ announces Q4 earnings of $1.2 billion, up from $1.1 billion last year."
api_key = "your_custom_api_key"
response = financial_parser(user_input, api_key=api_key)
print(response)
Or set the API key via an environment variable:
export LLM7_API_KEY="your_custom_api_key"
Then use the package without passing the API key:
from financial_parser import financial_parser
user_input = "Company XYZ announces Q4 earnings of $1.2 billion, up from $1.1 billion last year."
response = financial_parser(user_input)
print(response)
Input Parameters
user_input(str): The user input text to process.llm(Optional[BaseChatModel]): The LangChain LLM instance to use. If not provided, the default ChatLLM7 will be used.api_key(Optional[str]): The API key for LLM7. If not provided, the default API key will be used.
Default 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 the environment variable LLM7_API_KEY or directly via the api_key parameter.
You can get a free API key by registering at LLM7 Token.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
License
This project is licensed under the MIT License.
Author
- Eugene Evstafev
- Email: hi@euegne.plus
- GitHub: chigwell
Metadata
Release files for financial-parser 2025.12.21115104
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| financial_parser-2025.12.21115104.tar.gz | 5.7 kB | Without provenance | Details for financial_parser-2025.12.21115104.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| financial_parser-2025.12.21115104-py3-none-any.whl | Python 3 | none | any | Details for financial_parser-2025.12.21115104-py3-none-any.whl |
Total release size: 12.1 kB
Release files / financial_parser-2025.12.21115104.tar.gz
| Download URL | financial_parser-2025.12.21115104.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa7aed74fa068d5adaac366c9d01f2e683e935e8c20fc2a70c7978172ccb7477
|
|
BLAKE2b-256 checksum How to use checksums |
1984cf7b6913290b16b56d6163bed6274c05f8f9a5c0de81f90ba80039fb5000
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / financial_parser-2025.12.21115104-py3-none-any.whl
| Download URL | financial_parser-2025.12.21115104-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12bac15959e611bd23e3ab17f75707f811bb12cd536d0b104f0886775e5e34ee
|
|
BLAKE2b-256 checksum How to use checksums |
a4ea74cdb8990ba325177be034342027de7e5a5e3564171f047b3e0f0713c1cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Security for financial-parser 2025.12.21115104
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.