def get_alembic_version(meta):
 try:
  a_ver = sa.Table('alembic_version', meta, autoload=True)
  return sa.select([a_ver.c.version_num]).scalar()
 except sa.exc.NoSuchTableError:
  return None

def get_alembic_version ( meta ) : try : a_ver = sa . Table ( 'alembic_version' , meta , autoload = True ) return sa . select ( [ a_ver . c . version_num ] ) . scalar ( ) except sa . exc . NoSuchTableError : return None
return alembic version or none if no alembic table exists .