Skip to content
Discussion options

You must be logged in to vote

if you are using the async env.py template at https://github.com/sqlalchemy/alembic/blob/main/alembic/templates/async/env.py, which will establish SQLAlchemy's async "greenlet context" around everything that's running, you can run coroutines as:

from sqlalchemy.util import await_only

def upgrade():
    await_only(my_coroutine())

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Niccolum
Comment options

@Niccolum
Comment options

Answer selected by Niccolum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants