#OOP Database

1 messages · Page 1 of 1 (latest)

lost dagger
#

I’ll have to add a db to my discord bot. I’d prefer an oop approach to a functional one. Currently have a MySQL database, but have access to a vps as well, which would allow my to use some kinda self hosted db as well.
How would you go about this? Which library would you use?

steady thistle
#

you might want to look into ORMs

lost dagger
#

Took a look at sqlalchemy and it looked quite nice

#

How would you recommend hosting the db? Using SQLite on the vps? Or another way?

pallid ice
#

I use a Postgres instance in a separate VM on the hosting service that use for my bot, and connect to it via SQLAlchemy