Python based complex event processing