tree: 0758483ec23e3ad6be4f24d985ff928436a447a1 [path history] [tgz]
  1. interop/
  2. src/
  3. README.md
  4. requirements.txt
src/python/README.md

gRPC Python

The Python facility of gRPC.

Status

Alpha : Ready for early adopters

PREREQUISITES

  • Python 2.7, virtualenv, pip
  • homebrew on Mac OS X, linuxbrew on Linux. These simplify the installation of the gRPC C core.

INSTALLATION

On Mac OS X, install homebrew. On Linux, install linuxbrew. Run the following command to install gRPC Python.

$ curl -fsSL https://goo.gl/getgrpc | bash -s python

This will download and run the gRPC install script, then install the latest version of the gRPC Python package. It also installs the Protocol Buffers compiler (protoc) and the gRPC protoc plugin for python.

BUILDING FROM SOURCE

$ 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

PACKAGING

  • Install packaging dependencies
$ pip install setuptools twine
  • Push to PyPI
$ ../../tools/distrib/python/submit.py