This is a very simple implementation of postgres database in python.
To Install dbview on your local machine, you can clone the repo and download the requirements
git clone https://github.com/newtoallofthis123/dbview.git
cd dbview
pip3 install -r requirements.txt
Now, open up stuff.json and enter your password, username and port.
Now to lauch dbview, just go
python3 db.py
It uses the rich library in python to render the results in a beautiful UI.
The python library psycopg2 is used to interact with the postgres database
You can use db view to store a variety of things. All you need to do is change the source code to suit your needs.
By default, the table structure is
cursor.execute("""
CREATE TABLE IF NOT EXISTS main(
name TEXT NOT NULL,
url TEXT NOT NULL,
author TEXT,
hash TEXT NOT NULL,
date TIMESTAMP;
""")
You can customize this anytime to your need.
To use dbview, you must have postgres installed on your system.
You can get postgres from here
-
Python
-
Rich
-
Postgres
So, hope you like it. If you do, please be sure to leave a star and fork my repo to get your own dbview.
NoobScience 2022