pyjelly is a Python implementation of Jelly, a high-performance binary serialization format and streaming protocol for RDF knowledge graphs.
Documentation, usage guide and more: https://w3id.org/jelly/pyjelly
- Fast reading and writing of RDF knowledge graphs in the Jelly format. pyjelly writes Jelly-RDF 1.2 by default, and reads Jelly-RDF 1.0–1.2.
- Reading and writing SPARQL query results in Jelly-SPARQL, with RDFLib or the generic API.
- Standalone generic API that doesn't need RDFLib or any other RDF library, allowing for:
- Serialization and parsing of statements to and from Jelly files.
- Parsing and serializing streams of graphs and statements.
- RDF 1.2 triple terms and literals with a base direction.
- Precise control over serialization options and framing.
- Seamless integration with:
- Stream processing support for large datasets and streams of many RDF graphs or datasets.
pyjelly is useful when dealing with (see full description):
- Dumping and loading large RDF datasets.
- Client-server communication.
- Workflows, where streaming is required.
Install pyjelly from PyPI:
pip install pyjelly[rdflib]To write an RDF graph to a Jelly file:
from rdflib import Graph
g = Graph()
g.parse("http://xmlns.com/foaf/spec/index.rdf")
g.serialize(destination="foaf.jelly", format="jelly")To read a Jelly file and convert it to an RDFLib Graph:
from rdflib import Graph
g = Graph()
g.parse("foaf.jelly", format="jelly")See our documentation for further examples, a full API reference, and more.
This project is being actively developed – you can stay tuned by watching this repository.
Join the Jelly Discord chat to ask questions about pyjelly and to be up-to-date with the development activities.
NeverBlink provides commercial support services for Jelly, including implementing custom features, system integrations, implementations for new frameworks, benchmarking, and more.
If you'd like to contribute, check out our contributing guidelines.
The pyjelly library is licensed under the Apache 2.0 license.
The development of the Jelly protocol, its implementations, and supporting tooling was funded by commercial sponsors and the European Union. More details.