Add publish_event_from_python