Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Huddeij
Copy link

@Huddeij Huddeij commented Aug 30, 2023

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
Copy link
Member

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.

@domsj-foodpairing
Copy link

domsj-foodpairing commented Jul 25, 2024

Hi @nicholascar any update on this?

Edit: tried this patch in combination with apache jena fuseki, and it was giving me this error

15:33:48 INFO  Fuseki          :: [369] 415 Unsupported Media Type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants