openbim-ifc (Python)
Read, edit and write IFC STEP files from Python. A thin binding over the
openbim-ifc Rust crates: one abi3
wheel for CPython 3.9 and later.
from openbim_ifc import IfcModel, Text
with open("model.ifc", "rb") as f:
model = IfcModel.parse(f.read())
print(model.schema, len(model))
for id in model.ids_of_type_including_subtypes("IfcWall"):
print(id, model.attribute(id, 2)) # Name, e.g. Text('Wall')
model.set_attribute(id, 2, Text("Renamed"))
with open("out.ifc", "wb") as f:
f.write(model.write())
Values
Attribute values are frozen dataclasses, one per STEP form: Null ($),
Derived (*), Bool, Unknown (.U.), Integer, Real, Text,
Binary, Enum, Ref (#42), List, and Typed
(IFCLENGTHMEASURE(2.5)). They keep every distinction IFC makes, so a
file read and written back through Python is unchanged.
Bare Python values are refused with TypeError: 3 could be an Integer
or a Real, "x" a Text or an Enum, and the binding does not guess.
Errors
Every failure raises IfcError with a stable code: parse, write,
missing-entity, invalid-value, out-of-range or unsupported-schema.
The codes are shared with the JavaScript and C bindings.
Threads
parse releases the GIL while it reads. A model can be passed between
threads; the GIL serialises calls on it.
Scope
The record model only: entities, attributes, the STEP codec, exact and subtype queries. Domain views (properties, quantities, geometry) are not bound yet. The wheel is built and tested in CI; it is not on PyPI yet.
Build
uv venv && . .venv/bin/activate
uv pip install maturin
maturin develop --release # or: scripts/check-python.sh to build + test
Faster reading (opt-in)
maturin build --release --features mimalloc
Uses the mimalloc allocator for the extension's own memory: reading STEP takes 23-36% fewer CPU cycles, but 2-28% more memory stays resident. Off by default because mimalloc is C code and the project is pure Rust; #49 tracks a pure-Rust replacement.
Release files for openbim-ifc 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openbim_ifc-0.1.0.tar.gz | 3.2 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| openbim_ifc-0.1.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| openbim_ifc-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| openbim_ifc-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| openbim_ifc-0.1.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64 | Details |
Total release size: 6.5 MB
Release files / openbim_ifc-0.1.0.tar.gz
| Download URL | openbim_ifc-0.1.0.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29bc10a9185c506df267898ed7242176a143ffc00e9ca1f3e50201dff452b126
|
|
BLAKE2b-256 checksum How to use checksums |
ad6cbc1cd256ae6e71cc9da901fdcb060aad9523cab788d96540e36c72afc6a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / openbim_ifc-0.1.0-cp39-abi3-win_amd64.whl
| Download URL | openbim_ifc-0.1.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 598.2 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9a44858fa5dabf03f5a3dcfb13df481c6a40d33b1a642e0cca2c8f26226f8c12
|
|
BLAKE2b-256 checksum How to use checksums |
17ea8758bc8b4a2518145170f49f571bc39db4f8381657d8c7237f654abf3b1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / openbim_ifc-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl
| Download URL | openbim_ifc-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 692.5 kB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ba2d19e576af80af2cf94dfd1669aa9a6e09de98c8aa5c96022e4edd27ef4d7d
|
|
BLAKE2b-256 checksum How to use checksums |
e8b972a1a125b38573d1eb33be620f7546c4f3d6b440b336826d73bb73bd83a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / openbim_ifc-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl
| Download URL | openbim_ifc-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 665.6 kB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
72ca7a8e21ea2384475b0a642e62506eeeb8c96a66868b4a7b46fdf5fc9562b2
|
|
BLAKE2b-256 checksum How to use checksums |
0bfeda724e53361a3f7c0df14b6455939a782519d3d551d1d66988820e9cdf71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / openbim_ifc-0.1.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | openbim_ifc-0.1.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f48a4f6ebf6ccc6f2351e51b884e3bcb6fbe2cca5847a1362a33c3e25302bde8
|
|
BLAKE2b-256 checksum How to use checksums |
68e08124daf04ea1b02071eec10d2f9c3c3b5be47e7b0e58ff310e11dea2cdfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency log