Laura, I create dynamic queries as follows:
q = sparql.prepareQuery(""" SELECT * WHERE { ?s local:%s ?o . } """ % attr, initNs = INIT_NS ) Richard D On Sunday, March 25, 2018 at 9:10:06 PM UTC+2, Laura Morales wrote: > > I can't find any Python library that can help me create parameterized > queries. The closest thing I've found is RDFlib's prepared queries. Is > there any way that I can use a prepared query object and get a string from > it? Something more or less like this > > query = prepared_string ('select * where { $sbj a [] }', sbj='< > http://example.org/Alice>') > -- 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 post to this group, send email to rdflib-dev@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/0c3fdc18-6a6e-46f6-a6eb-bdc29a776bc5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.