def connect_url(self, url, connect_args={}):
        """Connect to a database using an SqlAlchemy URL.

        Args:
            url: An SqlAlchemy-style DB connection URL.
            connect_args: extra argument to be passed to the underlying
                          DB-API driver.
        Returns:
            True if connection was successful.
        """
        if self.trans_ctx and self.trans_ctx.transaction.is_active:
            print("You have an active transaction, either %commit or "
                  "%rollback before connecting to a new database.")
            return False
        try:
            parsed_url = sa.engine.url.make_url(str(url))
        except sa.exc.ArgumentError as e:
            print(e)
            return False
        safe_url = self.safe_url(parsed_url)
        if safe_url:
            print("ipydb is connecting to: %s" % safe_url)
        try:
            self.engine = engine.from_url(parsed_url,
                                          connect_args=connect_args)
        except __HOLE__:  # pragma: nocover
            print("It looks like you don't have a driver for %s.\n"
                  "See the following URL for supported "
                  "database drivers:\n\t%s" % (
                    parsed_url.drivername,
                    'http://docs.sqlalchemy.org/en/latest/'
                    'dialects/index.html#included-dialects'))
            return False
        # force a connect so that we can fail early if the connection url won't
        # work
        try:
            with self.engine.connect():
                pass
        except sa.exc.OperationalError as e:  # pragma: nocover
            print(e)
            return False

        self.connected = True
        self.nickname = None
        if self.do_reflection:
            self.metadata_accessor.get_metadata(self.engine, noisy=True)
        return True
dataset/ETHPy150Open jaysw/ipydb/ipydb/plugin.py/SqlPlugin.connect_url