Registry / serialization / lib3mf

lib3mf

JSON →
library2.5.0pypypi✓ verified 84d ago

lib3mf is the official Python binding for the 3D Manufacturing Format (3MF) library, enabling reading, writing, and manipulation of 3MF files. Version 2.5.0 is current. Release cadence is irregular, driven by upstream spec changes.

pip install lib3mf
INSTALL
IMPORT
SIG · LIB3MF
L
lib3mf
serializationpythonv2.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

Model
import lib3mf
from lib3mf import Model
Model is a class within the lib3mf module; direct import may fail because the module's __init__.py often doesn't expose submodules directly. Use 'import lib3mf' and then 'lib3mf.Model'.

Prints the version of the underlying lib3mf C++ library and creates a new empty model.

import lib3mf wrapper = lib3mf.getLibraryVersion() print('Version', wrapper.getMajor(), wrapper.getMinor(), wrapper.getMicro(), wrapper.getBuild()) model = lib3mf.Model() print('Model created')
Debug
Known issues
breakingVersion 2.x uses a completely different API from 1.x. The old functions (e.g., 'createModel', 'loadModel') are removed. You must rewrite code using the new object-oriented API.
fix
Refer to official documentation for the 2.x API. Use 'lib3mf.Model()' instead of 'createModel()'.
affects: >=2.0.0
gotchaThe Python package only provides bindings; the actual 3MF library must be installed separately or bundled. On some systems, `pip install lib3mf` may not work without a preinstalled 3MF SDK.
fix
Ensure the lib3mf C library is installed (e.g., via system package manager) or use the official binary wheels if available.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'lib3mf'
lib3mf not installed or pip install failed silently due to missing C library.
fix
Install with pip: 'pip install lib3mf'. If that fails, install the 3MF SDK first (see lib3mf.org).
ImportError: cannot import name 'Model' from 'lib3mf'
Attempting to import Model as a top-level attribute, but it is nested within the module.
fix
Use 'import lib3mf' and then 'lib3mf.Model'.
Upgrade
Version history
2.5.0latest on PyPI · released Feb 23, 2026
Audit
Dependencies

No dependency data recorded yet.

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