Google API Client Generator for Python
Project description
A generator for protocol buffer described APIs for and in Python 3.
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.
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
Built Distribution
Hashes for gapic_generator-1.18.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b190b8da482a5e7f8a799fafddb36a03da4063d696c82a0bade4186b7eb52b81 |
|
MD5 | 7eced0d0d16619d55989f5721e2a4ab2 |
|
BLAKE2b-256 | 12b0d2bcd736eac15b5fda6ade3dd210e09cc92faf3eabd8850e3cff9783718c |