Is there a particular reason that the eve_sqlalchemy.SQL object initializes with an internally created instance of flask_sqlalchemy.SQLAlchemy, rather than taking one as a constructor option?
It seems like the class would be much simpler to use if the constructor was able to take a previously built instance of flask_sqlalchemy.SQLAlchemy.
def init_app(self, app, db=None):
Psedocode example that is currently impossible:
# Make exactly the instance of flask_sqlalchemy.SQLAlchemy needed.
flask_app = app()
flask_sql = flask_sqlalchemy.SQLAlchemy(**kwargs)
eve_sql = eve_sqlalchemy.SQL(app=flask_app, db=flask_sql)
This change would seem to allow some of the currently enforced retroactive injection to be replaced by declaration and combination, resulting in more readable client code.
I could be missing some critical nuance of the architecture here, of course.
Is there a particular reason that the eve_sqlalchemy.SQL object initializes with an internally created instance of flask_sqlalchemy.SQLAlchemy, rather than taking one as a constructor option?
https://github.com/RedTurtle/eve-sqlalchemy/blob/master/eve_sqlalchemy/__init__.py#L27
https://github.com/RedTurtle/eve-sqlalchemy/blob/master/eve_sqlalchemy/__init__.py#L63
It seems like the class would be much simpler to use if the constructor was able to take a previously built instance of flask_sqlalchemy.SQLAlchemy.
Psedocode example that is currently impossible:
This change would seem to allow some of the currently enforced retroactive injection to be replaced by declaration and combination, resulting in more readable client code.
I could be missing some critical nuance of the architecture here, of course.