Welcome to the PSQL Query Builder! This project allows you to generate and run PostgreSQL queries using natural language inputs. Built with AI and compatible with LangChain, it simplifies database interactions.
- Natural Language Processing: Convert your natural language queries into SQL with ease.
- AI Integration: Leverage AI to enhance your query-building experience.
- LangChain Compatibility: Seamlessly integrate with LangChain for advanced functionalities.
- PostgreSQL Support: Directly interact with PostgreSQL databases.
- Easy to Use: Designed for both beginners and experienced developers.
To get started, clone the repository and install the necessary dependencies. Run the following commands in your terminal:
git clone https://github.com/gmilrod/psql-query-builder.git
cd psql-query-builder
pip install -r requirements.txt
Make sure you have Python and pip installed on your machine.
Once you have installed the package, you can start generating SQL queries. Here’s a simple example to get you started:
from psql_query_builder import QueryBuilder
# Initialize the QueryBuilder
qb = QueryBuilder()
# Generate a query
query = qb.generate("Show me all users who signed up last month")
print(query)
This will output a valid SQL query that you can run against your PostgreSQL database.
Here are some more examples of how you can use the PSQL Query Builder:
-
Get User Information:
query = qb.generate("List all users with their email addresses") print(query)
-
Count Records:
query = qb.generate("How many products are in stock?") print(query)
-
Join Tables:
query = qb.generate("Show orders with user details") print(query)
These examples illustrate how natural language can easily translate into SQL commands, making database management more intuitive.
We welcome contributions! If you want to improve this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push to your branch.
- Open a pull request.
Please ensure your code adheres to our coding standards and includes tests where applicable.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any inquiries or feedback, please reach out via GitHub Issues.
To download the latest version of the PSQL Query Builder, visit our Releases section. Be sure to check for updates regularly.
The PSQL Query Builder simplifies database interactions by allowing users to generate SQL queries through natural language. With its AI capabilities and LangChain compatibility, it serves as a powerful tool for developers and data analysts alike.
Feel free to explore the repository, contribute, and help us improve this project. Your feedback is valuable to us!
Thank you for checking out the PSQL Query Builder! Happy querying!