rdfmapper

A declarative Object-RDF Mapper for Python to map classes to RDF graphs.

Overview

Repository: https://github.com/lambdageo/rdfmapper

Creators: Felipe Goiabeira and Sérgio Souza Costa

rdfmapper is a declarative Object-RDF Mapper for Python. It allows you to map Python classes to RDF graphs using decorators, inspired by ORM frameworks such as JPA and SQLAlchemy, without requiring you to write SPARQL or manipulate triples manually.


PyPI License Python Versions Tests

Features

  • Declarative Mapping: Use decorators to map Python classes to RDF types and predicates.
  • Relationship Support: Built-in support for one-to-one and one-to-many relationships.
  • Automatic Validation: Generate SHACL shapes automatically from your class metadata.
  • Dynamic Queries: Built-in RDFRepository for find_by_* and count_by_* queries without manual SPARQL.
  • Type Awareness: Automatic conversion for int, float, bool, date, and datetime.

Installation

You can install the package directly from PyPI:

```bash pip install rdfmapper-py