© 2021

Ontologies with Python

Programming OWL 2.0 Ontologies with Python and Owlready2

  • The first book in market on OWL ontologies using Python

  • Includes examples based on well-known resources such as DBpedia, Gene Ontology, and UMLS

  • Describes the integration of ontologies in dynamic Python websites


Table of contents

  1. Front Matter
    Pages i-xvii
  2. Lamy Jean-Baptiste
    Pages 1-8
  3. Lamy Jean-Baptiste
    Pages 9-48
  4. Lamy Jean-Baptiste
    Pages 49-82
  5. Lamy Jean-Baptiste
    Pages 83-112
  6. Lamy Jean-Baptiste
    Pages 113-133
  7. Lamy Jean-Baptiste
    Pages 135-156
  8. Lamy Jean-Baptiste
    Pages 157-185
  9. Lamy Jean-Baptiste
    Pages 241-264
  10. Lamy Jean-Baptiste
    Pages 265-289
  11. Back Matter
    Pages 291-344

About this book


Use ontologies in Python, with the Owlready2 module developed for ontology-oriented programming. You will start with an introduction and refresher on Python and OWL ontologies. Then, you will dive straight into how to access, create, and modify ontologies in Python. Next, you will move on to an overview of semantic constructs and class properties followed by how to perform automatic reasoning. You will also learn about annotations, multilingual texts, and how to add Python methods to OWL classes and ontologies. Using medical terminologies as well as direct access to RDF triples is also covered.

Python is one of the most used programming languages, especially in the biomedical field, and formal ontologies are also widely used. However, there are limited resources for the use of ontologies in Python. Owlready2, downloaded more than 60,000 times, is a response to this problem, and this book is the first one on the topic of using ontologies with Python.

You will:

  • Use Owlready2 to access and modify OWL ontologies in Python
  • Publish ontologies on dynamic websites
  • Perform automatic reasoning in Python
  • Use well-known ontologies, including DBpedia and Gene Ontology, and terminological resources, such as UMLS (Unified Medical Language System)
  • Integrate Python methods in OWL ontologies


Python Ontology Formal ontology OWL Semantic web Linked data Gene ontology UMLS

Authors and affiliations

  1. 1.Université Sorbonne Paris Nord, LIMICSSorbonne Université INSERM, UMR 1142BobignyFrance

About the authors

Lamy Jean-Baptiste is a senior lecturer at Paris 13 University and a member of the LIMICS, a research lab focused on biomedical informatics. He is also the developer of the Owlready2 Python module that allows access to OWL ontologies. He has developed many research prototypes, and one of them (VCM iconic medical language) has been patented in the US, with three licenses sold to industrial partners.

Lamy speaks regularly at artificial intelligence and medical informatics conferences, has written over 50 journal papers, and is a moderator on the Owlready forum on Nabbles. He was awarded the best paper award at MEDINFO 2019, the largest international conference in medical informatics.

Bibliographic information

  • Book Title Ontologies with Python
  • Book Subtitle Programming OWL 2.0 Ontologies with Python and Owlready2
  • Authors Lamy Jean-Baptiste
  • DOI
  • Copyright Information Lamy Jean-Baptiste 2021
  • Publisher Name Apress, Berkeley, CA
  • eBook Packages Professional and Applied Computing Professional and Applied Computing (R0) Apress Access Books
  • Softcover ISBN 978-1-4842-6551-2
  • eBook ISBN 978-1-4842-6552-9
  • Edition Number 1
  • Number of Pages XVII, 344
  • Number of Illustrations 52 b/w illustrations, 0 illustrations in colour
  • Topics Web Development