Skip to content

Instantly share code, notes, and snippets.

@tokibito
Created January 31, 2012 14:38
Show Gist options
  • Save tokibito/1710819 to your computer and use it in GitHub Desktop.
Save tokibito/1710819 to your computer and use it in GitHub Desktop.
from google.appengine.ext import db
class Foo(db.Model):
a_value = db.IntegerProperty()
def save_foo_values_1(values):
for value in values:
obj = Foo(a_value=value)
obj.put()
def save_foo_values_2(values):
foo_objects = []
for value in values:
obj = Foo(a_value=value)
foo_objects.append(obj)
db.put(foo_objects)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment