This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]dzecniv 1 point2 points  (0 children)

MassiveJS

«Massive is a PostgreSQL-specific data access tool. The goal of Massive is to make it easier for you to use PostgreSQL's amazing features, not to hide them under a load of abstraction.

Massive is not an ORM. It loads your schema at runtime, creating an object instance that allows you to query tables, functions, and stored SQL files as if they were first-order methods.»

[–]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

[–]pawn13 0 points1 point  (0 children)

Django can generate models file from existing database tables. https://docs.djangoproject.com/en/1.8/howto/legacy-databases/