Ontogram
An OWL ontology diagram generator.
Currently it supports owl:class, rdfs:subClassOf, owl:equivalentClass, datatype properties and domain and range relationships. I am planning to add support for owl:subClassOf restrictions soon.
Example output
The output of examples/tern-org.ttl.
Installation
Install via PyPI for Python 3.
pip3 install ontogram
Usage
Command line application
$ ontogram --help
Usage: ontogram [OPTIONS] ONTOLOGY_FILEPATH
Ontogram CLI is a tool to generate a diagram from an OWL ontology file.
Options:
--format ['turtle', 'xml', 'nt', 'n3']
RDF serialization of input file. Default is
turtle.
--help Show this message and exit.
Use Ontogram's CLI to generate diagrams of an OWL ontology.
ontogram ontology.ttl
Output will be 3 files, ontology.ttl.txt, ontology.ttl.png, ontology.ttl.svg.
Use the --format option to specify the RDF serialization of the ontology if it is not Turtle.
Python library
Ontogram is a Python library and can be easily integrated with any existing Python application.
from ontogram import Ontogram
# First parameter accepts a file path to the OWL ontology.
# Second parameter tells Ontogram what RDF format the OWL ontology is in.
ontogram = Ontogram('ontology.ttl', format='turtle')
# Generate a PNG diagram from the OWl ontology and write to disk as 'ontology.ttl.txt'.
ontogram.png_file('ontology.ttl.txt')
# Same as above, but as an SVG diagram.
ontogram.svg_file('ontology.ttl.svg')
See the examples directory for example outputs.
Metadata
Release files for ontogram 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ontogram-0.1.1.tar.gz | 35.3 kB | Without provenance | Details for ontogram-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ontogram-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for ontogram-0.1.1-py3-none-any.whl |
Total release size: 70.8 kB
Release files / ontogram-0.1.1.tar.gz
| Download URL | ontogram-0.1.1.tar.gz |
|---|---|
| Size | 35.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4252a1eacb4cc1b5463128cd0d0e68d05b65042dc7f72d88e37de0dd7387b2c2
|
|
BLAKE2b-256 checksum How to use checksums |
9c6d32766327d4f8e1af840bf3b5b8c717c5044996e7a9c082a0ae759b5cc6e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0 CPython/3.7.13 Linux/5.10.16.3-microsoft-standard-WSL2
|
Release files / ontogram-0.1.1-py3-none-any.whl
| Download URL | ontogram-0.1.1-py3-none-any.whl |
|---|---|
| Size | 35.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
192dd2ae9e5079e824506ed9f50049326c6bf0f4c74efc736c6d1bef4e23754e
|
|
BLAKE2b-256 checksum How to use checksums |
4088630e70360eaa45f209f8028e046fa8e6054f2bf9b39d05b9d5cbb8ce093b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0 CPython/3.7.13 Linux/5.10.16.3-microsoft-standard-WSL2
|
Security for ontogram 0.1.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.