Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6194833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:21:46+00:00 2026-05-24T03:21:46+00:00

I am using Google App Engine Python. I would like to store a simple

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:21:47+00:00Added an answer on May 24, 2026 at 3:21 am

    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_name so that you can keep fetching it easily whenever you need to store your values.

    class MyAppData(db.Model):
        my_number = db.IntegerProperty()
    
    # fetch entity whenever you need to store your value
    data = MyAppData.get_or_insert(key_name='mydata', my_number=1)
    
    data.my_number += 1
    data.put()
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would really like to write tests for Google App Engine using their python
I am using python and Google app engine. I would like to use the
I'm using Google Engine App with Python. I want to add custom user authentication.
I'm using Google App Engine python. I want to know what browser the user
I've been developing a Facebook app using Google App Engine in Python and the
I'm creating a GWT app in Google App Engine, and using Google data store.
I'm using Google App Engine and python for a web service. Some of the
I'm using App Engine with Python. In order to store the images of my
I am developing an application on the Google App Engine using Python. I have
I'm using Google App Engine (Python), and using OpenID for login. Specifically, I'm playing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.