1- Python Client for {{ api.naming.long_name }} API
2- =================================================
1+ Python Client for {{ api.naming.title }}
2+ =================={% for i in range ( api .naming .title | length ) %} ={% endfor %}
3+
4+
5+ |{{ api.naming.release_level }}| |pypi| |versions|
6+
7+ `{{ api.naming.title }}`_: {% if api .naming .api_description %} {{ api.naming.api_description.replace("\n", " ") }}{% endif %}
8+
9+
10+ - `Client Library Documentation`_
11+ - `Product Documentation`_
12+
13+ .. |{{ api.naming.release_level }}| image:: https://img.shields.io/badge/support-{{ api.naming.release_level }}-{% if api .naming .release_level == "stable" %} gold{% else %} orange{% endif %} .svg
14+ :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
15+ .. |pypi| image:: https://img.shields.io/pypi/v/{{ api.naming.warehouse_package_name }}.svg
16+ :target: https://pypi.org/project/{{ api.naming.warehouse_package_name }}/
17+ .. |versions| image:: https://img.shields.io/pypi/pyversions/{{ api.naming.warehouse_package_name }}.svg
18+ :target: https://pypi.org/project/{{ api.naming.warehouse_package_name }}/
19+ .. _{{ api.naming.title }}: {{ api.naming.documentation_uri }}
20+ {% if api .naming .module_namespace |length >= 2 and api .naming .module_namespace [0] == "google" and api .naming .module_namespace [1] == "cloud" %}
21+ .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/{{ api.naming.documentation_name }}/latest/summary_overview
22+ {% else %}
23+ .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/{{ api.naming.documentation_name }}/latest
24+ {% endif %}
25+ .. _Product Documentation: {{ api.naming.documentation_uri }}
326
427Quick Start
528-----------
@@ -8,26 +31,55 @@ In order to use this library, you first need to go through the following steps:
831
9321. `Select or create a Cloud Platform project.`_
10332. `Enable billing for your project.`_
11- 3. Enable the {{ api.naming.long_name }} API.
12- 4. `Setup Authentication.`_
34+ 3. ` Enable the {{ api.naming.title }}.`_
35+ 4. `Set up Authentication.`_
1336
1437.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
1538.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
16- .. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
39+ .. _Enable the {{ api.naming.title }}.: {{ api.naming.documentation_uri }}
40+ .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
1741
1842Installation
1943~~~~~~~~~~~~
2044
21- Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
22- create isolated Python environments. The basic problem it addresses is one of
23- dependencies and versions, and indirectly permissions.
45+ Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
46+ creates isolated Python environments. These isolated environments can have separate
47+ versions of Python packages, which allows you to isolate one project's dependencies
48+ from the dependencies of other projects.
2449
25- With `virtualenv `_, it's possible to install this library without needing system
50+ With `venv `_, it's possible to install this library without needing system
2651install permissions, and without clashing with the installed system
2752dependencies.
2853
29- .. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
54+ .. _`venv`: https://docs.python.org/3/library/venv.html
55+
56+
57+ Code samples and snippets
58+ ~~~~~~~~~~~~~~~~~~~~~~~~~
59+
60+ Code samples and snippets live in the `samples/`_ folder.
61+
62+ .. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/{{ api.naming.warehouse_package_name }}/samples
63+
64+
65+ Supported Python Versions
66+ ^^^^^^^^^^^^^^^^^^^^^^^^^
67+ Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
68+ Python.
69+
70+ Python >= 3.7
71+
72+ .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
73+ .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
3074
75+ Unsupported Python Versions
76+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
77+ Python <= 3.6
78+
79+ If you are using an `end-of-life`_
80+ version of Python, we recommend that you update as soon as possible to an actively supported version.
81+
82+ .. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches
3183
3284Mac/Linux
3385^^^^^^^^^
@@ -36,18 +88,30 @@ Mac/Linux
3688
3789 python3 -m venv <your-env >
3890 source <your-env >/bin/activate
39- < your-env >/bin/ pip install /path/to/library
91+ pip install {{ api.naming.warehouse_package_name }}
4092
4193
4294Windows
4395^^^^^^^
4496
4597.. code-block:: console
4698
47- python3 -m venv <your-env >
48- <your-env >\Scripts\activate
49- <your-env >\Scripts\pip.exe install \path\to\library
99+ py -m venv <your-env >
100+ .\<your-env >\Scripts\activate
101+ pip install {{ api.naming.warehouse_package_name }}
102+
103+ Next Steps
104+ ~~~~~~~~~~
50105
106+ - Read the `Client Library Documentation`_ for {{ api.naming.title }}
107+ to see other available methods on the client.
108+ - Read the `{{ api.naming.title }} Product documentation`_ to learn
109+ more about the product and see How-to Guides.
110+ - View this `README`_ to see the full list of Cloud
111+ APIs that we cover.
112+
113+ .. _{{ api.naming.title }} Product documentation: {{ api.naming.documentation_uri }}
114+ .. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
51115
52116Logging
53117-------
@@ -59,7 +123,6 @@ Note the following:
59123#. Google may refine the occurrence, level, and content of various log messages in this library without flagging such changes as breaking. **Do not depend on immutability of the logging events**.
60124#. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below.
61125
62-
63126Simple, environment-based configuration
64127~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65128
@@ -75,9 +138,8 @@ A logging scope is a period-separated namespace that begins with :code:`google`,
75138
76139**NOTE**: If the logging scope is invalid, the library does not set up any logging handlers.
77140
78-
79- Examples
80- ^^^^^^^^
141+ Environment-Based Examples
142+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
81143
82144- Enabling the default handler for all Google-based loggers
83145
@@ -97,18 +159,17 @@ Advanced, code-based configuration
97159
98160You can also configure a valid logging scope using Python's standard `logging` mechanism.
99161
100-
101- Examples
102- ^^^^^^^^
162+ Code-Based Examples
163+ ^^^^^^^^^^^^^^^^^^^
103164
104165- Configuring a handler for all Google-based loggers
105166
106167.. code-block:: python
107168
108169 import logging
109-
110- from google.cloud.translate_v3 import translate
111-
170+
171+ from google.cloud import library_v1
172+
112173 base_logger = logging.getLogger("google")
113174 base_logger.addHandler(logging.StreamHandler())
114175 base_logger.setLevel(logging.DEBUG)
@@ -118,14 +179,13 @@ Examples
118179.. code-block:: python
119180
120181 import logging
121-
122- from google.cloud.translate_v3 import translate
123-
182+
183+ from google.cloud import library_v1
184+
124185 base_logger = logging.getLogger("google.cloud.library_v1")
125186 base_logger.addHandler(logging.StreamHandler())
126187 base_logger.setLevel(logging.DEBUG)
127188
128-
129189Logging details
130190~~~~~~~~~~~~~~~
131191
0 commit comments