예제 #1
0
파일: __init__.py 프로젝트: ohardy/APyMongo
    def get(self, file_id, callback):
        """Get a file from GridFS by ``"_id"``.

        Returns an instance of :class:`~gridfs.grid_file.GridOut`,
        which provides a file-like interface for reading.

        :Parameters:
          - `file_id`: ``"_id"`` of the file to get

        .. versionadded:: 1.6
        """
        GridOut.instance_for(self.__collection, callback, file_id)
예제 #2
0
파일: __init__.py 프로젝트: ohardy/APyMongo
 def mod_callback(response):
     if len(response) > 0:
         GridOut.instance_for(self.__collection, callback, file_document=response[0])
     else:
         callback(None)