Skip to main content

stackexchange-...

PyPI version License: MIT Downloads LinkedIn

StackExchange Q Count – A lightweight helper to quickly obtain the monthly volume of questions asked on any Stack Exchange site.


Features

  • Fast execution – Uses an LLM to parse the user’s natural‑language query and return a precise count.
  • Zero‑config – If you have an environment variable LLM7_API_KEY, the package will automatically pick it up.
  • Extensible – Pass your own BaseChatModel instance (OpenAI, Anthropic, Google GenAI, etc.) to use an alternative LLM.
  • Easy error handling – The function returns a list of strings containing the extracted answers or throws an informative exception.

Installation

pip install stackexchange-...

Quick start

from stackexchange_... import stackexchange_...

# Simple call using the default ChatLLM7
result = stackexchange_(...user_input="How many questions were asked on Stack Overflow in the last 6 months?")
print(result)

Tip: In the examples below, replace stackexchange_... and stackexchange_... with the real package and function names once you publish it (e.g. stackexchange_q).


Parameters

Parameter Type Description
user_input str The query to be processed.
llm Optional[BaseChatModel] A LangChain LLM instance to use. If omitted, the default ChatLLM7 is instantiated.
api_key Optional[str] LLM7 API key. If omitted, the package will look for LLM7_API_KEY in the environment.

Using a Custom LLM

LLM Example
OpenAI python<br>from langchain_openai import ChatOpenAI<br>from stackexchange_... import stackexchange_...<br>llm = ChatOpenAI()<br>response = stackexchange_(..., llm=llm)<br>
Anthropic python<br>from langchain_anthropic import ChatAnthropic<br>from stackexchange_... import stackexchange_...<br>llm = ChatAnthropic()<br>response = stackexchange_(..., llm=llm)<br>
Google Generative AI python<br>from langchain_google_genai import ChatGoogleGenerativeAI<br>from stackexchange_... import stackexchange_...<br>llm = ChatGoogleGenerativeAI()<br>response = stackexchange_(..., llm=llm)<br>

Rate Limits and API Key

  • LLM7 free tier is sufficient for most use‑cases.
  • For higher limits, provide your own key: stackexchange_(..., api_key="YOUR_KEY").
  • You can also set the key via the environment variable LLM7_API_KEY.
  • Obtain a free API key by registering at https://token.llm7.io/.

Author

Eugene Evstafev
Email: hi@euegne.plus
GitHub: chigwell


Issues

If you encounter any bugs or have feature requests, open an issue on GitHub:
https://github.com/chigwell/stackexchange-.../issues


License

MIT License – see the LICENSE file for details.

Metadata

Release files for stackexchange-question-analyzer 2025.12.21142930

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

Source distribution (sdist)

Source distribution for stackexchange-question-analyzer 2025.12.21142930
File Size Uploaded
stackexchange_question_analyzer-2025.12.21142930.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stackexchange-question-analyzer 2025.12.21142930
File Interpreter ABI Platform
stackexchange_question_analyzer-2025.12.21142930-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / stackexchange_question_analyzer-2025.12.21142930.tar.gz

Download URL stackexchange_question_analyzer-2025.12.21142930.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cc2a49208577d2f5322dea487a2a7673a31849adaa049144b844e170821ceecd
BLAKE2b-256 checksum
How to use checksums
3955ad6fbe679a01a17dbd26cf49e38fda3c3ad5eca8edef9ac16b7deb327f51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / stackexchange_question_analyzer-2025.12.21142930-py3-none-any.whl

Download URL stackexchange_question_analyzer-2025.12.21142930-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8cb878b817477ad046ce1a89e3dcca46af221d58da0dea6d9a348ba907a63cd
BLAKE2b-256 checksum
How to use checksums
c8b8202f34ac0b09c4c804e4bb04765745e4a7140f44e50fedc6707a2268bc18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

2025.12.21142930 This release

2 release files

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