scribe-org / Scribe-Data

Wikidata and Wikipedia language data extraction
GNU General Public License v3.0
18 stars 18 forks source link

Extract SPARQLWrapper code into an importable code snippet #164

Open andrewtavis opened 3 days ago

andrewtavis commented 3 days ago

Terms

Description

Something that would be great to get to would be to extract the SPARQLWrapper logic into a separate function that can be imported. Specifically, in multiple files we have the following:

from SPARQLWrapper import SPARQLWrapper
endpoint_url = "https://query.wikidata.org/sparql"
sparql = SPARQLWrapper(endpoint_url)

Maybe we can put all of this into a wikidata_utils.py file in src/scribe_data/wikidata 🤔

Contribution

Happy to support someone who has interest in working on this, or can also get to it myself at some point 😊

andrewtavis commented 3 days ago

Ping @mhmohona 👋 We don't necessarily have to have this be a part of GSoC. You'd be welcome to work on this if you'd like to though :)