Description
This is an implementation of JSON-LD for RDFLib. For more information about this technology, see the JSON-LD website.
RDFLib plugin providing JSON-LD parsing and serialization alternatives and similar packages
Based on the "Serialization" category.
Alternatively, view RDFLib plugin providing JSON-LD parsing and serialization alternatives based on common mentions on social networks and blogs.
-
marshmallow
A lightweight library for converting complex objects to and from simple Python datatypes. -
lupin is a Python JSON object mapper
0.9 0.0 RDFLib plugin providing JSON-LD parsing and serialization VS lupin is a Python JSON object mapperPython document object mapper (load python object from JSON and vice-versa) -
py-object-factory
objectfactory is a python package to easily implement the factory design pattern for object creation, serialization, and polymorphism
Scout Monitoring - Free Django app performance insights with Scout Monitoring
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of RDFLib plugin providing JSON-LD parsing and serialization or a related project?
Popular Comparisons
-
RDFLib plugin providing JSON-LD parsing and serializationvsPyLD
-
RDFLib plugin providing JSON-LD parsing and serializationvsmarshmallow
-
RDFLib plugin providing JSON-LD parsing and serializationvshjson-py
-
RDFLib plugin providing JSON-LD parsing and serializationvsjsons
-
RDFLib plugin providing JSON-LD parsing and serializationvsultrajson
README
RDFLib plugin providing JSON-LD parsing and serialization
This is an implementation of JSON-LD for RDFLib. For more information about this technology, see the JSON-LD website.
This implementation will:
- read in an JSON-LD formatted document and create an RDF graph
- serialize an RDF graph to JSON-LD formatted output
Installation
The easiest way to install the RDFLib JSON-LD plugin is directly from PyPi using pip by running the command below:
pip install rdflib-jsonld
Otherwise you can download the source and install it directly by running:
python setup.py install
Using the plug-in JSONLD serializer/parser with RDFLib
The plugin parser and serializer are automatically registered if installed by setuptools.
>>> from rdflib import Graph, plugin
>>> from rdflib.serializer import Serializer
>>> testrdf = '''
... @prefix dc: <http://purl.org/dc/terms/> .
... <http://example.org/about>
... dc:title "Someone's Homepage"@en .
... '''
>>> g = Graph().parse(data=testrdf, format='n3')
>>> print(g.serialize(format='json-ld', indent=4))
{
"@id": "http://example.org/about",
"http://purl.org/dc/terms/title": [
{
"@language": "en",
"@value": "Someone's Homepage"
}
]
}
>>> context = {"@vocab": "http://purl.org/dc/terms/", "@language": "en"}
>>> print(g.serialize(format='json-ld', context=context, indent=4))
{
"@context": {
"@language": "en",
"@vocab": "http://purl.org/dc/terms/"
},
"@id": "http://example.org/about",
"title": "Someone's Homepage"
}
<!-- CUT HERE --> <!-- Text after this comment won't appear on PyPI -->
Building the Sphinx documentation
If Sphinx is installed, Sphinx documentation can be generated with:
$ python setup.py build_sphinx
The documentation will be created in ./build/sphinx.