A client library generator for APIs described through protocol buffers.
This is a generator for API client libraries for APIs specified by protocol buffers, such as those inside Google. It takes a protocol buffer (with particular annotations) and uses it to generate a client library.
Purpose
This library replaces the monolithic generator with some improvements:
An explicit normalized format for specifying APIs.
Light weight, in-language code generators.
Bazel
This generator can be called from Bazel, which is a recommended way of using it inside a continuous integration build or any other automated pipeline.
Clone the googleapis repository $ git clone https://github.com/googleapis/googleapis.git
Create the targets
You need to add the following targets to your BUILD.bazel file.
load(
"@gapic_generator_python//rules_python_gapic:py_gapic.bzl",
"py_gapic_library"
)
load(
"@gapic_generator_python//rules_python_gapic:py_gapic_pkg.bzl",
"py_gapic_assembly_pkg"
)
py_gapic_library(
name = "documentai_py_gapic",
srcs = [":documentai_proto"],
)
py_gapic_assembly_pkg(
name = "documentai-v1beta2-py",
deps = [
":documentai_py_gapic",
],
)
Compiling an API
Using Bazel:
bazel build //google/cloud/documentai/v1beta2:documentai-v1beta2-py
Using Protoc:
# This is assumed to be in the `googleapis` project root.
$ protoc google/cloud/vision/v1/*.proto \
--python_gapic_out=/dest/
Development
Contributing
If you are looking to contribute to the project, please see Contributing for guidlines.
Documentation
See the documentation.
Release files for gapic-generator 1.39.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gapic_generator-1.39.0.tar.gz | 1.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gapic_generator-1.39.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.0 MB
Release files / gapic_generator-1.39.0.tar.gz
| Download URL | gapic_generator-1.39.0.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c951a346a67595f9e961fa7d1ef6b805e80d6f11c25ba5e09816919da99091b9
|
|
BLAKE2b-256 checksum How to use checksums |
d0855f185ad0ed3397cbaad9168806ff4bd7404ab8fe20521e50122d47b01fc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by Google Cloud, verified by PyPI on Aug 25, 2026.
Transparency logRelease files / gapic_generator-1.39.0-py3-none-any.whl
| Download URL | gapic_generator-1.39.0-py3-none-any.whl |
|---|---|
| Size | 304.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2faf32f0ec0661f7c5d260b3ebe3f359f1d1b5d6c2439cdf46ba46a1e25f708e
|
|
BLAKE2b-256 checksum How to use checksums |
3309887c123d73a29d669d85b9793b48799e38aabda24b2b5d9922ede12d8ccb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by Google Cloud, verified by PyPI on Aug 24, 2026.
Transparency log