A Python "Hello World" skeleton application for Google App Engine using Google Cloud Endpoints.
See our other Google Cloud Platform github repos for sample applications and scaffolding for other Python frameworks and use cases.
-
Install the App Engine Python SDK. See the README file for directions. You'll need Python 2.7 installed too.
-
Clone this repo with
git clone https://github.com/GoogleCloudPlatform/appengine-endpoints-helloendpoints-python.git
-
Run the application locally with
cd appengine-endpoints-helloendpoints-python dev_appserver.py .
-
Test your Endpoints by visiting the Google APIs Explorer (by default http://localhost:8000/_ah/api/explorer)
To deploy the application:
-
Use the Admin Console to create an app.
-
Replace
your-app-id
inapp.yaml
with the app id from the previous step. -
Optional step: These sub steps are not required but will enable the "Authenticated Greeting" functionality.
-
Deploy the application with:
appcfg.py --oauth2 update .
or use the App Engine Launcher.
-
Congratulations! Your application is now live at
your-app-id
.appspot.com. -
Generate the Android client library with:
endpointscfg.py get_client_lib java -o . helloworld_api.HelloWorldApi
or for Gradle projects:
endpointscfg.py get_client_lib java -bs gradle -o . helloworld_api.HelloWorldApi
The library will connect to your deployed application. If you change your app ID, you must regenerate the client library.
This skeleton includes TODO markers you can search for to determine some of the basic areas you will want to customize.
Building the backend is one part of Cloud Endpoints. See how you can consume your APIs from Android, iOS, or the web by reading the documentation.
See the third-party libraries page for libraries that are already included in the SDK. To include SDK libraries, add them in your app.yaml file. Other than libraries included in the SDK, only pure python libraries may be added to an App Engine project.
Star this repo if you found it useful. Use the github issue tracker to give feedback on this repo and to ask for scaffolds for other use cases.
See CONTRIB.md
See LICENSE