Skip to main content

OntoWeaver

OntoWeaver is a tool that automatize the creation of knowledge graphs from existing data.

It is made for people who want to easily define their own graph structure. Why having to use a knowledge graph that does not fit the question you are asking when you can easily make one that you perfectly understands? OntoWeaver allows you to do that with just a simple description of the graph you want.

Diagram showing that OntoWeaver needs ontologies, tabular data and graph schema to produce a Semantic Knowledge Graph.

SKG databases allows for an easy integration of very heterogeneous data, and OntoWeaver brings a reproducible approach to building them.

With OntoWeaver, you can very easily implement a script that will allow you to automatically reconfigure a new SKG from the input data, each time you need it.

OntoWeaver has been tested on large scale biomedical use cases (think: millions of nodes), and we can guarantee that it is simple to operate by anyone having a basic knowledge of programming.

Why OntoWeaver and not others?

OntoWeaver "killer features" that make it better than other solutions:

  • Reads several data file formats, tables or documents.
  • Lets you try various graph structures and contents.
  • Exports to several knowkedge graph databases and formats.
  • Allows reusing others' database mapping modules easily.

Basics

Mapping data

OntoWeaver provides a simple layer of abstraction on top of BioCypher, which remains responsible for doing the ontology alignment, supporting several graph database backends, and allowing reproducible & configurable builds.

With a pure Biocypher approach, you would have to write a whole adapter by hand, with OntoWeaver, you just have to express a mapping in YAML, looking like:

row: # The meaning of an entry in the input table.
   map:
      column: <column name in your CSV>
      to_subject: <ontology node type to use for representing a row>

transformers: # How to map cells to nodes and edges.
    - map: # Map a column to a node.
        column: <column name>
        to_object: <ontology node type to use for representing a column>
        via_relation: <edge type for linking subject and object nodes>
    - map: # Map a column to a property.
        column: <another name>
        to_property: <property name>
        for_object: <type holding the property>

metadata: # Optional properties added to every node and edge.
    - source: "My OntoWeaver adapter"
    - version: "v1.2.3"

OntoWeaver can read anything that Pandas can load, which means a lot of tabular formats. It can also parse graphs from OWL, and query XML or JSON files.

Usage

In most cases, you will just need to call the ontoweave command to build-up the SKG you prepared:

ontoweave my_data.csv:my_mapping.yaml --import-script-run --auto-schema

If you're using OntoWeaver from its Git repository, you will have to us UV:

uv run ontoweave data_A.csv:map_A.yaml data_B.tsv:map_B.yaml

The ontoweave command is very configurable, see ontoweave --help for more details.

Detailed documentation with tutorials and a more detailed installation guide is available on the OntoWeaver website.

Installation

The project is written in Python and is tested with the UV environment manager. You can install the necessary dependencies in a virtual environment like this:

git clone https://github.com/oncodash/ontoweaver.git
cd ontoweaver
uv venv
uv pip install .

UV will create a virtual environment according to your configuration (either centrally or in the project folder).

You can then run any script by calling it directly (.e.g. uv run ontoweave), and it should just work. If you want to call scripts from anywhere in your system, you will have to add the …/ontoweaver/src/ontoweaver directory to your PATH:

# Put this in your ~/.bashrc or ~/.zshrc
export PATH="$PATH:$HOME/<your path>/ontoweaver/src/ontoweaver/

The package can also be used in a UV environment. Just run:

uv sync

UV will create a virtual environment according to your configuration, and you can call the CLI with:

uv run ./src/ontoweaver/ontoweave --help

Theoretically, OntoWeaver can export a knowledge graph in any of the formats supported by BioCypher (Neo4j, ArangoDB, CSV, RDF, PostgreSQL, SQLite, NetworkX, … see BioCypher's documentation).

Development

Tests

Tests are located in the tests/ subdirectory and may be a good starting point to see OntoWeaver in practice. You may start with tests/test_simplest.py which shows the simplest example of mapping tabular data through BioCypher.

To run tests, use pytest:

uv run pytest

Contributing

In case of any questions or improvements feel free to open an issue or a pull request!

Metadata

Release files for ontoweaver 1.10.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ontoweaver 1.10.4
File Size Uploaded Provenance Actions
ontoweaver-1.10.4.tar.gz 128.9 kB With provenance Details for ontoweaver-1.10.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ontoweaver 1.10.4
File Interpreter ABI Platform Actions
ontoweaver-1.10.4-py3-none-any.whl Python 3 none any Details for ontoweaver-1.10.4-py3-none-any.whl

Total release size: 228.1 kB

Release files / ontoweaver-1.10.4.tar.gz

Download URL ontoweaver-1.10.4.tar.gz
Size 128.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c747cfcc2533a936e2ea1ea236efe40512cdd9343051ac8a0cdf9ea99e870838
BLAKE2b-256 checksum
How to use checksums
7ed04ab6675f9df448b96baee3ba247724bb9d441c4216bb31ac48b020b95332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / ontoweaver-1.10.4-py3-none-any.whl

Download URL ontoweaver-1.10.4-py3-none-any.whl
Size 99.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf52c740116c0f7cfce3b66d9917a776d70682ad1cbbb9cce596927cec25e340
BLAKE2b-256 checksum
How to use checksums
b453903894f5d1236574119bf89f8df6feeb486e6210f759a1d5aa3f67ed6657
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for ontoweaver 1.10.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ontoweaver-1.10.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.10.4 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page