def exists ( self ) : resp = self . r_session . head ( self . database_url ) if resp . status_code not in [ 200 , 404 ] : resp . raise_for_status ( ) return resp . status_code == 200
python check if database can be reached
Performs an existence check on the remote database .
def exists(self):
        """
        Performs an existence check on the remote database.

        :returns: Boolean True if the database exists, False otherwise
        """
        resp = self.r_session.head(self.database_url)
        if resp.status_code not in [200, 404]:
            resp.raise_for_status()

        return resp.status_code == 200