Skip to content

Commit 3c536f4

Browse files
author
Jon Wayne Parrott
committed
Re-generate all readmes
1 parent 840b142 commit 3c536f4

File tree

33 files changed

+171
-59
lines changed

33 files changed

+171
-59
lines changed

bigquery/api/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

bigquery/cloud-client/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

bigquery/dml/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ authentication:
2727

2828
.. code-block:: bash
2929
30-
gcloud beta auth application-default login
30+
gcloud auth application-default login
3131
3232
3333
#. When running on App Engine or Compute Engine, credentials are already

bigquery/rest/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

bigtable/hello/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

bigtable/hello_happybase/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ authentication:
3333

3434
.. code-block:: bash
3535
36-
gcloud beta auth application-default login
36+
gcloud auth application-default login
3737
3838
3939
#. When running on App Engine or Compute Engine, credentials are already

datastore/cloud-client/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

dns/api/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

error_reporting/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ authentication:
2727

2828
.. code-block:: bash
2929
30-
gcloud beta auth application-default login
30+
gcloud auth application-default login
3131
3232
3333
#. When running on App Engine or Compute Engine, credentials are already

kms/api-client/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

language/api/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

language/cloud-client/v1/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

language/cloud-client/v1beta2/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

language/tutorial/README.rst

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
.. This file is automatically generated. Do not edit this file directly.
2+
3+
Google Cloud Natural Language Tutorial Python Samples
4+
===============================================================================
5+
6+
This directory contains samples for Google Cloud Natural Language Tutorial. The `Google Cloud Natural Language API`_ provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger Cloud Machine Learning API.
7+
8+
9+
10+
11+
.. _Google Cloud Natural Language Tutorial: https://cloud.google.com/natural-language/docs/
12+
13+
Setup
14+
-------------------------------------------------------------------------------
15+
16+
17+
Authentication
18+
++++++++++++++
19+
20+
Authentication is typically done through `Application Default Credentials`_,
21+
which means you do not have to change the code to authenticate as long as
22+
your environment has credentials. You have a few options for setting up
23+
authentication:
24+
25+
#. When running locally, use the `Google Cloud SDK`_
26+
27+
.. code-block:: bash
28+
29+
gcloud auth application-default login
30+
31+
32+
#. When running on App Engine or Compute Engine, credentials are already
33+
set-up. However, you may need to configure your Compute Engine instance
34+
with `additional scopes`_.
35+
36+
#. You can create a `Service Account key file`_. This file can be used to
37+
authenticate to Google Cloud Platform services from any environment. To use
38+
the file, set the ``GOOGLE_APPLICATION_CREDENTIALS`` environment variable to
39+
the path to the key file, for example:
40+
41+
.. code-block:: bash
42+
43+
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account.json
44+
45+
.. _Application Default Credentials: https://cloud.google.com/docs/authentication#getting_credentials_for_server-centric_flow
46+
.. _additional scopes: https://cloud.google.com/compute/docs/authentication#using
47+
.. _Service Account key file: https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
48+
49+
Install Dependencies
50+
++++++++++++++++++++
51+
52+
#. Install `pip`_ and `virtualenv`_ if you do not already have them.
53+
54+
#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.
55+
56+
.. code-block:: bash
57+
58+
$ virtualenv env
59+
$ source env/bin/activate
60+
61+
#. Install the dependencies needed to run the samples.
62+
63+
.. code-block:: bash
64+
65+
$ pip install -r requirements.txt
66+
67+
.. _pip: https://pip.pypa.io/
68+
.. _virtualenv: https://virtualenv.pypa.io/
69+
70+
Samples
71+
-------------------------------------------------------------------------------
72+
73+
Language tutorial
74+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
75+
76+
77+
78+
To run this sample:
79+
80+
.. code-block:: bash
81+
82+
$ python tutorial.py
83+
84+
usage: tutorial.py [-h] movie_review_filename
85+
86+
positional arguments:
87+
movie_review_filename
88+
The filename of the movie review you'd like to
89+
analyze.
90+
91+
optional arguments:
92+
-h, --help show this help message and exit
93+
94+
95+
96+
97+
.. _Google Cloud SDK: https://cloud.google.com/sdk/

logging/api-client/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

logging/cloud-client/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

monitoring/api/v2/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

monitoring/api/v3/api-client/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

monitoring/api/v3/cloud-client/README.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ authentication:
2828

2929
.. code-block:: bash
3030
31-
gcloud beta auth application-default login
31+
gcloud auth application-default login
3232
3333
3434
#. When running on App Engine or Compute Engine, credentials are already
@@ -95,16 +95,17 @@ To run this sample:
9595
9696
$ python snippets.py
9797
98-
usage: snippets.py [-h] [--project_id PROJECT_ID]
99-
{create-metric-descriptor,list-metric-descriptors,delete-metric-descriptor,list-resources,get-resource,write-time-series,list-time-series,list-time-series-header,list-time-series-reduce,list-time-series-aggregate}
98+
usage: snippets.py [-h]
99+
{create-metric-descriptor,list-metric-descriptors,get-metric-descriptor,delete-metric-descriptor,list-resources,get-resource,write-time-series,list-time-series,list-time-series-header,list-time-series-reduce,list-time-series-aggregate}
100100
...
101101
102102
Demonstrates Monitoring API operations.
103103
104104
positional arguments:
105-
{create-metric-descriptor,list-metric-descriptors,delete-metric-descriptor,list-resources,get-resource,write-time-series,list-time-series,list-time-series-header,list-time-series-reduce,list-time-series-aggregate}
105+
{create-metric-descriptor,list-metric-descriptors,get-metric-descriptor,delete-metric-descriptor,list-resources,get-resource,write-time-series,list-time-series,list-time-series-header,list-time-series-reduce,list-time-series-aggregate}
106106
create-metric-descriptor
107107
list-metric-descriptors
108+
get-metric-descriptor
108109
delete-metric-descriptor
109110
list-resources
110111
get-resource
@@ -116,8 +117,6 @@ To run this sample:
116117
117118
optional arguments:
118119
-h, --help show this help message and exit
119-
--project_id PROJECT_ID
120-
Your cloud project ID.
121120
122121
123122

pubsub/cloud-client/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already

spanner/cloud-client/README.rst

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authentication:
2626

2727
.. code-block:: bash
2828
29-
gcloud beta auth application-default login
29+
gcloud auth application-default login
3030
3131
3232
#. When running on App Engine or Compute Engine, credentials are already
@@ -81,9 +81,9 @@ To run this sample:
8181
8282
$ python snippets.py
8383
84-
usage: snippets.py [-h] [--database-name DATABASE_NAME]
85-
instance_name
86-
{insert_data,query_data,read_data,update_data,read_write_transaction,query_data_with_index,read_data_with_index,read_data_with_storing_index}
84+
usage: snippets.py [-h] [--database-id DATABASE_ID]
85+
instance_id
86+
{create_database,insert_data,query_data,read_data,add_column,update_data,query_data_with_new_column,read_write_transaction,read_only_transaction,add_index,query_data_with_index,read_data_with_index,add_storing_index,read_data_with_storing_index}
8787
...
8888
8989
This application demonstrates how to do basic operations using Cloud
@@ -92,26 +92,42 @@ To run this sample:
9292
For more information, see the README.rst under /spanner.
9393
9494
positional arguments:
95-
instance_name Your Cloud Spanner instance name.
96-
{insert_data,query_data,read_data,update_data,read_write_transaction,query_data_with_index,read_data_with_index,read_data_with_storing_index}
95+
instance_id Your Cloud Spanner instance ID.
96+
{create_database,insert_data,query_data,read_data,add_column,update_data,query_data_with_new_column,read_write_transaction,read_only_transaction,add_index,query_data_with_index,read_data_with_index,add_storing_index,read_data_with_storing_index}
97+
create_database Creates a database and tables for sample data.
9798
insert_data Inserts sample data into the given database. The
9899
database and table must already exist and can be
99100
created using `create_database`.
100101
query_data Queries sample data from the database using SQL.
101102
read_data Reads sample data from the database.
103+
add_column Adds a new column to the Albums table in the example
104+
database.
102105
update_data Updates sample data in the database. This updates the
103106
`MarketingBudget` column which must be created before
104-
running this sample. Run the following query on your
105-
database to create the column: ALTER TABLE Albums ADD
106-
COLUMN MarketingBudget INT64
107+
running this sample. You can add the column by running
108+
the `add_column` sample or by running this DDL
109+
statement against your database: ALTER TABLE Albums
110+
ADD COLUMN MarketingBudget INT64
111+
query_data_with_new_column
112+
Queries sample data from the database using SQL. This
113+
sample uses the `MarketingBudget` column. You can add
114+
the column by running the `add_column` sample or by
115+
running this DDL statement against your database:
116+
ALTER TABLE Albums ADD COLUMN MarketingBudget INT64
107117
read_write_transaction
108118
Performs a read-write transaction to update two sample
109119
records in the database. This will transfer 200,000
110-
from the `MarketingBudget` field for the first Album
111-
to the second Album. If the `MarketingBudget` is too
120+
from the `MarketingBudget` field for the second Album
121+
to the first Album. If the `MarketingBudget` is too
112122
low, it will raise an exception. Before running this
113123
sample, you will need to run the `update_data` sample
114124
to populate the fields.
125+
read_only_transaction
126+
Reads data inside of a read-only transaction. Within
127+
the read-only transaction, or "snapshot", the
128+
application sees consistent view of the database at a
129+
particular timestamp.
130+
add_index Adds a simple index to the example database.
115131
query_data_with_index
116132
Inserts sample data into the given database. The
117133
database and table must already exist and can be
@@ -120,15 +136,16 @@ To run this sample:
120136
Inserts sample data into the given database. The
121137
database and table must already exist and can be
122138
created using `create_database`.
139+
add_storing_index Adds an storing index to the example database.
123140
read_data_with_storing_index
124141
Inserts sample data into the given database. The
125142
database and table must already exist and can be
126143
created using `create_database`.
127144
128145
optional arguments:
129146
-h, --help show this help message and exit
130-
--database-name DATABASE_NAME
131-
Your Cloud Spanner database name.
147+
--database-id DATABASE_ID
148+
Your Cloud Spanner database ID.
132149
133150
134151

0 commit comments

Comments
 (0)