sugar4.activity.activityhandle

Provides a class for storing activity metadata such as activity id’s, journal object id’s. The ActivityHandle class for managing activity instances and their metadata.

Classes

ActivityHandle

Data structure storing simple activity metadata

Module Contents

class sugar4.activity.activityhandle.ActivityHandle(activity_id=None, object_id=None, uri=None, invited=False)[source]

Bases: object

Data structure storing simple activity metadata

Parameters:
  • activity_id (string) – unique id for the activity to be

  • created

  • object_id (string) – identity of the journal object

  • activity. (associated with the)

  • journal (When you resume an activity from the)

  • optional (the object_id will be passed in. It is)

  • an (since new activities does not have)

  • object. (associated)

  • uri (string) – URI associated with the activity. Used when

  • the (opening an external file or resource in)

  • activity

  • object (rather than a journal)

  • for ((downloads stored on the file system)

  • pages) (example or web)

  • invited (bool) – True if the activity is being

  • network (launched for handling an invite from the)

activity_id = None[source]
object_id = None[source]
uri = None[source]
invited = False[source]
get_dict()[source]

Get a dictionary representation of the handle. :returns: Dictionary containing handle data :rtype: dict

classmethod create_from_dict(handle_dict)[source]

Create an ActivityHandle from a dictionary. :param handle_dict: Dictionary containing handle data :type handle_dict: dict

Returns:

New handle instance

Return type:

ActivityHandle

__repr__()[source]

String representation of the handle.