0 Followers
0 Following
1 Posts
Early iteration of whack-a-mole toy
Statements vs question
“Is now a good time?” before a sales pitch
N
H
E
T
E
So is kidney stone

Settings should just facilitate getting the configuration from your dotenv file. Rule of thumb: Each class should preferably serve a single purpose.

You should have a Database class that you can initialize with the relevant configuration from you Settings object and will handle the DB connectivity and session.

You should take a look at SQLModel and its examples.

SQLModel

SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.