Skip to main content

Ontospy

Python library and command-line interface for inspecting and visualizing RDF models.

Description

Ontospy is a lightweight Python library and command line tool for inspecting and visualizing vocabularies encoded using W3C Semantic Web standards, that is, RDF or any of its dialects (RDFS, OWL, SKOS).

The basic workflow is simple: load a graph by instantiating the Ontospy class with a file containing RDFS, OWL or SKOS definitions. You get back a object that lets you interrogate the ontology. That's all!

The same functionalities are accessible also via a command line application. This is an interactive environment (like a repl) that allows to load ontologies from a local repository, interrogate them and cache them so that they can be quickly reloaded for inspection later on.

Downloads

Generating ontology documentation

Ontospy can be used to generate HTML documentation for an ontology pretty much out-of-the-box.

See the website Examples of ontology documentation generated via Ontospy, or jump straight to the sample CIDOC-CRM or FOAF documentation pages.

From version 2.0, the documentation generation libraries are installed by default with Ontospy. Previously, third party dependencies (e.g. Django) had to be installed separately.

Status

Maintenance

I have little time to spend on this project these days, so I'm mainly focusing on bug fixes and maintenance. Happy to review PRs if you want to add more functionalities!

Development

# git clone the repo first
$ mkvirtualenv ontospy
$ pip install -e .

Run the tests with pytest:

$ pip install pytest
$ pytest                 # all tests
$ pytest -m "not remote"  # skip tests that need network access, as CI does

More details in docs/pages/tests.md.

Documentation

http://lambdamusic.github.io/Ontospy/

Metadata

Release files for ontospy 2.7

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

Source distribution (sdist)

Source distribution for ontospy 2.7
File Size Uploaded Provenance
ontospy-2.7.tar.gz 2.8 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 5.6 MB

Release files / ontospy-2.7.tar.gz

Download URL ontospy-2.7.tar.gz
Size 2.8 MB
Tags Source
SHA-256 checksum
How to use checksums
51633b81fcfd534b016a1baa618a3073a048a00f88160a6e1e62532c2c422a0f
BLAKE2b-256 checksum
How to use checksums
9a4b542c897b4cdfb1647f3e7e1f3c336069d19694e8bf9f71b4e3e41444af4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / ontospy-2.7-py3-none-any.whl

Download URL ontospy-2.7-py3-none-any.whl
Size 2.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4e722b4b88fc6250f5a82da18cbb7bb96eff57463238bb171a6e1f95fe8c0b1a
BLAKE2b-256 checksum
How to use checksums
a368775c71507913709a3611d1f17d65d64763a8ca74372923fa58093bd532d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for ontospy 2.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

2.7 This release

2 release files No provenance

1.5.1

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