Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If BoolOpOr CompareIs NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad TryExcept body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad handlers ExceptHandler body Pass Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
    eve.io.mongo.media
    ~~~~~~~~~~~~~~~~~~

    GridFS media storage for Eve-powered APIs.

    :copyright: (c) 2016 by Nicola Iarocci.
    :license: BSD, see LICENSE for more details.
 bson ObjectId flask Flask gridfs GridFS eve.io.media MediaStorage eve.io.mongo Mongo eve.utils str_type GridFSMediaStorage N/A MediaStorage N/A N/A  The GridFSMediaStorage class stores files into GridFS.

    ..versionadded:: 0.3
     __init__ N/A N/A self app N/A None N/A N/A 
        :param app: the flask application (eve itself). This can be used by
        the class to access, amongst other things, the app.config object to
        retrieve class-specific settings.

        .. versionchanged:: 0.6
           Support for multiple, cached, GridFS instances
         N/A N/A N/A N/A super GridFSMediaStorage self __init__ app N/A N/A N/A self validate N/A N/A self _fs N/A N/A validate N/A N/A self N/A N/A N/A  Make sure that the application data layer is a eve.io.mongo.Mongo
        instance.
         N/A N/A N/A self app None N/A N/A N/A TypeError Application object cannot be None N/A N/A N/A isinstance N/A self app Flask N/A N/A N/A TypeError Application object must be a Eve application N/A fs N/A N/A self resource N/A None N/A N/A  Provides the instance-level GridFS instance, instantiating it if
        needed.

        .. versionchanged:: 0.6
           Support for multiple, cached, GridFS instances
         N/A driver N/A N/A self app data N/A N/A N/A driver None N/A N/A isinstance driver Mongo N/A N/A N/A TypeError Application data object must be of eve.io.Mongo type. N/A px N/A N/A driver current_mongo_prefix resource N/A N/A px N/A self _fs N/A N/A N/A N/A self _fs N/A px N/A GridFS N/A N/A N/A driver pymongo prefix px db N/A N/A N/A self _fs N/A px N/A get N/A N/A self _id resource N/A None N/A N/A  Returns the file given by unique id. Returns None if no file was
        found.

        .. vesionchanged: 0.6
           Support for _id as string.
         N/A N/A isinstance _id str_type N/A N/A N/A N/A _id N/A ObjectId N/A unicode _id N/A N/A N/A NameError N/A N/A _id N/A ObjectId _id N/A _file None N/A N/A N/A _file N/A N/A N/A N/A self fs resource get _id N/A N/A N/A N/A N/A _file N/A put N/A N/A self content filename content_type resource N/A None None None N/A N/A  Saves a new file in GridFS. Returns the unique id of the stored
        file. Also stores content type of the file.
         N/A N/A N/A N/A N/A self fs resource put content filename filename content_type content_type N/A delete N/A N/A self _id resource N/A None N/A N/A  Deletes the file referenced by unique id.
         N/A N/A N/A N/A N/A self fs resource delete _id N/A exists N/A N/A self id_or_document resource N/A None N/A N/A  Returns True if a file referenced by the unique id or the query
        document already exists, False otherwise.

        Valid query: {'filename': 'file.txt'}
         N/A N/A N/A N/A N/A self fs resource exists id_or_document N/A N/A