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. -
ultrajson
Ultra fast JSON decoder and encoder written in C with Python bindings -
serpy
ridiculously fast object serialization -
cattrs
Complex custom class converters for attrs. -
PyLD
JSON-LD processor written in Python -
mashumaro (マシュマロ)
Fast and well tested serialization library on top of dataclasses -
pysimdjson
Python bindings for the simdjson project. -
jsonschema-rs
JSON Schema validation library -
python-rapidjson
Python wrapper around rapidjson -
Fast JSON schema for Python
Fast JSON schema validator for Python. -
pySHACL
A Python validator for SHACL -
jsons
🐍 A Python lib for (de)serializing Python objects to/from JSON -
hjson-py
Hjson for Python -
Trafaret
Ultimate transformation library that supports validation, contexts and aiohttp. -
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 -
PyValico
Small python wrapper around https://github.com/rustless/valico
Collect and Analyze Billions of Data Points in Real Time
* 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.