how to read th RDF-Turtle Star file with Python?

194 Views Asked by At

I have a .ttls file . i want to read it with python and extract some information. I googled a bit. there is the library rdflib. but I think it doesn't support the .ttls file. does anyone have any idea how i can read this .ttls file with python?

2

There are 2 best solutions below

0
On

Possible duplicte of How can I parse rdf* files with python? does rdflib sopport rdf*? No answer

Python rdflib issue about this topic: https://github.com/RDFLib/rdflib/issues/955

Have you tried this repo: https://github.com/RDFLib/rdflib-rdfstar ? (I didn't!)

A robust indirect solution is to use a triple store (such as GraphDB) load your rdf* data and query it through the graphDB python API
Other implementations declared by the RDF-star working group are few other options.

0
On

rdf-star (turtle) can be parsed by https://pyoxigraph.readthedocs.io/en/stable/