Skip to main content

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


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.9.tar.gz (904.4 kB view hashes)

Uploaded Source

Built Distributions

pyontoenv-0.1.9-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pyontoenv-0.1.9-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pyontoenv-0.1.9-cp312-cp312-musllinux_1_2_x86_64.whl (8.0 MB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

pyontoenv-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pyontoenv-0.1.9-cp311-cp311-musllinux_1_2_x86_64.whl (8.0 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

pyontoenv-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyontoenv-0.1.9-cp310-cp310-musllinux_1_2_x86_64.whl (8.0 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

pyontoenv-0.1.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyontoenv-0.1.9-cp39-cp39-musllinux_1_2_x86_64.whl (8.0 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.2+ x86-64

pyontoenv-0.1.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pyontoenv-0.1.9-cp38-cp38-musllinux_1_2_x86_64.whl (8.0 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.2+ x86-64

pyontoenv-0.1.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pyontoenv-0.1.9-cp38-abi3-win_amd64.whl (4.9 MB view hashes)

Uploaded CPython 3.8+ Windows x86-64

pyontoenv-0.1.9-cp38-abi3-musllinux_1_2_x86_64.whl (8.0 MB view hashes)

Uploaded CPython 3.8+ musllinux: musl 1.2+ x86-64

pyontoenv-0.1.9-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view hashes)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ x86-64

pyontoenv-0.1.9-cp38-abi3-macosx_11_0_arm64.whl (5.4 MB view hashes)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

pyontoenv-0.1.9-cp38-abi3-macosx_10_14_x86_64.whl (5.7 MB view hashes)

Uploaded CPython 3.8+ macOS 10.14+ x86-64

pyontoenv-0.1.9-cp38-abi3-macosx_10_14_x86_64.macosx_11_0_arm64.macosx_10_14_universal2.whl (11.0 MB view hashes)

Uploaded CPython 3.8+ macOS 10.14+ universal2 (ARM64, x86-64) macOS 10.14+ x86-64 macOS 11.0+ ARM64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page