@contextmanager
def _temp_alembic_ini(db_url):
 with TemporaryDirectory() as td:
  alembic_ini = os.path.join(td, 'alembic.ini')
  write_alembic_ini(alembic_ini, db_url)
  (yield alembic_ini)

@ contextmanager def _temp_alembic_ini ( db_url ) : with TemporaryDirectory ( ) as td : alembic_ini = os . path . join ( td , 'alembic.ini' ) write_alembic_ini ( alembic_ini , db_url ) ( yield alembic_ini )
context manager for temporary jupyterhub alembic directory temporarily write an alembic .