Skip to content
Snippets Groups Projects
Select Git revision
  • a1880228aa63d579b772a403090616ade95b41d5
  • master default protected
  • arm-aarch-platform
  • arm-platform
  • vjpai-patch-3
  • vjpai-patch-1
  • v1.27.x
  • jtattermusch-patch-2
  • jtattermusch-patch-1
  • update-java-worker-example-in-performance-docs
  • revert-21805-revert-21797-reintroduce_21527
  • revert-21804-tls-credentials-1
  • zhen_cleanup_namecheck
  • revert-21806-revert-21767-revert-21725-revert-21680-cq_ordering
  • vjpai-patch-2
  • revert-21766-tls-credentials-1
  • revert-21640-change_local_tcp_security_level
  • revert-21680-cq_ordering
  • revert-21527-unify_boringssl_deps2
  • revert-20803-grpclb_stabilization
  • fix-kokoro-rvm-key
  • v1.27.0
  • v1.27.0-pre2
  • v1.27.0-pre1
  • v1.26.0
  • v1.26.0-pre1
  • v1.25.0
  • v1.25.0-pre1
  • v1.24.3
  • v1.24.2
  • v1.24.1
  • v1.23.1
  • v1.24.0
  • v1.24.0-pre2
  • v1.24.0-pre1
  • v1.22.1
  • v1.23.0
  • v1.23.0-pre1
  • v1.22.0
  • v1.22.0-pre1
  • v1.21.4
41 results

python

user avatar
Nathaniel Manista authored
These changes probably should have been in 3b0fefb2 but
were overlooked.
a1880228
History

gRPC Python

The Python facility of gRPC.

Status

Beta : Core behavior well-used and proven; bugs lurk off the beaten path.

PREREQUISITES

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

INSTALLATION

Linux (Debian):

Add Debian jessie-backports to your sources.list file. Example:

echo "deb http://http.debian.net/debian jessie-backports main" | \
sudo tee -a /etc/apt/sources.list

Install the gRPC Debian package

sudo apt-get update
sudo apt-get install libgrpc-dev

Install the gRPC Python module

sudo pip install grpcio

Mac OS X

Install homebrew. 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.

EXAMPLES

Please read our online documentation for a Quick Start and a detailed example

BUILDING FROM SOURCE

  • Clone this repository

  • Initialize the git submodules

$ git submodule update --init
  • Make the libraries
$ make
  • Use build_python.sh to build the Python code and install it into a virtual environment
$ CONFIG=opt tools/run_tests/build_python.sh 2.7

TESTING

  • Use run_python.sh to run gRPC as it was installed into the virtual environment
$ CONFIG=opt PYVER=2.7 tools/run_tests/run_python.sh

PACKAGING

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