A lightweight Flask app to explore PostgreSQL commands with examples and built-in web interface.
Explore the docs »
View Demo
.
Report Bug
.
Request Feature
PostgreSQL Help is a simple Flask-based web application that allows users to:
- View and learn PostgreSQL commands and examples.
- Use an interactive interface built with Flask.
- Store queries and resources using SQLAlchemy ORM.
- Run with PostgreSQL or fall back to SQLite with zero config.
Whether you're a beginner learning SQL or a dev needing a quick command reference — this app helps you get started fast.
- Python 3.7+
- pip
git clone https://github.com/MithraReddy855/PostgreSQL-Help.git
cd PostgreSQL-Help(Optional) create and activate a virtual environment:
Linux/macOS:
python -m venv venv
source venv/bin/activateWindows:
python -m venv venv
venv\Scripts\activateThen install the required packages:
pip install -r requirements.txtflask==3.1.1
flask_sqlalchemy==3.1.1
requests==2.32.3
bs4==0.0.2
beautifulsoup4==4.13.4
By default, the app uses SQLite:
app.config["SQLALCHEMY_DATABASE_URI"] = os.environ.get("DATABASE_URL", "sqlite:///postgresql_agent.db")If you want to use PostgreSQL:
- Create a PostgreSQL database (e.g.,
mydb) - Export the database URL as an environment variable:
Linux/macOS:
export DATABASE_URL=postgresql://username:password@localhost/mydbWindows (CMD):
set DATABASE_URL=postgresql://username:password@localhost/mydbSet the Flask entry point:
Linux/macOS:
export FLASK_APP=app.pyWindows:
set FLASK_APP=app.pyRun the app:
flask runVisit http://127.0.0.1:5000 in your browser.
Use this app as a PostgreSQL learning guide and quick reference for:
- DDL/DML commands
- Query syntax examples
- Copying tested commands quickly
You can also extend the app with your own query modules or interface.
- Add SQLite fallback
- PostgreSQL dynamic connection
- Add command categorization by topic
- Enable query execution for sandbox DB
- User login for saving favorites
See the issues page for more.
Contributions are welcome! 🎉
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Star the repo ⭐ if it helped you — it motivates more updates!
Mithra Reddy
GitHub
Email: raghumithrareddy@gmail.com
Project Link: https://github.com/MithraReddy855/PostgreSQL-Help