0

using datastore client library. Can be used regardless of the state of the datastore property.

datastore_client.put({
  "foo":"foo",
  "bar":"bar",
  "xxx":"xxx", # any property can put
  ...
})

But, using ndb. Only predefined properties can be used.

Class Test(ndb.Model):
  foo = StringProperty()
...
Test(
  foo="foo",
  bar="bar" # error
).put()

If I want to put()/get() schemeless. I cannot use ndb?

stack_user
  • 563
  • 2
  • 14

1 Answers1

2

Look for ndb.Expando .This is what you want

janscas
  • 619
  • 4
  • 13