Module Import alias ImportFrom alias alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Str Str Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad Num NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If BoolOpAnd NameLoad UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If BoolOpAnd NameLoad UnaryOpNot NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If BoolOpAnd UnaryOpNot NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad If BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad keyword NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad AttributeLoad NameLoad attr keyword Dict Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr keyword NameLoad Return Call NameLoad GeneratorExp SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num comprehension NameStore NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr keyword NameLoad For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad GeneratorExp TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr With Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameStore body For TupleStore NameStore NameStore NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr keyword NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A time onitu.utils get_fid get_mimetype u folder Folder Metadata N/A object N/A N/A The Metadata class represent the metadata of any file in Onitu.

    This class should always be instantiated via the
    :meth:`.get_by_id` or :meth:`.get_by_filename`
    class methods.
    However, the drivers should never instantiate a new
    :class:`.Metadata` object themselves, but use the
    :meth:`.Plug.get_metadata` function.

    The attributes available for each file are the following :

    **filename**
        The absolute filename of the file
    **size**
        The size of the file, in octets
    **mimetype**
        The MIME type of the file, as detected by python

    Each service can also store extra informations via the :attr:`.extra`
    attribute. It's a dictionary which can contain any kind of information,
    as long as it's JSON serializable.
    Those informations will not be shared with the other entries, as they
    are stocked separately.
     N/A PROPERTIES N/A filename folder_name size mimetype __init__ N/A N/A self plug filename folder folder_name size fid mimetype N/A None None None None 0 None None N/A N/A N/A N/A N/A super Metadata self __init__ N/A N/A self _filename None N/A N/A self _folder_name None N/A N/A self _size None N/A N/A self filename filename N/A N/A self size size N/A N/A self mimetype mimetype N/A N/A folder_name N/A folder N/A N/A folder N/A N/A Folder get plug folder_name N/A N/A N/A folder N/A folder_name N/A N/A folder_name N/A folder name N/A N/A self folder_name folder_name N/A N/A self folder folder N/A N/A N/A fid N/A self filename N/A N/A fid N/A get_fid N/A self folder_name N/A self filename N/A N/A self fid fid N/A N/A N/A N/A self mimetype N/A self filename N/A N/A N/A self mimetype N/A get_mimetype N/A self filename N/A N/A self extra N/A N/A N/A self plug plug N/A N/A self _path None N/A get N/A N/A cls plug folder filename N/A N/A N/A Instantiate a new :class:`.Metadata` object for the file
        with the given name inside the given folder.
         N/A fid N/A get_fid folder N/A u filename N/A N/A N/A cls get_by_id plug fid N/A classmethod get_by_id N/A N/A cls plug fid N/A N/A N/A Instantiate a new :class:`.Metadata` object for the file
        with the given id.
         N/A values N/A N/A N/A plug escalator get N/A N/A file:{} format fid default None N/A N/A values N/A N/A None N/A metadata N/A cls plug fid fid values N/A N/A metadata extra N/A N/A N/A plug escalator get N/A N/A file:{}:service:{} format fid N/A plug name default N/A N/A metadata N/A classmethod filename N/A N/A self N/A N/A N/A N/A self _filename N/A property filename N/A N/A self value N/A N/A N/A N/A value None N/A N/A N/A self _filename None N/A N/A N/A self _filename N/A u value N/A N/A filename setter folder_name N/A N/A self N/A N/A N/A N/A self _folder_name N/A property folder_name N/A N/A self value N/A N/A N/A N/A value None N/A N/A N/A self _folder_name None N/A N/A N/A self _folder_name N/A u value N/A N/A folder_name setter size N/A N/A self N/A N/A N/A N/A self _size N/A property size N/A N/A self value N/A N/A N/A N/A value None N/A N/A N/A self _size None N/A N/A N/A self _size N/A int value N/A N/A size setter path N/A N/A self N/A N/A N/A N/A N/A self _path N/A N/A N/A self _path N/A N/A N/A self folder join N/A self filename N/A N/A self _path N/A property is_uptodate N/A N/A self N/A N/A N/A N/A N/A N/A N/A self plug escalator exists N/A N/A file:{}:uptodate:{} format N/A self fid N/A N/A self plug name N/A property last_update N/A N/A self N/A N/A N/A 
        Return the timestamp of the last update for this service if the
        file is up-to-date, and `None` otherwise.
         N/A N/A N/A N/A N/A self plug escalator get N/A N/A file:{}:uptodate:{} format N/A self fid N/A N/A self plug name default None N/A property uptodate_services N/A N/A self N/A N/A N/A services N/A N/A N/A N/A self plug escalator range N/A N/A file:{}:uptodate: format N/A self fid include_value False N/A N/A tuple N/A N/A N/A N/A key split : N/A -1 N/A key services N/A property set_uptodate N/A N/A self reset N/A False N/A N/A reset N/A N/A services N/A N/A N/A N/A self plug escalator range N/A N/A file:{}:uptodate: format N/A self fid include_value False N/A key services N/A N/A N/A N/A N/A N/A self plug escalator delete key N/A N/A N/A N/A N/A self plug escalator put N/A N/A file:{}:uptodate:{} format N/A self fid N/A N/A self plug name N/A N/A time time N/A dict N/A N/A self N/A N/A N/A Return the metadata as a dict N/A N/A dict N/A N/A N/A u p N/A getattr self p N/A p N/A self PROPERTIES N/A write N/A N/A self N/A N/A N/A Write the metadata of the current file in the database. N/A N/A N/A N/A N/A self plug escalator write_batch batch N/A N/A N/A N/A batch put N/A N/A path:{}:{} format N/A self folder_name N/A self filename N/A self fid N/A N/A N/A batch put N/A N/A file:{} format N/A self fid N/A N/A self dict N/A N/A N/A batch put N/A N/A file:{}:service:{} format N/A self fid N/A N/A self plug name N/A self extra N/A clone N/A N/A self new_folder new_filename N/A N/A N/A 
        Return a new Metadata object with the same properties than the current,
        but with a new filename. The object is not saved in the database, but
        the service's extras are copied and saved.
         N/A values N/A N/A self dict N/A N/A values N/A filename new_filename N/A N/A values N/A folder new_folder N/A N/A values N/A folder_name N/A new_folder name N/A clone N/A N/A self __class__ N/A self plug values N/A extras N/A N/A N/A N/A self plug escalator range N/A N/A file:{}:service: format N/A self fid N/A N/A N/A N/A N/A self plug escalator write_batch batch N/A N/A N/A key extra extras N/A N/A service N/A N/A N/A key split : N/A -1 N/A N/A N/A batch put N/A N/A file:{}:service:{} format N/A clone fid service extra N/A N/A clone extra N/A self extra N/A clone N/A delete N/A N/A self N/A N/A N/A N/A N/A N/A N/A self plug escalator delete N/A N/A file:{}:service:{} format N/A self fid N/A N/A self plug name N/A other_services N/A N/A N/A N/A self plug escalator range N/A N/A file:{}:service: format N/A self fid include_value False N/A N/A other_services N/A N/A N/A N/A N/A N/A self plug escalator delete N/A N/A file:{} format N/A self fid N/A N/A N/A N/A N/A self plug escalator delete N/A N/A path:{}:{} format N/A self folder_name N/A self filename N/A N/A