Skip to main content

insightminer

PyPI version License: MIT Downloads LinkedIn

insightminer is a lightweight Python package that extracts and structures key insights from opinionated articles, blog posts, tweets, and other short texts. It leverages the llmatch‑messages library together with a language model (LLM) to parse free‑form input into a predefined, regex‑validated structure, making downstream analysis (sentiment, trend tracking, etc.) straightforward and consistent.


✨ Features

  • One‑function interface – Call insightminer() with your text and get a list of extracted fields.
  • Built‑in LLM – Uses ChatLLM7 from the langchain_llm7 package by default (free tier suitable for most workloads).
  • Pluggable LLM – Pass any LangChain‑compatible chat model (OpenAI, Anthropic, Google, etc.) if you prefer a different provider.
  • Regex‑driven pattern matching – Guarantees that the output conforms to the pattern you define.
  • Simple installation – Available on PyPI.

📦 Installation

pip install insightminer

🚀 Quick Start

from insightminer import insightminer

user_input = "I Wouldn't Want John Solomon's New CMO Job at Mozilla"
results = insightminer(user_input)

print(results)
# Example output: ['John Solomon', 'new CMO job', 'Mozilla']

Parameters

Parameter Type Description
user_input str The text to be processed (e.g., a blog post title, tweet, etc.).
llm Optional[BaseChatModel] A LangChain chat model instance. If omitted, the default ChatLLM7 is used.
api_key Optional[str] API key for LLM7. If omitted, the function reads the LLM7_API_KEY environment variable or falls back to the default key ("None").

🔧 Using a Custom LLM

You can safely replace the default ChatLLM7 with any LangChain‑compatible chat model.

OpenAI

from langchain_openai import ChatOpenAI
from insightminer import insightminer

llm = ChatOpenAI()
response = insightminer("Your text here", llm=llm)
print(response)

Anthropic

from langchain_anthropic import ChatAnthropic
from insightminer import insightminer

llm = ChatAnthropic()
response = insightminer("Your text here", llm=llm)
print(response)

Google Generative AI

from langchain_google_genai import ChatGoogleGenerativeAI
from insightminer import insightminer

llm = ChatGoogleGenerativeAI()
response = insightminer("Your text here", llm=llm)
print(response)

🔑 LLM7 API Key

  • Default behaviour: The function looks for an environment variable LLM7_API_KEY.
  • Providing manually: Pass api_key="YOUR_KEY" when calling insightminer.
  • Free tier: Sufficient for typical usage of this package.
  • Get a key: Register for free at https://token.llm7.io/.

📚 Documentation & References


🐞 Issues & Contributions

If you encounter bugs or have feature requests, please open an issue:

https://github....

Pull requests are welcome! Follow the standard GitHub workflow and ensure tests (if any) pass before submitting.


✉️ Author

Eugene Evstafev – hi@euegne.plus
GitHub: chigwell


📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for insightminer 2025.12.21123144

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

Source distribution (sdist)

Source distribution for insightminer 2025.12.21123144
File Size Uploaded Provenance Actions
insightminer-2025.12.21123144.tar.gz 5.8 kB Without provenance Details for insightminer-2025.12.21123144.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for insightminer 2025.12.21123144
File Interpreter ABI Platform Actions
insightminer-2025.12.21123144-py3-none-any.whl Python 3 none any Details for insightminer-2025.12.21123144-py3-none-any.whl

Total release size: 12.3 kB

Release files / insightminer-2025.12.21123144.tar.gz

Download URL insightminer-2025.12.21123144.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7fb8e1620cfc9deeeeb9e87d36f864234e55098cce1f0bb1e69e36b188083cb1
BLAKE2b-256 checksum
How to use checksums
c99030917fa18430cd5e14c690f7ca9a22dbb717bcc745a56ad57df030157cda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / insightminer-2025.12.21123144-py3-none-any.whl

Download URL insightminer-2025.12.21123144-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae316072d053e0849ebb0fdcfa72d3fc928ae272d8ab9cb6584ca3c76ff03f49
BLAKE2b-256 checksum
How to use checksums
97543baf5f9f2ec523efb91bd23cfa71a2d0b41465093aab00e56590f22146e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Security for insightminer 2025.12.21123144

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.

Release history Release notifications | RSS feed

This release
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