StructuredSnip
StructuredSnip is a Python package that takes unstructured text input from users and returns structured, categorized feedback or suggestions. It uses pattern matching to ensure responses follow a consistent format, such as extracting key points, summarizing content, or organizing ideas into predefined sections.
Features
- Pattern Matching: Ensures responses follow a consistent format.
- Customizable LLM: Uses
ChatLLM7by default but can be customized with anyBaseChatModelfrom LangChain. - Flexible Input: Accepts user input text and processes it into structured output.
- Error Handling: Provides detailed error messages for failed LLM calls.
Installation
pip install structuredsnip
Usage
Basic Usage
from structuredsnip import structuredsnip
user_input = "Your unstructured text here."
response = structuredsnip(user_input)
print(response)
Using a Custom LLM
You can use any LLM compatible with LangChain's BaseChatModel. Here are examples using different LLMs:
Using OpenAI
from langchain_openai import ChatOpenAI
from structuredsnip import structuredsnip
llm = ChatOpenAI()
response = structuredsnip(user_input, llm=llm)
print(response)
Using Anthropic
from langchain_anthropic import ChatAnthropic
from structuredsnip import structuredsnip
llm = ChatAnthropic()
response = structuredsnip(user_input, llm=llm)
print(response)
Using Google
from langchain_google_genai import ChatGoogleGenerativeAI
from structuredsnip import structuredsnip
llm = ChatGoogleGenerativeAI()
response = structuredsnip(user_input, llm=llm)
print(response)
Using an API Key
You can pass an API key directly or via an environment variable.
Passing API Key Directly
from structuredsnip import structuredsnip
user_input = "Your unstructured text here."
api_key = "your_api_key_here"
response = structuredsnip(user_input, api_key=api_key)
print(response)
Using Environment Variable
export LLM7_API_KEY="your_api_key_here"
from structuredsnip import structuredsnip
user_input = "Your unstructured text here."
response = structuredsnip(user_input)
print(response)
Parameters
- user_input (str): The user input text to process.
- llm (Optional[BaseChatModel]): The LangChain LLM instance to use. Defaults to
ChatLLM7. - api_key (Optional[str]): The API key for LLM7. If not provided, it will use the environment variable
LLM7_API_KEY.
Rate Limits
The default rate limits for LLM7's 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 api_key parameter or the LLM7_API_KEY environment variable. You can get a free API key by registering at LLM7.
Issues
If you encounter any issues, please report them on the GitHub issues page.
Author
- Eugene Evstafev
- Email: hi@eugene.plus
- GitHub: chigwell
Metadata
Release files for structuredsnip 2025.12.21115854
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 |
|---|---|---|---|---|
| structuredsnip-2025.12.21115854.tar.gz | 6.6 kB | Without provenance | Details for structuredsnip-2025.12.21115854.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| structuredsnip-2025.12.21115854-py3-none-any.whl | Python 3 | none | any | Details for structuredsnip-2025.12.21115854-py3-none-any.whl |
Total release size: 13.7 kB
Release files / structuredsnip-2025.12.21115854.tar.gz
| Download URL | structuredsnip-2025.12.21115854.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7959e096b8878e47a5d3a4da29b30a15ff99c422bd4b3e76b5836f982daf168
|
|
BLAKE2b-256 checksum How to use checksums |
4eeee5a5e65a3d147e3e9b2f4e7be6e6958e2fe1d87d739c66b865035b0b97e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / structuredsnip-2025.12.21115854-py3-none-any.whl
| Download URL | structuredsnip-2025.12.21115854-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eddf15bf0eee8d00375cb744501a4316b490faf403d54f5e6893d0a455087567
|
|
BLAKE2b-256 checksum How to use checksums |
d77e2748561d85835f76c27e8b2f72276ee557be90b8e97527e8a5b52a98ac3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Security for structuredsnip 2025.12.21115854
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.