Registry / data / ifcopenshell

ifcopenshell

JSON →
library0.8.5pypypi✓ verified 84d ago

IfcOpenShell is an open-source (LGPL) software library providing an API for working with the Industry Foundation Classes (IFC) data model, used in Building Information Modeling (BIM). The `ifcopenshell` Python library offers high-level bindings and utilities for reading, writing, and manipulating IFC files. It is currently at version 0.8.5 and receives updates aligning with the underlying C++ library, with an irregular release cadence.

pip install ifcopenshell
INSTALL
IMPORT
SIG · IFCOPENSHELL
I
ifcopenshell
datapythonv0.8.5
Install
7.5s avg
Import
830ms
Disk
286MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.8.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
installs and imports cleanly · install 7.5s · import 0.830s · 281MB
286MB installed
● package 286MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ifcopenshell
import ifcopenshell
open
ifcopenshell.open(...)
from ifcopenshell import open
Importing 'open' directly can conflict with Python's built-in open() function.
template
ifcopenshell.template(...)
guid.new
ifcopenshell.guid.new()
ifcopenshell.create_guid()
Replaced 'create_guid()' in v0.8 with 'guid.new()'.
geom.settings
settings = ifcopenshell.geom.settings()
Used for configuring geometry processing parameters.

This quickstart demonstrates how to create a new IFC file with a basic 'IfcProject' entity, save it to disk, and then clean up the generated file.

import ifcopenshell import os # Create a new IFC4 file ifc_file = ifcopenshell.template(schema="IFC4") # Create a project entity project_guid = ifcopenshell.guid.new() project = ifc_file.create_entity("IfcProject", project_guid) project.Name = "My First IfcOpenShell Project" # Add the project to the file ifc_file.add(project) # Define output path output_path = "my_first_project.ifc" # Save the IFC file ifc_file.write(output_path) print(f"Successfully created IFC file: {output_path}") # Optional: Clean up the created file for repeated runs if os.path.exists(output_path): os.remove(output_path) print(f"Cleaned up {output_path}")
ifcopenshell --version
Debug
Known issues
breakingMajor API changes occurred between v0.7 and v0.8, particularly in geometry processing and file creation. Code written for v0.7 will likely break in v0.8.
fix
Review the official migration guide for v0.8. Specifically, `ifcopenshell.guid.new()` replaces `ifcopenshell.create_guid()`, and arguments for `ifcopenshell.geom.settings()` have changed.
affects: 0.8.x and later
gotchaIfcOpenShell has strict Python version requirements and platform-specific binary wheels. Installation might fail if your Python version or operating system/architecture is not supported by a pre-built wheel.
fix
Always check the `requires_python` metadata on PyPI or the official documentation for the supported Python range. For v0.8.5, this is typically Python 3.10-3.14. If a wheel is unavailable, building from source is an option but significantly more complex.
affects: All versions
deprecatedThe `ifcopenshell.file.createIfcFile()` function is effectively superseded by `ifcopenshell.template()`, which offers a more robust and flexible way to create new IFC files.
fix
Use `ifcopenshell.template(schema='IFC4')` for creating new IFC files. This provides better control over the IFC schema and initial setup.
affects: 0.8.x and later
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'ifcopenshell'
The ifcopenshell package was not installed or is not accessible in the current Python environment.
fix
Run `pip install ifcopenshell` in the correct virtual environment. Ensure your Python version is compatible with the latest IfcOpenShell release.
ImportError: DLL load failed while importing _ifcopenshell: The specified module could not be found.
This usually indicates missing underlying C++ dependencies (e.g., Visual C++ Redistributables on Windows), or that a compatible binary wheel (`ifcopenshell-python`) could not be installed for your specific platform/Python version.
fix
On Windows, install the latest Visual C++ Redistributables. Ensure your Python version matches a pre-built wheel available for your OS and architecture. Check `pip debug` output for more clues or consider using a different Python environment.
TypeError: guid.create_guid() takes 0 positional arguments but 1 was given
Attempting to use the deprecated `create_guid()` function with an argument, or using it at all in v0.8+ where it's been replaced.
fix
Replace `ifcopenshell.create_guid()` with `ifcopenshell.guid.new()` which generates a new GUID without arguments.
TypeError: argument of type 'IfcProduct' is not iterable
You are trying to iterate over a single IFC entity object, likely returned by `ifc_file.by_id()` or if a `by_type()` call only returned one result, without properly converting it to a list if iteration is intended.
fix
If `by_id()` is used, it returns a single object. If `by_type()` might return one, convert to a list: `my_entities = list(ifc_file.by_type('IfcWall'))` or check `if isinstance(entity, list):` before iterating.
Upgrade
Version history
0.8.5latest on PyPI · released Apr 13, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
ifcopenshell — pip install ifcopenshell · libregistry