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.8.tar.gz
(901.6 kB
view hashes)
Built Distributions
Close
Hashes for pyontoenv-0.1.8-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | accef617ac4926dfb47ebc7033bc0fe058d5d145292077f44f568d176d496cc8 |
|
MD5 | 8877323879ef2d026161d0da3ac4389c |
|
BLAKE2b-256 | 67dd76c8b2f5fd47eeeafa725b696a145325ffe1d49baa0261c7e98469f6fa16 |
Close
Hashes for pyontoenv-0.1.8-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed0551a735222f22c53739bda95f2335d79f79189e5e6c62c97628f3b2a78653 |
|
MD5 | 06ff76621eced722163a073e42c5d065 |
|
BLAKE2b-256 | d354ee7164c70fe843fa8f4926a614f83fad290bc6c57bdd3fde728b2d906d6a |
Close
Hashes for pyontoenv-0.1.8-cp38-abi3-macosx_10_13_x86_64.macosx_11_0_arm64.macosx_10_13_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef0f0e38c0b87301e6a669dbd7248288f80a2f36bd90159aa7c62a0778d36424 |
|
MD5 | d9fc0f613110fe62e1f506ccaec6872e |
|
BLAKE2b-256 | 6bf08fbb780c569d2b610e7976d4fda6eadfd23755b2511baaa05940d0c2899c |