MongoEngine / mongoengine

A Python Object-Document-Mapper for working with MongoDB
http://mongoengine.org
MIT License
4.24k stars 1.23k forks source link

Simplest way to expose mongoengine as restful api #1349

Closed oreon closed 7 years ago

oreon commented 8 years ago

Is there a simple framework , django's support for mongo is not so great

amcgregor commented 8 years ago

Shameless self-promotion: I've been using my own WebCore web framework for 10 the last years to great success. WebCore 2 was released recently, and has support in web.dispatch.resource (REST dispatch, complete and working) and (https://github.com/marrow/mongo) (REST dispatch adapters for MongoDB collections + more, a still somewhat WIP general adapter solution) for quickly exposing MongoDB collections to the web.

It'd be pretty trivial to alter the marrow.mongo general collection adapter to use MongoEngine-specific constructs. (I just see no particular reason to tie the overall solution to this quite complex, and arguably no longer nessicary library, given MongoDB's native schema support—document validation—and vastly improved basic API.)

wojcikstefan commented 7 years ago

@oreon we've been successfully using https://github.com/closeio/flask-mongorest in production with tens of thousands of API clients, nearly 4TB of MongoDB data served in real time.

That being said, it's my company's internally developed package and we've done a very poor job at documenting its usage and best practices. PRs are welcome though.

I'll leave this issue open in case anybody has other suggestions.