

def create_object(self, uid, token, content, meta=None):
    '\n        Create an object for a user. Returns and id\n\n        :param content: Some content.\n        :param uid: User id.\n        :param token: Access token.\n        :param meta: Some meta data.\n        '
    database = self.client[uid]
    database.authenticate(uid, token)
    collection = database['data_objects']
    if (meta is None):
        meta = {
            'name': str(uuid.uuid4()),
            'mime-type': 'N/A',
            'tags': [],
        }
    tmp = {
        'value': content,
        'meta': meta,
    }
    obj_id = collection.insert(tmp)
    return obj_id

dataset/ETHPy150Open tmetsch/suricate/suricate/data/object_store.py MongoStore.create_object/original