google-app-engine

How many shards in a Google App Engine sharded counter?

I read today about sharded counters in Google App Engine. The article says that you should expect to max out at about 5/updates per second per entity in the data store. But it seems to me that this solution doesn't 'scale' unless you have some way of knowing how many updates you are doing per second. For example, you can allocate 10 s...

What is the best way to handle one to many relationships in the low level datastore api?

I've been using the low level datastore API for App Engine in Java for a while now and I'm trying to figure out the best way to handle one to many relationships. Imagine a one to many relationship like "Any one student can have zero or more computers, but every computer is owned by exactly one student". The two options are to: have th...

Is there a limit on the number of asynchronous urlfetch calls I can run simultaneously?

I noticed what appears to be a limit on simultaneous asynchronous calls of urlfetch in the Java implementation (as noted here: http://code.google.com/appengine/docs/java/urlfetch/overview.html) but not in the python documentation: http://code.google.com/appengine/docs/python/urlfetch/asynchronousrequests.html So is it the case that th...

Google App Engine Project works in Development Environment but not when Deployed

Hi, I am in the process of moving my web website over to google app engine and am having a problem with my site when it is deployed. The application was being hosted on tomcat/mysql and predominately consists of jsp pages. I have read the fallowing google documentation: http://code.google.com/appengine/docs/java/config/webxml.html ...

how to detect bounce mail in google app engine ?

Hi, sometime due to wrong input from user side, mail bounce and did not reach the recipient. ( sent from google app engine.) How to detect such email ? edit: may be i was not clear in my question : I want to know to which mail i have sent the mail which was return ( so that i may alert the user or delete the email id ). this is mo...

Google App Engine, How to automatically load model class for ReferenceProperty

Hello! I have modular project structure, like this: ./main.py ./app.yaml ../articles .../__init__.py .../models.py ../blog .../__init__.py .../models.py ../comments .../__init__.py .../models.py I have defined models in file models.py for each package (this is application). I have defined next models for "comments" application: clas...

Need Help Creating GAE Datastore Loader Class?

Need Help Creating GAE Datastore Loader Class for uploading data using appcfg.py? Any other way to simplified this process? is there any detailed example better than here When try using bulkloader.yaml: Uploading data records. [INFO ] Logging to bulkloader-log-20100701.041515 [INFO ] Throttling transfers: [INFO ] Bandwidth: 25...

One-to-one relationships between entities in the Python Google App Engine

Is to possible to create one-to-one relations in the Python version of Google App Engine? I know it is possible in Java. ...

Python Google App Engine: How do you find the count number of a particular entity in the datastore?

I want to be able to give each instance of a particular object a unique number id in the order that they are created, so I was thinking of getting the number of the particular entity already in the datastore and add 1 to get the new number. I know I can do something like query = Object.all() count = query.count() but that has some l...

Passing a JSON object through POST using Python

I'm trying to post a JSON object through a POST. I'm trying to do it as follows: import json, urllib, urllib2 filename = 'test.json' race_id = 2530 f = open(filename, 'r') fdata = json.loads(f.read()) f.close() prefix = 'localhost:8000' count = 0 for points in fdata['positions'].iteritems(): print '--' + str(count) + '--------' ...

How to decode a Google App Engine entity Key path str in Python?

In Google App Engine, an entity has a Key. A key can be made from a path, in which case str(key) is an opaque hex string. Example: from google.appengine.ext import db foo = db.Key.from_path(u'foo', u'bar', _app=u'baz') print foo gives agNiYXpyDAsSA2ZvbyIDYmFyDA if you set up the right paths to run the code. So, how can one take ...

App Engine template values not showing

Hi everyone. I'm trying to read a line from a static file and insert it into a template in Google App engine using the Webapp framework. However, the line does not render, not matter what I try. Is there something that I'm overlooking? main.py: def get(self): ... question = randomLine("data/questions.csv") data = question....

UnicodeEncodeError Google App Engine

I am getting the very familiar: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 24: ordinal not in range(128) I have checked out multiple posts on SO and they recommend - variable.encode('ascii', 'ignore') however, this is not working. Even after this I am getting the same error ... The stack trace: '...

Google App Engine retrieve user defined key name

Is there a way to retrieve the key name you set using: Model( key_name = ... ... ) I tried using the key() method but that returns the one Google makes. ...

google app engine downloading datastore entity with db.ListProperty

Using the following link: http://code.google.com/appengine/docs/python/tools/uploadingdata.html#Downloading_and_Uploading_All_Data I am creating an bulkloader to download a datastore entity that is defined as follows: class ReportEntry(db.Model): """A report from a Jinx instance running in the field.""" entry_type = db.StringP...

File upload error on google app engine

I'm trying to upload a file with curl, but I keep running into this one error. AttributeError: 'unicode' object has no attribute 'file' I'm on OSX, and the curl command im using looks like this: curl -d "attach=@`pwd`/output.txt" http://localhost:8081 The app engine code looks like this which is taken from the image share example a...

datastore get previous/next appengine

In MySQL you can get the next or previous record based on the key/id. Anyone know how i can achieve this in app engine (im using python) by only knowing/passing the key? Thanks ...

App Engine - MemcacheService namespaces

(I may be totally off in my understanding here but I still would like to ask.) The MemcacheServiceFactory can return a MemcacheService instance given a namespace. Can one application request MemcacheService instances for more than one namespace? If yes, can namespace be used as a grouping concept? For instance, say my model has folder...

goog app engine Problem with setting Attribute

Hi, I am having a little trouble getting an attribute that I am setting in one jsp page: pageContext.setAttribute("purchaser", purchaser, PageContext.SESSION_SCOPE); and by calling it in other parts of the site via This works in the google app engine development environment, but doesn't work once it is deployed to the real google ...

Global Exception Handling in Google App Engine

Instead of encapsulating my entire code in a try{} except{} block, is there someway of catching exceptions globally? Basically I am looking for a way to have a global exception handler which will handle all unhandled exceptions in the my python application written for google app engine ...