Skip to main content

A rules engine for RDF data

Project description

PyPI - Status

RDF-Engine

Why?

Motivation: This was developed as part of BIM2RDF where the conversion from BIM to RDF is framed as 'mapping rules'.

How?

Rules are processes that generate quads. They are simply applied until no new quads are produced. Oxigraph is used to store data.

A rule is defined as a function that takes an Oxigraph instance and returns quads.

Features

  • Handling of anonymous/blank nodes: They can be derandomized.
  • Oxigraph can handle RDF-star data and querying. However, RDF-star is derandomized for each graph in a rule. RDF-star data is expected to be of form <<data.subject data.predicate data.object >> meta.predicate meta.object.

Usage

The package can be obtained from PyPi. Note the CLI is optional: rdf-engine[cli].

A 'program' is defined as a sequence of engine runs initialized by a `db'. Each engine run takes:

  • (engine) params
  • and a list of rules. Each rule needs a module, maker, and params. See program example in test script.

Development Philosophy

  • KISS: It should only address executing rules. Therefore, the code is expected to be feature complete (without need for adding more 'features').
  • Minimal dependencies: follows from above.
  • Explicit > Implicit: Parameters should be specificed (explicitly).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rdf_engine-214.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rdf_engine-214-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file rdf_engine-214.tar.gz.

File metadata

  • Download URL: rdf_engine-214.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for rdf_engine-214.tar.gz
Algorithm Hash digest
SHA256 3ccb4c34b62d9013d49135370a20d232ff459e057ef7f79716f012a933f1fed3
MD5 50dd026f2d77c3bc175798c909a781fe
BLAKE2b-256 2c8c815626da4b331cef76122bc9f650506fc4046992cee7b5018b9a48645200

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdf_engine-214.tar.gz:

Publisher: python-publish.yml on pnnl/rdf-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rdf_engine-214-py3-none-any.whl.

File metadata

  • Download URL: rdf_engine-214-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for rdf_engine-214-py3-none-any.whl
Algorithm Hash digest
SHA256 5ce3cac59bf3c4e7089b1a20096ac9c2afe94710990a68602efd1a854f49fa15
MD5 8202b32bb3359a32fb2adce81b264398
BLAKE2b-256 f5da742f990d0e2cc1c40a5bb60b745c7395cdcec22a882f9542209573570662

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdf_engine-214-py3-none-any.whl:

Publisher: python-publish.yml on pnnl/rdf-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page