| > All our python examples are in framework X, that's sufficient for everyone using framework Y, right? I work on GCP on the Python samples. We generally pick Flask, since our thinking is that for many API calls, it is pretty much identical code in other frameworks, and Flask has minimal boilerplate. We have quick starts for Django for all our platforms. I think Flask + Django covers a huge chunk of Python frameworks people are using. If you think we are missing important Python samples, you can file an issue here: https://github.com/googlecloudplatform/python-docs-samples There are a lot of potential samples to write, so any guidance on which ones people want is always helpful to us. |
I keep a local branch of the python-docs-sample repo and just took a gander to refresh my memory. Specifically I see a quite a few examples using class based views based from the webapp2 package. I don't think it's unreasonable to have this as a major reference point, but it does require some extra documentation reading when converting to say, function based views in Flask.
Our personal use case is python3 in the flexible environment and I'd like to point out two notes while I have you here (if it's appropriate):
1) Are task queues coming to GAE Flexible environment - python? (and more over is feature parity coming between the google.appengine and google.cloud packages)
2) It's undocumented that the flexible environment of python requires a specific configuration variable to be set in order to make a connection to cloudSQL. I raised a support ticket for it a few weeks ago and the documentation hasn't been changed. It took me a few hours to debug it personally and I would like to save others the effort, can users make a pull request on the docs directly? For reference the variable is "beta_settings: cloud_sql_instances:" in app.yaml (it's present in the python-docs-samples but has no comment explaining its significance/requirement).
EDIT: I can no longer edit my original comment, but it seems GAE flexibly environment for python does support web sockets, though I would question the effectiveness of stateful servers in GAE. Of course thats an implementation problem and not one with GAE.