You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 24, 2025. It is now read-only.
Well, this is a simple CRUD CLI with PostgreSQL. I made this project to help others learn more about PostgreSQL driver for Python and how to create beautiful and interactive CLI's with Python.
4
+
5
+
Well it is basically a book mark manager, you can add, edit, delete and list your bookmarks.
6
+
7
+
It is called the Query DB btw.
8
+
9
+
## What you can learn
10
+
11
+
I highly recommend you try and read through the code.
12
+
As a beginner, it is far easier to read code that is more like what you would write yourself, and this is a good example of that.
13
+
It doesn't use any advanced Python features, and it doesn't use any advanced SQL features either.
14
+
15
+
So, no classes, confusing context managers, or anything like that.
16
+
Just plain old functions and SQL.
17
+
18
+
So, if you are a beginner, you can learn:
19
+
20
+
- Asking better input from the user
21
+
- Using PostgreSQL with Python
22
+
- Creating beautiful and interactive CLI's with Python
23
+
- Create, Read, Update and Delete (CRUD) operations with PostgreSQL
24
+
25
+
If you find this project useful, please give it's parent a star.
26
+
27
+
## Screenshot
28
+
29
+

30
+
31
+
## Features
32
+
33
+
1. Easy to use
34
+
2. Interactive
35
+
3. Beautiful
36
+
4. No need to remember SQL commands
37
+
5. Fast and lightweight
38
+
39
+
## Prerequisites
40
+
41
+
- Python 3.6 or higher
42
+
- PostgreSQL 9.5 or higher
43
+
44
+
### Python dependencies
45
+
46
+
- psycopg2
47
+
- rich
48
+
49
+
These dependencies are already in the `requirements.txt` file.
50
+
51
+
### Create a database
52
+
53
+
We use postgresql as our database, so you need to create a database with any name and enter the credentials in the `creds.json` file.
54
+
55
+
```bash
56
+
createdb db_name
57
+
```
58
+
59
+
## How to use
60
+
61
+
First, you need to install the dependencies:
62
+
63
+
```bash
64
+
pip install -r requirements.txt
65
+
```
66
+
67
+
Then, you need to create a `creds.json` file with the following info:
0 commit comments