> > > > 1/ The idea is to read a CSV file, and create an item with its properties > for each line. So I have to loop over thousands of lines and create an item > and multiple claims associated, and it takes quite some time to do so. > (atleast 1 hour to create 1000 items) I guess it's because for each line, I > create a new entity and new claims, which means multiple requests for each > line. > > There is an API call, wbeditentity [1] that allows preparing an item with multiple claims which are written to WB in one call. its Are you aware of wikibase universal bot [2] and wikibase-tools [3]? Both cover functionality that should allow to do what you describe above and both use the wbeditentity call.
[1] https://www.wikidata.org/w/api.php?action=help&modules=wbeditentity [2] https://github.com/dcodings/Wikibase_Universal_Bot [3] https://github.com/stuppie/wikibase-tools
_______________________________________________ pywikibot mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot
