Skip to main content

SQL agent, query your database

Project description

SQL Agent Library

Overview

The SQL Agent Library allows users to interact with SQL databases using natural human language. With this library, users can simply describe what data they want to retrieve or manipulate, and the library will convert these descriptions into precise SQL queries and execute them. This simplifies database interactions for those who may not be familiar with SQL syntax but need to access and manage data.

Features

  • Natural Language Processing: Convert human language queries into SQL statements.
  • Database Agnostic: Works with various SQL databases (MySQL, PostgreSQL, SQLite, etc.).
  • Ease of Use: Simple input-output mechanism to facilitate quick querying.
  • Flexibility: Handles a variety of query types including SELECT, INSERT, UPDATE, and DELETE.

Installation

To install the SQL Agent Library, use pip:

pip install sqlagent

Usage

Here's a quick example to get you started:

Step 1: Initiate instance

# Create an instance of the SQLAgent
from sqlagent.agent import SQLAgent
agent = SQLAgent(db_connection_string="your_database_connection_string")

Step 2: Query the Database

await agent.arun("how many tables are there in my db ?")

Configuration

You can configure the SQL Agent Library to connect to your specific database by providing the appropriate connection string during initialization. it's utilizing sqlachemy under the hood

Supported Databases

  • MySQL
  • PostgreSQL
  • SQLite

Contributing

Contributions are welcome! Please read the CONTRIBUTING.md for guidelines on how to contribute to this project.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

We'd like to thank all contributors and supporters of this project. Your efforts help make database interactions simpler for everyone.

Contact

For any questions or issues, please open an issue on GitHub or contact us at vikyw89@gmail.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqlagent2-1.0.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sqlagent2-1.0.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file sqlagent2-1.0.2.tar.gz.

File metadata

  • Download URL: sqlagent2-1.0.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.6 Darwin/22.5.0

File hashes

Hashes for sqlagent2-1.0.2.tar.gz
Algorithm Hash digest
SHA256 33a9a57e1a0146a36b8c0dc8930ec40f63f21c1d8e9a5f89bf18dc32e3f44ba3
MD5 d3f2766c907c41cff1d9b81316889df3
BLAKE2b-256 85c735ef1fcb494ae4a2327ae7535601764e154892c9ad5d6cc3c706540a76ad

See more details on using hashes here.

File details

Details for the file sqlagent2-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: sqlagent2-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.6 Darwin/22.5.0

File hashes

Hashes for sqlagent2-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 370535ca11167998e10e8426cbd28529e6b0fc690a44a1b59f1b1b05cbf51fd6
MD5 9332c8949b77ce271bb576d62af68242
BLAKE2b-256 ce9e439b255cada9cc11b1c6ba74af6cfd707c4be748b2be244292a5a699d5a4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page