

def deserialize(self, data):
    if isinstance(data, Document):
        return data
    (d, lazy) = self.backend.deserialize_db_data(data)
    if self.raw:
        return d
    obj = self.backend.create_instance(self.cls, d, lazy=lazy)
    obj.attributes = self.backend.deserialize(obj.lazy_attributes, create_instance=False)
    return obj

dataset/ETHPy150Open adewes/blitzdb/blitzdb/backends/sql/queryset.py QuerySet.deserialize/original