

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.






So is a kidney stone