Python code compatible with WAMP (Web Application Messaging Protocol)