Skip to main content

textstructify

PyPI version License: MIT Downloads LinkedIn

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_KEY or 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_KEY or 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

Metadata

Release files for textstructify 2025.12.21083245

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

Source distribution (sdist)

Source distribution for textstructify 2025.12.21083245
File Size Uploaded
textstructify-2025.12.21083245.tar.gz 4.3 kB Details

Built distribution (wheel)

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

Total release size: 9.2 kB

Release files / textstructify-2025.12.21083245.tar.gz

Download URL textstructify-2025.12.21083245.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d266ed47c090ebbea915a677b496eb8fd104ade4105fbf8e2f56ba1bc77b0958
BLAKE2b-256 checksum
How to use checksums
222b32640bde1998e512b603cc672ccd184a68fd99d9975c423e6de4d52b3e78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.11

Release files / textstructify-2025.12.21083245-py3-none-any.whl

Download URL textstructify-2025.12.21083245-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a4ee7a0f4a461fc770dd60a59853b435c2e9a00c92b2a0d8f442eead6bc1630
BLAKE2b-256 checksum
How to use checksums
2f9b710e26fc90053a22ad14db96596ee1018d33856c1e670136713c7904e480
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

2025.12.21083245 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