A robust package for extracting structured insights from project titles and descriptions using advanced pattern matching with retries. This tool helps developers parse and organize project information (like names, programming languages, and key features) from text snippets without handling raw code, images, or videos.
Install the package via pip:
pip install projects_parser- Structured Extraction: Parses project names, programming languages, and key features from user input.
- Flexible LLM Integration: Works with default
ChatLLM7or any LangChain-compatible LLM (e.g., OpenAI, Anthropic, Google). - Retry Mechanism: Built-in resilience for reliable parsing.
- Regex Validation: Ensures extracted data matches predefined patterns.
from projects_parser import projects_parser
user_input = "A Python web app with Flask and React for data visualization."
response = projects_parser(user_input)
print(response) # Extracted structured dataReplace the default ChatLLM7 with any LangChain-compatible LLM (e.g., OpenAI, Anthropic, Google):
from langchain_openai import ChatOpenAI
from projects_parser import projects_parser
llm = ChatOpenAI()
response = projects_parser(user_input, llm=llm)from langchain_anthropic import ChatAnthropic
from projects_parser import projects_parser
llm = ChatAnthropic()
response = projects_parser(user_input, llm=llm)from langchain_google_genai import ChatGoogleGenerativeAI
from projects_parser import projects_parser
llm = ChatGoogleGenerativeAI()
response = projects_parser(user_input, llm=llm)- Uses
LLM7_API_KEYfrom environment variables or falls back to a default key. - Suitable for most use cases (check LLM7 free tier limits).
Pass your API key directly or via environment variable:
# Directly
response = projects_parser(user_input, api_key="your_api_key_here")
# Via environment variable
os.environ["LLM7_API_KEY"] = "your_api_key_here"
response = projects_parser(user_input)Get a free API key: Register at LLM7.
projects_parser(
user_input: str,
api_key: Optional[str] = None,
llm: Optional[BaseChatModel] = None
) -> List[str]user_input(str): Text containing project details (e.g., title/description).api_key(Optional[str]): LLM7 API key (optional if using environment variable).llm(Optional[BaseChatModel]): Custom LangChain LLM (optional; defaults toChatLLM7).
List[str]: Extracted structured data (e.g., project name, language, features).
- LLM7 Free Tier: Sufficient for most use cases.
- Upgrade: Use a custom API key for higher limits.
MIT License (see LICENSE).
For bugs/feature requests, open an issue on GitHub: 🔗 GitHub Issues
Eugene Evstafev 📧 hi@euegne.plus 🔗 GitHub: chigwell