pondsocket 0.0.3__tar.gz → 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pondsocket-0.0.3 → pondsocket-0.0.4}/PKG-INFO +2 -2
- {pondsocket-0.0.3 → pondsocket-0.0.4}/pyproject.toml +2 -2
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/__init__.py +16 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/endpoint.py +18 -2
- pondsocket-0.0.4/src/pondsocket/py.typed +1 -0
- pondsocket-0.0.4/src/pondsocket/typed.py +249 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_smoke.py +1 -1
- pondsocket-0.0.3/src/pondsocket/py.typed +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/.gitignore +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/README.md +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/channel.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/contexts/__init__.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/contexts/connection_context.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/contexts/event_context.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/contexts/join_context.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/contexts/leave_context.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/contexts/outgoing_context.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/distributed/__init__.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/distributed/redis_pubsub.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/errors.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/hooks.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/in_memory_transport.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/lobby.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/middleware.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/parser.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/presence.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/pubsub.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/pubsub_local.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/server.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/sse_transport.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/store.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/transport.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/types.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/src/pondsocket/wire.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_channel.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_distributed_local.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_errors.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_hooks_integration.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_hooks_unit.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_in_memory_transport.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_integration.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_middleware.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_parser.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_presence.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_pubsub.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_redis_pubsub.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_sse_transport.py +0 -0
- {pondsocket-0.0.3 → pondsocket-0.0.4}/tests/test_pondsocket_store.py +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pondsocket
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: PondSocket - channel-based real-time framework with bring-your-own-server design.
|
|
5
5
|
Author: eleven-am
|
|
6
6
|
License: GPL-3.0-or-later
|
|
7
7
|
Requires-Python: >=3.11
|
|
8
|
-
Requires-Dist: pondsocket-common<0.1.0,>=0.0.
|
|
8
|
+
Requires-Dist: pondsocket-common<0.1.0,>=0.0.4
|
|
9
9
|
Provides-Extra: redis
|
|
10
10
|
Requires-Dist: redis>=5; extra == 'redis'
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pondsocket"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.4"
|
|
4
4
|
description = "PondSocket - channel-based real-time framework with bring-your-own-server design."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
7
7
|
license = { text = "GPL-3.0-or-later" }
|
|
8
8
|
authors = [{ name = "eleven-am" }]
|
|
9
9
|
dependencies = [
|
|
10
|
-
"pondsocket-common>=0.0.
|
|
10
|
+
"pondsocket-common>=0.0.4,<0.1.0",
|
|
11
11
|
]
|
|
12
12
|
|
|
13
13
|
[project.optional-dependencies]
|
|
@@ -78,6 +78,15 @@ from .server import EndpointMatch, PondSocket
|
|
|
78
78
|
from .sse_transport import SSEServerTransport
|
|
79
79
|
from .store import Store
|
|
80
80
|
from .transport import OnCloseCallback, OnMessageHandler, PushableTransport, Transport
|
|
81
|
+
from .typed import (
|
|
82
|
+
TypedChannel,
|
|
83
|
+
TypedEventContext,
|
|
84
|
+
TypedEventHandler,
|
|
85
|
+
TypedJoinContext,
|
|
86
|
+
TypedJoinHandler,
|
|
87
|
+
TypedLobby,
|
|
88
|
+
typed_lobby,
|
|
89
|
+
)
|
|
81
90
|
from .types import (
|
|
82
91
|
AllExceptSender,
|
|
83
92
|
AllUsers,
|
|
@@ -176,6 +185,12 @@ __all__ = [
|
|
|
176
185
|
"TokenBucketRateLimiter",
|
|
177
186
|
"Transport",
|
|
178
187
|
"TransportType",
|
|
188
|
+
"TypedChannel",
|
|
189
|
+
"TypedEventContext",
|
|
190
|
+
"TypedEventHandler",
|
|
191
|
+
"TypedJoinContext",
|
|
192
|
+
"TypedJoinHandler",
|
|
193
|
+
"TypedLobby",
|
|
179
194
|
"User",
|
|
180
195
|
"UserData",
|
|
181
196
|
"__version__",
|
|
@@ -197,6 +212,7 @@ __all__ = [
|
|
|
197
212
|
"parse_inbound_text",
|
|
198
213
|
"pubsub_bytes_to_event",
|
|
199
214
|
"too_many_requests",
|
|
215
|
+
"typed_lobby",
|
|
200
216
|
"unauthorized",
|
|
201
217
|
"uuid",
|
|
202
218
|
"wire_to_event",
|
|
@@ -4,9 +4,9 @@ import asyncio
|
|
|
4
4
|
import time
|
|
5
5
|
from collections.abc import Awaitable, Callable
|
|
6
6
|
from dataclasses import dataclass
|
|
7
|
-
from typing import TypeAlias
|
|
7
|
+
from typing import TypeAlias, TypeVar
|
|
8
8
|
|
|
9
|
-
from pondsocket_common import ClientActions, IncomingConnection, ServerActions, uuid
|
|
9
|
+
from pondsocket_common import ClientActions, IncomingConnection, PondSchema, ServerActions, uuid
|
|
10
10
|
|
|
11
11
|
from .channel import Channel
|
|
12
12
|
from .contexts.connection_context import ConnectionContext, ConnectionDecision
|
|
@@ -18,6 +18,7 @@ from .parser import parse
|
|
|
18
18
|
from .pubsub import PubSub
|
|
19
19
|
from .store import Store
|
|
20
20
|
from .transport import Transport
|
|
21
|
+
from .typed import TypedJoinContext, TypedJoinHandler, TypedLobby, typed_lobby
|
|
21
22
|
from .types import (
|
|
22
23
|
Event,
|
|
23
24
|
LeaveReason,
|
|
@@ -35,6 +36,9 @@ JoinHandler: TypeAlias = Callable[[JoinContext], Awaitable[None]]
|
|
|
35
36
|
JoinMiddlewareFn: TypeAlias = Callable[
|
|
36
37
|
[JoinContext, Callable[[], Awaitable[None]]], Awaitable[None]
|
|
37
38
|
]
|
|
39
|
+
PresenceT = TypeVar("PresenceT")
|
|
40
|
+
AssignsT = TypeVar("AssignsT")
|
|
41
|
+
JoinParamsT = TypeVar("JoinParamsT")
|
|
38
42
|
|
|
39
43
|
|
|
40
44
|
@dataclass(slots=True)
|
|
@@ -106,6 +110,18 @@ class Endpoint:
|
|
|
106
110
|
)
|
|
107
111
|
return lobby
|
|
108
112
|
|
|
113
|
+
def create_typed_channel(
|
|
114
|
+
self,
|
|
115
|
+
schema: PondSchema[PresenceT, AssignsT, JoinParamsT],
|
|
116
|
+
pattern: str,
|
|
117
|
+
handler: TypedJoinHandler[PresenceT, AssignsT, JoinParamsT],
|
|
118
|
+
) -> TypedLobby[PresenceT, AssignsT]:
|
|
119
|
+
async def wrapped(ctx: JoinContext) -> None:
|
|
120
|
+
await handler(TypedJoinContext(ctx))
|
|
121
|
+
|
|
122
|
+
lobby = self.create_channel(pattern, wrapped)
|
|
123
|
+
return typed_lobby(lobby, schema)
|
|
124
|
+
|
|
109
125
|
async def request_connection(
|
|
110
126
|
self,
|
|
111
127
|
incoming: IncomingConnection,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Awaitable, Callable
|
|
4
|
+
from typing import Any, Generic, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from pondsocket_common import PondEvent, PondSchema, to_pond_object
|
|
7
|
+
|
|
8
|
+
from .channel import Channel
|
|
9
|
+
from .contexts.event_context import EventContext
|
|
10
|
+
from .contexts.join_context import JoinContext
|
|
11
|
+
from .lobby import Lobby
|
|
12
|
+
from .types import User
|
|
13
|
+
|
|
14
|
+
PayloadT = TypeVar("PayloadT")
|
|
15
|
+
ResponseT = TypeVar("ResponseT")
|
|
16
|
+
PresenceT = TypeVar("PresenceT")
|
|
17
|
+
AssignsT = TypeVar("AssignsT")
|
|
18
|
+
JoinParamsT = TypeVar("JoinParamsT")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class TypedChannel(Generic[PresenceT, AssignsT]):
|
|
22
|
+
__slots__ = ("_raw",)
|
|
23
|
+
|
|
24
|
+
def __init__(self, raw: Channel) -> None:
|
|
25
|
+
self._raw = raw
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def raw(self) -> Channel:
|
|
29
|
+
return self._raw
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def name(self) -> str:
|
|
33
|
+
return self._raw.name
|
|
34
|
+
|
|
35
|
+
async def broadcast(
|
|
36
|
+
self,
|
|
37
|
+
event: PondEvent[PayloadT, ResponseT],
|
|
38
|
+
payload: PayloadT,
|
|
39
|
+
) -> None:
|
|
40
|
+
await self._raw.broadcast(event.name, to_pond_object(payload))
|
|
41
|
+
|
|
42
|
+
async def broadcast_to(
|
|
43
|
+
self,
|
|
44
|
+
event: PondEvent[PayloadT, ResponseT],
|
|
45
|
+
payload: PayloadT,
|
|
46
|
+
*user_ids: str,
|
|
47
|
+
) -> None:
|
|
48
|
+
await self._raw.broadcast_to(event.name, to_pond_object(payload), *user_ids)
|
|
49
|
+
|
|
50
|
+
async def broadcast_from(
|
|
51
|
+
self,
|
|
52
|
+
event: PondEvent[PayloadT, ResponseT],
|
|
53
|
+
payload: PayloadT,
|
|
54
|
+
sender_id: str,
|
|
55
|
+
) -> None:
|
|
56
|
+
await self._raw.broadcast_from(event.name, to_pond_object(payload), sender_id)
|
|
57
|
+
|
|
58
|
+
async def track_presence(self, user_id: str, presence: PresenceT) -> None:
|
|
59
|
+
await self._raw.track_presence(user_id, to_pond_object(presence))
|
|
60
|
+
|
|
61
|
+
async def update_presence(self, user_id: str, presence: PresenceT) -> None:
|
|
62
|
+
await self._raw.update_presence(user_id, to_pond_object(presence))
|
|
63
|
+
|
|
64
|
+
async def get_presence(self) -> dict[str, PresenceT]:
|
|
65
|
+
return cast(dict[str, PresenceT], await self._raw.get_presence())
|
|
66
|
+
|
|
67
|
+
async def get_assigns(self) -> dict[str, AssignsT]:
|
|
68
|
+
return cast(dict[str, AssignsT], await self._raw.get_assigns())
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class TypedJoinContext(Generic[PresenceT, AssignsT, JoinParamsT]):
|
|
72
|
+
__slots__ = ("_raw",)
|
|
73
|
+
|
|
74
|
+
def __init__(self, raw: JoinContext) -> None:
|
|
75
|
+
self._raw = raw
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def raw(self) -> JoinContext:
|
|
79
|
+
return self._raw
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def join_params(self) -> JoinParamsT:
|
|
83
|
+
return cast(JoinParamsT, self._raw.join_params)
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def user_id(self) -> str:
|
|
87
|
+
return self._raw.transport.get_id()
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def channel(self) -> TypedChannel[PresenceT, AssignsT]:
|
|
91
|
+
return TypedChannel(self._raw.channel)
|
|
92
|
+
|
|
93
|
+
async def accept(self, assigns: AssignsT | None = None) -> TypedJoinContext[PresenceT, AssignsT, JoinParamsT]:
|
|
94
|
+
await self._raw.accept(to_pond_object(assigns))
|
|
95
|
+
return self
|
|
96
|
+
|
|
97
|
+
async def decline(self, code: int, message: str) -> None:
|
|
98
|
+
await self._raw.decline(code, message)
|
|
99
|
+
|
|
100
|
+
async def reply(
|
|
101
|
+
self,
|
|
102
|
+
event: PondEvent[PayloadT, ResponseT],
|
|
103
|
+
payload: ResponseT,
|
|
104
|
+
) -> TypedJoinContext[PresenceT, AssignsT, JoinParamsT]:
|
|
105
|
+
await self._raw.reply(event.name, to_pond_object(payload))
|
|
106
|
+
return self
|
|
107
|
+
|
|
108
|
+
async def track(self, presence: PresenceT) -> TypedJoinContext[PresenceT, AssignsT, JoinParamsT]:
|
|
109
|
+
await self._raw.track(to_pond_object(presence))
|
|
110
|
+
return self
|
|
111
|
+
|
|
112
|
+
async def broadcast(
|
|
113
|
+
self,
|
|
114
|
+
event: PondEvent[PayloadT, ResponseT],
|
|
115
|
+
payload: PayloadT,
|
|
116
|
+
) -> TypedJoinContext[PresenceT, AssignsT, JoinParamsT]:
|
|
117
|
+
await self._raw.broadcast(event.name, to_pond_object(payload))
|
|
118
|
+
return self
|
|
119
|
+
|
|
120
|
+
async def assign(self, assigns: AssignsT) -> TypedJoinContext[PresenceT, AssignsT, JoinParamsT]:
|
|
121
|
+
await self._raw.assign(to_pond_object(assigns))
|
|
122
|
+
return self
|
|
123
|
+
|
|
124
|
+
async def get_all_presence(self) -> dict[str, PresenceT]:
|
|
125
|
+
return cast(dict[str, PresenceT], await self._raw.get_all_presence())
|
|
126
|
+
|
|
127
|
+
async def get_all_assigns(self) -> dict[str, AssignsT]:
|
|
128
|
+
return cast(dict[str, AssignsT], await self._raw.get_all_assigns())
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class TypedEventContext(Generic[PayloadT, PresenceT, AssignsT]):
|
|
132
|
+
__slots__ = ("_raw",)
|
|
133
|
+
|
|
134
|
+
def __init__(self, raw: EventContext) -> None:
|
|
135
|
+
self._raw = raw
|
|
136
|
+
|
|
137
|
+
@property
|
|
138
|
+
def raw(self) -> EventContext:
|
|
139
|
+
return self._raw
|
|
140
|
+
|
|
141
|
+
@property
|
|
142
|
+
def payload(self) -> PayloadT:
|
|
143
|
+
return cast(PayloadT, self._raw.get_payload())
|
|
144
|
+
|
|
145
|
+
@property
|
|
146
|
+
def event_name(self) -> str:
|
|
147
|
+
return self._raw.event_name
|
|
148
|
+
|
|
149
|
+
@property
|
|
150
|
+
def user(self) -> User:
|
|
151
|
+
return self._raw.user
|
|
152
|
+
|
|
153
|
+
@property
|
|
154
|
+
def assigns(self) -> AssignsT:
|
|
155
|
+
return cast(AssignsT, self._raw.user.assigns)
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def presence(self) -> PresenceT | None:
|
|
159
|
+
return cast(PresenceT | None, self._raw.user.presence)
|
|
160
|
+
|
|
161
|
+
@property
|
|
162
|
+
def channel(self) -> TypedChannel[PresenceT, AssignsT]:
|
|
163
|
+
return TypedChannel(self._raw.channel)
|
|
164
|
+
|
|
165
|
+
async def reply(
|
|
166
|
+
self,
|
|
167
|
+
event: PondEvent[Any, ResponseT],
|
|
168
|
+
payload: ResponseT,
|
|
169
|
+
) -> TypedEventContext[PayloadT, PresenceT, AssignsT]:
|
|
170
|
+
await self._raw.reply(event.name, to_pond_object(payload))
|
|
171
|
+
return self
|
|
172
|
+
|
|
173
|
+
async def broadcast(
|
|
174
|
+
self,
|
|
175
|
+
event: PondEvent[ResponseT, Any],
|
|
176
|
+
payload: ResponseT,
|
|
177
|
+
) -> TypedEventContext[PayloadT, PresenceT, AssignsT]:
|
|
178
|
+
await self._raw.broadcast(event.name, to_pond_object(payload))
|
|
179
|
+
return self
|
|
180
|
+
|
|
181
|
+
async def track(self, presence: PresenceT) -> TypedEventContext[PayloadT, PresenceT, AssignsT]:
|
|
182
|
+
await self._raw.track(to_pond_object(presence))
|
|
183
|
+
return self
|
|
184
|
+
|
|
185
|
+
async def update_presence(
|
|
186
|
+
self,
|
|
187
|
+
presence: PresenceT,
|
|
188
|
+
) -> TypedEventContext[PayloadT, PresenceT, AssignsT]:
|
|
189
|
+
await self._raw.update_presence(to_pond_object(presence))
|
|
190
|
+
return self
|
|
191
|
+
|
|
192
|
+
async def assign(self, assigns: AssignsT) -> TypedEventContext[PayloadT, PresenceT, AssignsT]:
|
|
193
|
+
await self._raw.assign(to_pond_object(assigns))
|
|
194
|
+
return self
|
|
195
|
+
|
|
196
|
+
async def get_all_presence(self) -> dict[str, PresenceT]:
|
|
197
|
+
return cast(dict[str, PresenceT], await self._raw.get_all_presence())
|
|
198
|
+
|
|
199
|
+
async def get_all_assigns(self) -> dict[str, AssignsT]:
|
|
200
|
+
return cast(dict[str, AssignsT], await self._raw.get_all_assigns())
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
TypedJoinHandler = Callable[[TypedJoinContext[PresenceT, AssignsT, JoinParamsT]], Awaitable[None]]
|
|
204
|
+
TypedEventHandler = Callable[[TypedEventContext[PayloadT, PresenceT, AssignsT]], Awaitable[None]]
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
class TypedLobby(Generic[PresenceT, AssignsT]):
|
|
208
|
+
__slots__ = ("_raw",)
|
|
209
|
+
|
|
210
|
+
def __init__(self, raw: Lobby) -> None:
|
|
211
|
+
self._raw = raw
|
|
212
|
+
|
|
213
|
+
@property
|
|
214
|
+
def raw(self) -> Lobby:
|
|
215
|
+
return self._raw
|
|
216
|
+
|
|
217
|
+
def on(
|
|
218
|
+
self,
|
|
219
|
+
event: PondEvent[PayloadT, ResponseT],
|
|
220
|
+
handler: TypedEventHandler[PayloadT, PresenceT, AssignsT],
|
|
221
|
+
) -> None:
|
|
222
|
+
async def wrapped(ctx: EventContext) -> None:
|
|
223
|
+
await handler(TypedEventContext(ctx))
|
|
224
|
+
|
|
225
|
+
self._raw.on_message(event.name, wrapped)
|
|
226
|
+
|
|
227
|
+
async def get_channel(self, name: str) -> TypedChannel[PresenceT, AssignsT] | None:
|
|
228
|
+
channel = await self._raw.get_channel(name)
|
|
229
|
+
if channel is None:
|
|
230
|
+
return None
|
|
231
|
+
return TypedChannel(channel)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def typed_lobby(
|
|
235
|
+
raw: Lobby,
|
|
236
|
+
_schema: PondSchema[PresenceT, AssignsT, JoinParamsT],
|
|
237
|
+
) -> TypedLobby[PresenceT, AssignsT]:
|
|
238
|
+
return TypedLobby(raw)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
__all__ = [
|
|
242
|
+
"TypedChannel",
|
|
243
|
+
"TypedEventContext",
|
|
244
|
+
"TypedEventHandler",
|
|
245
|
+
"TypedJoinContext",
|
|
246
|
+
"TypedJoinHandler",
|
|
247
|
+
"TypedLobby",
|
|
248
|
+
"typed_lobby",
|
|
249
|
+
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|