google-app-engine

PyDev project for Google App Engine not finding webapp2

左心房为你撑大大i 提交于 2020-01-10 04:01:36
问题 I am attempting to try out Google App Engine with python. Being familiar with Eclipse, I decided to use PyDev. After some trouble, I have a hello world program working... almost. It cannot find the webapp2 import, telling me it is unresolved. I have followed all of the instructions I can find, and have the google app engine libraries linked up - I think. I have searched for webapp2 as a potential import, and cannot find this anywhere in any of the library files. I am really new to python in

How does Google App Engine Autoscaling work?

血红的双手。 提交于 2020-01-10 04:01:05
问题 This question is about Google App Engine quotas and instances. I deployed a GAE app without specifying any specific scaling algo. From their docs, it seems like the default is auto-scaling. So when do they scale the app to another instance, i.e. when exactly does a new instance spawn? What request/s causes the second instance to get started and traffic to be split? 回答1: Actually it is fairly well explained. From Scaling dynamic instances: The App Engine scheduler decides whether to serve each

Google Cloud Pub/Sub API - Push E-mail

强颜欢笑 提交于 2020-01-10 03:46:17
问题 I'm using node.js to create an app that gets a PUSH from Gmail each time an email is received, checks it against a third party database in a CRM and creates a new field in the CRM if the e-mail is contained there. I'm having trouble using Google's new Cloud Pub/Sub, which seems to be the only way to get push from Gmail without constant polling. I've gone through the instructions here: https://cloud.google.com/pubsub/prereqs but I don't understand how exactly this is supposed to work from an

Python App Engine webapp2 slow to route

眉间皱痕 提交于 2020-01-10 03:11:11
问题 I have a Python App Engine application which serves about 3M requests per day. I am trying to optimize the app to save on my ridiculously ballooned hosting bill. November, App Engine Frontend Instances: 12924.391 Hours, $604.22 I have the request handling down to some memcached calls, but now I've noticed that it usually takes about 20ms, sometimes as long as 166ms before webapp2 even passes the request to me. In the image below you can see a Trace showing "Post" happening at 166ms. Here is

How can I have dynamic properties in go on the google app engine datastore

若如初见. 提交于 2020-01-10 02:15:09
问题 I want to do something like the Expando Model that python supports on app engine. Sometimes you don't want to declare your properties ahead of time. A special model subclass, Expando, changes the behavior of its entities so that any attribute assigned (as long as it doesn't start with an underscore) is saved to the Datastore. How can I do this in Go? 回答1: Note beforehand: There are 2 APIs. The one with import path appengine/datastore uses channels as arguments. The other with import path

Looking for example using MediaFileUpload

强颜欢笑 提交于 2020-01-10 01:04:22
问题 Does anyone know where I can find complete sample code for uploading a local file and getting contents with MediaFileUpload? I really need to see both the HTML form used to post and the code to accept it. I'm pulling my hair out and so far only getting partial answers. Thanks! 回答1: I found this question while trying to figure out where the heck "MediaFileUpload" came from in the Google API examples, and I eventually figured it out. Here is a more complete code example that I used to test

cron job in google app engine not working

ぐ巨炮叔叔 提交于 2020-01-09 11:43:25
问题 I have taken the basic python 3 tutorial website on flask from this google cloud tutorial and I am able to set this up and the website works just fine. In addition , I also wanted to run a python script which runs everyday to collect some data, but the cron job just doesn't work. I also added login: admin to restrict anyone to directly use that url cron.yaml cron: - description: test dispatch vs target url: /cronapp schedule: every 5 hours app.yaml runtime: python env: flex entrypoint:

How to get Google profile info including custom fields from an Apps Domain user?

倾然丶 夕夏残阳落幕 提交于 2020-01-09 10:10:49
问题 Using the user.profile and user.email scope and the /oauth2/v2/userinfo feed doesn't seem to return any custom fields (in my case Department) or phone numbers. These fields show up in the Domain Shared Contacts directory. Is there perhaps an Apps Domain specific feed URL something like /oauth2/{DOMAIN}/v2/userinfo ? Does the API/Service not support any custom fields yet? Is there a way to fudge this into working? Read access to your own Apps Domain Shared Contacts profile that's connected to

How to serialize db.Model objects to json?

柔情痞子 提交于 2020-01-09 09:02:10
问题 When using from django.utils import simplejson on objects of types that derive from db.Model it throws exceptions. How to circumvent this? 回答1: Ok - my python not great so any help would be appreciated - You dont need to write a parser - this is the solution: add this utlity class http://code.google.com/p/google-app-engine-samples/source/browse/trunk/geochat/json.py?r=55 import datetime import time from google.appengine.api import users from google.appengine.ext import db #this is a mod on

Google Cloud Endpoints with another oAuth2 provider

◇◆丶佛笑我妖孽 提交于 2020-01-09 09:00:26
问题 Is there a way to use another OAuth2 provider with Google Cloud Endpoints? I mean for example, get authentication from Facebook and use it the same way we use Google Account Auth (using gapi js and putting User class on @ApiMethod ) 回答1: No. I came across someone else asking this question and the answer from the google folks (if I remember correctly) was that the endpoints user authentication currently only supports Google accounts. 回答2: You have to implement your own Authenticator and update