Questions tagged [google-app-engine-python]

Python language version of Google App Engine

Python Runtime Environment for Google App Engine

Useful links:

703 questions
163
votes
16 answers

Choosing Java vs Python on Google App Engine

Currently Google App Engine supports both Python & Java. Java support is less mature. However, Java seems to have a longer list of libraries and especially support for Java bytecode regardless of the languages used to write that code. Which language…
25
votes
3 answers

How to ignore files when running `gcloud app deploy`?

When I run gcloud app deploy app.yaml which files actually get uploaded? The project folder contains folders and files such as .git, .git_ignore, Makefile or venv that are irrelevant for the deployed application. How does gcloud app deploy decide…
Lars Blumberg
  • 19,326
  • 11
  • 90
  • 127
18
votes
5 answers

Google app engine deployment fails- Error while finding module specification for 'pip' (AttributeError: module '__main__' has no attribute '__file__')

We are using command prompt c:\gcloud app deploy app.yaml, but get the following error: Running "python3 -m pip install --requirement requirements.txt --upgrade --upgrade-strategy only-if-needed --no-warn-script-location --no-warn-conflicts…
Jack tileman
  • 813
  • 2
  • 11
  • 26
17
votes
4 answers

ImportError: No module named flask_restful

I am trying to deploy appengine flex python app but getting the following in Stackdriver log stderr after deployment File "/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker worker.init_process() File…
15
votes
1 answer

Speed up App Engine local SDK DB query when multiple order properties present?

I have a query that looks like this: query = (models.Foo.all() .filter('x =', x) .filter('y =', y) .filter('z =', z) .filter('zz =', zz) .order('-a')) It runs on the local SDK in ~100ms, and runs in cloud at acceptable speeds. When I add…
tom
  • 2,189
  • 2
  • 15
  • 27
14
votes
2 answers

what's the difference between google.appengine.ext.ndb and gcloud.datastore?

ndb: (from google.appengine.ext import ndb) datastore: (from gcloud import datastore) What's the difference? I've seen both of them used, and hints they both save data to google datastore. Why are there two different implementations?
12
votes
4 answers

GSpread ImportError: No module named oauth2client.service_account

Ok I'm following along with the Become A Technical Marketer course and I'm trying to learn how to manage Google Spreadsheets with GSpread. I've followed along with the documentation at http://gspread.readthedocs.io/en/latest/oauth2.html. I've…
11
votes
4 answers

AppEngine urlfetch validate_certificate=False/None not being respected

In the AppEngine developer appserver I am getting an error like this: SSLCertificateError: Invalid and/or missing SSL certificate for URL ... when I am making a fetch like this to an https server with a self-signed certificate (almost always…
10
votes
1 answer

Increase time to run code for Google flexible app engine delaying DeadlineExceededError

I have a single function running on Google App Engine Flexible as part of an API call. The structure is something like this import externalmod ... ... @app.route('/calc_here') def calc: answer = externalmod.Method() return answer The function…
Vipluv
  • 884
  • 7
  • 23
10
votes
2 answers

AppEngine dev_appserver - urllib2.urlopen issue with localhost url

UPDATE App Engine SDK 1.9.24 was released on July 20, 2015, so if you're still experiencing this, you should be able to fix this simply by updating. See +jpatokal's answer below for an explanation of the exact problem and solution. Original…
Aaron
  • 4,206
  • 3
  • 24
  • 28
9
votes
2 answers

How to use Python 3 with Google App Engine's Local Development Server

I've got a local Python application configured with runtime: python in it's app.yaml file. When starting the local development server with dev_appserver.py app.yaml all is fine. Since GAE's Local Development Server uses Python2.7 by default, I now…
Lars Blumberg
  • 19,326
  • 11
  • 90
  • 127
9
votes
3 answers

Can't connect to Cloud SQL using PyMySQL

I'm trying to connect to Cloud SQL from a Python application (using PyMySQL 0.7.9) running on top of Google App Engine. My connection string looks like this (credentials are fake of…
Niklas9
  • 8,816
  • 8
  • 37
  • 60
9
votes
2 answers

Google App Engine custom 404 page for static files

I'm working on a GAE application which largely consists of static content. I've configured the following handlers: - url: /content/(.*\..*) static_files: static/content/\1 upload: static/content/(.*) - url: /content/(.+) static_files:…
Tony the Pony
  • 40,327
  • 71
  • 187
  • 281
8
votes
3 answers

/healthz route of an app deployed on Google App Engine returns 404

HTTP requests for a /healthz route on an app deployed on Google App Engine don't seem to reach the /healthz endpoint within the app. Instead, a 404 page is served, apparently from the GCP infrastructure. Can I know how to override this behaviour…
8
votes
3 answers

How to emulate Google cloud tasks service locally in app engine flex (Python 3.7)?

I have been using Google App Engine Standard Environment(Python 2.7) since some days now. It provides a good local development server, providing Task queues, datastore and other services locally. Recently i have been exploring App Engine Flex…
1
2 3
46 47