Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Feature Request: PROV-RDF Serialization #1

nicholsn opened this Issue · 7 comments

3 participants


I'd be interested in adding support for PROV-RDF using rdflib. Is this in the roadmap? If so, I could help add this feature with a little guidance about how to extend prov with additional serializations.


Hi Nolan,

We did consider of adding RDF export/import support but never had the bandwidth. Hence, you are very welcome to make contribution in this area. Please let me know what you need and I'll try to help the best I can.

Are you looking for both RDF import and export? I think RDF export is easier than import, and can be quickly implemented. Importing is trickier as it is not a straight forward mapping.

You might find the PROV-O document ( useful for mapping PROV-DM to RDF.


Great. I think eventual support for import and export would be great, but export would be a great place to start. I'm still getting familiar with your codebase (nice work btw!) and the PROV-O document, but in the meantime perhaps you could tell me where you think the best place to add an rdf export def would be or if there example code of something similar. Maybe get_provn?

Thanks and looking forward to contributing!


Thank you for the nice comment. I made a stab at RDF export and created an rdf branch for it. It is currently experimental and I'm still quite unsure about coupling the code of the model with that for RDF export. Nevertheless, I hope it gives you some ideas.

RDF support will not be trivial (as our experience with the ProvToolbox's implementation in Java told us) and it might be better to have a separate module for RDF (de)serialisation.


You're very welcome and thanks for taking an initial stab at the RDF export. This will definitely give me a good foothold to start from and I agree that coupling the serialization code with the model might need a little refactoring. I'll tinker with this over the upcoming break for the holidays and we can discuss.


@nicholsn, @satra,

Just a head up. I'm refactoring the prov.model package, introducing significant changes to the data model. In addition, I separated (de)serialization's code from the mode's. See prov.model.serializers package in the 1.x branch, which contains the PROV-JSON serializer. It would be great if you have a chance to port the RDF code to a new serializer following the PROV-JSON example.


@trungdong - i'll send a PR today. is there a prov/bundle you have that generates all possible records?


@satra, thank you. It doesn't need to be that fast but you're very welcome to :)

The branch is completed in functionality, except prov.model.graph which has not been ported. That's why I haven't released it yet.

BTW, the Django app prov.persistence has been removed and will become a separate package soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.