def from_mongo()

in optional-kubernetes-engine/bookshelf/model_mongodb.py [0:0]


def from_mongo(data):
    """
    Translates the MongoDB dictionary format into the format that's expected
    by the application.
    """
    if not data:
        return None

    data['id'] = str(data['_id'])
    return data