Skip to content

Commit 679698f

Browse files
author
Jonathan Wayne Parrott
committed
Merge pull request #140 from GoogleCloudPlatform/appengine-readme-cleanup
Standardizing the App Engine readmes. 2/3rds of #137.
2 parents b80b688 + 171632b commit 679698f

File tree

14 files changed

+98
-387
lines changed

14 files changed

+98
-387
lines changed

appengine/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Google App Engine Samples
2+
3+
This section contains samples for [Google Cloud Storage](https://cloud.google.com/storage). Most of these samples have associated documentation that is linked
4+
within the docstring of the sample itself.
5+
6+
## Running the samples locally
7+
8+
1. Download the [Google App Engine Python SDK](https://cloud.google.com/appengine/downloads) for your platform.
9+
2. Many samples require extra libraries to be installed. If there is a `requirements.txt`, you will need to install the dependencies with [`pip`](pip.readthedocs.org).
10+
11+
pip install -t lib -r requirements.txt
12+
13+
3. Use `dev_appserver.py` to run the sample:
14+
15+
dev_appserver.py app.yaml
16+
17+
4. Visit `http://localhost:8080` to view your application.
18+
19+
Some samples may require additional setup. Refer to individual sample READMEs.
20+
21+
## Deploying the samples
22+
23+
1. Download the [Google App Engine Python SDK](https://cloud.google.com/appengine/downloads) for your platform.
24+
2. Many samples require extra libraries to be installed. If there is a `requirements.txt`, you will need to install the dependencies with [`pip`](pip.readthedocs.org).
25+
26+
pip install -t lib -r requirements.txt
27+
28+
3. Use `appcfg.py` to deploy the sample, you will need to specify your Project ID and a version number:
29+
30+
appcfg.py update -A your-app-id -V your-version app.yaml
31+
32+
4. Visit `https://your-app-id.appost.com` to view your application.
33+
34+
## Additional resources
35+
36+
For more information on App Engine:
37+
38+
> https://cloud.google.com/appengine
39+
40+
For more information on Python on App Engine:
41+
42+
> https://cloud.google.com/appengine/docs/python

appengine/angular/README.md

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,5 @@
1-
## App Engine AngularJS "Hello World" Python
1+
## App Engine & Angular JS
22

3-
A simple [AngularJS](http://angularjs.org/) CRUD application
4-
for [Google App Engine](https://appengine.google.com/).
3+
A simple [AngularJS](http://angularjs.org/) CRUD application for [Google App Engine](https://appengine.google.com/).
54

6-
Author: Fred Sauer <[email protected]>
7-
8-
9-
## Project setup
10-
11-
1. Install the [App Engine Python SDK](https://developers.google.com/appengine/downloads)
12-
13-
14-
## Testing the app locally
15-
16-
To run the app locally:
17-
18-
```
19-
dev_appserver.py .
20-
```
21-
22-
23-
## Deploying
24-
25-
To deploy the application:
26-
27-
1. Use the [Google Cloud Console](https://cloud.google.com/console) to create a project
28-
1. Replace `your-app-id` in `app.yaml` with the project id from the previous step
29-
1. Deploy the application:
30-
31-
```
32-
appcfg.py --oauth2 update .
33-
```
34-
35-
36-
## Contributing changes
37-
38-
See [CONTRIB.md](CONTRIB.md)
39-
40-
41-
# Licensing
42-
43-
See [LICENSE](LICENSE)
5+
Refer to the [App Engine Samples README](../README.md) for information on how to run and deploy this sample.

appengine/bigquery/README.md

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
1-
## Google App Engine accessing BigQuery using OAuth2
1+
# Google App Engine accessing BigQuery using OAuth2
22

33
This sample demonstrates [authenticating to BigQuery in App Engine using OAuth2](https://cloud.google.com/bigquery/authentication).
44

5-
### Running the sample
5+
Refer to the [App Engine Samples README](../README.md) for information on how to run and deploy this sample.
66

7-
1. To install dependencies for this sample, run:
7+
## Setup
88

9-
$ pip install -t lib -r requirements.txt
9+
1. You'll need a client id for your project. Follow [these instructions](https://cloud.google.com/bigquery/authentication#clientsecrets). Once you've downloaded the client's json secret copy it into the sample directory and rename it to `client_secrets.json`.
1010

11-
2. You must then update `main.py` and replace `<your-project-id>` with your project's
12-
ID.
13-
14-
3. You'll need a client id from your project - instructions
15-
[here](https://cloud.google.com/bigquery/authentication#clientsecrets).
16-
Once you've downloaded the client's json secret, copy it to the root directory
17-
of this project, and rename it to `client_secrets.json`.
18-
19-
3. You can then run the sample on your development server:
20-
21-
$ dev_appserver.py .
22-
23-
Or deploy the application:
24-
25-
$ appcfg.py update .
11+
2. Update `main.py` and replace `<your-project-id>` with your project's ID.

appengine/cloudsql/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# Using Cloud SQL from Google App Engine
22

3-
This is an example program showing how to use the native MySQL connections from Google App Engine to Google Cloud SQL.
3+
This is an example program showing how to use the native MySQL connections from Google App Engine to [Google Cloud SQL](https://cloud.google.com/sql).
44

5-
## Running the sample
5+
Refer to the [App Engine Samples README](../README.md) for information on how to run and deploy this sample.
66

7-
1. Edit the `CLOUDSQL_INSTANCE` and `CLOUDSQL_PROJECT` values in `main.py`.
7+
## Setup
88

9-
2. If you have a local MySQL instance, run the app locally:
9+
1. You will need to create a [Cloud SQL instance](https://cloud.google.com/sql/docs/create-instance).
1010

11-
dev_appserver.py .
11+
2. Edit the `CLOUDSQL_INSTANCE` and `CLOUDSQL_PROJECT` values in `main.py`.
1212

13-
2. Upload the app:
14-
15-
appcfg.py update .
13+
3. To run locally, you will need to be running a local instance of MySQL. You may need to update the connection code in `main.py` with the appropriate local username and password.

appengine/i18n/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# App Engine Internationalization sample in Python
1+
# App Engine Internationalization Sample
22

33
A simple example app showing how to build an internationalized app
4-
with App Engine. The main purpose of this example is to provide the
5-
basic how-to.
4+
with App Engine.
65

76
## What to internationalize
87

@@ -93,6 +92,9 @@ Open `locales/ja/LC_MESSAGES/jsmessages.po` and translate it.
9392

9493
$ pybabel compile -d locales -D jsmessages
9594

95+
### Running locally & deploying
96+
97+
Refer to the [App Engine Samples README](../README.md) for information on how to run and deploy this sample.
9698

9799
## How it works
98100

appengine/images/README.md

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,6 @@
11
## Images Guestbook Sample
22

3-
This is a sample app for Google App Engine that exercises the [images
4-
Python
3+
This is a sample app for Google App Engine that demonstrates the [Images Python
54
API](https://cloud.google.com/appengine/docs/python/images/usingimages).
65

7-
See our other [Google Cloud Platform github
8-
repos](https://github.com/GoogleCloudPlatform) for sample applications
9-
and scaffolding for other python frameworks and use cases.
10-
11-
## Run Locally
12-
13-
1. Install the [Google Cloud SDK](https://cloud.google.com/sdk/),
14-
including the [gcloud tool](https://cloud.google.com/sdk/gcloud/),
15-
and [gcloud app
16-
component](https://cloud.google.com/sdk/gcloud-app).
17-
18-
1. Setup the gcloud tool.
19-
```
20-
gcloud components update app
21-
gcloud auth login
22-
gcloud config set project <your-app-id>
23-
```
24-
You don't need a valid app-id to run locally, but will need a valid id
25-
to deploy below.
26-
27-
1. Clone this repo.
28-
```
29-
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
30-
cd appengine/images/
31-
```
32-
33-
1. Run this project locally from the command line.
34-
```
35-
gcloud preview app run ./app.yaml
36-
```
37-
38-
1. Visit the application at
39-
[http://localhost:8080](http://localhost:8080).
40-
41-
## Deploying
42-
43-
1. Use the [Cloud Developer
44-
Console](https://console.developer.google.com) to create a
45-
project/app id. (App id and project id are identical)
46-
47-
1. Configure gcloud with your app id.
48-
```
49-
gcloud config set project <your-app-id>
50-
```
51-
52-
1. Use the [Admin Console](https://appengine.google.com) to view data,
53-
queues, and other App Engine specific administration tasks.
54-
55-
1. Use gcloud to deploy your app.
56-
```
57-
gcloud preview app deploy ./app.yaml
58-
```
59-
60-
1. Congratulations! Your application is now live at your-app-id.appspot.com
61-
62-
## Contributing changes
63-
64-
* See [CONTRIBUTING.md](/CONTRIBUTING.md)
65-
66-
## Licensing
67-
68-
* See [LICENSE](/LICENSE)
6+
Refer to the [App Engine Samples README](../README.md) for information on how to run and deploy this sample.

appengine/mailgun/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Mailgun & Google App Engine
2+
3+
This sample application demonstrates how to use [Mailgun with Google App Engine](https://cloud.google.com/appengine/docs/python/mail/mailgun).
4+
5+
Refer to the [App Engine Samples README](../../README.md) for information on how to run and deploy this sample.
6+
7+
# Setup
8+
9+
Before running this sample:
10+
11+
1. You will need a [Mailgun account](http://www.mailgun.com/google).
12+
2. Update the `MAILGUN_DOMAIN_NAME` and `MAILGUN_API_KEY` constants in `main.py`. You can use your account's sandbox domain.
Lines changed: 3 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,5 @@
1-
## Memcache Guestbook Sample
1+
# Memcache Guestbook Sample
22

3-
This is a sample app for Google App Engine that exercises the [memcache Python API](https://cloud.google.com/appengine/docs/python/memcache/usingmemcache).
3+
This is a sample app for Google App Engine that demonstrates the [Memcache Python API](https://cloud.google.com/appengine/docs/python/memcache/usingmemcache).
44

5-
See our other [Google Cloud Platform github
6-
repos](https://github.com/GoogleCloudPlatform) for sample applications and
7-
scaffolding for other python frameworks and use cases.
8-
9-
## Run Locally
10-
1. Install the [Google Cloud SDK](https://cloud.google.com/sdk/), including the [gcloud tool](https://cloud.google.com/sdk/gcloud/), and [gcloud app component](https://cloud.google.com/sdk/gcloud-app).
11-
2. Setup the gcloud tool.
12-
13-
```
14-
gcloud components update app
15-
gcloud auth login
16-
gcloud config set project <your-app-id>
17-
```
18-
You don't need a valid app-id to run locally, but will need a valid id to deploy below.
19-
20-
1. Clone this repo.
21-
22-
```
23-
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
24-
cd appengine/memcache/guestbook/
25-
```
26-
1. Run this project locally from the command line.
27-
28-
```
29-
gcloud preview app run ./app.yaml
30-
```
31-
32-
1. Visit the application at [http://localhost:8080](http://localhost:8080).
33-
34-
## Deploying
35-
36-
1. Use the [Cloud Developer Console](https://console.developer.google.com) to create a project/app id. (App id and project id are identical)
37-
2. Configure gcloud with your app id.
38-
39-
```
40-
gcloud config set project <your-app-id>
41-
```
42-
1. Use the [Admin Console](https://appengine.google.com) to view data, queues, and other App Engine specific administration tasks.
43-
1. Use gcloud to deploy your app.
44-
45-
```
46-
gcloud preview app deploy ./app.yaml
47-
```
48-
49-
1. Congratulations! Your application is now live at your-app-id.appspot.com
50-
51-
## Contributing changes
52-
53-
* See [CONTRIBUTING.md](../../../CONTRIBUTING.md)
54-
55-
## Licensing
56-
57-
* See [LICENSE](../../../LICENSE)
5+
Refer to the [App Engine Samples README](../../README.md) for information on how to run and deploy this sample.

appengine/multitenancy/README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
## Google App Engine Namespaces
1+
# Google App Engine Namespaces
22

3-
This sample demonstrates how to use Google App Engine's [Namespace Manager API](https://cloud.google.com/appengine/docs/python/multitenancy/multitenancy) in Python.
3+
This sample demonstrates how to use Google App Engine's [Namespace Manager API](https://cloud.google.com/appengine/docs/python/multitenancy/multitenancy).
44

5-
### Running the sample
6-
7-
You can run the sample on your development server:
8-
9-
$ dev_appserver.py .
10-
11-
Or deploy the application:
12-
13-
$ appcfg.py update .
5+
Refer to the [App Engine Samples README](../README.md) for information on how to run and deploy this sample.

appengine/ndb/README.md

Lines changed: 0 additions & 58 deletions
This file was deleted.

appengine/ndb/modeling/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
appengine-ndb-snippets
2-
======================
1+
## App Engine Datastore NDB Modeling Samples
32

4-
= modeling
3+
These samples demonstrate how to [model entity relationships](https://cloud.google.com/appengine/articles/modeling]) using the Datastore NDB library.
54

6-
Sample code for (Modeling Entity Relationships)[https://cloud.google.com/appengine/articles/modeling].
5+
Refer to the [App Engine Samples README](../../README.md) for information on how to run and deploy this sample.

0 commit comments

Comments
 (0)