I am using Google App Engine Python.
I would like to store a simple variable number somewhere, so I can add, deduct and use this number.
examplenum=5
example+=1
Next time I use this examplenum, it wil become 6.
I know I can build a Model and add an IntegerProperty varible. But I guess that would be too much hassle because I only need one simple number not a model.
I have also read this question Simplest way to store a value in Google App Engine Python?, the memcache solution is not good for me. I want the number to stay forever not just temporary in the memcache.
Thanks a lot.
All the answers to the question you linked are relevent to you. If you want persistance you will have to create a model. Look at using get_or_insert to fetch/initialize an entity and give your entity a
key_nameso that you can keep fetching it easily whenever you need to store your values.You code does look suspiciously like a counter, and you might want to look at the sharding countering article and the problems that it solves in case they are relevent.