def reflect(self, bind=None, schema=None, views=False, only=None,
                extend_existing=False,
                autoload_replace=True,
                **dialect_kwargs):
        if bind is None:
            bind = _bind_or_error(self)

        with bind.connect() as conn:

            reflect_opts = {
                'autoload': True,
                'autoload_with': conn,
                'extend_existing': extend_existing,
                'autoload_replace': autoload_replace
            }

            reflect_opts.update(dialect_kwargs)

            if schema is None:
                schema = self.schema

            if schema is not None:
                reflect_opts['schema'] = schema

            available = util.OrderedSet(
                bind.engine.table_names(schema, connection=conn))
            if views:
                available.update(
                    bind.dialect.get_view_names(conn, schema)
                )

            if schema is not None:
                available_w_schema = util.OrderedSet(["%s.%s" % (schema, name)
                                                      for name in available])
            else:
                available_w_schema = available

            current = set(self.tables)

            if only is None:
                load = [name for name, schname in
                        zip(available, available_w_schema)
                        if extend_existing or schname not in current]
            elif util.callable(only):
                load = [name for name, schname in
                        zip(available, available_w_schema)
                        if (extend_existing or schname not in current)
                        and only(name, self)]
            else:
                missing = [name for name in only if name not in available]
                if missing:
                    s = schema and (" schema '%s'" % schema) or ''
                    raise exc.InvalidRequestError(
                        'Could not reflect: requested table(s) not available '
                        'in %s%s: (%s)' %
                        (bind.engine.url, s, ', '.join(missing)))
                load = [name for name in only if extend_existing or
                        name not in current]

            for name in load:
                Table(name, self, **reflect_opts)
Load all available table definitions from the database.
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/sql/schema.py/MetaData.reflect