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

  • SEARCH
  • Home
  • 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 9135449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:49:32+00:00 2026-06-17T08:49:32+00:00

From google documentation: A model instance’s key includes the instance’s entity kind along with

  • 0

From google documentation:

“A model instance’s key includes the instance’s entity kind along with a unique identifier. The identifier may be either a key name string, assigned explicitly by the application when the instance is created, or an integer numeric ID, assigned automatically by App Engine when the instance is written (put) to the Datastore. “

so in the example:

name = "John"
idd = 11
person = Person(name, idd)
person.put()

How do i get the “integer numeric ID, assigned automatically by App Engine”?

  • 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-06-17T08:49:33+00:00Added an answer on June 17, 2026 at 8:49 am

    if you are using ndb put() returns the new key… call the id function on the key:

    name = "John"
    idd = 11
    person = Person(name, idd)
    new_key = person.put()
    auto_assigned_id = new_key.id()
    

    from https://developers.google.com/appengine/docs/python/ndb/entities :

    To store the object as a persistent entity in the Datastore, use the
    put() method. This returns a key for retrieving the entity from the
    Datastore later:

    sandy_key = sandy.put()

    and:

    https://developers.google.com/appengine/docs/python/ndb/keyclass#Key_id

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

Sidebar

Related Questions

I don't understand how google app engine for python's Model.get_or_insert(key_name, **kwds) method works. From
I am trying to create several markers along a route from google maps directions.
I've searched everywhere, IPB forums, google, everywhere. I couldn't find any documentation from IPB/IP.Nexus
I took two simple examples from Google Maps v.3 Documentation https://code.google.com/apis/maps/documentation/javascript/examples/maptype-base.html google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/examples/weather_map.html And I
From the Google App Engine documentation: cursor() returns a base64-encoded cursor string denoting the
According documentation Google App Engine could send mail but from restricted list of addresses
According to the Google AppEngine documentation, one should import memcache like this: from google.appengine.api
Going thru all the documentation and results from google, I can't find or figure
I started out with hello world application from google documentation to write a chrome
Searching from google.com, like www.abc.com Search Result Rank the pages like Title..... Description... www.abc.com

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.