djangonic way to deal with rdf?

前端 未结 2 1621
温柔的废话
温柔的废话 2021-02-15 13:54

I was looking for an RDF project for django and I cant find any active.

This seems to be a good one http://code.google.com/p/django-rdf, but the last commit was in 2008,

2条回答
  •  滥情空心
    2021-02-15 14:41

    From what little I've read of RDF you are probably going to have to do manual work to get meaningful RDF statements from Django models since it's not a simple data representation format like JSON, it is trying to encode semantic meaning.

    That said, have a look at django-rdflib:
    https://github.com/odeoncg/django-rdflib

    There doesn't seem to be any documentation (and it seems to have been built for a specific app) but the author has posted here about a manage.py syncvb command that generates an RDF graph from existing Django models:
    https://groups.google.com/d/msg/django-rdf/14WVK7t88PE/ktAKJo-aCfUJ

    Not sure exactly what views django-rdflib provides, but if it can make an RDFlib graph for you then you can probably use the serialization plugins provided by RDFlib to output rdf+xml or whatever from your own view.

提交回复
热议问题