Metadata-Version: 2.4
Name: pyjelly
Version: 0.6.2
Summary: Jelly-RDF implementation for Python
Project-URL: Homepage, https://w3id.org/jelly/pyjelly
Project-URL: Documentation, https://w3id.org/jelly/pyjelly
Project-URL: Repository, https://github.com/Jelly-RDF/pyjelly
Project-URL: Issues, https://github.com/Jelly-RDF/pyjelly/issues
Project-URL: Changelog, https://github.com/Jelly-RDF/pyjelly/releases
Author-email: "NeverBlink et al." <contact@neverblink.eu>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: Jelly,Knowledge graph,RDF,Serialization format
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Environment :: Plugins
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Topic :: File Formats
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: protobuf>=6.30.0
Requires-Dist: typing-extensions>=4.12.2
Provides-Extra: rdflib
Requires-Dist: rdflib>=7.1.4; extra == 'rdflib'
Description-Content-Type: text/markdown

[![Documentation](https://img.shields.io/website?url=https%3A%2F%2Fw3id.org%2Fjelly%2Fpyjelly&label=Documentation)](https://w3id.org/jelly/pyjelly) [![PyPI – Version](https://img.shields.io/pypi/v/pyjelly)](https://pypi.org/project/pyjelly/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyjelly)](https://pypi.org/project/pyjelly/) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![CI status](https://github.com/Jelly-RDF/pyjelly/actions/workflows/ci.yml/badge.svg)](https://github.com/Jelly-RDF/pyjelly/actions/workflows/ci.yml) [![Code coverage](https://codecov.io/gh/Jelly-RDF/pyjelly/branch/main/graph/badge.svg?token=2D8M2QH6U0)](https://codecov.io/gh/Jelly-RDF/pyjelly) [![Discord](https://img.shields.io/discord/1333391881404420179?label=Discord%20chat)](https://discord.gg/A8sN5XwVa5)

# pyjelly

**pyjelly** is a Python implementation of [Jelly](http://w3id.org/jelly), a high-performance binary serialization format and streaming protocol for RDF knowledge graphs.

**Documentation, usage guide and more: https://w3id.org/jelly/pyjelly**

## Features

- **Fast reading and writing** of RDF knowledge graphs in the [Jelly format](http://w3id.org/jelly).
- **Standalone [generic API](https://w3id.org/jelly/pyjelly/dev/generic-sink)** with no third-party dependencies, allowing for:
    - Serialization and parsing of statements to and from Jelly files.
    - Parsing and serializing streams of graphs and statements.
- Precise control over **serialization options, framing and compression**.
- **Seamless** integration with: 
    - **[rdflib](https://w3id.org/jelly/pyjelly/dev/getting-started)**
    - **[RDFLib-Neo4j](https://w3id.org/jelly/pyjelly/dev/rdflib-neo4j-integration)**
    - **[NetworkX](https://w3id.org/jelly/pyjelly/dev/networkx-integration)**
- **Stream processing support** for large datasets or streams of all [physical stream types](https://w3id.org/jelly/dev/specification/reference/#physicalstreamtype).

**pyjelly** is useful when dealing with (see [full description](https://w3id.org/jelly/pyjelly/dev/overview/#use-cases)):

- Dumping and loading **large RDF datasets**.
- **Client-server communication**.
- Workflows, where **streaming** is required.

## Getting started

Install pyjelly from **[PyPI](https://pypi.org/project/pyjelly/)**:

```bash
pip install pyjelly[rdflib]
```

To write an RDF graph to a Jelly file:

```python
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`:

```python
from rdflib import Graph

g = Graph()
g.parse("foaf.jelly", format="jelly")
```

**See [our documentation](https://w3id.org/jelly/pyjelly) for [further examples](https://w3id.org/jelly/pyjelly/dev/getting-started/), a full [API reference](https://w3id.org/jelly/pyjelly/dev/api), and more.**

## Contributing and support

This project is being actively developed – you can stay tuned by [watching this repository](https://docs.github.com/en/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications#subscription-options).

Join the **[Jelly Discord chat](https://discord.gg/A8sN5XwVa5)** to ask questions about pyjelly and to be up-to-date with the development activities.

### Commercial support

**[NeverBlink](https://neverblink.eu)** provides commercial support services for Jelly, including implementing custom features, system integrations, implementations for new frameworks, benchmarking, and more.

### Contributing

If you'd like to contribute, check out our [contributing guidelines](CONTRIBUTING.md).

## License

The pyjelly library is licensed under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0).

----

The development of the Jelly protocol, its implementations, and supporting tooling was co-funded by the European Union. **[More details](https://w3id.org/jelly/dev/licensing/projects)**.
