FastAPI-template icon indicating copy to clipboard operation
FastAPI-template copied to clipboard

Add support for db/orm like mongodb and oss like minio

Open djun opened this issue 3 years ago • 5 comments
trafficstars

Please add support for db/orm like mongodb and oss like minio, thanks very much!

(mongodb orm maybe can use mongoengine)

djun avatar Aug 12 '22 03:08 djun

Hi. Thanks for raising this issue. It's a really good Idea, but I have almost zero experience with mongodb production setup.

Could you please provide me an example, so I could add this to this project?

s3rius avatar Aug 29 '22 22:08 s3rius

thanks for your reply! i think mongoengine can be loaded as other orm modules like, and its apis or operations are all like django orm (write model fields and queries, etc.). i wrote projects for my company in the past and codes cannot be public currently, sorry. the only problem is, mongoengine does not supports async/await.

djun avatar Sep 01 '22 10:09 djun

i found a new mongodb orm module supported async/await: https://github.com/art049/odmantic

djun avatar Sep 01 '22 10:09 djun

I could suggest using https://github.com/roman-right/beanie as ODM (and I suppose it is the most widely used).

jegork avatar Oct 30 '22 18:10 jegork

@jegork Okay. It looks nice and have an async support. Maybe I'll add it later.

s3rius avatar Oct 31 '22 07:10 s3rius