Plugin serializersΒΆ

These serializers are available in default RDFLib, you can use them by passing the name to a graph’s serialize() method:

print graph.serialize(format='n3')

It is also possible to pass a mime-type for the format parameter:

graph.serialize(my_url, format='application/rdf+xml')
Name Class
n3 N3Serializer
nquads NQuadsSerializer
nt NTSerializer
pretty-xml PrettyXMLSerializer
trig TrigSerializer
trix TriXSerializer
turtle TurtleSerializer
xml XMLSerializer