Skip to content

Commit

Permalink
chore: remove experimental note from README (#1719)
Browse files Browse the repository at this point in the history
Co-authored-by: Omair Naveed <[email protected]>
  • Loading branch information
ohmayr and ohmayr authored Aug 10, 2023
1 parent 42a8c82 commit 00e8579
Showing 1 changed file with 73 additions and 2 deletions.
75 changes: 73 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _codingstyle:

API Client Generator for Python
===============================

Expand All @@ -15,12 +17,81 @@ to generate a client library.
Purpose
-------

This library primarily exists to facilitate experimentation, particularly
regarding:
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
-------------

Expand Down

0 comments on commit 00e8579

Please sign in to comment.