github.com/xxf098/lite-proxy@v0.15.1-0.20230422081941-12c69f323218/api/rpc/liteclientpy/README.md (about)

     1  ### setup environment
     2  ```bash
     3  # python3 -m pip install virtualenv
     4  virtualenv -p python3 env
     5  source env/bin/activate
     6  pip install grpcio grpcio-tools
     7  cp ../lite/lite.proto ./
     8  # generate lite_pb2.py lite_pb2_grpc.py
     9  python3 -m grpc_tools.protoc --proto_path=. ./lite.proto --python_out=. --grpc_python_out=.
    10  ```
    11  
    12  ### start test
    13  ```bash
    14  # open a new terminal to start the grpc server
    15  ./lite -grcp -p 10999
    16  
    17  # open another terminal to start the python client
    18  python3 client.py
    19  ```
    20