def write_alembic_ini(alembic_ini='alembic.ini', db_url='sqlite:///jupyterhub.sqlite'):
 with open(ALEMBIC_INI_TEMPLATE_PATH) as f:
  alembic_ini_tpl = f.read()
 with open(alembic_ini, 'w') as f:
  f.write(alembic_ini_tpl.format(alembic_dir=ALEMBIC_DIR, db_url=db_url))

def write_alembic_ini ( alembic_ini = 'alembic.ini' , db_url = 'sqlite:///jupyterhub.sqlite' ) : with open ( ALEMBIC_INI_TEMPLATE_PATH ) as f : alembic_ini_tpl = f . read ( ) with open ( alembic_ini , 'w' ) as f : f . write ( alembic_ini_tpl . format ( alembic_dir = ALEMBIC_DIR , db_url = db_url ) )
write a complete alembic .