Thank you for using Google Groups! Passing data between a backend and frontend service differs depending on the language and/or framework you are using. Should you be adopting a RESTful backend architecture in Python such as Flask, you can define a route handler, hit it with a GET request using the Fetch API <https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch> from JavaScript, and then have the data returned using the response object in your 'main.py' file.
You can follow this tutorial <https://flask.palletsprojects.com/en/1.1.x/tutorial/> on how to write route handlers using Flask that you can then hit using the Fetch API <https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch> from JavaScript, and have data returned from the backend service to the frontend service. Furthermore, you can use the GCP Flask tutorial <https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/standard/flask/tutorial> to get you started. Finally, these types of questions are better addressed on StackOverflow where you have access to a large community of enthusiasts and experts to share ideas with and get support from. Please make sure to include all relevant details and error messages which would help the community troubleshoot. On Monday, August 12, 2019 at 2:22:09 PM UTC-4, Ray Wong wrote: > > At present I deploy my gae project on appscale. I want to pass data to > html page. I know a simple way is to use Google JavaScript Library. But for > some reason, the https://apis.google.com/js/client.js is blocked and I > can't use this library. So I want to ask are there other ways to get > backend data(written in python) for javascript page. Thanks! > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/67890207-823c-4098-a34b-ed40dbe2e6a2%40googlegroups.com.
