Nirvana Python : Writing an Event to a Nirvana DataGroup

Once the NirvanaSession has been established with the Nirvana realm server, a new Nirvana Event object (nConsumeEvent) must be constructed.

Note that in this example code, we also create a Nirvana Event Dictionary object (nEventDictionary) for our Nirvana 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 Nirvana DataGroup object, you simply pass the name of the DataGroup you wish to publish to.

The underlying library (written using the Nirvana C++ API) will create the DataGroup if it does not exist on the Nirvana Realm Server.