Skip to main content

A tools to transforms owl into yams schema

Project description

OWL2YAMS

A script to create a new CubicWeb instance from OWL ontology and RDF data

Installing the project

Create and activate a virtual environment

python3 -m venv my-virtual-env
source my-virtual-env/bin/activate

Install the dependencies, in this folder, run

pip install -e .

Bootstrap a cube from a OWL file

This command will create a cube from the OWL file

owl2yams -m path/to/my-ontology.owl -n my_owl2yams_instance

It requires the ontology file path.

optional arguments:

Option Description
-h, --help how this help message and exit
--owl-model OWL_MODEL, -m OWL_MODEL Specify the OWL file to translate
--instance-name INSTANCE_NAME, -n INSTANCE_NAME Specify the instance name for the CW instance
--parse-format {turtle,xml,n3,nquads,nt,trix}, -f {turtle,xml,n3,nquads,nt,trix} pecify the OWL file serialization
--dry-run, -d Print the YAMS schema only
--only-cube Only create the cube and exit (no instance and db-init)

Populate a CubicWeb instance from RDF data

Run the script to populate your CubicWeb instance with your RDF data compliant with the OWL ontology that was used to create your cube.

cubicweb-ctl import-rdf my_owl2yams_instance -f /path/to/rdfdata.ttl

optional arguments: --parse-format The RDF serialization format between {turtle,xml,n3,nquads,nt,trix}

Launch your CubicWeb instance

This command will launch the CubicWeb instance

cubicweb-ctl pyramid my_owl2yams_instance

By default it used the 8080 port. You can change this port using the environement variable CW_PORT, which you can set with the following command:

export CW_PORT=8081

You know the server is running when you see the log

Serving on http://0.0.0.0:8080

Use your CubicWeb instance

After those two commands, you can browse, create new data and more on your web application.

Go to http://localhost:8080 and you can start browsing, adding data, etc.

If you want to use this instance as a data server, there is an API available automatically since the (cubicweb-api)[https://forge.extranet.logilab.fr/cubicweb/cubes/api/] cube is installed by default when using OWL2YAMS. You can find the open-api spec using the route /api/v1/openapi.

This cube is mandatory to use the (cubicweb-react-admin)[https://forge.extranet.logilab.fr/cubicweb/react-admin-cubicweb] tool. This tool lets you navigate and administrate your data using a modern and dynamic interface.

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

owl2yams-1.4.0.tar.gz (441.5 kB view details)

Uploaded Source

Built Distribution

owl2yams-1.4.0-py3-none-any.whl (441.5 kB view details)

Uploaded Python 3

File details

Details for the file owl2yams-1.4.0.tar.gz.

File metadata

  • Download URL: owl2yams-1.4.0.tar.gz
  • Upload date:
  • Size: 441.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for owl2yams-1.4.0.tar.gz
Algorithm Hash digest
SHA256 90f647cf65be6b9488e3859281b09402d8065e13354d9760bf6b4e4c4a1ba4a0
MD5 287dd5cfe4139dff81a9fc855c8a547a
BLAKE2b-256 9a5473320e82b5d6d73b4cf23227621ea425ff1540349da371d6ce16844bca57

See more details on using hashes here.

File details

Details for the file owl2yams-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: owl2yams-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 441.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for owl2yams-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1628a859c6b0564b11d3a40b1df74954ec7ce20c1b9050b9c2549b25a84927c1
MD5 a89955eeb5db17495fc21a766ce339f3
BLAKE2b-256 24cf9652812c8cdf8517628d5b7fa906a78f09ba3d7cf8dd5a68bd62d88d00eb

See more details on using hashes here.

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