s3rius / FastAPI-template

Feature rich robust FastAPI template.
MIT License
1.83k stars 161 forks source link

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

Open djun opened 1 year ago

djun commented 1 year ago

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

(mongodb orm maybe can use mongoengine)

s3rius commented 1 year ago

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?

djun commented 1 year ago

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 commented 1 year ago

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

jegork commented 1 year ago

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

s3rius commented 1 year ago

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