RDFLib / sparqlwrapper

A wrapper for a remote SPARQL endpoint
https://sparqlwrapper.readthedocs.io/
Other
513 stars 121 forks source link

Added support of sessions by requests, removed dependency of urllib's authentications #229

Open Huddeij opened 10 months ago

Huddeij commented 10 months ago

Because of the need of more than the 2 standard HEADER-based authentications (BASIC, DIGEST) there is a need of a session based solution. Now the library uses the library requests with that the user prepares an authenticated session and hands it over to the library before the sparql query is send to the server. This way the urllib library was deprecated. As long as a valid session is forwarded, the query is valid. It still supports the legacy way, but all urllib based methods are marked as deprecated. Further changes to the codebase were made to go a bit with pythons evolution, like the implementataion of f-strings for example.

nicholascar commented 5 months ago

Thanks @Huddeij for this PR. It has been long overdue to add sessions.

I'll just run a couple of local tests and then merge this creating a new version of SPARQLWrapper.