Skip to main content

TopologicPy

topologicpy logo

An AI-Powered Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction

Introduction

Welcome to TopologicPy (rhymes with apple pie). TopologicPy is a powerful, open-source Python library for spatial modelling, topology, graph analysis, and computational design in Architecture, Engineering, and Construction (AEC). It enables the creation and analysis of information-rich representations of architectural spaces, buildings, infrastructure, and other spatial systems by integrating geometry, topology, semantics, graphs, and computation within a coherent programming framework.

At the heart of TopologicPy is support for non-manifold topology (NMT). Unlike conventional solid-modelling approaches, NMT allows entities of different dimensionalities to coexist within a single coherent model. Vertices, edges, surfaces, volumes, and their assemblies can therefore represent complex spatial and analytical systems while explicitly preserving their connectivity and adjacency relationships. This makes TopologicPy particularly well suited to applications in architectural space planning, building analysis, structural modelling, circulation and navigation, energy and environmental analysis, and other workflows in which relationships between entities are as important as their geometric form.

TopologicPy supports mixed-dimensional models naturally. For example, lines may represent beams, columns, circulation paths, or network connections; surfaces may represent walls, slabs, zones, or analytical boundaries; and volumes may represent rooms, buildings, or other spatial regions. These entities can coexist within the same topological structure and carry associated dictionaries and semantic information. This provides a flexible foundation for translating between geometric models, Building Information Models (BIM), analytical models, and graph-based representations.

A major strength of TopologicPy is its ability to transform spatial and topological models into graphs. Buildings and other spatial systems can be represented through nodes and edges describing adjacency, accessibility, containment, visibility, connectivity, or other relationships. TopologicPy provides graph algorithms for path finding, centrality, community detection, spatial analysis, and related operations, while also supporting integration with Graph Machine Learning (GML) workflows. These capabilities make it possible to investigate spatial configurations computationally and to apply machine-learning techniques to problems such as classification, prediction, pattern recognition, and inference over connected spatial data.

TopologicPy also supports semantic and knowledge-based representations. Its graph and ontology capabilities can be used to construct knowledge graphs, represent relationships derived from BIM and IFC data, perform reasoning, and connect spatial models with broader semantic information. This provides a foundation for workflows involving knowledge graphs, rule-based reasoning, graph databases, and emerging approaches such as GraphRAG and AI-assisted spatial analysis.

TopologicPy provides a comprehensive Python Application Programming Interface (API) designed for scripting, Jupyter notebooks, computational design workflows, research applications, and integration into larger software systems. Its geometry and topology capabilities are currently powered primarily by PythonOCC/OpenCASCADE, providing access to the mature Open CASCADE geometric modelling kernel through Python. TopologicPy also maintains support for alternative topology backends, allowing the Python API to remain increasingly independent of any single underlying geometry engine.

Interoperability is an important part of the library. TopologicPy supports widely used formats and workflows including IFC, BREP, OBJ, STL, DXF, JSON, CSV, RDF/TTL, and HBJSON, among others. Its IFC capabilities enable geometric, topological, spatial, and semantic information to be extracted from Building Information Models and transformed into structures suitable for analysis, graph generation, reasoning, and downstream computational workflows.

TopologicPy is distributed as open-source software under the GNU Lesser General Public License (LGPL). This allows it to be used, extended, embedded, and integrated into both research and professional workflows without dependence on proprietary subscription-based platforms. The library is designed to provide an extensible computational foundation on which researchers, designers, engineers, educators, and software developers can build their own spatial analysis and design tools.

TopologicPy can be used interactively in Python and Jupyter environments, incorporated into automated analysis pipelines, or embedded within larger applications. By bringing together geometry, non-manifold topology, graph computation, semantics, and artificial intelligence, TopologicPy provides a flexible platform for computationally understanding and working with the spatial relationships that underpin the built environment.

Installation

Recommended: Conda

TopologicPy can be installed from conda-forge:

conda create -n topologicpy -c conda-forge topologicpy
conda activate topologicpy

Pip

TopologicPy can also be installed from PyPI:

pip install topologicpy --upgrade

Prerequisites

TopologicPy requires Python 3.8 or newer and currently supports Python versions below 3.15.

Core Dependencies

TopologicPy depends on the following Python libraries:

Expand to view dependencies

These dependencies are installed automatically when TopologicPy is installed.

Geometry and Topology Backend

TopologicPy requires a geometry and topology backend.

When TopologicPy is installed from conda-forge, the recommended pythonocc-core backend is installed automatically:

conda create -n topologicpy -c conda-forge topologicpy
conda activate topologicpy

How to start using TopologicPy

  1. Open your favourite python editor (jupyter notebook is highly recommended)
  2. Type 'import topologicpy'
  3. Start using the API

Ontology and Semantic Web Support

topologicpy now includes a formal ontology specification that provides a semantic framework for representing geometry, topology, graphs, spatial relationships, building information, provenance, and analytical metrics.

The ontology enables interoperability with:

  • RDF / RDFS / OWL
  • BOT (Building Topology Ontology)
  • Brick Schema
  • IFC and Linked Building Data workflows
  • Graph databases such as Neo4j and Kùzu
  • GraphRAG and AI reasoning systems

The canonical namespace is:

@prefix top: <http://w3id.org/topologicpy#> .

The ontology is persistently identified through w3id.org and physically hosted through GitHub Pages.

Ontology Resources

  • Ontology namespace: http://w3id.org/topologicpy#
  • Ontology document: http://w3id.org/topologicpy
  • Current ontology specification: https://wassimj.github.io/topologicpy/ontology/topologicpy.ttl
  • Ontology source folder: https://github.com/wassimj/topologicpy/tree/main/ontology

Example

@prefix top: <http://w3id.org/topologicpy#> .

:room_101 a top:Room ;
    top:hasArea "24.6"^^xsd:double ;
    top:adjacentTo :corridor_1 .

:wall_12 a top:Wall ;
    top:bounds :room_101 .

Python Example

from topologicpy.Ontology import Ontology

Ontology.SetClass(cell, "top:Room")
Ontology.SetLabel(cell, "Room 101")
Ontology.SetCategory(cell, "space")

ttl = Ontology.TTLString(cell)
print(ttl)

API Documentation

API documentation can be found at https://topologicpy.readthedocs.io

How to cite topologicpy

If you wish to cite the actual software, you can use:

Jabi, W. (2024). topologicpy. pypi.org. http://doi.org/10.5281/zenodo.11555172

To cite one of the main papers that defines topologicpy, you can use:

Jabi, W., & Chatzivasileiadi, A. (2021). Topologic: Exploring Spatial Reasoning Through Geometry, Topology, and Semantics. In S. Eloy, D. Leite Viana, F. Morais, & J. Vieira Vaz (Eds.), Formal Methods in Architecture (pp. 277–285). Springer International Publishing. https://doi.org/10.1007/978-3-030-57509-0_25

Or you can import the following .bib formatted references into your favourite reference manager

@misc{Jabi2025,
   author = {Wassim Jabi},
   doi = {https://doi.org/10.5281/zenodo.11555173},
   title = {topologicpy},
   url = {http://pypi.org/projects/topologicpy},
   year = {2025},
}
  @inbook{Jabi2021,
   abstract = {Topologic is a software modelling library that supports a comprehensive conceptual framework for the hierarchical spatial representation of buildings based on the data structures and concepts of non-manifold topology (NMT). Topologic supports conceptual design and spatial reasoning through the integration of geometry, topology, and semantics. This enables architects and designers to reflect on their design decisions before the complexities of building information modelling (BIM) set in. We summarize below related work on NMT starting in the late 1980s, describe Topologic’s software architecture, methods, and classes, and discuss how Topologic’s features support conceptual design and spatial reasoning. We also report on a software usability workshop that was conducted to validate a software evaluation methodology and reports on the collected qualitative data. A reflection on Topologic’s features and software architecture illustrates how it enables a fundamental shift from pursuing fidelity of design form to pursuing fidelity of design intent.},
   author = {Wassim Jabi and Aikaterini Chatzivasileiadi},
   city = {Cham},
   doi = {10.1007/978-3-030-57509-0_25},
   editor = {Sara Eloy and David Leite Viana and Franklim Morais and Jorge Vieira Vaz},
   isbn = {978-3-030-57509-0},
   journal = {Formal Methods in Architecture},
   pages = {277-285},
   publisher = {Springer International Publishing},
   title = {Topologic: Exploring Spatial Reasoning Through Geometry, Topology, and Semantics},
   url = {https://link.springer.com/10.1007/978-3-030-57509-0_25},
   year = {2021},
}

topologicpy: © 2026 Wassim Jabi

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topologicpy-0.9.64-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file topologicpy-0.9.64-py3-none-any.whl.

File metadata

  • Download URL: topologicpy-0.9.64-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for topologicpy-0.9.64-py3-none-any.whl
Algorithm Hash digest
SHA256 b4491d1803b709018875d8508f3a38c7e5a3dcad2a0873d601bd6b224b84c27a
MD5 a62d546b6a934ae67748a2224624dddb
BLAKE2b-256 05d73b63d47d67140c99a878e47159f830e8b1fca9a597ac456cb099a17e063c

See more details on using hashes here.

Provenance

The following attestation bundles were made for topologicpy-0.9.64-py3-none-any.whl:

Publisher: build.yml on wassimj/topologicpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

6.0.0

1 file

This release

0.9.64 This release

1 file

0.9.63

1 file

0.9.62

1 file

0.9.58

1 file

0.9.57

1 file

0.9.56

1 file

0.9.55

1 file

0.9.54

1 file

0.9.53

1 file

0.9.52

1 file

0.9.51

1 file

0.9.50

1 file

0.9.43

1 file

0.9.40

1 file

0.9.39

1 file

0.9.37

1 file

0.9.36

1 file

0.9.35

1 file

0.9.34

1 file

0.9.33

1 file

0.9.32

1 file

0.9.31

1 file

0.9.30

1 file

0.9.29

1 file

0.9.28

1 file

0.9.27

1 file

0.9.26

1 file

0.9.25

1 file

0.9.22

1 file

0.9.21

1 file

0.9.20

1 file

0.9.19

1 file

0.9.18

1 file

0.9.17

1 file

0.9.16

1 file

0.9.15

1 file

0.9.14

1 file

0.9.13

1 file

0.9.12

1 file

0.9.10

1 file

0.9.7

1 file

0.9.6

1 file

0.9.5

1 file

0.9.4

1 file

0.9.3

1 file

0.9.2

1 file

0.9.1

1 file

0.9.0

1 file

0.8.99

1 file

0.8.98

1 file

0.8.97

1 file

0.8.95

1 file

0.8.93

1 file

0.8.92

1 file

0.8.91

1 file

0.8.90

1 file

0.8.89

1 file

0.8.88

1 file

0.8.87

1 file

0.8.86

1 file

0.8.85

1 file

0.8.80

1 file

0.8.77

1 file

0.8.75

1 file

0.8.74

1 file

0.8.73

1 file

0.8.72

1 file

0.8.71

1 file

0.8.61

1 file

0.8.59

1 file

0.8.58

1 file

0.8.57

1 file

0.8.55

1 file

0.8.54

1 file

0.8.52

1 file

0.8.51

1 file

0.8.50

1 file

0.8.49

1 file

0.8.48

1 file

0.8.47

1 file

0.8.46

1 file

0.8.45

1 file

0.8.44

1 file

0.8.43

1 file

0.8.42

1 file

0.8.41

1 file

0.8.40

1 file

0.8.39

1 file

0.8.38

1 file

0.8.37

1 file

0.8.36

1 file

0.8.35

1 file

0.8.33

1 file

0.8.31

1 file

0.8.30

1 file

0.8.29

1 file

0.8.28

1 file

0.8.26

1 file

0.8.25

1 file

0.8.24

1 file

0.8.23

1 file

0.8.22

1 file

0.8.21

1 file

0.8.20

1 file

0.8.19

1 file

0.8.18

1 file

0.8.17

1 file

0.8.15

1 file

0.8.14

1 file

0.8.13

1 file

0.8.12

1 file

0.8.11

1 file

0.8.10

1 file

0.8.9

1 file

0.8.8

1 file

0.8.7

1 file

0.8.5

1 file

0.8.4

1 file

0.8.3

1 file

0.8.2

1 file

0.8.0

1 file

0.7.99

1 file

0.7.98

1 file

0.7.97

1 file

0.7.96

1 file

0.7.94

1 file

0.7.93

1 file

0.7.92

1 file

0.7.91

1 file

0.7.90

1 file

0.7.87

1 file

0.7.86

1 file

0.7.85

1 file

0.7.84

1 file

0.7.83

1 file

0.7.82

1 file

0.7.81

1 file

0.7.80

1 file

0.7.79

1 file

0.7.78

1 file

0.7.77

1 file

0.7.76

1 file

0.7.75

1 file

0.7.74

1 file

0.7.73

1 file

0.7.72

1 file

0.7.71

1 file

0.7.70

1 file

0.7.69

1 file

0.7.68

1 file

0.7.67

1 file

0.7.66

1 file

0.7.65

1 file

0.7.64

1 file

0.7.63

1 file

0.7.62

1 file

0.7.61

1 file

0.7.60

1 file

0.7.58

1 file

0.7.57

1 file

0.7.56

1 file

0.7.55

1 file

0.7.54

1 file

0.7.52

1 file

0.7.51

1 file

0.7.50

1 file

0.7.49

1 file

0.7.48

1 file

0.7.47

1 file

0.7.46

1 file

0.7.45

1 file

0.7.44

1 file

0.7.43

1 file

0.7.42

1 file

0.7.41

1 file

0.7.40

1 file

0.7.39

1 file

0.7.38

1 file

0.7.37

1 file

0.7.36

1 file

0.7.34

1 file

0.7.30

1 file

0.7.29

1 file

0.7.28

1 file

0.7.27

1 file

0.7.26

1 file

0.7.24

1 file

0.7.23

1 file

0.7.22

1 file

0.7.21

1 file

0.7.20

1 file

0.7.19

1 file

0.7.18

1 file

0.7.17

1 file

0.7.15

1 file

0.7.14

1 file

0.7.12

1 file

0.7.11

1 file

0.7.10

1 file

0.7.9

1 file

0.7.8

1 file

0.7.6

1 file

0.7.5

1 file

0.7.4

1 file

0.7.3

1 file

0.7.2

1 file

0.7.0

1 file

0.6.3

1 file

0.6.2

1 file

0.6.1

1 file

0.6.0

1 file

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.99

2 files

0.4.98

2 files

0.4.97

2 files

0.4.96

2 files

0.4.95

2 files

0.4.94

2 files

0.4.93

2 files

0.4.92

2 files

0.4.91

2 files

0.4.90

2 files

0.4.89

2 files

0.4.88

2 files

0.4.87

2 files

0.4.86

2 files

0.4.85

2 files

0.4.84

2 files

0.4.83

2 files

0.4.82

2 files

0.4.81

2 files

0.4.80

2 files

0.4.79

2 files

0.4.78

2 files

0.4.77

2 files

0.4.76

2 files

0.4.75

2 files

0.4.74

2 files

0.4.73

2 files

0.4.72

2 files

0.4.71

2 files

0.4.70

2 files

0.4.69

2 files

0.4.68

2 files

0.4.67

2 files

0.4.66

2 files

0.4.65

2 files

0.4.64

2 files

0.4.63

2 files

0.4.62

2 files

0.4.61

2 files

0.4.60

2 files

0.4.59

2 files

0.4.58

2 files

0.4.57

2 files

0.4.56

2 files

0.4.55

2 files

0.4.54

2 files

0.4.53

2 files

0.4.52

2 files

0.4.51

2 files

0.4.50

2 files

0.4.49

2 files

0.4.48

2 files

0.4.47

2 files

0.4.46

2 files

0.4.45

2 files

0.4.44

2 files

0.4.43

2 files

0.4.42

2 files

0.4.41

2 files

0.4.40

2 files

0.4.39

2 files

0.4.38

2 files

0.4.37

2 files

0.4.36

2 files

0.4.35

2 files

0.4.34

2 files

0.4.33

2 files

0.4.32

2 files

0.4.31

2 files

0.4.30

2 files

0.4.29

2 files

0.4.28

2 files

0.4.27

2 files

0.4.26

2 files

0.4.25

2 files

0.4.24

2 files

0.4.23

2 files

0.4.22

2 files

0.4.21

2 files

0.4.20

2 files

0.4.19

2 files

0.4.18

2 files

0.4.17

2 files

0.4.16

2 files

0.4.15

2 files

0.4.14

2 files

0.4.13

2 files

0.4.12

2 files

0.4.11

2 files

0.4.10

2 files

0.4.9

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page