text2structured
Transform unstructured text inputs into structured, actionable insights using advanced language models.
Overview
This package is designed to leverage the capabilities of langchain's messages to transform text inputs into structured, actionable insights. It uses the ChatLLM7 model from langchain_llm7 by default, but allows users to pass their own langchain llm instance for custom LLM usage.
Installation
pip install text2structured
Usage
from text2structured import text2structured
user_input = "How Hurricanes Became a Hot Investment"
response = text2structured(user_input)
Parameters
user_input: the user input text to process (str)llm: the langchain llm instance to use, if not provided the default ChatLLM7 will be used (Optional[BaseChatModel])api_key: the api key for llm7, if not provided the default rate limits for LLM7 free tier will be used (Optional[str])
Custom LLM usage
You can safely pass your own langchain llm instance to use a custom LLM. For example to use the openai model:
from langchain_openai import ChatOpenAI
from text2structured import text2structured
llm = ChatOpenAI()
response = text2structured(user_input, llm=llm)
Similarly you can use anthropic or google models with their respective packages:
# with anthropic model
from langchain_anthropic import ChatAnthropic
from text2structured import text2structured
llm = ChatAnthropic()
response = text2structured(user_input, llm=llm)
# with google model
from langchain_google_genai import ChatGoogleGenerativeAI
from text2structured import text2structured
llm = ChatGoogleGenerativeAI()
response = text2structured(user_input, llm=llm)
Default rate limits
The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you need higher rate limits you can get a free api key by registering at https://token.llm7.io/. You can pass your api key via environment variable LLM7_API_KEY or directly to the text2structured function:
text2structured(user_input, api_key="your_api_key")
Documentation
For more information about the(ChatLLM7) model and its API, please refer to the langchain_llm7 documentation and the langchain documentation.
GitHub Issues
Open issues on GitHub.
Author
Eugene Evstafev (hi@eugene.plus).
Social media
License
Metadata
Release files for text2structured 2025.12.20175536
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| text2structured-2025.12.20175536.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| text2structured-2025.12.20175536-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / text2structured-2025.12.20175536.tar.gz
| Download URL | text2structured-2025.12.20175536.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1aec82550de2eaee1a3d9a9aa20c39b097aa3a61febb3d1bf3348b2216f06688
|
|
BLAKE2b-256 checksum How to use checksums |
8a17f40bb3c4e0032af02ad9da97fd8f313683810dcf00a06dc333d08a65affa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / text2structured-2025.12.20175536-py3-none-any.whl
| Download URL | text2structured-2025.12.20175536-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f38b9892a74cbfb86d6185e1dd18dd0ae888154742b5b1abae130c07382eec80
|
|
BLAKE2b-256 checksum How to use checksums |
65d78fc69ef31f0ac08155a01d107ce8b873971a6197443d8f631f8a8333606d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|