Skip to main content

Google API Client Generator for Python

Project description

release level pypi versions

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

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

gapic_generator-1.31.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gapic_generator-1.31.0-py3-none-any.whl (2.5 MB view details)

Uploaded Python 3

File details

Details for the file gapic_generator-1.31.0.tar.gz.

File metadata

  • Download URL: gapic_generator-1.31.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for gapic_generator-1.31.0.tar.gz
Algorithm Hash digest
SHA256 abfb6aa6a1f3bc09fba4c8d540294d9a7c50ff05a27a040da75db90b07e35370
MD5 135f42aaae83b9207f0647baebfd4bbb
BLAKE2b-256 9bedb9e3d27634cefde5ba24f9d1b51dc122335f4945307ed2c788a783341b2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapic_generator-1.31.0.tar.gz:

Publisher: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.
  • Statement: Publication detail:
    • Token Issuer: https://accounts.google.com
    • Service Account: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

File details

Details for the file gapic_generator-1.31.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gapic_generator-1.31.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95f52afc79a9266d481e869bcfb4cd1f910f6f7284f4117fa14f3d345e7b8fb9
MD5 3d9a74deee6f1aa797bc10585e022ed3
BLAKE2b-256 98b26409bb42a5c25eab4ffb5cf906f1fb9f7dfa50cc88f1c8aff82f08f0fca6

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapic_generator-1.31.0-py3-none-any.whl:

Publisher: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.
  • Statement: Publication detail:
    • Token Issuer: https://accounts.google.com
    • Service Account: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page