github.com/micro/go-micro/examples@v0.0.0-20210105173217-bf4ab679e18b/proxy/python/README.md (about)

     1  # Python
     2  
     3  - proxy.py: methods to call proxy
     4  - rpc_{client,server}.py: RPC client/server
     5  - http_{client,server}.py: HTTP client/server
     6  
     7  ## RPC Example
     8  
     9  Run proxy
    10  ```shell
    11  micro proxy
    12  ```
    13  
    14  Run server
    15  ```shell
    16  # serves Say.Hello
    17  python rpc_server.py
    18  ```
    19  
    20  Run client
    21  ```shell
    22  # calls go.micro.srv.greeter Say.Hello
    23  python rpc_client.py
    24  ```
    25  
    26  ## HTTP Example
    27  
    28  Run proxy with proxy handler
    29  ```shell
    30  micro proxy --handler=http
    31  ```
    32  
    33  Run server
    34  ```shell
    35  # serves /greeter
    36  python http_server.py
    37  ```
    38  
    39  Run client
    40  ```shell
    41  # calls /greeter
    42  python http_client.py
    43  ```