Repository navigation
SQL Agent Tool v0.1.2
馃摝 SQL Agent Tool v0.1.2
This is the initial release of sql-agent-tool, now available on PyPI!
馃敡 Features
- Safe SQL query execution using SQLAlchemy
- Natural language to SQL (via Groq LLM)
- Schema reflection & parameter extraction
- Custom exception handling
- Pytest-based test suite with temporary tables
馃搳 Sample Code
result = sql_tool.process_natural_language_query("Tell me about user named harsh")馃搳 Sample Output
Extracted parameters: {'search_pattern': 'harsh'}
SQL with parameters:
-- Find user by first name or last name
SELECT *
FROM users
WHERE first_name ILIKE :search_pattern
OR last_name ILIKE :search_pattern
LIMIT 500;
-- Parameter: search_pattern = '%harsh%'
Query executed successfully, found 1 results:
{'id': 1, 'first_name': 'Harsh', 'last_name': 'Dadiya', 'email': 'harshd.wappnet@outlook.com', ...}
Developed By - @Dadiya-Harsh, @Dadiya-Harsh-wappnet
馃敆 View on PyPI