Skip to content

SQL Agent Tool v0.1.1

Choose a tag to compare

@Dadiya-Harsh Dadiya-Harsh released this 08 Apr 11:50
· 50 commits to main since this release

馃摝 SQL Agent Tool v0.1.1

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 Output

result = sql_tool.process_natural_language_query("Tell me about user named harsh")
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

馃敆 [View on PyPI]

Full Changelog: https://github.com/Dadiya-Harsh/sql-tool/commits/v0.1.1