I have a User model for a game system. Need to increase the points by 100 every hour.
# the key_name is the userid in this case
class User(db.Model):
points = db.IntegerProperty(default=0)
so should prepare a handler which does a GQL query across all entities? ( wouldn't that be a little slow with 500k - 1 million user entities? )
...
I want determine the type of an attribute in a class. I am using setattr to set the value, and I would like to check the type that is expected, so that I can properly convert a string value before calling setattr.
How do you do this in python?
EDIT 1-
Some additional information based on the answers so far:
I only know the name of th...
Hello i am doing a very small application in google appengine and i use python.
My problem is that i have two tables using de db.model ("clients" and "requests"). The table "client" has got the email and name fields and the table "requests" has got the email and issue fields. I want to do a query that returns for each request the email, ...
Hey all,
As far as I understand from app engine tutorial, entity groups exist only for the purpose of transactions:
"Only use entity groups when they are needed for transactions" (from the tutorial)
The definition of being in the same entity group is to have the same root.. In that case, what is the use of having more than 1 hierarchy...
I am working on a social-network type of application on App Engine, and would like to send multiple images to the client based on a single get request. In particular, when a client loads a page, they should see all images that are associated with their account.
I am using python on the server side, and would like to use Javascript/JQue...
I made a very minor mod to the GqlQuery to retrieve only specified records using the
'where' keyword. The output, however, displays all entries from the guestbook db!
(I need to filter the data by author)
Guestbook5_datastore code:
#greetings = db.GqlQuery("SELECT * FROM Greeting ORDER BY date DESC LIMIT 10")
greetings = db.GqlQuery("...
Has anyone got jsonpickle working on the google app engine? My logs say there is no module but there is a module as sure as you're born. i'm using jsonpickle 0.32.
<type 'exceptions.ImportError'>: No module named jsonpickle
Traceback (most recent call last):
File "/base/data/home/apps/xxxxx/xxxxxxxxxxxxxxxxx/main.py", line 4, in <modu...
When receiving a file upload on google app engine, the example assumes you're receiving a .png. However you only konw what the type of the image is by the extension on the filename.
How do you get the original filename uploaded on GAE?
...
application = webapp.WSGIApplication(
[(r'/main/profile/([a-f0-9]{40})', ProfileHandler)],
debug=True)
The regex in the above parameter will not recognize a 40 hex long hexdigest in Google App Engine.
I'm getting 404s instead of ProfileHandler being passed the matching 40 hex long profile ID. My app.yaml passes everything /mai...
In Google App Engine, I can use JDO to persist Java objects into the data store.
Can I also use JDO to turn the object into a byte[], so that I can put it into memcache or send it over HTTP?
Clarification: I want to serialize classes that I have already annotated for JDO persistence. Having to use another serialization mechanism seems t...
I'm using PyCrypto (on google app engine) for AES encryption.
PyCrypto gives I guess a raw interface to AES--i need to pad my keys and my inputs to 16 byte multiples.
Is there a higher level library which takes care of this stuff for me?
...
I've heard that GAE now supports Groovy, but it seems the plugins don't work so well together. I'm trying to make a GAE project in eclipse that I can add Groovy Classes too...but it won't work. Everytime I try to add a Groovy Class I get the error 'Project is not a Groovy Project'. And when I go to Configure - Convert to Groovy Project, ...
Downloaded GAE sample code and copied into Eclipse pydev explorer
and got following errors on execution
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 67, in <module>
run_file(__file__, globals())
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 63,...
Is it possible (and does it make sense) to use the JDO Level 2 Cache for the Google App Engine Datastore?
First of all, why is there no documentation about this on Google's pages? Are there some problems with it? Do we need to set up limits to protect our memcache quota?
According to DataNucleus on Stackoverflow, you can set the follow...
I have a Model with a big blob property User.image
Having this property in my model made my queries take too much time and go over the deadline so I decided to move that property into another model - UserData - who's parent is the User.
However, existing model instances that are already in the datastore still contain that image data eve...
i am trying to use velocity framework on google app engine. i wrote a small program with a main method and tried running it locally. i get the following exception :
Exception in thread "main" org.apache.velocity.exception.VelocityException: Failed to initialize an instance of org.apache.velocity.runtime.log.ServletLogChute with the curr...
I am trying to write an application for google app engine that would be available only for myself. (I know it sounds strange..just for the time being) I am trying to write a Login servlet that would authenticate user using google's UserService and let the user into the app only if I login and would show a brief message prompting for logo...
I'm writing a Google Wave robot and I just messed something up. It was working just fine but now I'm getting an IllegalArgument exception on the line that includes query.execute.
Am I doing something stupid? I've seen several code samples very similar to what I'm doing. I can include the code of the WaveUpdate class if necessary.
Th...
Hi,
Given document-D1: containing words (w1,w2,w3)
and document D2 and words (w2,w3..)
and document Dn and words ( w1,w2, wn)
Can I structure my data in big table to answer the questions like:
which words occur most frequently with w1,
or which words occur most frequently with w1 and w2.
What I am trying to achieve is to find the...
I'm trying to find the most efficient way to get all objects from the datastore except ones already contained in a list.
Eg. PersistencyManager.getObjectsById(List) will return a list of objects with given ID's. I want a getObjectsExcept(List) method that will return all of the objects that are not contained in the given collection.
...