These are samples for using Python on Google App Engine Managed VMs. These samples are typically referenced from the docs.
See our other Google Cloud Platform github repos for sample applications and scaffolding for other frameworks and use cases.
Some samples have specific instructions. If there is a README in the sample folder, pleaese refer to it for any additional steps required to run the sample.
In general, the samples typically require:
-
Install the Google Cloud SDK, including the gcloud tool, and gcloud app component.
-
Setup the gcloud tool. This provides authentication to Google Cloud APIs and services.
gcloud init
-
Clone this repo.
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git cd python-docs-samples/managed_vms
-
Open a sample folder, create a virtualenv, install dependencies, and run the sample:
cd hello-world virtualenv env source env/bin/activate pip install -r requirements.txt python main.py
-
Visit the application at http://localhost:8080.
Some samples in this repositories may have special deployment instructions. Refer to the readme in the sample directory.
-
Use the Google Developers Console to create a project/app id. (App id and project id are identical)
-
Setup the gcloud tool, if you haven't already.
gcloud init
-
Use gcloud to deploy your app.
gcloud preview app deploy app.yaml
-
Congratulations! Your application is now live at
your-app-id.appspot.com
- See CONTRIBUTING.md
- See LICENSE