Skip to content

isabella232/appengine-endpoints-helloendpoints-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

status: inactive

This sample has been moved to GoogleCloudPlatform/python-docs-samples.

Hello Endpoints Python

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.

Run Locally

  1. Install the App Engine Python SDK. See the README file for directions. You'll need Python 2.7 installed too.

  2. Clone this repo with

    git clone https://github.com/GoogleCloudPlatform/appengine-endpoints-helloendpoints-python.git
    
  3. Run the application locally with

    cd appengine-endpoints-helloendpoints-python
    dev_appserver.py .
    
  4. Test your Endpoints by visiting the Google APIs Explorer (by default http://localhost:8000/_ah/api/explorer)

Deploy

To deploy the application:

  1. Use the Admin Console to create an app.

  2. Replace your-app-id in app.yaml with the app id from the previous step.

  3. Optional step: These sub steps are not required but will enable the "Authenticated Greeting" functionality.

    1. Update the values in helloworld_api.py to reflect the respective client IDs you have registered in the console.
    2. Update the value of google.devrel.samples.helloendpoints.CLIENT_ID in static/js/base.js to reflect the web client ID you have registered in the console.
  4. Deploy the application with:

    appcfg.py --oauth2 update .
    

    or use the App Engine Launcher.

  5. Congratulations! Your application is now live at your-app-id.appspot.com.

  6. 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.

Next Steps

This skeleton includes TODO markers you can search for to determine some of the basic areas you will want to customize.

Consuming APIs

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.

Installing Libraries

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.

Feedback

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.

Contributing changes

See CONTRIB.md

Licensing

See LICENSE

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 40.1%
  • HTML 38.7%
  • Python 21.2%