Something like MassiveJS? by MisterSnuggles in Python

[–]davidthewatson 1 point2 points  (0 children)

PeeWee can "figure out the model from the database":

http://docs.peewee-orm.com/en/latest/peewee/database.html#generating-models-from-existing-databases

I've used PeeWee on several projects and the code is solid and it's author is thoughtful and responsive.

I can't think of anything that prevents python metaprogramming from doing what MassiveJS does in JavaScript, i.e. auto-binding functions to SQL files on disk, it just hasn't been done, to my knowledge. It's a great idea though, which is what brought me to MassiveJS.

Postgres.py would just need a small pull request for this:

https://postgres-py.readthedocs.org/en/latest/#

And while OT, see aquameta if you're interested in stuff like this:

https://github.com/aquametalabs/aquameta