Skip to content

openbim-ifc-py ​

Python bindings for openbim-ifc: read, edit and write IFC STEP files from Python.

StatusPartial
Latest release0.2.0 (2026-09-29)
RegistriesPyPI openbim-ifc
API documentationrustdoc
Sourcecrates/openbim-ifc-py/

Overview ​

Python bindings for the IFC facade (ADR 0013, #39).

The compiled module is openbim_ifc._native; the public API is the pure Python package openbim_ifc, which wraps it and defines the value classes. Values cross as plain dicts in the tagged encoding shared with the WASM and C bindings; openbim_ifc turns them into frozen dataclasses.

This crate adds calling-convention glue only. IFC behaviour belongs in openbim-ifc, shared binding behaviour in openbim-ifc-binding-core.

Features ​

FeatureDefaultEnables
rusty_allocdep:rusty_alloc-api, dep:rusty_alloc

Depends on ​

Changes ​

Latest release, 0.2.0 (2026-09-29):

Changed ​

  • Links every bundled IFC release explicitly through the binding core's new release features; behaviour is unchanged.

Added (lazy loading) ​

  • IfcModel.open(path, *, mapped=False): read a file straight into the model with the GIL released; mapped=True memory-maps it (the file must not change while the model lives). Failures raise IfcError with the new code io.
  • Parsed models decode entities on first access (ADR 0015), so opening a large file is several times faster and holds the file plus what was touched. IfcModel.parse now copies its input once, not twice.

Full history: crates/openbim-ifc-py/CHANGELOG.md

Released under the AGPL-3.0-or-later licence. ISO and CEN standards material is not redistributed.