Skip to main content

Original Author DOI PyPI badge

OWL-RL Logo

OWL-RL

A simple implementation of the OWL2 RL Profile, as well as a basic RDFS inference, on top of RDFLib, based on forward-chaining.

Installation

This package requires RDFLib 7.6.0 or newer. It can be installed from the Python Package Index in the usual way:

pip install owlrl

or

poetry add owlrl

Optional: run the closure against an Oxigraph in-memory store by installing the extra:

pip install "owlrl[oxigraph]"

Use

This package can run inference according to RDFS and/or OWL-RL.

For details on RDFS, see the RDF Semantics Specification; for OWL 2 RL, see the OWL 2 Profile specification.

View the OWL-RL documentation online:

http://owl-rl.readthedocs.io/

Scripts

This Python package contains a couple of Command Line scripts:

  • scripts/RDFConvertService: a CGI script to invoke the library

    • It may have to be adapted to the local server setup.
  • scripts/owlrl: a script that can be run locally to transform a file into RDF (on the standard output)

    • Run the script with -h to get the available flags.

Oxigraph store (optional)

After installing the oxigraph extra (see Installation above), you may pass a PyOxigraph Store into owlrl.DeductiveClosure(...).expand(...) and related closure entry points wherever you would normally pass an RDFLib Graph or Dataset. Inferred triples can still be written to a separate named graph on that store via the destination argument, as with RDFLib.

This integration is provided for compatibility (for example, keeping the rest of an application on Oxigraph) rather than for speed. Converting terms to and from RDFLib objects removes most of the performance benefit of Oxigraph, and this project still uses RDFLib types and logic internally for all inference steps.

License

This software is released under the W3C© SOFTWARE NOTICE AND LICENSE. See LICENSE.txt.

Support & Contacts

Please follow the instructions for Support and Contact as given for the RDFLib package:

Development

Changes

To view the changelog for this software package, see CHANGELOG.rst.

Release Procedure

  • ensure all tests pass: pytest
  • update all the version numbers
    • pyproject.toml
    • README.rst
  • remove the current dist/ directory
  • build the new distribution
  • test the metadata rendering
  • test pushing it to PyPI
  • actually push it to PyPI
pytest
rm -vf dist/*
poetry build
bsdtar -xvf dist/owlrl-*.whl -O '*/METADATA' | view -
bsdtar -xvf dist/owlrl-*.tar.gz -O '*/PKG-INFO' | view -

poetry publish --dry-run
poetry publish -u __token__ -p <OWL-RL PyPI Token>
  • commit the version update
  • tag it
  • push the commits and tag to GitHub
  • make a GitHub release
    • reuse the CHANGELOG entry for the release

Release files for owlrl 7.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for owlrl 7.6.2
File Size Uploaded
owlrl-7.6.2.tar.gz 48.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for owlrl 7.6.2
File Interpreter ABI Platform
owlrl-7.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 104.4 kB

Release files / owlrl-7.6.2.tar.gz

Download URL owlrl-7.6.2.tar.gz
Size 48.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c743f35c2d908396e77823852bb1ebbce88340cd49961493983bec42c93283a8
BLAKE2b-256 checksum
How to use checksums
cb0850dd7fd0c64775d3d6309f35c0cc9a9d635f392f94ee2c4f9122404f7f86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.7 Darwin/25.3.0

Release files / owlrl-7.6.2-py3-none-any.whl

Download URL owlrl-7.6.2-py3-none-any.whl
Size 55.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83347bf7f133979e87b2b18695d51d25510b99cec3f6919b5df05d4fbf058ae0
BLAKE2b-256 checksum
How to use checksums
4a5e314be7440bf28dbd47f85321a7434c5b74179a762228487d6493c01bddce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.7 Darwin/25.3.0

Release history Release notifications | RSS feed

This release

7.6.2 This release

2 release files

7.6.1

2 release files

7.6.0

2 release files

7.1.4

2 release files

7.1.3

2 release files

7.1.2

2 release files

7.1.1

2 release files

6.0.2

2 release files

5.2.3

2 release files

5.2.2

2 release files

5.2.1

2 release files

5.2.0

2 release files

5.1.1

2 release files

5.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page