Metadata-Version: 2.1
Name: gapic-generator
Version: 1.23.5
Summary: Google API Client Generator for Python
Home-page: https://github.com/googleapis/gapic-generator-python
Author: Google LLC
Author-email: googleapis-packages@google.com
License: Apache 2.0
Platform: Posix; MacOS X
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
License-File: LICENSE
Requires-Dist: click>=6.7
Requires-Dist: google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0,>=1.34.1
Requires-Dist: googleapis-common-protos>=1.55.0
Requires-Dist: grpcio>=1.24.3
Requires-Dist: jinja2>=2.11
Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<7.0.0,>=3.20.2
Requires-Dist: pypandoc>=1.4
Requires-Dist: PyYAML>=5.1.1
Requires-Dist: grpc-google-iam-v1<1.0.0,>=0.14.0
Requires-Dist: libcst<2.0.0,>=0.4.9
Requires-Dist: inflection<1.0.0,>=0.5.1

.. _codingstyle:

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.

.. _protocol buffers: https://developers.google.com/protocol-buffers/

Purpose
-------

This library replaces the `monolithic generator`_
with some improvements:

- An explicit normalized format for specifying APIs.
- Light weight, in-language code generators.

.. _monolithic generator: https://github.com/googleapis/gapic-generator


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.

.. code-block:: c

        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:

.. code-block:: c

        bazel build //google/cloud/documentai/v1beta2:documentai-v1beta2-py

Using Protoc:

.. code-block:: c

        # This is assumed to be in the `googleapis` project root.
        $ protoc google/cloud/vision/v1/*.proto \
            --python_gapic_out=/dest/

Development
-------------
`Development`_

.. _Development: https://github.com/googleapis/gapic-generator-python/blob/main/DEVELOPMENT.md

Contributing
-------------
If you are looking to contribute to the project, please see `Contributing`_
for guidlines.

.. _Contributing: https://github.com/googleapis/gapic-generator-python/blob/main/CONTRIBUTING.md

Documentation
-------------

See the `documentation`_.

.. _documentation: https://googleapis.dev/python/gapic-generator-python/latest

.. |release level| image:: https://img.shields.io/badge/support-stable-gold.svg
  :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability
.. |pypi| image:: https://img.shields.io/pypi/v/gapic-generator.svg
  :target: https://pypi.org/project/gapic-generator/
.. |versions| image:: https://img.shields.io/pypi/pyversions/gapic-generator.svg
  :target: https://pypi.org/project/gapic-generator/
