Owlready2 0.30 has been released!

Owlready is a Python module for ontology-oriented programming. It can load OWL 2.0 ontologies and manipulate them transparently in Python.

This version brings two new features:

  • a SPARQL engine which translates the queries into SQL. This engine is much faster than RDFlib (around 60x), it has no dependencies and a shorter loading time. It currently supports a subset of SPARQL: SELECT, INSERT and DELETE queries, sub-queries, UNION, OPTIONAL, FILTER, BIND, FILTER EXISTS, FILTER NOT EXISTS, all functions of SPARQL, blank node notation with square brackets, e.g. ‘[a XXX]’, and property path expressions except those with parentheses.

    This new SPARQL engine can be used as follows (see documentation):

    list(default_world.sparql("""<query>"""))
  • Dublin Core support via integrated OWL translation. It is possible to load Dublin Core directly as follows:

    dc = get_ontology("http://purl.org/dc/elements/1.1").load()

Here are the changes:

  • New native SPARQL engine that translates SPARQL queries to SQL

  • Direct support for Dublin Core via the integration of an OWL translation

  • Bugfixes: - Fix RecursionError when saving very deep ontologies to RDF/XML - Fix IRI of the form 'urn:uuid:...' - Fix loading ontologies that modify an imported property

The new version be downloaded from PyPI (Python Package Index): https://pypi.python.org/pypi/Owlready2