[User(key=Key('User', 5275456790069248), auth_ids=[u'abc@gmail.com'], created=datetime.datetime(2017, 8, 29, 22, 50, 36, 297407), email='abc@gmail.com'),
User(key=Key('User', 5838406743490560), auth_ids=[u'def@gmail.com'], created=datetime.datetime(2017, 8, 29, 16, 23, 16, 406468), email='def@gmail.com'),
User(key=Key('User', 6401356696911872), auth_ids=[u'ghi@gmail.com'], created=datetime.datetime(2017, 8, 30, 12, 34, 51, 816926), email='ghi@gmail.com')]
I managed to query the above data from Google App Engine datastore using Python but I am unable to loop it into JSON. Don't quite understand the concept of the Keys even I have gone through the documentations.
Besides hoping to understand the way to dump the entire object with the key into JSON without limits, any idea how could I just to extract the 'key'(in string), 'email' and 'created' (DateTime)? By the way, I am trying to retrieve all data.
For example:
users_new_list = []
allusers = User.query().fetch()
for user in all_users:
#How to get key in string and pass into 'users_new_list'
users_new_list.append(keyString)