trevrpc 1.13.0__py3-none-any.whl
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.
- trevrpc/__init__.py +55 -0
- trevrpc/_call.py +1102 -0
- trevrpc/_channel.py +363 -0
- trevrpc/_compression.py +456 -0
- trevrpc/_connection_metadata.py +95 -0
- trevrpc/_datagram.py +213 -0
- trevrpc/_frames.py +90 -0
- trevrpc/_metadata.py +74 -0
- trevrpc/_method.py +37 -0
- trevrpc/_qmux.py +1169 -0
- trevrpc/_quic.py +423 -0
- trevrpc/_status.py +151 -0
- trevrpc/_stream.py +282 -0
- trevrpc/_varint.py +50 -0
- trevrpc/_wire.py +312 -0
- trevrpc/_zstd.py +344 -0
- trevrpc/py.typed +0 -0
- trevrpc-1.13.0.dist-info/METADATA +171 -0
- trevrpc-1.13.0.dist-info/RECORD +21 -0
- trevrpc-1.13.0.dist-info/WHEEL +4 -0
- trevrpc-1.13.0.dist-info/licenses/LICENSE +21 -0
trevrpc/__init__.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""TrevRPC for Python: a client for TrevRPC services over native QUIC and QMux over TLS.
|
|
2
|
+
|
|
3
|
+
Generate a client for your service with `protoc-gen-py` (protobuf-py's messages) and
|
|
4
|
+
`protoc-gen-trevrpc-py`, then call it on a `Channel`::
|
|
5
|
+
|
|
6
|
+
import trevrpc
|
|
7
|
+
from gen.greeter_trevrpc import GreeterClient
|
|
8
|
+
from gen.greeter_pb import HelloRequest
|
|
9
|
+
|
|
10
|
+
async with trevrpc.Channel("example.com:443") as channel:
|
|
11
|
+
greeter = GreeterClient(channel)
|
|
12
|
+
reply = await greeter.say_hello(HelloRequest(name="Ada"), timeout=5)
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from ._call import (
|
|
16
|
+
BidiStreamingCall,
|
|
17
|
+
CallOptions,
|
|
18
|
+
ClientStreamingCall,
|
|
19
|
+
ResponseStream,
|
|
20
|
+
Status,
|
|
21
|
+
)
|
|
22
|
+
from ._channel import Channel, ChannelOptions, Transport, TransportPolicy, connect
|
|
23
|
+
from ._compression import Compression, Dictionary
|
|
24
|
+
from ._frames import DEFAULT_MAX_FRAME_SIZE
|
|
25
|
+
from ._metadata import Metadata, MetadataInput
|
|
26
|
+
from ._method import Method, MethodCompression, MethodKind
|
|
27
|
+
from ._qmux import QMUX_ALPN
|
|
28
|
+
from ._quic import ALPN
|
|
29
|
+
from ._status import Code, StatusDetail, TrevRpcError
|
|
30
|
+
|
|
31
|
+
__all__ = [
|
|
32
|
+
"ALPN",
|
|
33
|
+
"DEFAULT_MAX_FRAME_SIZE",
|
|
34
|
+
"QMUX_ALPN",
|
|
35
|
+
"BidiStreamingCall",
|
|
36
|
+
"CallOptions",
|
|
37
|
+
"Channel",
|
|
38
|
+
"ChannelOptions",
|
|
39
|
+
"ClientStreamingCall",
|
|
40
|
+
"Code",
|
|
41
|
+
"Compression",
|
|
42
|
+
"Dictionary",
|
|
43
|
+
"Metadata",
|
|
44
|
+
"MetadataInput",
|
|
45
|
+
"Method",
|
|
46
|
+
"MethodCompression",
|
|
47
|
+
"MethodKind",
|
|
48
|
+
"ResponseStream",
|
|
49
|
+
"Status",
|
|
50
|
+
"StatusDetail",
|
|
51
|
+
"Transport",
|
|
52
|
+
"TransportPolicy",
|
|
53
|
+
"TrevRpcError",
|
|
54
|
+
"connect",
|
|
55
|
+
]
|