Nathaniel Manista faafb38d14 Merge pull request #1558 from soltanmm/extension 10 năm trước cách đây
..
interop 7181d85f8b Merge pull request #1668 from soltanmm/cancel-interop 10 năm trước cách đây
src a2918d2e04 Move batch API exposure to Python layer 10 năm trước cách đây
README.md 6ab757bc94 Update README.md 10 năm trước cách đây
requirements.txt b98188e826 Upgrading third_party/protobuf to version v3.0.0-alpha-1-150-g7d5cf8d. 10 năm trước cách đây

README.md

gRPC Python

The Python facility of gRPC.

Status

Alpha : Ready for early adopters

Prerequisites

Python 2.7, virtualenv, pip, libprotobuf-dev, and libprotoc-dev.

Building from source

  • Build the gRPC core from the root of the gRPC git repo

    $ make shared_c static_c
    
  • Use build_python.sh to build the Python code and install it into a virtual environment

    $ tools/run_tests/build_python.sh
    

Testing

  • Use run_python.sh to run gRPC as it was installed into the virtual environment

    $ tools/run_tests/run_python.sh
    

Installing

  • Install the gRPC core

    • Debian package

      $ wget https://github.com/grpc/grpc/releases/download/release-0_5_0/libgrpc_0.5.0_amd64.deb
      $ wget https://github.com/grpc/grpc/releases/download/release-0_5_0/libgrpc-dev_0.5.0_amd64.deb
      $ sudo dpkg -i libgrpc_0.5.0_amd64.deb libgrpc-dev_0.5.0_amd64.deb
      
    • From source

  • Install gRPC Python's dependencies

    $ pip install -r src/python/requirements.txt
    
  • Install gRPC Python

    $ pip install src/python/src
    

Packaging to PyPI

  • Install packaging dependencies

    $ pip install setuptools twine
    
  • Push to PyPI

    $ ../../tools/distrib/python/submit.py