SuLab / WikidataIntegrator

A Wikidata Python module integrating the MediaWiki API and the Wikidata SPARQL endpoint
MIT License
244 stars 46 forks source link

Publication helper should wait to hit the api #79

Closed stuppie closed 4 years ago

stuppie commented 6 years ago

PublicationHelper hits the API upon instantiation, even if the item already exists and it doesn't need to. It should check if the item exists upon call to "get_or_create" and then only if it doesn't exist, hit the external api and make all the statements. Because right now, its slow..

https://github.com/SuLab/WikidataIntegrator/blob/master/wikidataintegrator/wdi_helpers/publication.py