def load(cls, path):
        "Loads database from path and tests identity."
        with open(path, 'rb') as file:
            obj = pickle.loads(bz2.decompress(file.read()))
        assert isinstance(obj, cls), 'Could not load a database object!'
        obj.__path = path
        return obj
Loads database from path and tests identity.
recipes/Python/577825_Rudimentary_Database_Engine/recipe-577825.py