-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrpc_method.py
More file actions
58 lines (46 loc) · 1.22 KB
/
rpc_method.py
File metadata and controls
58 lines (46 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Code generated by river.codegen. DO NOT EDIT.
from collections.abc import AsyncIterable, AsyncIterator
import datetime
from typing import (
Any,
Literal,
Mapping,
NotRequired,
TypedDict,
cast,
)
from typing_extensions import Annotated
from pydantic import BaseModel, Field, TypeAdapter, WrapValidator
from replit_river.error_schema import RiverError
from replit_river.client import (
RiverUnknownError,
translate_unknown_error,
RiverUnknownValue,
translate_unknown_value,
)
import replit_river as river
def encode_Rpc_MethodInput(
x: "Rpc_MethodInput",
) -> Any:
return {
k: v
for (k, v) in (
{
"data": x.get("data"),
"data2": x.get("data2"),
}
).items()
if v is not None
}
class Rpc_MethodInput(TypedDict):
data: str
data2: datetime.datetime
class Rpc_MethodOutputData_3(BaseModel):
data_test: str | None = Field(alias="data-test", default=None)
class Rpc_MethodOutput(BaseModel):
data: str
data_3: Rpc_MethodOutputData_3 = Field(alias="data-3")
data2: datetime.datetime
Rpc_MethodOutputTypeAdapter: TypeAdapter[Rpc_MethodOutput] = TypeAdapter(
Rpc_MethodOutput
)