File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # Clients
2+
3+ !!! warning
4+ Make sure to enable client generation when compiling your code. See [ TODO link]
5+
6+ ## Synchronous clients
7+
8+ Compile the following proto file in a directory called ` example ` , with the generation of synchronous clients activated.
9+
10+ ``` proto
11+ syntax = "proto3";
12+
13+ message Request {}
14+ message Response {}
15+
16+ service MyService {
17+ rpc MyRPC(Request) returns (Response);
18+ }
19+ ```
20+
21+ The synchronous client can be used as follows:
22+
23+ ``` python
24+ import grpc
25+
26+ from example import Request, MyServiceStub
27+
28+ with grpc.insecure_channel(" address:port" ) as channel:
29+ client = MyServiceStub(channel)
30+
31+ response = client.my_rpc(Request())
32+ ```
33+
34+ ## Asynchronous clients
35+
36+ ### With grpcio
37+
38+ !!! warning
39+ No yet supported
40+
41+ ### With grpclib
42+
43+ !!! warning
44+ Documentation not yet available
Original file line number Diff line number Diff line change 1515 - Getting Started : getting-started.md
1616 - Tutorial :
1717 - Messages : tutorial/messages.md
18+ - Clients : tutorial/clients.md
1819 - API : api.md
19- - Migrating : migrating.md
2020 - Betterproto2 compiler : https://betterproto.github.io/python-betterproto2-compiler/
2121
2222plugins :
You can’t perform that action at this time.
0 commit comments