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.7a2.tar.gz
(874.1 kB
view hashes)
Built Distributions
Close
Hashes for pyontoenv-0.1.7a2-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41803f88c0b2486fba2dd75d72aa49dbe00d56032ae6ed43f46b558d1e54f3b7 |
|
MD5 | 1bb1e5efad8c7b860098ee7748280659 |
|
BLAKE2b-256 | b65d44911413f2b3f7e75b68b8a0a7c6b15aed2ca42a3bba7619e5c724c4c3cc |
Close
Hashes for pyontoenv-0.1.7a2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b442a3d2ea627f720df66b45a8654bedc536aad28cb7a13282ae8ed3c242e6d6 |
|
MD5 | fab70b6142e946f6b353263222453f11 |
|
BLAKE2b-256 | e1e6e6b46c8e1022aede9c98ccb0297e7d3088ddb8a837ef281c9c9619032e7e |
Close
Hashes for pyontoenv-0.1.7a2-cp38-abi3-macosx_10_13_x86_64.macosx_11_0_arm64.macosx_10_13_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d286348dacaa3d5469f4b089f06104c1326b4e026e3bbf9e1f49e44db05c932 |
|
MD5 | 5a17e1926e9df7985cb7323c1d44cdac |
|
BLAKE2b-256 | 063166f3dd048e0f56a1e749d6a011555531c18722c7ec4d90b0446c6b025a0d |