pyphoenix.types
Core types and data structures for PyPhoenix.
Classes
|
Channel connection states. |
|
Response from joining a channel. |
|
Phoenix message structure. |
|
Metadata for presence tracking. |
|
State of a presence entry. |
|
Response from pushing a message to a channel. |
- class pyphoenix.types.ChannelState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Channel connection states.
- CLOSED = 'closed'
- ERRORED = 'errored'
- JOINED = 'joined'
- JOINING = 'joining'
- LEAVING = 'leaving'
- class pyphoenix.types.PushResponse(status, response, ref=None)[source]
Response from pushing a message to a channel.
- Parameters:
- class pyphoenix.types.Message(topic, event, payload, ref=None, join_ref=None)[source]
Phoenix message structure.
- Parameters:
- to_list()[source]
Convert to Phoenix wire format [join_ref, ref, topic, event, payload].
- Return type:
- class pyphoenix.types.PresenceMeta(online_at, user_id=None, metadata=None)[source]
Metadata for presence tracking.
- class pyphoenix.types.PresenceState(metas)[source]
State of a presence entry.
- Parameters:
metas (
list[PresenceMeta])
-
metas:
list[PresenceMeta]
- property first_meta: PresenceMeta | None
Get the first (oldest) meta entry.
- __init__(metas)
- Parameters:
metas (
list[PresenceMeta])