A natural language interface for querying datasets using LLMs
Project description
QueryBot
A powerful web application that enables users to upload various data formats, execute SQL queries, and download results through an intuitive interface.
Table of Contents
Overview
QueryBot is built with FastAPI for the backend and a responsive HTML/Bootstrap frontend. It provides a seamless experience for data analysis by allowing users to query multiple data sources through a unified SQL interface.
Features
- Multi-format Support: Query CSV, Parquet, SQLite, Excel files, and MySQL databases with a single interface.
- Example: Users can upload a CSV file and query it directly.
- Interactive SQL Editor: Writes and executes SQL queries with syntax highlighting. The application automatically generates DuckDB queries and runs on datasets. It supports multiple files if the paths are provided separated by commas.
- Real-time Results: View query results instantly in a paginated table format
- Export Functionality: Download query results in CSV format for further analysis. Note: Currently, only CSV format is supported for export.
- Responsive Design: Works seamlessly across desktop and mobile devices
Getting Started
Installation
Note: Installation is optional as
uvxwill handle the necessary setup.
pip install querybot
Running the Application
- Start the application with a single command using
uv:uvx querybot - Open your web browser and navigate to http://localhost:8001 to access the QueryBot interface.
Usage
-
Upload Data: Use the interface to specify data sources by:
- Entering file paths (multiple paths can be separated by commas, without quotes)
- Uploading files directly through the browser
-
Supported Data Formats:
- CSV files (
.csv) - Parquet files (
.parquet) - SQLite databases (
.db) - Excel spreadsheets (
.xlsx) - External MySQL databases (from relational-data.org)
- CSV files (
-
Execute Queries: Write SQL queries in the editor and click "Run Query" to see results.
-
Export Results: Download query results as CSV files for further analysis or reporting.
Project Structure
/querybot
│
├── querybot # Main package directory
│ ├── app.py # FastAPI application entry point
│ ├── __init__.py # Package initialization
│ ├── static # Static assets
│ │ ├── index.html # Main frontend interface
│ │ └── js # JavaScript resources
│ │ └── script.js # Frontend functionality
├── pyproject.toml # Project metadata and dependencies
├── .gitignore # Git ignore configuration
├── uv.lock # Dependency lock file
├── README.md # Project documentation
Development
Prerequisites
- Python 3.8+
Setting Up Development Environment
-
Clone the repository:
git clone https://github.com/gramener/querybot.git cd querybot
-
Install dependencies:
pip install -e ".[dev]"
License
This project is licensed under the MIT License - see the LICENSE file for details.
Additional Resources
Query Result
Contribution Guidelines
We welcome contributions! Please see our CONTRIBUTING.md for more details.
FAQ
Q: What data formats are supported? A: The application supports CSV, Parquet, SQLite, Excel, and MySQL formats.
Q: How do I report an issue? A: Please use the Issue Tracker to report any issues you encounter.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file querybot-0.1.6.tar.gz.
File metadata
- Download URL: querybot-0.1.6.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.27
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53cf617f151b36e6a3af21d0b89c980f5ea70bab4032d56988da221aa5f2ca63
|
|
| MD5 |
ecac423df5a8ae3301448086c4a6e2a8
|
|
| BLAKE2b-256 |
fcac360aee7c5e204c6a54e7109645bf1777b111e168ce90bf1614e33da20f49
|
File details
Details for the file querybot-0.1.6-py3-none-any.whl.
File metadata
- Download URL: querybot-0.1.6-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.27
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18672203095fa76b829a5ca77beb8a950c8e01293ded18fd4a4db23c1169b4f4
|
|
| MD5 |
3640898bb8c5e067654bb699156d4dac
|
|
| BLAKE2b-256 |
b52c7a037d5c153b2407976ec336b8198f74b53fc7f1b5f852d6a1c1f5d8b21a
|