serializer
Serializer plugin interface.
The RDF serialization plugins used during RDFlib’s common serialization of a graph is described in this module.
TODO: info for how to write a serializer that can plugin to rdflib.
See also rdflib.plugin
All builtin RDF Serializer are listed
under rdflib.plugins.serializers.
Classes:
-
Serializer–Base class for RDF Serializer.
Serializer
Serializer(store: Graph)
Base class for RDF Serializer.
New Serializer can be registered as plugin as described
in rdflib.plugin.
Methods:
-
relativize– -
serialize–Abstract method. Print Graph.
Attributes:
Source code in rdflib/serializer.py
serialize
serialize(stream: IO[bytes], base: Optional[str] = None, encoding: Optional[str] = None, **args: Any) -> None
Abstract method. Print Graph. Used in Graph.serialize
Serialize Graph
Parameters:
-
(streamIO[bytes]) –The destination to serialize the graph to.
-
(baseOptional[str], default:None) –The base IRI for formats that support it.
-
(encodingOptional[str], default:None) –Encoding of output.
-
(argsAny, default:{}) –Additional arguments to pass to the Serializer that will be used.