librelist archives

« back to archive

extension: Flask + MongoDB frontend

extension: Flask + MongoDB frontend

From:
Jay Goel
Date:
2013-11-11 @ 06:03
Greetings!

I have written (yet another?) MongoDB frontend as a Flask extension.
Behold: https://github.com/classicspecs/Flask-MongoMyAdmin

In contrast to other extensions - all of which are fantastic - I had the
following goals:

1. It does not use any sort of ORM or models. It is intended to let you
read and write pure JSON, which is often useful when working with mongo.

2. It supports connections to multiple databases. If you're managing many
applications, you could conceivably manage all of their databases via this
app.

3. It is a thin wrapper around the pymongo library. That is, it does as
little error checking as possible, preferring to pass data to pymongo and
allow *it* to do its own validation. All pymongo errors are passed back to
the user unadulterated. The goal is to let things work as consistently with
the raw pymongo driver as possible.

This code is far from perfect. (Specifically, my next step will be to
refactor the main blueprint into its own module. And then add other
rudimentary functionality, like "deleting documents.")

I am very amenable to pull requests, bug reports, or feedback. Otherwise, I
hope everyone enjoys!

Best,

Jay Goel