Skip to content

Instantly share code, notes, and snippets.

@pirhoo
pirhoo / owl2django.py
Last active December 19, 2015 18:48 — forked from n-kb/owl2django.py
from lxml import etree
# This string will contain the models.py file
modelsContents = "from neo4django.db import models\n\n"
# Enter the name of the OWL file to parse
# The relationships in the file should always start with has...
owlFile = "ontology.owl"
# Gives the ontology URI. Only needed for documentation purposes