Skip to main content

Plugin for setuptools to compile protobuf and gRPC service files to python modules.

Usage

This package provides build_grpc command.

Run python setup.py build_grpc for available options.

Options

Command build_grpc provides following options:

  • proto_files: Newline separated list of glob patterns matching protobuf files to be compiled. Paths are relative to the current directory. ** can be used to match any files and zero or more directories. Default value is empty list.

  • grpc_files: Newline separated list of glob patterns matching grpc service files to be compiled. Paths are relative to the current directory. ** can be used to match any files and zero or more directories. Default value is empty list.

  • proto_path: Path to root directory with protobuf files. This path is passed through -I option to grpc_tools.protoc. Default is . (current directory).

  • output_path: Path to root directory for generated python modules. This path is passed through --python_out or --grpc_python_out option to grpc_tools.protoc. Default is . (current directory).

Example

# pyproject.toml
[build-system]
requires = ["setuptools", "setuptools-grpc"]
build-backend = "setuptools.build_meta"
# setup.py
from distutils.command.build import build
from setuptools import setup

class custom_build(build):
    sub_commands = [
        ('build_grpc', None),
    ] + build.sub_commands

setup(cmdclass={'build': custom_build})
# setup.cfg
[build_grpc]
proto_files = src/**/*.proto
grpc_files = src/**/*_grpc.proto
proto_path = ./src
output_path = ./out

Metadata

Release files for setuptools-grpc 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for setuptools-grpc 0.2
File Size Uploaded
setuptools-grpc-0.2.tar.gz 16.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for setuptools-grpc 0.2
File Interpreter ABI Platform
setuptools_grpc-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 32.9 kB

Release files / setuptools-grpc-0.2.tar.gz

Download URL setuptools-grpc-0.2.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
01234d64032db691e04890c0bbbeb8a0089898e094a4d2cb05105dcda9c13fc0
BLAKE2b-256 checksum
How to use checksums
ff837ff935e5d3ab4860378f3aab82d3bc411543a1d41d37a897e8e54d12783f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

Release files / setuptools_grpc-0.2-py3-none-any.whl

Download URL setuptools_grpc-0.2-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34302dfedc095453034af085e5cfd4d2ef9d41f14d28710a2ccca2fc782f5e05
BLAKE2b-256 checksum
How to use checksums
03d01ff223a4f7f82fed3975df41adb1c95849c57e8acf78ce5d410973a17265
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

Release history Release notifications | RSS feed

1.0.0

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page