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.5.tar.gz
(874.3 kB
view hashes)
Built Distributions
Close
Hashes for pyontoenv-0.1.5-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6a8fb26139603af9bfc9f5e079ee179c3db754ef21ed5c99a8d143eefd89cd5 |
|
MD5 | f92742ce27f6963596641de9292e4625 |
|
BLAKE2b-256 | 632979bcfec8af25f91850f27d887d5fe41f5e16d5c2b587cd1b59363e88b758 |
Close
Hashes for pyontoenv-0.1.5-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27a2c09f3fee470005d267c42245c209848c38aff1b3ec1033ac5bebb1df4e56 |
|
MD5 | bf1305d37ff49ecd9a58f423cb21f9fd |
|
BLAKE2b-256 | cd801e9571996efd5b0164377bd371013f2550324dc76df3097a34c2baca33ae |