CoolFace
Apppublic

Vaijayanth-sheri/postgres-console

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
App README

Postgres Console (Org SQL Dashboard)

A lightweight, web-based PostgreSQL database console and dashboard built with Streamlit. It allows you to connect to your PostgreSQL databases (including serverless platforms like Neon), browse schemas, execute custom SQL queries, and download the full results as CSV or Excel.

Features

  • Connect to PostgreSQL: Securely connect to your PostgreSQL database.
  • Schema & Table Browser: Automatically browse through schemas and tables.
  • SQL Editor: Run custom SQL queries with a convenient text editor.
  • Data Preview & Export: Preview data with row limits and download the full dataset as CSV or Excel.

Local Development

  1. 1.Clone the repository:
bash
   git clone <your-repo-url>
   cd Postgres_console
  1. 1.Install dependencies:
bash
   pip install -r requirements.txt
  1. 1.Setup your secrets (optional): Create a .streamlit/secrets.toml file with your database credentials (this file is ignored by git):
toml
   [db_credentials]
   host = "your_host"
   port = "5432"
   dbname = "your_db"
   user = "your_user"
   password = "your_password"
  1. 1.Run the app:
bash
   streamlit run app.py

Deployment on Hugging Face Spaces

This project includes a Dockerfile customized for Hugging Face Spaces. When creating a new Space on Hugging Face, select Docker as the Space SDK. The Space will automatically build and run the container.