impact_parser
A Python package for parsing text input to extract and structure information about service disruptions and restorations.
Overview
This package takes text input describing incidents like power outages, internet disruptions, or transportation delays, and returns a structured output with key details such as the affected area, number of impacted users, cause of the disruption, and estimated restoration time.
Installation
pip install impact_parser
Usage
from impact_parser import impact_parser
response = impact_parser(
user_input="The power outage occurred in the downtown area due to a storm, affecting 1000 homes and businesses. Estimated restoration time is 2 hours.",
api_key=None,
llm=None,
)
print(response)
Parameters
user_input: The text input to processllm: The Langchain LLM instance to use (optional, defaults toChatLLM7with no API key)api_key: The API key for LLM7 (optional, defaults toNone)
LLM Options
You can safely pass your own LLM instance (based on https://docs.langchain.io/) if you want to use another LLM.
Examples:
from langchain_openai import ChatOpenAI
from impact_parser import impact_parser
llm = ChatOpenAI()
response = impact_parser(user_input, llm=llm)
from langchain_anthropic import ChatAnthropic
from impact_parser import impact_parser
llm = ChatAnthropic()
response = impact_parser(user_input, llm=llm)
from langchain_google_genai import ChatGoogleGenerativeAI
from impact_parser import impact_parser
llm = ChatGoogleGenerativeAI()
response = impact_parser(user_input, llm=llm)
LLM7 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 for LLM7, you can pass your own API key via environment variable LLM7_API_KEY or via passing it directly like impact_parser(user_input, api_key="your_api_key").
To get a free API key, register at https://token.llm7.io/
Issues
Refer to the GitHub issues page: https://github.com/chigwell/impact-parser/issues
Author
Eugene Evstafev eugene@eugene.plus
Metadata
Release files for impact-parser 2025.12.21202313
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| impact_parser-2025.12.21202313.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| impact_parser-2025.12.21202313-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.2 kB
Release files / impact_parser-2025.12.21202313.tar.gz
| Download URL | impact_parser-2025.12.21202313.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33d5c99cfb50772af8591a0a6f7adecc8a2d1dc7ff74547db3a08544cdc5548b
|
|
BLAKE2b-256 checksum How to use checksums |
c360ac508349d9f5f28a6052fa2851a6fae5ce9b5945268e9649af52061519d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / impact_parser-2025.12.21202313-py3-none-any.whl
| Download URL | impact_parser-2025.12.21202313-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
226e91e19f681829bf3255b6a09f81b91833e8fab4be14c0f69ea512c54759a2
|
|
BLAKE2b-256 checksum How to use checksums |
c6c4d5411f39756f104cbd93d9a2733d2126539cf0e9090dab9dcd050ddc99f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|