get_context

get_context() → alembic.runtime.migration.MigrationContext

Return the current MigrationContext object.

If EnvironmentContext.configure() has not been called yet, raises an exception.