Created
April 10, 2013 14:51
-
-
Save etimesg/5355307 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.appengine.ext import ndb | |
from random import randint | |
from time import sleep | |
class State(ndb.Model): | |
name = ndb.StringProperty() | |
cities = ndb.KeyProperty(repeated=True) | |
fake_state_name = str(randint(3,1000)) | |
fake_state = State(name=fake_state_name) | |
fake_state.put() | |
print fake_state | |
sleep(1) | |
fake_state_fetch = State.query(State.name==fake_state_name).fetch(1) | |
print fake_state_fetch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment