Universal Messaging 10.1 | Developer Guide | Enterprise APIs | Enterprise Developer's Guide for Python | Enterprise Client Development | Writing an Event to a DataGroup
 
Writing an Event to a DataGroup
Once the NirvanaSession has been established with the Universal Messaging realm server, a new Universal Messaging Event object (nConsumeEvent) must be constructed.
Note that in this example code, we also create a Universal Messaging Event Dictionary object (nEventDictionary) for our Universal Messaging Event before publishing it:

datagroupname = "myDataGroup"
props = nEventProperties()
props.put("exampleKey", "Hello World")
event = nConsumeEvent(props,"aTag")

mySession.writeDataGroup(datagroupname,event)
Note that there is no Universal Messaging DataGroup object, you simply pass the name of the DataGroup you wish to publish to.
The underlying library (written using the Universal Messaging C++ API) will create the DataGroup if it does not exist on the Universal Messaging Realm Server.