I am working on a project where I process a URL and get an array (containing columns and rows) using beautifulsoup. Now I need to store this data in the datastore. I cannot find any reference on storing an array in the datastore.
A multivalued property is represented in the datastore api as a python list. If you can organize the data in list, you can define a part of your data model as
class MyData(ndb.Model):
array = ndb.StringProperty(repeated=True)
In the request handler, store the data like
data = MyData()
data.array = list_you_got_from_request
data.put()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With