google-app-engine

App engine, Flask-Socketio server Cors_Allowed_Origins header is missing

App engine, Flask-Socketio server Cors_Allowed_Origins header is missing Question: When I try to send a request from the client to my socketio flask server that is deployed on app engine I recieve the following error: has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. I did put the following …

Total answers: 3

converting google datastore query result to pandas dataframe in python

converting google datastore query result to pandas dataframe in python Question: I need to convert a Google Cloud Datastore query result to a dataframe, to create a chart from the retrieved data. The query: def fetch_times(limit): start_date = ‘2019-10-08’ end_date = ‘2019-10-19′ query = datastore_client.query(kind=’ParticleEvent’) query.add_filter( ‘published_at’, ‘>’, start_date) query.add_filter( ‘published_at’, ‘<‘, end_date) query.order = …

Total answers: 4

sqlite ImportError: No module named _sqlite3 Google App Engine

sqlite ImportError: No module named _sqlite3 Google App Engine Question: I am attempting to deploy a Python Flask, HTML, JavaScript web application through Google App Engine. I’m using sqlite3 for my database >>> python >>> import sqlite3 This works just fine. Deploying my web app with $ gcloud app deploy Works just fine. However when …

Total answers: 2

Save an email attachment to a designated bucket

Save an email attachment to a designated bucket Question: App Engine allows one to listen to incoming emails. I’d like to then read attachments and write them to a GCS bucket. google.cloud.storage is not available in the standard environment, and cloudstorage, which is available, doesn’t allow writing in any other bucket but the default one. …

Total answers: 2

Getting error 403 while installing package with pip

Getting error 403 while installing package with pip Question: getting an error while installing google app engine using pip Collecting google_appengine Downloading google-appengine-1.5.1.tar.gz (897kB) 100% |████████████████████████████████| 901kB 1.9MB/s Complete output from command python setup.py egg_info: Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz Traceback (most recent call last): File “<string>”, line 1, in <module> File “/private/var/folders/88/5jq5gz011sl63h_37k_qftv40000gn/T/pip-build-vxx8Ov/google-appengine/setup.py”, line 3, in <module> ez_setup.use_setuptools() …

Total answers: 4

Update one property of an entity in google cloud datastore python

Update one property of an entity in google cloud datastore python Question: How do I update only one property of an entity in the google cloud datastore, without remove all other properties? key = client.key(’employee’, ID) employee_to_deactivate = datastore.Entity(key) employee_to_deactivate.update({ ‘active’:False, }) this updates the active property to False, but removes all the other properties. …

Total answers: 3

How to prevent "ImportError: No module named oauth2client.client" on Google App Engine?

How to prevent "ImportError: No module named oauth2client.client" on Google App Engine? Question: We are receiving an error: ImportError: No module named OAuth2Client We have noticed scores of questions around this topic, many unanswered and at least one answer that describes the solution of copying over files from the Google App Engine SDK. This approach, …

Total answers: 5

Optimizing an Update statement with many records in SQLAlchemy

Optimizing an Update statement with many records in SQLAlchemy Question: I am trying to update many records at a time using SQLAlchemy, but am finding it to be very slow. Is there an optimal way to perform this? For some reference, I am performing an update on 40,000 records and it took about 1 hour. …

Total answers: 2

Visual Studio Code pylint: Unable to import 'protorpc'

Visual Studio Code pylint: Unable to import 'protorpc' Question: I’m using pylint in Visual Studio Code to develop a Google App Engine (GAE) Cloud Endpoint API in Python. I’m unable to resolve a lint error. I don’t know what’s causing the error, but at a guess, pylint cannot find the protorpc library? The recommended fix …

Total answers: 19