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.6.tar.gz
(874.2 kB
view hashes)
Built Distributions
Close
Hashes for pyontoenv-0.1.6-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87f3546f9761313f5479f9ec6d2cb956e999497e82bc1ddb911903f7383fce39 |
|
MD5 | 3b3cd6e768f488e01972eea9de83c89f |
|
BLAKE2b-256 | a76d64795aa04b504ea339b7ef1d1ab019fe8137ce6161640c311c898d5da45d |
Close
Hashes for pyontoenv-0.1.6-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a2941276efb47c776e61d89a3ba884d3f3cf65c4d8a64d3ac7edc10a6f6fa96 |
|
MD5 | 62e92fa5d1145cfcb946b80f85266c1a |
|
BLAKE2b-256 | 05d36ebe11df21fda97d983290e560bc61cb9cb02ce08352c588f9a6c9321aa9 |
Close
Hashes for pyontoenv-0.1.6-cp38-abi3-macosx_10_13_x86_64.macosx_11_0_arm64.macosx_10_13_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad0c54831e1f547e31c0b761d010cc2625cf07cf1c0a5b69640f4350f7ccb394 |
|
MD5 | a6b7aa960d6a8c268d8ed5bef68a61d9 |
|
BLAKE2b-256 | c208463bc9453c1b29317df5f88a521c3cbef6237611565a9b586908d80fc8e2 |