Command line tool to manage ontologies and their imports in a local environment
Project description
PyOntoenv
Installation
pip install pyontoenv
Usage
from ontoenv import Config, OntoEnv
from rdflib import Graph
cfg = Config(["../brick"], strict=False, offline=True)
# make environment
env = OntoEnv(cfg)
g = Graph()
# get the transitive owl:imports closure into 'g'
env.get_closure("https://brickschema.org/schema/1.4-rc1/Brick", g)
brick = Graph()
brick.parse("Brick.ttl", format="turtle")
# transitively import dependencies into the 'brick' graph, using the owl:imports declarations
env.import_dependencies(brick)
# pull Brick graph out of environment
brick = env.get_graph("https://brickschema.org/schema/1.4-rc1/Brick")
# import graphs by name
env.import_graph(brick, "https://w3id.org/rec")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyontoenv-0.1.7a3.tar.gz
(874.2 kB
view hashes)
Built Distributions
Close
Hashes for pyontoenv-0.1.7a3-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa39a6627c7b9be73b12869878af353d546ba942dbf782e0d150dbaca075c9da |
|
MD5 | 17de192708c3653cfffedcd174cdb0e7 |
|
BLAKE2b-256 | 57f2c64fe7d38786935a560f036e9ed40067bbe5ce98aa5fcbbcf2225f292dd6 |
Close
Hashes for pyontoenv-0.1.7a3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a899c4cab86986b0f761957b7473cd6180928f3c71ffb66d95a1df2080b5964 |
|
MD5 | a0099c8a1231c6e65316404a0a674f78 |
|
BLAKE2b-256 | 984534c77b12a4dc259f5d1a3a59d9870411b2499743835ec96a19a61103f8e9 |
Close
Hashes for pyontoenv-0.1.7a3-cp38-abi3-macosx_10_13_x86_64.macosx_11_0_arm64.macosx_10_13_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8756574d7626a109b4d730735e17a19e25de1739379f476bfc7fbfe62a15c3e0 |
|
MD5 | d0dcd5702019d361f14ca6db93db86dc |
|
BLAKE2b-256 | beea5ff42349b39b6c45fad2a9e9c6d7b52a54e34941a45ec269bdc1ac0475ef |