Skip to main content

Google API Client Generator for Python

Project description

release level pypi versions

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

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.15.0.tar.gz (968.9 kB view details)

Uploaded Source

Built Distribution

gapic_generator-1.15.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file gapic-generator-1.15.0.tar.gz.

File metadata

  • Download URL: gapic-generator-1.15.0.tar.gz
  • Upload date:
  • Size: 968.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for gapic-generator-1.15.0.tar.gz
Algorithm Hash digest
SHA256 d14c3f5f2a40d1f4e154a81475991417fe705ac2f074da00951bb90977173490
MD5 cf7d41315c2488df2eb5facf46c30540
BLAKE2b-256 2b9486df58c7b641413e708e7e51d926c80ea3a9e10a5fecaf30d1c288052490

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for gapic_generator-1.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b7b68816ad7e8a00fa021fc915aef9069bd7ea5108ef6e80ee21edc0f8a184e
MD5 bbdfffaf41c9c8d210c1f779db4d7b56
BLAKE2b-256 000fb8a6551379b68504aa5c1838e0d66a39be9887a6850e67b4349574f87c01

See more details on using hashes here.

Provenance

Supported by

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