def get_or_create(self, **kwargs):

        model = self.get(**kwargs)

        is_created = False

        if model is None:
            is_created = True
            model = self._model_class()

            for key, value in kwargs.items():
                setattr(model, key, value)

        return model, is_created
Looks up an object with the given kwargs, creating one if necessary.
dataset/ETHPy150Open saeschdivara/ArangoPy/arangodb/orm/models.py/CollectionModelManager.get_or_create