Masood Malekghassemi 8be7a0491c Merge pull request #3149 from nathanielmanistaatgoogle/drop-invoker há 10 anos atrás
..
grpcio 1d14618a0e Fix grace period bug in _end.accept_ticket há 10 anos atrás
grpcio_health_checking 12dadafd22 Add health-checking to Python há 10 anos atrás
grpcio_test dff73c7d23 Drop invoker during test tear-down há 10 anos atrás
README.md aec4ac8221 update debian unstable to testing há 10 anos atrás

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. These simplify the installation of the gRPC C core.

INSTALLATION

Linux (Debian):

Add Debian testing to your sources.list file. Example:

echo "deb http://ftp.us.debian.org/debian testing main contrib non-free" | \
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