Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products. If you have feedback or questions as you navigate the site, click Send Feedback.

Python 2 is no longer supported by the community. We recommend that you migrate Python 2 apps to Python 3.

google.appengine.ext.testbed.apiserver_util module


Utility class for testbed only used for py_test.

This file wraps imports and attributes that testbed would need for accessing api_server and datastore_emulator. testbed uses cloud datastore emulator if and only if emulator_util can be import by it.



Get port number out of a line like “some message: localhost:[port].

google.appengine.ext.testbed.apiserver_util.read_lines_until(in_file, stop_string, timeout=30)source

Read lines in an input file until stop_string is found.


Launches api_server.


Two integers, first is the port number for api_server’s http endpoint, second is the port number of the Cloud Datastore Emulator.