A new package designed to transform raw text inputs into structured, meaningful outputs using advanced language models. This package leverages the capabilities of llmatch-messages to ensure that the r
Project description
textstructify
textstructify is a Python package designed to transform raw text inputs into structured, meaningful outputs using advanced language models. It leverages the llmatch-messages framework to ensure responses are consistent and properly formatted. Ideal for applications requiring extraction of key points, summaries, or specific text formatting.
Installation
Install from PyPI:
pip install textstructify
Usage
Import the package and call the main function as shown:
from textstructify import textstructify
response = textstructify(
user_input="Your raw text input here",
api_key="your_llm7_api_key" # optional if LLM is specified
)
print(response)
Parameters
- user_input (str): The input text string to process.
- llm (Optional[BaseChatModel]): An instance of a language model from langchain. If None, the default ChatLLM7 is used.
- api_key (Optional[str]): API key for LLM7. If not provided, will attempt to read from environment variable
LLM7_API_KEYor will use the default.
Using custom LLMs
You can pass your own LLM instances compatible with langchain. For example:
from langchain_openai import ChatOpenAI
from textstructify import textstructify
llm = ChatOpenAI()
response = textstructify(user_input="Your text here", llm=llm)
Similarly, with other supported LLMs like Anthropic or Google Generative AI:
from langchain_anthropic import ChatAnthropic
from textstructify import textstructify
llm = ChatAnthropic()
response = textstructify(user_input="Your text here", llm=llm)
from langchain_google_genai import ChatGoogleGenerativeAI
from textstructify import textstructify
llm = ChatGoogleGenerativeAI()
response = textstructify(user_input="Your text here", llm=llm)
Notes
- The default rate limits for LLM7's free tier are sufficient for most use cases.
- For higher rate limits, supply an API key via environment variable
LLM7_API_KEYor directly in the function call. - Obtain a free API key at https://token.llm7.io/.
References
Author
Eugene Evstafev
Email: hi@eugene.plus
GitHub: chigwell
Issue Tracker
Report issues at: https://github.com/chigwell/textstructify/issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file textstructify-2025.12.21083245.tar.gz.
File metadata
- Download URL: textstructify-2025.12.21083245.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d266ed47c090ebbea915a677b496eb8fd104ade4105fbf8e2f56ba1bc77b0958
|
|
| MD5 |
750be01ae9f0c4d67bb6ce926876eaba
|
|
| BLAKE2b-256 |
222b32640bde1998e512b603cc672ccd184a68fd99d9975c423e6de4d52b3e78
|
File details
Details for the file textstructify-2025.12.21083245-py3-none-any.whl.
File metadata
- Download URL: textstructify-2025.12.21083245-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a4ee7a0f4a461fc770dd60a59853b435c2e9a00c92b2a0d8f442eead6bc1630
|
|
| MD5 |
f9c4b49e388040cda42a64ca7160e504
|
|
| BLAKE2b-256 |
2f9b710e26fc90053a22ad14db96596ee1018d33856c1e670136713c7904e480
|