Module ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Str ListLoad Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str FunctionDef arguments args NameParam defaults body TryExcept body Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Num handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr If NameLoad body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr TryExcept body Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Raise Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Continue If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If CompareEq NameLoad Str body Return NameLoad If CompareEq SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr body Return NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr Str CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Str body Return NameLoad If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr NameLoad body Return NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Return NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Return NameLoad Return Dict Str Str Str ListLoad NameLoad Str Dict Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str body Return NameLoad Return Dict Str Str Str Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpOr CompareNotIn Str NameLoad CompareNotIn Str SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Str keyword Dict Str Str SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str Dict attr Str ListLoad Assign NameStore Call NameLoad NameLoad If Call AttributeLoad Call NameLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list
N/A collections namedtuple N/A json N/A logging gevent.queue Full h realtime h.realtime Consumer h.api storage h.auth.util translate_annotation_principals h.streamer websocket N/A h.sentry N/A log N/A N/A logging getLogger __name__ N/A Message N/A namedtuple Message N/A topic payload process_messages N/A N/A settings routing_key work_queue raise_error N/A True N/A N/A 
    Configure, start, and monitor a realtime consumer for the specified
    routing key.

    This sets up a :py:class:`h.realtime.Consumer` to route messages from
    `routing_key` to the passed `work_queue`, and starts it. The consumer
    should never return. If it does, this function will raise an exception.
     _handler N/A N/A payload N/A N/A N/A N/A N/A message N/A Message topic routing_key payload payload N/A N/A N/A work_queue put message timeout 0.1 N/A N/A N/A Full N/A N/A N/A N/A log warn Streamer work queue full! Unable to queue message from h.realtime having waited 0.1s: giving up. N/A N/A conn N/A N/A realtime get_connection settings N/A sentry_client N/A N/A N/A h sentry get_client settings N/A consumer N/A Consumer connection conn routing_key routing_key handler _handler sentry_client sentry_client N/A N/A N/A consumer run N/A raise_error N/A N/A N/A RuntimeError Realtime consumer quit unexpectedly! N/A handle_message N/A N/A message topic_handlers N/A N/A N/A 
    Deserialize and process a message from the reader.

    For each message, `handler` is called with the deserialized message and a
    single :py:class:`h.streamer.WebSocket` instance, and should return the
    message to be sent to the client on that socket. The handler can return
    `None`, to signify that no message should be sent, or a JSON-serializable
    object. It is assumed that there is a 1:1 request-reply mapping between
    incoming messages and messages to be sent out over the websockets.
     N/A data N/A message payload N/A N/A N/A handler N/A topic_handlers N/A N/A message topic N/A N/A N/A KeyError N/A N/A N/A RuntimeError N/A N/A Don't know how to handle message from topic: {} format N/A message topic N/A sockets N/A list N/A N/A websocket WebSocket instances N/A socket sockets N/A N/A reply N/A handler data socket N/A N/A reply None N/A N/A N/A N/A N/A socket terminated N/A N/A N/A N/A socket send N/A N/A json dumps reply N/A handle_annotation_event N/A N/A message socket N/A N/A N/A 
    Get message about annotation event `message` to be sent to `socket`.

    Inspects the embedded annotation event and decides whether or not the
    passed socket should receive notification of the event.

    Returns None if the socket should not receive any message about this
    annotation event, otherwise a dict containing information about the event.
     N/A action N/A message N/A action N/A annotation N/A N/A storage annotation_from_dict N/A message N/A annotation N/A N/A action read N/A N/A None N/A N/A N/A message N/A src_client_id N/A socket client_id N/A N/A None N/A N/A N/A N/A annotation get nipsa N/A N/A N/A socket request authenticated_userid N/A N/A annotation get user N/A N/A None N/A N/A N/A _authorized_to_read N/A socket request annotation N/A N/A None N/A N/A N/A socket filter None N/A N/A None N/A N/A N/A N/A N/A socket filter match annotation action N/A N/A None N/A N/A payload type options N/A annotation annotation-notification N/A action action N/A handle_user_event N/A N/A message socket N/A N/A N/A 
    Get message about user event `message` to be sent to `socket`.

    Inspects the embedded user event and decides whether or not the passed
    socket should receive notification of the event.

    Returns None if the socket should not receive any message about this user
    event, otherwise a dict containing information about the event.
     N/A N/A N/A N/A socket request authenticated_userid N/A message N/A userid N/A N/A None N/A N/A type action model session-change N/A message N/A type N/A message N/A session_model N/A _authorized_to_read N/A N/A request annotation N/A N/A N/A Return True if the passed request is authorized to read the annotation.

    If the annotation belongs to a private group, this will return False if the
    authenticated user isn't a member of that group.
     N/A N/A N/A permissions annotation N/A read N/A annotation N/A permissions N/A N/A N/A N/A N/A request sentry captureMessage streamer received annotation lacking valid permissions level warn extra N/A id permissions N/A annotation N/A id N/A N/A json dumps N/A N/A annotation get permissions N/A read_permissions N/A N/A N/A N/A annotation get permissions N/A get read N/A N/A read_principals N/A translate_annotation_principals read_permissions N/A N/A N/A N/A set read_principals intersection N/A request effective_principals N/A N/A True N/A False N/A