Skip to content

Commit

Permalink
update README (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
wescpy authored Jun 15, 2022
1 parent 9432aae commit 9f29ed0
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Google App Engine services SDK for Python 3
# Google App Engine bundled services SDK for Python 3

This is a release of the App Engine services SDK for Python 3. It provides access
to various API endpoints that were previously only available on the Python 2.7
runtime.
This is a release of the App Engine services SDK for Python 3. It provides access to various services and API endpoints that were previously only available on the Python 2.7 runtime.

See the
[documentation](https://cloud.google.com/appengine/docs/standard/python3/services/access) to learn more about using this SDK.
See the [documentation](https://cloud.google.com/appengine/docs/standard/python3/services/access) to learn more about using this SDK, and learn more about it in [this product announcement](http://cloud.google.com/blog/products/serverless/support-for-app-engine-services-in-second-generation-runtimes) (Fall 2021).

Additional examples (Datastore [NDB], Task Queues [push tasks], Memcache) can be found in the [App Engine migration repo](https://github.com/googlecodelabs/migrate-python2-appengine). (Specifically look for samples whose folders have a `b` but where the Python 2 equivalent folder does **not** have an `a`, meaning this SDK is required, e.g., Modules 1 [`mod1` and `mod1b`], 7, 12, etc.)

We are working to support more App Engine bundled service APIs for Python 3. To sign up for the private preview, visit https://docs.google.com/forms/d/e/1FAIpQLSd1hFLA2UFSYwIMxm9ZI3pwigORZBgjJRH0qrnhtE7nvhhRCQ/viewform.

## Using the SDK

Expand All @@ -19,28 +17,29 @@ In your app's `app.yaml`, add the following:

`app_engine_apis: true`

In your `main.py`, import google.appengine.api.wrap_wsgi_app and call it on your
In your `main.py`, import `google.appengine.api.wrap_wsgi_app()` and call it on your
WSGI app object.

Example for a standard WSGI app:

~~~
import google.appengine.api
import google.appengine.api

def app(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
yield b'Hello world!\n'

app = google.appengine.api.wrap_wsgi_app(app)
~~~
app = google.appengine.api.wrap_wsgi_app(app)

Example for a Flask app:

~~~
import google.appengine.api
from flask import Flask, request
import google.appengine.api
from flask import Flask, request

app = Flask(__name__)
app.wsgi_app = google.appengine.api.wrap_wsgi_app(app.wsgi_app)
~~~
app = Flask(__name__)
app.wsgi_app = google.appengine.api.wrap_wsgi_app(app.wsgi_app)

Then deploy your app as usual, with `gcloud beta app deploy` (currently only the Beta version has the capability to enable these APIs). The following modules are available:

- `google.appengine.api.app_identity`
- `google.appengine.api.background_thread`
- `google.appengine.api.blobstore`
Expand All @@ -63,6 +62,7 @@ Then deploy your app as usual, with `gcloud beta app deploy` (currently only the
- `google.appengine.ext.ndb`
- `google.appengine.ext.testbed`


## Using the development version of the SDK

To install the code from the `main` branch on GitHub rather than the latest
Expand Down

0 comments on commit 9f29ed0

Please sign in to comment.