sugar3.activity.activityhandle module

Provides a class for storing activity metadata such as activity id’s, journal object id’s,

class sugar3.activity.activityhandle.ActivityHandle(activity_id=None, object_id=None, uri=None, invited=False)

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) –

  • object (activity, 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) –

get_dict()

Returns activity settings as a dictionary in format {activity_id:XXXX, object_id:XXXX, uri:XXXX, invited:BOOL}

sugar3.activity.activityhandle.create_from_dict(handle_dict)

Returns an activity handle from a dictionary of parameters