Search code examples
pythonwampautobahncrossbar

Caller identification in Autobahn | Python


I am trying to find out how to disclose the caller in Autobahn|Python as described here: http://crossbar.io/docs/Caller-Identification/ I found the following in the docs:

class autobahn.wamp.message.Call(request, procedure, args=None, kwargs=None, timeout=None, receive_progress=None, disclose_me=None)

and therefore tried:

res = session.call(u'com.example.function', data, disclose_me=True)

with no luck. Any help would be sincerely appreciated.


Solution

  • OK, I figured it out:

    from autobahn.wamp.types import CallOptions
    
    options = CallOptions(on_progress=None, timeout=120, disclose_me=True)
    res = session.call(u'com.example.function', server_events, options=options)