Native DWF 2D package inspector and parser for Python powered by Rust
Project description
ezdwf
ezdwf is an experimental, read-only Python library for parsing 2D Autodesk
DWF and DWFx files. Its parser is written in Rust and exposes drawings through
an ezdxf-style Python API.
The library reads source formats directly without converting them to DXF. It provides both a normalized paper-space model for application code and access to the underlying DWF, W2D, OPC, and XPS records when lower-level data is needed.
Installation
Python 3.10 or later is required. From a source checkout, run:
python -m pip install .
Building from source also requires a Rust toolchain.
Quick start
import ezdwf
drawing = ezdwf.read("drawing.dwf")
sheet = drawing.modelspace()
print(drawing.stats())
for entity in sheet.query('LINE POLYLINE[layer=="Walls", visible==true]'):
print(entity.dxftype(), entity.layer, entity.points)
sheet.save_svg("drawing.svg")
Multi-sheet drawings can be accessed by index, page name, or title:
first_sheet = drawing.sheet(0)
named_sheet = drawing.sheet("Floor Plan")
Command line
ezdwf inspect drawing.dwf
ezdwf inspect drawing.dwf --json
ezdwf render drawing.dwf drawing.svg --sheet 0
Run ezdwf --help or ezdwf <command> --help for all options.
Supported input
- Legacy 2D DWF/WHIP streams
- DWF 6 packages containing ePlot/W2D resources
- DWFx packages containing OPC/OpenXPS fixed pages
Common 2D geometry, layers, colors, line and fill styles, text, raster images, clips, opacity masks, gradients, Canvas groups, and VisualBrush resources are represented in the normalized model. DWFx package fonts can be decoded into positioned glyph outlines. Drawings can be queried by entity type and style and rendered to deterministic SVG without additional runtime dependencies.
For package inspection without normalization, use the lower-level API:
package = ezdwf.inspect_package("drawing.dwf")
dwfx = ezdwf.inspect_dwfx("drawing.dwfx")
# Glyph outlines are opt-in for structure-only DWFx inspection.
dwfx_with_outlines = ezdwf.inspect_dwfx(
"drawing.dwfx",
resolve_glyph_outlines=True,
)
Coordinates
High-level entities use the sheet's paper units in a bottom-left, Y-up coordinate system. DWFx pages use device-independent pixels (DIP), where 96 DIP equals one inch. Raw objects retain their source coordinate systems and transforms.
See the object model documentation for details.
Limitations
- The API is read-only and is still pre-alpha.
- Support is focused on 2D ePlot content; 3D DWF content is outside the current scope.
- SVG output is a reference preview. Some color-profile brushes, JPEG XR image details, and format-specific embedded fonts cannot yet be rendered exactly.
- Unsupported or ambiguous source semantics are reported through diagnostics instead of being silently approximated.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ezdwf-0.0.1.tar.gz.
File metadata
- Download URL: ezdwf-0.0.1.tar.gz
- Upload date:
- Size: 144.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9308ac8d41522600c5aa46421d3c495820ed6c1463d90f7c83a5e7a22446d7bc
|
|
| MD5 |
249f2e8a79299d25a5829158a6f2a636
|
|
| BLAKE2b-256 |
5e4b38bd3304943d51de9d0ced29451fefbc0ab805d5f424f22913376ff09b9f
|
Provenance
The following attestation bundles were made for ezdwf-0.0.1.tar.gz:
Publisher:
release.yml on monozukuri-ai/ezdwf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ezdwf-0.0.1.tar.gz -
Subject digest:
9308ac8d41522600c5aa46421d3c495820ed6c1463d90f7c83a5e7a22446d7bc - Sigstore transparency entry: 2256333539
- Sigstore integration time:
-
Permalink:
monozukuri-ai/ezdwf@a1c378e795e3d7bb6f15fdd208b26b8f7369b8a9 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/monozukuri-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1c378e795e3d7bb6f15fdd208b26b8f7369b8a9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ezdwf-0.0.1-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: ezdwf-0.0.1-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 940.9 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fdf08605f2aad891e011bec0550cb358f357d09e2519c2a4341fb9f9633883f
|
|
| MD5 |
ed30fc10511b3a6fbe51146cf26e4ade
|
|
| BLAKE2b-256 |
c27f2390d17ae60bafa1d9bb0cac782dceb2c5545d5e5d3ae0b8eff1e5784c56
|
Provenance
The following attestation bundles were made for ezdwf-0.0.1-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on monozukuri-ai/ezdwf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ezdwf-0.0.1-cp310-abi3-win_amd64.whl -
Subject digest:
7fdf08605f2aad891e011bec0550cb358f357d09e2519c2a4341fb9f9633883f - Sigstore transparency entry: 2256333549
- Sigstore integration time:
-
Permalink:
monozukuri-ai/ezdwf@a1c378e795e3d7bb6f15fdd208b26b8f7369b8a9 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/monozukuri-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1c378e795e3d7bb6f15fdd208b26b8f7369b8a9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ezdwf-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: ezdwf-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4d5838ef5c42e72c4832a4d577928cba5f9a3e5f21ae395ca61250429de05b3
|
|
| MD5 |
8fddcbb01562fe280a83ab1831c22084
|
|
| BLAKE2b-256 |
ab9132ba4f9fda6f1728ae886ae95fb2440716c24860651a3ba4b2c9f93cd6da
|
Provenance
The following attestation bundles were made for ezdwf-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on monozukuri-ai/ezdwf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ezdwf-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
f4d5838ef5c42e72c4832a4d577928cba5f9a3e5f21ae395ca61250429de05b3 - Sigstore transparency entry: 2256333569
- Sigstore integration time:
-
Permalink:
monozukuri-ai/ezdwf@a1c378e795e3d7bb6f15fdd208b26b8f7369b8a9 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/monozukuri-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1c378e795e3d7bb6f15fdd208b26b8f7369b8a9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ezdwf-0.0.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: ezdwf-0.0.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a171f93e44f7492ee27422598864e61f330a80f0e697911739cd39c8754fe860
|
|
| MD5 |
3823a8b465bdf9d2ffe1173bd0295389
|
|
| BLAKE2b-256 |
0136d3d57b8e9993780deb4cae049eaf621db705d854cd9b5eb135c6733ff255
|
Provenance
The following attestation bundles were made for ezdwf-0.0.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on monozukuri-ai/ezdwf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ezdwf-0.0.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
a171f93e44f7492ee27422598864e61f330a80f0e697911739cd39c8754fe860 - Sigstore transparency entry: 2256333586
- Sigstore integration time:
-
Permalink:
monozukuri-ai/ezdwf@a1c378e795e3d7bb6f15fdd208b26b8f7369b8a9 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/monozukuri-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1c378e795e3d7bb6f15fdd208b26b8f7369b8a9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ezdwf-0.0.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: ezdwf-0.0.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.10+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
232050fb32096cefa5028f530edadff8bb67e34f827f05ebaf64bfc006477041
|
|
| MD5 |
176ca02dd0cb2743881732d9d392d154
|
|
| BLAKE2b-256 |
ddb049c26be7ef8b4d22d51ec09cec4deab4a6c3078cb91a20d257e41aa28dea
|
Provenance
The following attestation bundles were made for ezdwf-0.0.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:
Publisher:
release.yml on monozukuri-ai/ezdwf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ezdwf-0.0.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
232050fb32096cefa5028f530edadff8bb67e34f827f05ebaf64bfc006477041 - Sigstore transparency entry: 2256333558
- Sigstore integration time:
-
Permalink:
monozukuri-ai/ezdwf@a1c378e795e3d7bb6f15fdd208b26b8f7369b8a9 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/monozukuri-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1c378e795e3d7bb6f15fdd208b26b8f7369b8a9 -
Trigger Event:
push
-
Statement type: