skillfed

protoc-gen-openapiv2

Provides the missing pieces for gRPC Gateway.

protoc-gen-openapiv2 v0.0.1 2.0M downloads/30d#3,356 on PyPI0
Permissive license Abandoned released

What it is and what it does

protoc-gen-openapiv2 is a protoc plugin that generates Python code to support gRPC Gateway protoc annotations. It fills a gap in the gRPC Gateway ecosystem by providing the missing Python runtime support that the generated code depends on, specifically providing access to google.api.annotations_pb2 and related protocol buffer definitions through googleapis-common-protos.

The package is designed to work with the new protobuf major version (as of 2022) and requires protobuf as a runtime dependency. It is a code generation tool rather than a runtime library—you install it to run protoc during your build process, not to import and use directly in application code.

Use it for:

  • Generate Python gRPC service stubs from proto files that use gRPC Gateway annotations for REST API exposure.
  • Build microservices that expose both gRPC and HTTP/REST endpoints from a single proto definition.
  • Integrate gRPC Gateway-annotated proto files into Python projects that need OpenAPI v2 support.
  • Support proto-based API contracts that require both gRPC and REST client generation.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Generates Python support code for gRPC Gateway protoc annotations, bridging the gap between gRPC Gateway and Python protobuf stubs.

No. The package is abandoned (last release 2022-12-02, no commits since) and has zero repository stars. While install friction is low and the license is permissive, the lack of maintenance means it will not track upstream gRPC Gateway or protobuf changes. Consider whether a maintained alternative or direct gRPC Gateway integration exists before adopting this.

Install

protoc-gen-openapiv2 on PyPI

pip

pip install protoc-gen-openapiv2

uv

uv add protoc-gen-openapiv2

poetry

poetry add protoc-gen-openapiv2

Installing protoc-gen-openapiv2

Before you install

Low install friction with only two runtime dependencies (googleapis-common-protos and protobuf), but the package is abandoned—last release was 2022-12-02 with no subsequent maintenance.

License in practice

Licensed under BSD (permissive), which places no significant restrictions on use or redistribution.

Quickstart

pip install protoc-gen-openapiv2

Then use protoc with the plugin during your build process to generate Python code from proto files with gRPC Gateway annotations.

Requires protobuf and googleapis-common-protos as runtime dependencies; designed for protobuf major version as of 2022.

Verify before relying

  • Whether the generated code remains compatible with current protobuf major versions beyond the 2022 release date.
  • Whether gRPC Gateway upstream changes since 2022-12-02 have introduced incompatibilities with this generator.
  • Active community or alternative maintained forks for this functionality.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 2 — googleapis-common-protos, protobuf
Maintenance abandoned — 1,351 days since the last release
Last repo commit
First released
Downloads 2,023,032/month — #3,356 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: protoc_gen_openapiv2-0.0.1-py3-none-any.whl

License :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

grpc gateway python supportprotoc plugin openapi v2grpc gateway protobuf codegenprotoc annotations pythongrpc gateway python bindings
grpcprotobuf-codegenabandoned

More Build Tools packages

packaging

Provides reusable utilities for Python…

permissive · top 100 on PyPI

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

pip

pip is the standard installer for Python…

permissive · top 100 on PyPI

hatchling

Hatchling is a standards-compliant Python build…

permissive · top 100 on PyPI

grpcio-tools

Generates Python gRPC service stubs and message…

permissive · top 1,000 on PyPI

pre-commit

pre-commit is a framework for installing and…

permissive · top 1,000 on PyPI

grpc-gateway-protoc-gen-openapiv2

Generates Python support code for gRPC Gateway…

permissive · top 15,000 on PyPI

hatch-protobuf

A Hatch build plugin that generates Python…

copyleft · top 15,000 on PyPI

protoc-gen-connect-python

A protoc plugin that generates Python client…

permissive · top 15,000 on PyPI

pbtools

Generates C source code from Protocol Buffer…

permissive · top 15,000 on PyPI

aristaproto

Generates Python gRPC stubs and message classes…

permissive · top 15,000 on PyPI

betterproto-fw

Generates idiomatic Python code from Protobuf 3…

permissive · top 15,000 on PyPI

betterproto2

Generates idiomatic Python code from Protobuf…

permissive · top 5,000 on PyPI

betterproto2-compiler

Generates idiomatic Python code from Protobuf 3…

permissive · top 15,000 on PyPI

logic2-automation

Python client library for controlling Saleae…

unclear · top 15,000 on PyPI

ansys-api-tools-filetransfer

Provides auto-generated gRPC Python interface…

permissive · top 15,000 on PyPI