google-app-engine

Increasing the number of Models on Google App Engine affects performance?

I made a Google App Engine application as a class project in my university. Now I need to optimize it to use it commercially. Nowadays, the code is very slow. It has only few Models with many properties in each. Before rewriting the Models code, I need to know if my application will be faster if I increase the number of Models, i.e. inc...

Google App Engine Example Modified

I took an official example of Google App Engine, that creates a Shoppinglist, and modified it so it would: Create two tables (contact and Phonenumber) instead of one Shoppinglist. This is to understand how google deals with two tables and the Foreignkey (see code below). It displays everything until line 47: data = PhoneNumber(data=se...

Securing a web service running on App Engine

Hey there, Our application consists of a REST web service running on App Engine and a flash client. We need to make sure that only our client can make requests to the web service and to prevent situations like replay attacks. I'm not a security expert (by far) so I'd like some advice with the security scheme I came up with. The syste...

How to create unique IDs for child entities containing Key fields?

In the demo code below, the User is the parent entity, with a one-to-many relationship with a BlogPost. Because the BlogPost is a child of a User, its primary key field cannot be an auto-generated long value but has to be a Key object instantiated with the KeyFactory. At the moment, I am passing the BlogPost blogTitle (not guaranteed u...

Removing Entity from GAE

I am doing some tests with GAE/J. Some days ago I created a model and I have persisted some instances twig-persist. Now that class doesn't exist any more and I want to remove that instances. Can I do it from the Data Viewer or I can only remove it from the code? ...

How do I query a many to many relationship model? - Google App Engine

Here are my models: class User(db.Model): id = db.StringProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) updated = db.DateTimeProperty(auto_now=True) name = db.StringProperty(required=True) email = db.StringProperty() class Page(db.Model): id = db.StringProperty(required=True) created...

Migrate data from MySQL to Google App Engine (Python) Data Store

Hey, I have a legacy website created in PHP and MySQL. I wish to migrate this onto Google App Engine (Python). Has anybody done this before? Any examples, tips, resources, tools you'd like to share? I believe I will have to use "bulkloader" introduced in the GAE docs. Still haven't figured out how to get started. I have two tasks: ...

app on GAE | Restricted Google account authentications | listed google accounts not all |

Hi All, I am quite new to this Google app engine. I am learning things every day. I am have a forum on google app engine. But I want is to be having private or restricted parts. Some features should be locked for certain google account users, which are in some sort of access control list. I plain words I can say, only those user who are...

GqlQuery with selfreferenceproperty key

Hi Everyone, I have an entity with a selfreferencyproperty and I wanted to search with a WHERE condition on the selfref field's key. My intent is to reduce DB hits by building a list of keys, then iterating over the same entity to build a nested list. I am using this list to hit memcache.get_multi() for a cached dictionary version of th...

Are there limits to what you can do inside asynchronous URL fetch callbacks?

I'm experimenting with the asynchronous URL fetch interface. But when callbacks are used on the production environment, I get an AssertionError. Is this caused by datastore access in the callback function? What limits are there in the callback function? Are there other APIs that cannot run asynchronously? Here's the stack... ('The Wa...

web.py on Google App Engine

I'm trying to get a web.py application running on GAE. I hoped that sth like the following might work import web from google.appengine.ext.webapp.util import run_wsgi_app [...] def main(): app = web.application(urls, globals()) run_wsgi_app(app) But obviously the app object doesn't conform with the run_wsgi_app function's ex...

What's the correct way to store an object in a Model property ?

I need to store a Django template object in a Model property. My solution so far has been to pickle the object before assigning it to a BlobProperty : entity.template_blob = pickle.dumps(template) entity.put() And then after a fetch from the datastore, I do : template = pickle.loads(entity.template_blob) Am I doing this wrong ? I ...

Appengine retrieve data related to user form submission

Hi, I had read the docs for Appengine to know how to retrieve data from Models. But i´m missing something.. My models are user and student, where student is a reference property from user. Users login, fill form with some values and save the data with put(). If you login with [email protected] you get your data or if you login with an...

How to deploy this "Python+twill+mechanize" combination to "Google App Engine"?

Hello, I've been trying to pass my login and password from Python script to the eBay sign-in page. Later I want this script to be run from "Google App Engine" I was suggested to use "mechanize". Unfortunately, it didn't work for me: IDLE 1.2.4 >>> import re >>> import mechanize >>> br = mechanize.Browser() >>> br.open("https:...

App Engine Bulk Loader Performance

I am using the App Engine Bulk loader (Python Runtime) to bulk upload entities to the data store. The data that i am uploading is stored in a proprietary format, so i have implemented by own connector (registerd it in bulkload_config.py) to convert it to the intermediate python dictionary. import google.appengine.ext.bulkload import con...

what files in django are not necessary for using only templates?

hi, I use django templates 1.2 in my GAE app. I remember default templates in GAE were some kind of old version (0.96 or smth) and I moved to the new one. The question is - what files and directories I can delete from django folder to minimize its size - I need only templates. ...

How to require a key_name when creating model classes with App Engine?

I want to require that one of my model classes specify my own custom key as the key_name, that way I can always rely on it being there. How can I require this? For example, I may have a model class such as: class Account(db.Model): user = db.UserProperty(required=True) email = db.EmailProperty() And I want to require that k...

Google App Engine many-to-many to self

I'm trying to convert a django project for GAE, and I've stumbled upon this: (relational-databse) class Clan(models.Model): wars = models.ManyToManyField('self') How can I do this in a non-relational database(i.e. gae datastore)? ...

get_current_session returns None

I've been using geasessions for a while, been working great. It's simple and fast. But today I started a new project (GAE v1.3.7) and can't get it to work, get_current_session() just returns None I've split the code in to a new project that's just using gaesessions: from google.appengine.ext import webapp from google.appengine.ext.we...

With Appscale, does it mean I can deploy GAE applications on Xen VPS hosts without worrying about server maintenance?

I'm pretty new to Appscale and GAE. Say I have a web application on GAE (offers hassle-free maintenance on server security etc), if I move the application to a Xen VPS host using Appscale, do I still enjoy hassle-free maintenance (since Appscale is based on GAE)? ...