aboutsummaryrefslogtreecommitdiff
path: root/scripts/readme-gen/templates/README.tmpl.rst
blob: 4fd239765b0a4d65cad121c57adeb33c3a894fe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{# The following line is a lie. BUT! Once jinja2 is done with it, it will
    become truth! #}
.. This file is automatically generated. Do not edit this file directly.

{{product.name}} Python Samples
===============================================================================

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
   :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor={{folder}}/README.rst


This directory contains samples for {{product.name}}. {{product.description}}

{{description}}

.. _{{product.name}}: {{product.url}}

{% if required_api_url %}
To run the sample, you need to enable the API at: {{required_api_url}}
{% endif %}

{% if required_role %}
To run the sample, you need to have `{{required_role}}` role.
{% endif %}

{{other_required_steps}}

{% if setup %}
Setup
-------------------------------------------------------------------------------

{% for section in setup %}

{% include section + '.tmpl.rst' %}

{% endfor %}
{% endif %}

{% if samples %}
Samples
-------------------------------------------------------------------------------

{% for sample in samples %}
{{sample.name}}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

{% if not sample.hide_cloudshell_button %}
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
   :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor={{folder}}/{{sample.file}},{{folder}}/README.rst
{% endif %}


{{sample.description}}

To run this sample:

.. code-block:: bash

    $ python {{sample.file}}
{% if sample.show_help %}

    {{get_help(sample.file)|indent}}
{% endif %}


{% endfor %}
{% endif %}

{% if cloud_client_library %}

The client library
-------------------------------------------------------------------------------

This sample uses the `Google Cloud Client Library for Python`_.
You can read the documentation for more details on API usage and use GitHub
to `browse the source`_ and  `report issues`_.

.. _Google Cloud Client Library for Python:
    https://googlecloudplatform.github.io/google-cloud-python/
.. _browse the source:
    https://github.com/GoogleCloudPlatform/google-cloud-python
.. _report issues:
    https://github.com/GoogleCloudPlatform/google-cloud-python/issues

{% endif %}

.. _Google Cloud SDK: https://cloud.google.com/sdk/