A simple implementation of the OWL2 RL Profile on top of RDFLib: it expands the graph with all possible triples that OWL RL defines. It can be used together with RDFLib to expand an RDFLib Graph object, or as a stand alone service with its own serialization.
https://github.com/RDFLib/OWL-RL/blob/a77e1791b88b54aace609bc6000aac14c7add4ff/scripts/owlrl#L90
graph.serialize
could be string (which does not have .decode).