historical-scam-summary
Extract structured, domain‑specific summaries from a single sentence or title.
The package turns unstructured text (e.g., “How Scams Worked In The 1800s (2015)”) into a concise, standardized output that lists key historical scams, their mechanisms, and societal impact—all without any additional manual parsing.
Features
- Uses
llmatch-messagesto enforce an output regex and recover only the relevant information. - Defaults to the free tier of ChatLLM7 via the
langchain_llm7wrapper. - Works with any LangChain LLM instance – OpenAI, Anthropic, Google Generative AI, or custom models.
- Returns a
List[str]– one string per extracted entity (scam, scheme, etc.).
Installation
pip install historical_scam_summary
Quick Start
from historical_scam_summary import historical_scam_summary
# Minimal usage – relies on ChatLLM7 (free tier)
response = historical_scam_summary(user_input="How Scams Worked In The 1800s (2015)")
print(response) # e.g. ["Confidence trick (3800s): ...", "..."]
Custom LLM
If you prefer another provider, instantiate the desired LangChain model and pass it to the function:
OpenAI
from langchain_openai import ChatOpenAI
from historical_scam_summary import historical_scam_summary
llm = ChatOpenAI() # <-- provide your own API key via env var or param
response = historical_scam_summary(user_input="Masonic scams of 1920s", llm=llm)
Anthropic
from langchain_anthropic import ChatAnthropic
from historical_scam_summary import historical_scam_summary
llm = ChatAnthropic()
response = historical_scam_summary(user_input="Pyramid schemes in the 1980s", llm=llm)
Google Generative AI
from langchain_google_genai import ChatGoogleGenerativeAI
from historical_scam_summary import historical_scam_summary
llm = ChatGoogleGenerativeAI() # set `api_key` via environment
response = historical_scam_summary(user_input="Early Ponzi schemes", llm=llm)
Configuration
| Parameter | Type | Description |
|---|---|---|
user_input |
str |
The raw text to process (title, sentence, etc.). |
llm |
Optional[BaseChatModel] |
LangChain LLM instance to use. If omitted, the default ChatLLM7 is instantiated. |
api_key |
Optional[str] |
API key for ChatLLM7. Either pass it directly or set the environment variable LLM7_API_KEY. |
Note
The default free tier of ChatLLM7 is sufficient for most use cases. If you require higher rate limits, supply your own key.
Getting an LLM7 API Key
Register for a free key at https://token.llm7.io/.
You can then provide it via:
export LLM7_API_KEY="YOUR_KEY"
or directly in code:
historical_scam_summary(user_input="...", api_key="YOUR_KEY")
Issues & Contribution
- Open an issue or submit a pull request via the GitHub repo:
https://github.com/chigwell/historical_scam_summary - Contributions are welcome! Please follow the standard PR process.
Author
Eugene Evstafev
hi@euegne.plus
GitHub: chigwell
License
MIT © 2025 Eugene Evstafev
Metadata
Release files for historical-scam-summary 2025.12.21102119
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 |
|---|---|---|---|---|
| historical_scam_summary-2025.12.21102119.tar.gz | 5.0 kB | Without provenance | Details for historical_scam_summary-2025.12.21102119.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| historical_scam_summary-2025.12.21102119-py3-none-any.whl | Python 3 | none | any | Details for historical_scam_summary-2025.12.21102119-py3-none-any.whl |
Total release size: 10.7 kB
Release files / historical_scam_summary-2025.12.21102119.tar.gz
| Download URL | historical_scam_summary-2025.12.21102119.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed2860f0d315cf296dba379308bd27432c79c374f92a3425d8556667e1de13f8
|
|
BLAKE2b-256 checksum How to use checksums |
718ac33094183b5c7a7715606ae0d05ece247c190a567a373c9db25a8360e0ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / historical_scam_summary-2025.12.21102119-py3-none-any.whl
| Download URL | historical_scam_summary-2025.12.21102119-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5477c1909405acbe8ac9657c363a4b73fce50d37204ab2371a26484f7ed0fcb0
|
|
BLAKE2b-256 checksum How to use checksums |
ad70a5ecd352534b72b533134c8de41623a3e6de7f45eec56b3968eae59ea030
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Security for historical-scam-summary 2025.12.21102119
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.