Skip to main content

UNKNOWN

Project description

Package for gRPC Python tools.

Installation

The gRPC Python tools package is available for Linux, Mac OS X, and Windows running Python 2.7.

From PyPI

If you are installing locally…

$ pip install grpcio-tools

Else system wide (on Ubuntu)…

$ sudo pip install grpcio-tools

If you’re on Windows make sure that you installed the pip.exe component when you installed Python (if not go back and install it!) then invoke:

$ pip.exe install grpcio-tools

Windows users may need to invoke pip.exe from a command line ran as administrator.

n.b. On Windows and on Mac OS X one must have a recent release of pip to retrieve the proper wheel from PyPI. Be sure to upgrade to the latest version!

You might also need to install Cython to handle installation via the source distribution if gRPC Python’s system coverage with wheels does not happen to include your system.

From Source

Building from source requires that you have the Python headers (usually a package named python-dev) and Cython installed. It further requires a GCC-like compiler to go smoothly; you can probably get it to work without GCC-like stuff, but you may end up having a bad time.

$ export REPO_ROOT=grpc  # REPO_ROOT can be any directory of your choice
$ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc $REPO_ROOT
$ cd $REPO_ROOT
$ git submodule update --init

$ cd tools/distrib/python/grpcio_tools
$ python ../make_grpcio_tools.py

# For the next command do `sudo pip install` if you get permission-denied errors
$ pip install .

You cannot currently install Python from source on Windows. Things might work out for you in MSYS2 (follow the Linux instructions), but it isn’t officially supported at the moment.

Troubleshooting

Help, I …

  • … see a pkg_resources.VersionConflict when I try to install grpc

    This is likely because pip doesn’t own the offending dependency, which in turn is likely because your operating system’s package manager owns it. You’ll need to force the installation of the dependency:

    pip install --ignore-installed $OFFENDING_DEPENDENCY

    For example, if you get an error like the following:

    Traceback (most recent call last):
    File "<string>", line 17, in <module>
     ...
    File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 509, in find
      raise VersionConflict(dist, req)
    pkg_resources.VersionConflict: (six 1.8.0 (/usr/lib/python2.7/dist-packages), Requirement.parse('six>=1.10'))

    You can fix it by doing:

    sudo pip install --ignore-installed six
  • … see compiler errors on some platforms when either installing from source or from the source distribution

    If you see

    /tmp/pip-build-U8pSsr/cython/Cython/Plex/Scanners.c:4:20: fatal error: Python.h: No such file or directory
    #include "Python.h"
                    ^
    compilation terminated.

    You can fix it by installing python-dev package. i.e

    sudo apt-get install python-dev

    If you see something similar to:

    third_party/protobuf/src/google/protobuf/stubs/mathlimits.h:173:31: note: in expansion of macro 'SIGNED_INT_MAX'
    static const Type kPosMax = SIGNED_INT_MAX(Type); \\
                               ^

    And your toolchain is GCC (at the time of this writing, up through at least GCC 6.0), this is probably a bug where GCC chokes on constant expressions when the -fwrapv flag is specified. You should consider setting your environment with CFLAGS=-fno-wrapv or using clang (CC=clang).

Usage

Given protobuf include directories $INCLUDE, an output directory $OUTPUT, and proto files $PROTO_FILES, invoke as:

$ python -m grpc.tools.protoc -I$INCLUDE --python_out=$OUTPUT --grpc_python_out=$OUTPUT $PROTO_FILES

To use as a build step in distutils-based projects, you may use the provided command class in your setup.py:

setuptools.setup(
  # ...
  cmdclass={
    'build_proto_modules': grpc.tools.command.BuildPackageProtos,
  }
  # ...
)

Invocation of the command will walk the project tree and transpile every .proto file into a _pb2.py file in the same directory.

Note that this particular approach requires grpcio-tools to be installed on the machine before the setup script is invoked (i.e. no combination of setup_requires or install_requires will provide access to grpc.tools.command.BuildPackageProtos if it isn’t already installed). One way to work around this can be found in our grpcio-health-checking package:

class BuildPackageProtos(setuptools.Command):
  """Command to generate project *_pb2.py modules from proto files."""
  # ...
  def run(self):
    from grpc.tools import command
    command.build_package_protos(self.distribution.package_dir[''])

Now including grpcio-tools in setup_requires will provide the command on-setup as desired.

For more information on command classes, consult distutils and setuptools documentation.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grpcio-tools-1.1.3.tar.gz (1.8 MB view details)

Uploaded Source

Built Distributions

grpcio_tools-1.1.3-cp36-cp36m-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.6m Windows x86-64

grpcio_tools-1.1.3-cp36-cp36m-win32.whl (1.1 MB view details)

Uploaded CPython 3.6m Windows x86

grpcio_tools-1.1.3-cp36-cp36m-manylinux1_x86_64.whl (19.3 MB view details)

Uploaded CPython 3.6m

grpcio_tools-1.1.3-cp36-cp36m-manylinux1_i686.whl (18.5 MB view details)

Uploaded CPython 3.6m

grpcio_tools-1.1.3-cp36-cp36m-macosx_10_9_intel.whl (3.2 MB view details)

Uploaded CPython 3.6m macOS 10.9+ intel

grpcio_tools-1.1.3-cp35-cp35m-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.5m Windows x86-64

grpcio_tools-1.1.3-cp35-cp35m-win32.whl (1.1 MB view details)

Uploaded CPython 3.5m Windows x86

grpcio_tools-1.1.3-cp35-cp35m-manylinux1_x86_64.whl (19.3 MB view details)

Uploaded CPython 3.5m

grpcio_tools-1.1.3-cp35-cp35m-manylinux1_i686.whl (18.5 MB view details)

Uploaded CPython 3.5m

grpcio_tools-1.1.3-cp35-cp35m-macosx_10_9_intel.whl (3.2 MB view details)

Uploaded CPython 3.5m macOS 10.9+ intel

grpcio_tools-1.1.3-cp34-cp34m-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.4m Windows x86-64

grpcio_tools-1.1.3-cp34-cp34m-win32.whl (1.6 MB view details)

Uploaded CPython 3.4m Windows x86

grpcio_tools-1.1.3-cp34-cp34m-manylinux1_x86_64.whl (19.3 MB view details)

Uploaded CPython 3.4m

grpcio_tools-1.1.3-cp34-cp34m-manylinux1_i686.whl (18.5 MB view details)

Uploaded CPython 3.4m

grpcio_tools-1.1.3-cp34-cp34m-macosx_10_9_intel.whl (3.2 MB view details)

Uploaded CPython 3.4m macOS 10.9+ intel

grpcio_tools-1.1.3-cp27-cp27mu-manylinux1_x86_64.whl (19.3 MB view details)

Uploaded CPython 2.7mu

grpcio_tools-1.1.3-cp27-cp27mu-manylinux1_i686.whl (18.5 MB view details)

Uploaded CPython 2.7mu

grpcio_tools-1.1.3-cp27-cp27m-win_amd64.whl (1.5 MB view details)

Uploaded CPython 2.7m Windows x86-64

grpcio_tools-1.1.3-cp27-cp27m-win32.whl (1.6 MB view details)

Uploaded CPython 2.7m Windows x86

grpcio_tools-1.1.3-cp27-cp27m-manylinux1_x86_64.whl (19.3 MB view details)

Uploaded CPython 2.7m

grpcio_tools-1.1.3-cp27-cp27m-manylinux1_i686.whl (18.5 MB view details)

Uploaded CPython 2.7m

grpcio_tools-1.1.3-cp27-cp27m-macosx_10_10_intel.whl (2.9 MB view details)

Uploaded CPython 2.7m macOS 10.10+ intel

File details

Details for the file grpcio-tools-1.1.3.tar.gz.

File metadata

File hashes

Hashes for grpcio-tools-1.1.3.tar.gz
Algorithm Hash digest
SHA256 831d2d7db7c9b4d7e1751f65780591799cdfdb3b1bb6329aa283347b33d80093
MD5 fc1e0e5f4dc39f7912c424a2e634d413
BLAKE2b-256 b71b74d793e738945c18b697337cf53f804fb93ea98d73653f6ff7158a4d8151

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 4d629daa597cd95b87087c0d98a63d1eefca950c359f4d6c23f33a71c01a24ee
MD5 88311177ce32e94cad6b817158bb1d3b
BLAKE2b-256 74eef50948dd32d7184af5ecae69082120bbcbde9b016c638c7f9c3355a07c41

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp36-cp36m-win32.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 af4fa50925f6ec9ed5208fce236e0bf6af8424c663371a881450515b5eebae6c
MD5 ae005a2b159d860e26c285dc07d0610a
BLAKE2b-256 af89c6c8ca1833fa535abc7c2ef852624372e37dfbe6f5124ca8ce6ee6841072

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 76aca16518e1a77e50a2dd400f2ebab9206821f3a83b335c6ab8fcf2af46ddff
MD5 cb1c56a16b3f8479b27b482886e1cca0
BLAKE2b-256 839de443207f14feff06c2fc42e6aa01bce390ed51b07f8fcb6af2b4bffb4705

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp36-cp36m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 816ca995d47580ddb58fcf952f8e6b26a63dd47d8ed17307eb3879e22296e133
MD5 618d75eb8153e985dd6e095ed9a9bb2b
BLAKE2b-256 4f2aeee492d4612c6486e691b8d3e559a9ae0ac2e2ecc989c334d5827916c2b6

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp36-cp36m-macosx_10_9_intel.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp36-cp36m-macosx_10_9_intel.whl
Algorithm Hash digest
SHA256 867e3734c6e8fa7f8d3abdec0c42bc764f0dc4d8bc751b5d34ebd7bf42cd5eb5
MD5 d6c91cd9a79b4e841694b4856891c21f
BLAKE2b-256 56bbfc079a0c38e25353898f39301233be3ba6586c0f91305cbbe1880345c030

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 130636df8fc64798b2481bbd0d3cda3cc9c00b5a69fb9ccbf92fde6a6cd2a446
MD5 92d1492b857a2de6987f8e71ff820d76
BLAKE2b-256 69f301845937b8be8792bc2684e202061851b117d3be9ca9ec67c08cf7b857b2

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 1d0554d703e66e3ce56c1fe575d27836deecb9885f3b540bd06aa103f97e3a55
MD5 a9567225365c1b607c38abd983ef0bbb
BLAKE2b-256 6b901a17941b1f2af4ffdd82e017d17f6c8241b2f5ad38d7bce7fc59ef2e873a

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b8e548d3b78f17683a456e2d4944c9ccbeb6dada504f50f2e0d3f761ad636d76
MD5 e26c1ab65a20c2161453f5e57d596a24
BLAKE2b-256 576827323712c69bcb975774e0ec4e79525a849474db8299f1423e944d5a37c1

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp35-cp35m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 3a3f5d7916ccc5a09ac11cac1f8f2031b901ba7a91729d8cabfa13654b4c2c8c
MD5 273ecf302a2f38985e9dd0fb3b549596
BLAKE2b-256 d789c93738f30ada88ff3656bc67a2c1523ed263f10032aa588dabab61fce042

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp35-cp35m-macosx_10_9_intel.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp35-cp35m-macosx_10_9_intel.whl
Algorithm Hash digest
SHA256 e5551c66c08ed73e271b138c0d5aa780ccb525ae846ba84d1a2e8f012bd71276
MD5 e0ecf1c1671a80a6dba50e67ada70c9b
BLAKE2b-256 cf71fdb652c31698a782655f894bd2c5d0ae59b4bb861b672221cabf6842d330

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 90b79ecddeff7cb6184bbcf799b21725a372610f1b608cc565da97ca63bdee8c
MD5 2ee013ee29a95eebf9053202da38e4ed
BLAKE2b-256 e872c40a0974d88c2361d8f36dcc8da09854fbdff1b2220142c4050c06084849

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 942e7628d92425985db95f383635aab713150edbcb6c051e487a159c52b88dee
MD5 bbd7cb82fd7db9de6392eb521a33b9a9
BLAKE2b-256 8eb45a0a16981d6f1189f49dab2982007e919dc5ce28802d4a8ce13f3a6db5d6

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f25281d14f9060adb0cc223d824975b46a3761b1312325da4b1da6ee87a3e20f
MD5 c363a4ca4012ba2860ef37139832a69b
BLAKE2b-256 e1a67b8414e58a8c23b793338159730ea5a8d882fdb49b2b542ab9b710630187

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp34-cp34m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 775ae1c8581ab771ddb4a84b5e2bf27e4d1990ceece4b6119fbac99fa1585542
MD5 4a2e8422bd86529fde5d82c10aa91275
BLAKE2b-256 ff2fb0994d9732b6b1e73d710d07aa2ee868d1ad6eed758675e1412d205d84e9

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp34-cp34m-macosx_10_9_intel.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp34-cp34m-macosx_10_9_intel.whl
Algorithm Hash digest
SHA256 6d451092147838fe8c051b520d33ba9702408968a150e87fd388fd5a708a3f1c
MD5 0b47d31fcfe5544a206cd86497b89f32
BLAKE2b-256 2539da58d61cc356eb9cd6ae1389cedcb5333e145efbe6901972b69a6087a503

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8c60fe494a485b9bff802bd4a52e4003212ac028b65802950601daaba724b07e
MD5 278ec17b9579c98637e7339a40a1949d
BLAKE2b-256 1717a339300acf544594c159d564567a02693255f5b19c65a3d5e081619e1bd5

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp27-cp27mu-manylinux1_i686.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 238cca396b6bf6b9402f9da30947658a436a9cd1b46bb152b00caa77d4f59ad4
MD5 010991b013d3e53dfe21eef583543d06
BLAKE2b-256 4d31d8fae1f62aac81e98759556cd7744b51deac157275522571406c52a90a42

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 192b12ca40db33840d34ad87dc48698438d512557c0ddb91de2ef3ce0b3ccfe6
MD5 e4fd4f5c4e681c67efbbd10348b1cbae
BLAKE2b-256 b0cfa74d3aa94a67ca0b2d3b3096f09726d8e69079eafaa5f6eddfb33ba12f4b

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp27-cp27m-win32.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 515f9cb94218bca7586444405fc03f80027750b8fff897662af093e559f031f9
MD5 55a14b0c8f75bbd4d3c9da77b0e2b034
BLAKE2b-256 a525ea98ba0056826dc17c2c6f19ee73759ccba39f94159c7e45e24c111f6db7

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 34a6e175cb42b9ff2085e0480946e18db2c35f34c7899e3277266797607469a7
MD5 bedd4f36712e2526a227c385430f08a3
BLAKE2b-256 433c3778dd957253e7f4ff7da02efd9bdf1bfd5f809170245430b8613cc377c3

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp27-cp27m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 c6a697213bde1bc9f928acec894c32322e12fdcb184aa68cebd54a64d8d698aa
MD5 9e7b50e2bed538d6d6db097b3760ea0e
BLAKE2b-256 7361c65aeba3c1264d00da7b7cd7c3f8aeb32eac4d808839e3502e35815a52c1

See more details on using hashes here.

Provenance

File details

Details for the file grpcio_tools-1.1.3-cp27-cp27m-macosx_10_10_intel.whl.

File metadata

File hashes

Hashes for grpcio_tools-1.1.3-cp27-cp27m-macosx_10_10_intel.whl
Algorithm Hash digest
SHA256 33cd7819bc147783c92aea3ee0f2e9a75c8ab2f186e57e0f6e39bce292273ead
MD5 da6368cb0aea4ecf7b612ce1f8f84037
BLAKE2b-256 f21d4d38c736cf6cb9be5a3a078921e08c1ccce327bfa70597d8889393496431

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page