setuptools-protobuf
Setuptools protobuf extension plugin
Decision gist · record as of 2026-08-14
Yes, if your project uses protobuf schemas and you want to automate code generation during the build process. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a straightforward choice. The main prerequisite is having protoc available; if that's already part of your build environment or CI setup, this plugin integrates cleanly.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- The external protoc executable must be present in the environment (from protobuf-compiler package on Debian, or downloaded if protoc_version is specified)
- Low friction installation with only setuptools and tomli as runtime dependencies.
- Active maintenance with recent commits; last release 289 days ago.
License · maintenance · safety
Apachev2 (permissive) — Licensed under Apache v2 (permissive), allowing commercial and private use with minimal restrictions.
last release 2025-10-29 (289 days) · last repo commit 2026-07-20 · 17 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 89,996 downloads/mo, #13,623 on PyPI
Alternatives
Verify before relying
# In pyproject.toml
[build-system]
requires = ["setuptools", "setuptools-protobuf"]
[tool.setuptools-protobuf]
protobufs = ["example/foo.proto"]
# Or in setup.py
from setuptools_protobuf import Protobuf
setup(setup_requires=['setuptools-protobuf'], protobufs=[Protobuf('example/foo.proto')])- Whether typing hint generation (mypy extra) requires mypy as a build-time dependency
- Performance characteristics when compiling large numbers of proto files
- Compatibility with protoc versions outside the tested range
What it is and what it does
setuptools-protobuf is a build-time plugin for setuptools that integrates protobuf compilation into the Python package build process. It wraps the protoc compiler and runs it during setup to convert .proto files into Python modules, placing generated files in the source tree for inclusion in the package. The plugin supports configuration via setup.py, setup.cfg, or pyproject.toml, and can optionally generate type hints when the mypy extra is enabled.
The plugin requires the protoc executable to be available in the build environment—either pre-installed on the system or automatically downloaded by specifying a protoc_version. It is designed for projects that define protocol buffer schemas and need to generate Python code from them as part of their build workflow, eliminating manual compilation steps.
Use it for
- Include protobuf-generated Python modules in a package distribution without manual pre-compilation
- Automate proto file compilation in CI/CD pipelines using GitHub Actions or similar
- Generate type hints alongside protobuf code by enabling the mypy extra
- Manage multiple .proto files with custom search paths using the proto_path configuration
- Pin a specific protoc version for reproducible builds across different environments
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if your project uses protobuf schemas and you want to automate code generation during the build process.
The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a straightforward choice. The main prerequisite is having protoc available; if that's already part of your build environment or CI setup, this plugin integrates cleanly.
Install
setuptools-protobuf on PyPI
Before you install
Low friction installation with only setuptools and tomli as runtime dependencies. Active maintenance with recent commits; last release 289 days ago.
The external protoc executable must be present in the environment (from protobuf-compiler package on Debian, or downloaded if protoc_version is specified)
License in practice
Licensed under Apache v2 (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
# In pyproject.toml
[build-system]
requires = ["setuptools", "setuptools-protobuf"]
[tool.setuptools-protobuf]
protobufs = ["example/foo.proto"]
# Or in setup.py
from setuptools_protobuf import Protobuf
setup(setup_requires=['setuptools-protobuf'], protobufs=[Protobuf('example/foo.proto')])
Verify before relying
- Whether typing hint generation (mypy extra) requires mypy as a build-time dependency
- Performance characteristics when compiling large numbers of proto files
- Compatibility with protoc versions outside the tested range
Package facts
| License | Apachev2 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagessetuptoolstomli |
| Maintenance | Actively maintained 289 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 89,996 / month, #13,623 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Version Control |
Evidence: setuptools_protobuf-0.1.16-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “protobuf compilation setuptools”
- setuptools-protobufA setuptools plugin that automates compilation of protobuf files…
- grpcio-toolsGenerates Python gRPC service stubs and message classes from Protocol…
- scikit-buildscikit-build bridges setuptools and CMake to compile CPython…
Give your agent the search over MCP, or paste the wish link into any chat.
More Version Control packages
Automatically extracts and manages Python package versions from git or Mercurial metadata instead of hardcoding them, and includes SCM-tracked files in source distributions.
Dulwich provides pure Python access to Git repositories—both local and remote—without requiring Git or native code to be installed, offering an alternative to calling Git directly.
setuptools-rust is a setuptools plugin that compiles and packages Python extensions written in Rust, using PyO3 or rust-cpython bindings.
pygit2 provides Python bindings to libgit2, enabling direct programmatic access to Git repository operations at the plumbing level without shelling out to the git command-line tool.
A Poetry plugin that automatically derives and injects version numbers from version control tags into your project during builds, using Dunamai to support multiple VCS systems.
Install it if you use Poetry 1.2.0+ and want to eliminate manual version management in your build workflow.
Parses and applies patch files in multiple diff formats (unified, context, normal, ed, rcs) and from several source control systems (Git, SVN, CVS).
See also hatch-protobuf · pylint-protobuf · protoletariat · grpcio-tools · nanopb · setuptools-git · opensearch-protobufs · setuptools-golang · protobuf_to_pydantic · pbr