Giter Club home page Giter Club logo

gapic-generator-python's Introduction

API Client Generator for Python

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.

gapic-generator-python's People

Contributors

arithmetic1728 avatar atulep avatar busunkim96 avatar chingor13 avatar crwilcox avatar dandhlee avatar dependabot[bot] avatar dizcology avatar dpcollins-google avatar evaogbe avatar galz10 avatar gcf-owl-bot[bot] avatar google-cloud-policy-bot[bot] avatar henribru avatar kbandes avatar lidizheng avatar lukesneeringer avatar miraleung avatar noahdietz avatar ohmayr avatar parthea avatar picardparis avatar release-please[bot] avatar renovate-bot avatar software-dov avatar tmc avatar tseaver avatar vam-google avatar vchudnov-g avatar yon-mg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.