0

I would like to perform bulk insert/update with the umongo library in Python. Is there a way to do the bulk update all at once or am I going to run one insert/update job per item to update ?

Jérôme
  • 13,328
  • 7
  • 56
  • 106
Robin Nicole
  • 113
  • 2
  • 8

1 Answers1

0

umongo doesn't do bulk update.

What you could do is call to_mongo on each document to build the bulk insert/update payload, then call YourDocument.collection.insert/update with that payload.

Beware, the bulk insert/update operation is not atomic (independently from umongo).

Jérôme
  • 13,328
  • 7
  • 56
  • 106