Skip to main content

ifc-lite

High-performance Python bindings for the ifc-lite IFC parser.

Relationship with upstream

This Python version is not released or maintained by the original authors of ifc-lite. It is a modified version, released under the same licence.

The Rust code is basically copied from upstream, but with some changes:

  • The MeshData object exposes property_sets as an attribute, and the Rust code has been changed to populate this for all elements.
  • Added include_geometry option to StreamingOptions in the processing crate. When false, geometry extraction is skipped and MeshData objects are returned with empty geometry but fully populated metadata.
  • Added process_ifc_text_with_options and process_ifc_file_with_options to the engine crate for non-streaming use with include_properties and include_geometry flags.

These changes are based on the current needs of the maintainers, and are provisional, while we are still in the evaluation stage for this new library.

Installation

pip install ifc-lite

Quick Start

import ifc_lite

# Load an IFC file
model = ifc_lite.process_file("building.ifc")

# List all IFC types in the model
print(model.ifc_types)

# Get all reinforcing bars
bars = model.elements_by_type("IfcReinforcingBar")
for bar in bars:
    print(f"{bar.name}: {bar.vertex_count} vertices, {bar.triangle_count} triangles")
    print(f"  Properties: {bar.properties}")

# Access geometry (vertex positions, normals, triangle indices)
for mesh in model.meshes:
    positions = mesh.positions  # flat list of x,y,z triplets
    normals = mesh.normals      # flat list of nx,ny,nz triplets
    indices = mesh.indices      # triangle indices
    color = mesh.color          # RGBA tuple

# Load metadata + properties only (skip expensive geometry extraction)
model = ifc_lite.process_file("building.ifc", load_geometry=False)

# Load geometry only (skip property set parsing)
model = ifc_lite.process_file("building.ifc", load_properties=False)

# Fastest: metadata only (no geometry, no properties)
model = ifc_lite.process_file(
    "building.ifc", load_geometry=False, load_properties=False
)

API

Module-level functions

  • ifc_lite.process_file(path, *, load_geometry=True, load_properties=True) – Load and process an IFC file from disk
  • ifc_lite.process_text(content, *, load_geometry=True, load_properties=True) – Process IFC content from a string
  • ifc_lite.version() – Get the native library version

Optional keyword arguments:

  • load_geometry – When False, skip geometry extraction. MeshData elements will have empty positions/normals/indices but full metadata. Significantly faster for large files.
  • load_properties – When False, skip property set parsing. MeshData elements will have properties=None and property_sets=None.

IfcModel

  • model.meshes – List of all MeshData elements
  • model.ifc_types – All distinct IFC type names
  • model.elements_by_type(type_name) – Filter elements by IFC type
  • model.element_by_express_id(id) – Lookup by express ID
  • model.element_by_global_id(gid) – Lookup by IFC GlobalId
  • model.metadata – Schema version, entity counts, coordinate info
  • model.stats – Processing timing statistics

MeshData

  • mesh.express_id, mesh.ifc_type, mesh.global_id, mesh.name
  • mesh.positions, mesh.normals, mesh.indices, mesh.color
  • mesh.properties – IFC property set values (dict or None)
  • mesh.vertex_count, mesh.triangle_count

License

MPL-2.0 (same as upstream ifc-lite)

Download files

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

Source Distribution

ifc_lite-0.4.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distributions

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

ifc_lite-0.4.0-cp312-abi3-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.12+Windows x86-64

ifc_lite-0.4.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64

ifc_lite-0.4.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

ifc_lite-0.4.0-cp312-abi3-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

ifc_lite-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file ifc_lite-0.4.0.tar.gz.

File metadata

  • Download URL: ifc_lite-0.4.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ifc_lite-0.4.0.tar.gz
Algorithm Hash digest
SHA256 fa550dfd98204e16b592796b93b974aeb20f08da4d4081c9ad0d5dae9252ab57
MD5 bafffa69987ff3b0b086c2400f86e079
BLAKE2b-256 83c4af9d7b8f3bd031911ecfcd77a3099212f3dfbe1c24068f236f43f2e56ad8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.4.0.tar.gz:

Publisher: release.yml on spookylukey/ifc-lite-python

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

File details

Details for the file ifc_lite-0.4.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: ifc_lite-0.4.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ifc_lite-0.4.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7efcd297c6ba35b165fc38e1209855aeeac90e1d4b25caa2a355072439d4946c
MD5 c312c948df7c927ddab06245cf47ae51
BLAKE2b-256 915875af294cb608cb3a5b89ab9ee1d0dcb2526f7d13788d44db8486b3a119e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.4.0-cp312-abi3-win_amd64.whl:

Publisher: release.yml on spookylukey/ifc-lite-python

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

File details

Details for the file ifc_lite-0.4.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ifc_lite-0.4.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 49ee9ff994d31427ec271abe2d0e6a4df154eeb2b5453004a68747bb755477f5
MD5 a83090cd79d49576b296eb9aacc442b5
BLAKE2b-256 de86c753877005b2807315982aaf96ee06e5b7703d31b5a9dfe2b3f60c44294e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.4.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on spookylukey/ifc-lite-python

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

File details

Details for the file ifc_lite-0.4.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ifc_lite-0.4.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 075d2b4020af993c34ff14963224fb26ceaade1e30b22f89b9bbf9a8ed2182da
MD5 bf854d5b1722b4686911560d3457f794
BLAKE2b-256 35f49dd3e69fef08e185024acb926e901d4037b213adc53bf959af086593347a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.4.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on spookylukey/ifc-lite-python

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

File details

Details for the file ifc_lite-0.4.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ifc_lite-0.4.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 983397fecdf42526088876f728cad0a17dcf123074cf8637e943fe2f0bad10fa
MD5 63765f5dd1149b93b50fba3281e44d81
BLAKE2b-256 6092b8b0049d2a960f9c27772765593f35500015c0be6af775e0fcdbe6542ac7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.4.0-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on spookylukey/ifc-lite-python

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

File details

Details for the file ifc_lite-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ifc_lite-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1a4e8622da58efe2f55e970470513e060b2b42ca0efcc4dd1b1dc3adc95d381f
MD5 39d53bea1d8e3f828509cca4848d6631
BLAKE2b-256 eb99360610f4aead4038c64bb5ad3c3ce2b99314d694ff69528daa10a427386e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifc_lite-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on spookylukey/ifc-lite-python

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

Release history Release notifications | RSS feed

This release

0.4.0 This release

6 files

0.3.0

6 files

0.2.0

6 files

0.1.1

6 files

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page