Just to give an example I'm using this code to query data from official 
endpoint from Italian assembly. I am having trouble with the connection of 
my production environment. I am wondering if it is possibile to query 
through a proxy I have
having
PROXY_PORT
PROXY_HOST
PROXY_PASSWORD
PROXY_USER

sparql_endpoint = "https://dati.senato.it/sparql";
sparql = SPARQLWrapper(sparql_endpoint)
sparql.setQuery("""
PREFIX osr: <http://dati.senato.it/osr/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT DISTINCT ?senatore ?nome ?cognome ?inizioMandato ?legislatura 
?tipoMandato
WHERE {
    ?senatore a osr:Senatore.
    ?senatore foaf:firstName ?nome.
    ?senatore foaf:lastName ?cognome.
    ?senatore osr:mandato ?mandato.
    ?mandato osr:legislatura ?legislatura.
    ?mandato osr:inizio ?inizioMandato.
    ?mandato osr:tipoMandato ?tipoMandato.
    OPTIONAL { ?mandato osr:fine ?df. }
    FILTER(!bound(?df))
} ORDER BY ?cognome ?nome
""")
sparql.setReturnFormat(JSON)
sparql.setTimeout(10)
sparql.query().convert()
On Friday, 22 November 2024 at 17:06:07 UTC+1 Mario Migliaccio wrote:

> I am wondering if there's the possibility to query the endpoint throgh a 
> proxy.
>
> Is it possibile?
>

-- 
http://github.com/RDFLib
--- 
You received this message because you are subscribed to the Google Groups 
"rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rdflib-dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/rdflib-dev/aa2ed8cd-4adc-43cc-8ba0-ea1da25a7ae0n%40googlegroups.com.

Reply via email to