STABLE
Bases: gi.overrides.GObject.Object
A representation of the metadata associated with a DS entry.
Update all of the metadata
Bases: object
A representation of a DS entry.
Bases: object
A representation for objects not in the DS but in the file system.
Copy a datastore entry
Keyword arguments: ds_object – DSObject to copy mount_point – mount point of the new datastore entry
Create a new DSObject.
Return: a DSObject
Delete the datastore entry with the given uid.
Keyword arguments: object_id – uid of the datastore entry
Find DS entries that match the query provided.
Keyword arguments: query – a dictionary containing metadata key value pairs
for a fulltext search use the key ‘query’ e.g. {‘query’: ‘blue*’} other possible well-known properties are: ‘activity’: ‘my.organization.MyActivity’ ‘activity_id’: ‘6f7f3acacca87886332f50bdd522d805f0abbf1f’ ‘title’: ‘My new project’ ‘title_set_by_user’: ‘0’ ‘keep’: ‘0’ ‘ctime’: ‘1972-05-12T18:41:08’ ‘mtime’: ‘2007-06-16T03:42:33’ ‘timestamp’: 1192715145 ‘preview’: ByteArray(png file data, 300x225 px) ‘icon-color’: ‘#ff0000,#ffff00’ ‘mime_type’: ‘application/x-my-activity’ ‘share-scope’: # if shared ‘buddies’: ‘{}’ ‘description’: ‘some longer text’ ‘tags’: ‘one two’
sorting – key to order results by e.g. ‘timestamp’ (default None) limit – return only limit results (default None) offset – return only results starting at offset (default None) properties – you can specify here a list of metadata you want to be
present in the result e.g. [‘title, ‘keep’] (default None)
Return: DSObjects matching the query, number of matches
Get the properties of the object with the ID given.
Keyword arguments: object_id – unique identifier of the object
Return: a DSObject
Retrieve an array of unique values for a field.
Keyword arguments: key – only the property activity is currently supported
Return: list of activities
Write the DSObject given to the datastore. Creates a new entry if the entry does not exist yet.
Keyword arguments: update_mtime – boolean if the mtime of the entry should be regenerated
(default True)
timeout – dbus timeout for the caller to wait (default -1)