Skip to content

How can I register sqlalchemy extension to the current flask application globally? #24

@oxesoft

Description

@oxesoft

The default way of using sqlalchemy models is calling globally:

db = SQLAlchemy()
db.init_app(app)

I don't see a way to get the "app" globally with functions-framework. sqlalchemy doesn't allow us registering it after a request is made. The desired use case is a simple:

result = SomeTable.query.all()

More information about using Flask-SqlAlchemy is here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions