gapic-generator


Namegapic-generator JSON
Version 1.20.2 PyPI version JSON
download
home_pagehttps://github.com/googleapis/gapic-generator-python
SummaryGoogle API Client Generator for Python
upload_time2024-10-30 19:37:36
maintainerNone
docs_urlNone
authorGoogle LLC
requires_python>=3.7
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            .. _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/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/googleapis/gapic-generator-python",
    "name": "gapic-generator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Google LLC",
    "author_email": "googleapis-packages@google.com",
    "download_url": "https://files.pythonhosted.org/packages/8c/86/a96de293841a9b1aa0418c6670394413357677802f5fe0340180ec8fbdf0/gapic_generator-1.20.2.tar.gz",
    "platform": "Posix; MacOS X",
    "description": ".. _codingstyle:\n\nAPI Client Generator for Python\n===============================\n\n|release level| |pypi| |versions|\n\n    A generator for protocol buffer described APIs for and in Python 3.\n\nThis is a generator for API client libraries for APIs\nspecified by `protocol buffers`_, such as those inside Google.\nIt takes a protocol buffer (with particular annotations) and uses it\nto generate a client library.\n\n.. _protocol buffers: https://developers.google.com/protocol-buffers/\n\nPurpose\n-------\n\nThis library replaces the `monolithic generator`_\nwith some improvements:\n\n- An explicit normalized format for specifying APIs.\n- Light weight, in-language code generators.\n\n.. _monolithic generator: https://github.com/googleapis/gapic-generator\n\n\nBazel\n-------------\nThis generator can be called from Bazel, which is a recommended way of using it inside a continuous integration build or any other automated pipeline.\n\nClone the googleapis repository\n$ git clone https://github.com/googleapis/googleapis.git\n\nCreate the targets\n------------------\nYou need to add the following targets to your BUILD.bazel file.\n\n.. code-block:: c\n\n        load(\n            \"@gapic_generator_python//rules_python_gapic:py_gapic.bzl\",\n            \"py_gapic_library\"\n        )\n\n        load(\n            \"@gapic_generator_python//rules_python_gapic:py_gapic_pkg.bzl\",\n            \"py_gapic_assembly_pkg\"\n        )\n\n        py_gapic_library(\n            name = \"documentai_py_gapic\",\n            srcs = [\":documentai_proto\"],\n        )\n\n        py_gapic_assembly_pkg(\n            name = \"documentai-v1beta2-py\",\n            deps = [\n                \":documentai_py_gapic\",\n            ],\n        )\n\n\nCompiling an API\n----------------\n\nUsing Bazel:\n\n.. code-block:: c\n\n        bazel build //google/cloud/documentai/v1beta2:documentai-v1beta2-py\n\nUsing Protoc:\n\n.. code-block:: c\n\n        # This is assumed to be in the `googleapis` project root.\n        $ protoc google/cloud/vision/v1/*.proto \\\n            --python_gapic_out=/dest/\n\nDevelopment\n-------------\n`Development`_\n\n.. _Development: https://github.com/googleapis/gapic-generator-python/blob/main/DEVELOPMENT.md\n\nContributing\n-------------\nIf you are looking to contribute to the project, please see `Contributing`_\nfor guidlines.\n\n.. _Contributing: https://github.com/googleapis/gapic-generator-python/blob/main/CONTRIBUTING.md\n\nDocumentation\n-------------\n\nSee the `documentation`_.\n\n.. _documentation: https://googleapis.dev/python/gapic-generator-python/latest\n\n.. |release level| image:: https://img.shields.io/badge/support-stable-gold.svg\n  :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability\n.. |pypi| image:: https://img.shields.io/pypi/v/gapic-generator.svg\n  :target: https://pypi.org/project/gapic-generator/\n.. |versions| image:: https://img.shields.io/pypi/pyversions/gapic-generator.svg\n  :target: https://pypi.org/project/gapic-generator/\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Google API Client Generator for Python",
    "version": "1.20.2",
    "project_urls": {
        "Homepage": "https://github.com/googleapis/gapic-generator-python"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "88551fdd5188cc5549a9d7707d5eca5f8718fbb367c85c95c8fc8f74ade2df87",
                "md5": "08237857257f3eaf1331d9179cbb845e",
                "sha256": "57e03e595ec064621d09866c30c2ace8bd938255f9c1a90ca16531242ba77fa6"
            },
            "downloads": -1,
            "filename": "gapic_generator-1.20.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "08237857257f3eaf1331d9179cbb845e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 1589660,
            "upload_time": "2024-10-30T19:37:34",
            "upload_time_iso_8601": "2024-10-30T19:37:34.516058Z",
            "url": "https://files.pythonhosted.org/packages/88/55/1fdd5188cc5549a9d7707d5eca5f8718fbb367c85c95c8fc8f74ade2df87/gapic_generator-1.20.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c86a96de293841a9b1aa0418c6670394413357677802f5fe0340180ec8fbdf0",
                "md5": "19d28379fc6f0692a07469e5cbe31e7e",
                "sha256": "b793e3817d10246ea57c43cd35c47f53898db355a09f857939446b3ddb119442"
            },
            "downloads": -1,
            "filename": "gapic_generator-1.20.2.tar.gz",
            "has_sig": false,
            "md5_digest": "19d28379fc6f0692a07469e5cbe31e7e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 1057751,
            "upload_time": "2024-10-30T19:37:36",
            "upload_time_iso_8601": "2024-10-30T19:37:36.953889Z",
            "url": "https://files.pythonhosted.org/packages/8c/86/a96de293841a9b1aa0418c6670394413357677802f5fe0340180ec8fbdf0/gapic_generator-1.20.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-30 19:37:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "googleapis",
    "github_project": "gapic-generator-python",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "gapic-generator"
}
        
Elapsed time: 0.73873s