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.7a5.tar.gz
(900.4 kB
view hashes)
Built Distributions
Close
Hashes for pyontoenv-0.1.7a5-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40f98c0eced30084af85644d4217aeea8c90017e986a28313df2e289c99e4662 |
|
MD5 | 6252c65e394353868f21953e06ea1a12 |
|
BLAKE2b-256 | ca1d7cfad4ae30a84abd75d60d7e9333fe6ac501ee1b3a2133c3f4c05f63c941 |
Close
Hashes for pyontoenv-0.1.7a5-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b77869899b145c691a1b111369a1d1cd60533576811c875ad33725809b2a321 |
|
MD5 | 29d34fc410bd0f31d7d6694bc5c480a5 |
|
BLAKE2b-256 | 82e9af9fe184ceb0a1193b50d205af70a53eab5f6a01ac8e70db5a609e96159d |
Close
Hashes for pyontoenv-0.1.7a5-cp38-abi3-macosx_10_13_x86_64.macosx_11_0_arm64.macosx_10_13_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 919ef908abe1de37a39b49b540573459738798629593f3b5d883d266d2c56c8c |
|
MD5 | 69aa02505beb7e822d7196ea5dc48ba7 |
|
BLAKE2b-256 | ca4b36ac39b9a046edb419270dc2e8f1f49f9a42c37636491484e63eed525383 |