Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marshmellow-SQLAlchemy Integration #9

Open
msarfati opened this issue Dec 29, 2015 · 1 comment
Open

Marshmellow-SQLAlchemy Integration #9

msarfati opened this issue Dec 29, 2015 · 1 comment

Comments

@msarfati
Copy link

https://flask-marshmallow.readthedocs.org/en/latest/ -- scroll down to Optional Flask-SQLAlchemy Integration

By implementing this into the Diamond ecosystem, downstream developers will no longer have to maintain a schema separate from the model, and JSON serialization will be more efficient.

I was trying to implement this at GYI, but it cuts too deeply into the Diamond ecosystem -- utils.mxins classmethods would have to be updated, the component initialization order may have to be changed (SQLAlchemy must be initialized before Marshmallow), and other places I imagine.

@iandennismiller
Copy link
Member

Interesting! I can imagine how that would save some headaches. Here's a direct link to the section you referenced:

https://flask-marshmallow.readthedocs.org/en/latest/#optional-flask-sqlalchemy-integration

Out of curiosity, does it not work to use ModelSchema as is? It seems like a promising avenue.

https://flask-marshmallow.readthedocs.org/en/latest/#flask_marshmallow.sqla.ModelSchema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants