SPARQL Query RDF data with Python

Опубликовано: 05 Апрель 2025
на канале: Patimir
11,005
116

RDFLib is a pure Python package for working with RDF. The package include parsers and serializers for most of the RDF supported formats, graph interface for linked data manipulation as well as SPARQL 1.1 implementation for SPARQL 1.1 queries.
This video talks about querying existing RDF Graph. Rdflib query method is very intuitive and uses the same syntax as regular SPARQL queries which are only enclosed by triple quotes. The method then returns an iterator object with can be traversed to get all the values.

Links:
Jupyter notebook: https://github.com/Patimir/yt-noteboo...
Wikidata query service: https://query.wikidata.org/
WIkidata build in prefixes: https://en.wikibooks.org/wiki/SPARQL/...
Wikidata Michael Jackson entity: https://www.wikidata.org/wiki/Q2831

Subscribe to the channel for more content, it is very much appreciated:    / @thepato181  
Thank you very much!