8000 Merge branch 'master' into tmp-generated-samples · gargravish/python-docs-samples@72f6763 · GitHub
[go: up one dir, main page]

Skip to content

Commit 72f6763

Browse files
author
Rebecca Taylor
committed
Merge branch 'master' into tmp-generated-samples
2 parents 1acc945 + 950d97a commit 72f6763

File tree

126 files changed

+1288
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+1288
-196
lines changed

.kokoro/common.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build_file: "python-docs-samples/.kokoro/trampoline.sh"
99
# Use the Python worker docker image.
1010
env_vars: {
1111
key: "TRAMPOLINE_IMAGE"
12-
value: "gcr.io/cloud-devrel-kokoro-resources/python@sha256:e11a459d01e5dcd3613fda35c7c94edfecfe911ed79c078580ff59de300b1938"
12+
value: "gcr.io/cloud-devrel-kokoro-resources/python@sha256:9f83a3711eef244a4d45ac25028e200c87c4d4060d445438683a1ed4d3f093b6"
1313
}
1414

1515
# Specify project ID

.kokoro/presubmit_tests_container_engine.cfg renamed to .kokoro/presubmit_tests_kubernetes_engine.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ env_vars: {
1111

1212
env_vars: {
1313
key: "NOX_SESSION"
14-
value: "container_engine and py36 and not appengine"
14+
value: "kubernetes_engine and py36 and not appengine"
1515
}

.kokoro/system_tests_container_engine.cfg renamed to .kokoro/system_tests_kubernetes_engine.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ env_vars: {
1111

1212
env_vars: {
1313
key: "NOX_SESSION"
14-
value: "container_engine and py36 and not appengine"
14+
value: "kubernetes_engine and py36 and not appengine"
1515
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This repository holds the samples used in the python documentation on [cloud.goo
1010
[![Build Status](https://travis-ci.org/GoogleCloudPlatform/python-docs-samples.svg)](https://travis-ci.org/GoogleCloudPlatform/python-docs-samples)
1111
[![Coverage Status](https://coveralls.io/repos/github/GoogleCloudPlatform/python-docs-samples/badge.svg?branch=HEAD)](https://coveralls.io/github/GoogleCloudPlatform/python-docs-samples?branch=HEAD)
1212

13-
For more detailed introduction to a product, check the README.md in the
13+
For a more detailed introduction to a product, check the README.md in the
1414
corresponding folder.
1515

1616
## Contributing changes

appengine/flexible/django_cloudsql/mysite/settings.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,34 @@
7878
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
7979

8080
# [START dbconfig]
81+
82+
# The following DATABASES configuration is for PostgreSQL. If you are using
83+
# MySQL, use the commented-out block that follows this one instead. In this
84+
# case, please also follow the commented instructions in requirements.txt.
85+
8186
DATABASES = {
8287
'default': {
83-
# If you are using Cloud SQL for MySQL rather than PostgreSQL, set
84-
# 'ENGINE': 'django.db.backends.mysql' instead of the following.
8588
'ENGINE': 'django.db.backends.postgresql',
8689
'NAME': 'polls',
8790
'USER': '<your-database-user>',
8891
'PASSWORD': '<your-database-password>',
89-
# For MySQL, set 'PORT': '3306' instead of the following. Any Cloud
90-
# SQL Proxy instances running locally must also be set to tcp:3306.
9192
'PORT': '5432',
9293
}
9394
}
95+
96+
# Uncomment this DATABASES block and use it instead of the above if you are
97+
# using MySQL. Also follow the commented instructions in requirements.txt.
98+
99+
# DATABASES = {
100+
# 'default': {
101+
# 'ENGINE': 'django.db.backends.mysql',
102+
# 'NAME': 'polls',
103+
# 'USER': '<your-database-user>',
104+
# 'PASSWORD': '<your-database-password>',
105+
# 'PORT': '3306',
106+
# }
107+
# }
108+
94109
# In the flexible environment, you connect to CloudSQL using a unix socket.
95110
# Locally, you can use the CloudSQL proxy to proxy a localhost connection
96111
# to the instance
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Django==2.1.5
2-
mysqlclient==1.4.1
1+
Django==2.1.9
2+
# mysqlclient==1.4.1 # Uncomment this line if using MySQL
33
wheel==0.32.3
44
gunicorn==19.9.0
5-
psycopg2==2.7.7
5+
psycopg2==2.7.7 # Comment this line out if using MySQL
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Django==2.1.5
1+
Django==2.1.9
22
gunicorn==19.9.0

appengine/flexible/tasks/README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,29 @@ App Engine task attempts.
2525

2626
Please refer to [Setting Up a Python Development Environment](https://cloud.google.com/python/setup).
2727

28-
## Authentication
28+
### Authentication
2929

3030
To set up authentication, please refer to our
3131
[authentication getting started guide](https://cloud.google.com/docs/authentication/getting-started).
3232

33+
### Install Dependencies
34+
35+
To install the dependencies for this sample, use the following command:
36+
37+
```
38+
pip install -r requirements.txt
39+
```
40+
41+
This sample uses the common protos in the [googleapis](https://github.com/googleapis/googleapis)
42+
repository. For more info, see
43+
[Protocol Buffer Basics](https://developers.google.com/protocol-buffers/docs/pythontutorial).
44+
3345
## Creating a queue
3446

3547
To create a queue using the Cloud SDK, use the following gcloud command:
3648

3749
```
38-
gcloud beta tasks queues create-app-engine-queue my-appengine-queue
50+
gcloud tasks queues create my-appengine-queue
3951
```
4052

4153
Note: A newly created queue will route to the default App Engine service and
@@ -79,14 +91,14 @@ export PROJECT_ID=my-project-id
7991
```
8092

8193
Then the queue ID, as specified at queue creation time. Queue IDs already
82-
created can be listed with `gcloud beta tasks queues list`.
94+
created can be listed with `gcloud tasks queues list`.
8395

8496
```
8597
export QUEUE_ID=my-appengine-queue
8698
```
8799

88100
And finally the location ID, which can be discovered with
89-
`gcloud beta tasks queues describe $QUEUE_ID`, with the location embedded in
101+
`gcloud tasks queues describe $QUEUE_ID`, with the location embedded in
90102
the "name" value (for instance, if the name is
91103
"projects/my-project/locations/us-central1/queues/my-appengine-queue", then the
92104
location is "us-central1").
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Flask==1.0.2
22
gunicorn==19.9.0
3-
google-cloud-tasks==0.7.0
3+
google-cloud-tasks==1.1.0
4+
googleapis-common-protos==1.6.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Django==2.1.5
1+
Django==2.1.9
22
PyMySQL==0.9.3

0 commit comments

Comments
 (0)
0