Root objects

Read an object’s metadata

weye.root_objects.get_object_from_path(path)

returns metadata for an item from its path.

List of supported metadata:

  • id
  • size
  • name
  • descr
  • mime
Parameters:path (str) – the path of the item

Update an object’s metadata

weye.root_objects.update_object(path, meta)

List object’s children

weye.root_objects.list_children(path)

Returns a sorted list of children in compact form for the given path

Only returns ultra minimalistic metadata set:

  • link (real name/id)
  • title
  • descr
  • mime
Parameters:path (str) – the path of the folder

Format:

{children: {'c': ['descr', 'mime', 'link', 'title'], 'r': values}}

Add new object

weye.root_objects.save_object_to_path(path, read_func)

Saves an object, providing a read function

Parameters:
  • str (path) – the file path
  • callable (read_func) – a function that takes an integer (number of bytes to read)

This Page