fastdxf
fastdxf accelerates ezdxf.readfile() with Rust and returns an editable ezdxf.document.Drawing. It also extracts modelspace LINE endpoints directly into a NumPy array.
Installation
Install fastdxf from PyPI with Python 3.11 or later.
python -m pip install fastdxf
The two document-loading options below are available in fastdxf 0.1.0. CPython 3.12 wheels target Linux x86-64 (glibc 2.28+), Windows x86-64 and macOS 11+ on Apple silicon. Source builds require Rust. To install from a checkout, run python -m pip install .. PyPI release files
Run an existing ezdxf script
Use the module runner to launch the script with its existing imports.
python -m fastdxf edit.py input.dxf output.dxf
Inside that process, import ezdxf, from ezdxf import readfile and from ezdxf.filemanagement import readfile use the accelerated reader, including in the script's helper modules. Arguments after the script name are passed to the script.
Alternatively, change the import to import fastdxf as ezdxf and run the script with the usual python edit.py command.
import fastdxf as ezdxf
from ezdxf.math import Vec3
doc = ezdxf.readfile("drawing.dxf")
doc.modelspace().add_line(Vec3(0, 0), Vec3(3, 4))
doc.saveas("edited.dxf")
Both options use the Rust document reader with ezdxf 1.4.5 for ASCII R12, R2007, R2010, R2013 and R2018. Binary DXF, other ezdxf or DXF versions, and encodings, error handlers or structures outside the native reader use the installed ezdxf reader. Queries, edits and saves use ezdxf's own document and entity classes. Use the usual ezdxf.* imports for submodules.
Document loading performance
| Mixed drawing | ezdxf read | fastdxf read (import / runner) | Full script speedup (import / runner) |
|---|---|---|---|
| R2010, 7.54 MB | 1,822 ms | 1,239 / 1,242 ms | 1.22× / 1.20× |
| R2018, 2.17 MB | 375 ms | 251 / 246 ms | 1.16× / 1.16× |
The full script starts Python, reads the drawing, queries and edits a modelspace LINE, saves the file, and exits. The PR10 wheel measurements use the median of six rotated trials on Linux x86-64 with CPython 3.12.3 and ezdxf 1.4.5 with C extensions. All edited files matched the official ezdxf output byte for byte. Benchmark inputs, wheel hash and timings
Extract LINE endpoints
import fastdxf
segments = fastdxf.read_lines("drawing.dxf")
starts, ends = segments[:, 0], segments[:, 1]
read_lines(path) returns a read-only, C-contiguous float64 array with shape (N, 2, 3). Each row holds the WCS start and end of a LINE directly in modelspace, in layout order. An empty selection has shape (0, 2, 3). The native LINE reader targets the same five ASCII DXF versions. Binary DXF, other versions, and layouts it cannot resolve use ezdxf's reader.
LINE extraction performance
| Mixed drawing | Direct modelspace LINEs | fastdxf | Faster of the two iterdxf readers | Speedup |
|---|---|---|---|---|
| R2010, 7.54 MB | 11,556 | 45.31 ms | 888.59 ms | 19.61× |
| R2018, 2.17 MB | 2,039 | 8.68 ms | 189.17 ms | 21.80× |
These are the PR3 release-wheel measurements on Linux x86-64, Core i9-13900H, CPython 3.12.3 and ezdxf 1.4.5 with C extensions. Times cover opening the file through returning the NumPy array, using one warm-up and the median of five rotated trials. The indexed iterdxf measurement includes building the index. All methods matched the ordered endpoint bits from ezdxf. Benchmark details and reproduction
Maintainers can rehearse a release or publish a tagged build. Release instructions
Metadata
Release files for fastdxf 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 | Provenance | Actions |
|---|---|---|---|---|
| fastdxf-0.1.0.tar.gz | 15.1 kB | With provenance | Details for fastdxf-0.1.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastdxf-0.1.0-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details for fastdxf-0.1.0-cp312-cp312-win_amd64.whl |
| fastdxf-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details for fastdxf-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl |
| fastdxf-0.1.0-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details for fastdxf-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
Total release size: 827.8 kB
Release files / fastdxf-0.1.0.tar.gz
| Download URL | fastdxf-0.1.0.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3527e9eadc7fccc42843ef7d9a87f6ab5c83f91e4746d3b55215235e809892bf
|
|
BLAKE2b-256 checksum How to use checksums |
5388510dc0a8254c7934b12b7e8fcb0e52070ca01753826936aa66f27c3db428
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 2, 2026.
Transparency logRelease files / fastdxf-0.1.0-cp312-cp312-win_amd64.whl
| Download URL | fastdxf-0.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 187.3 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8acf4dfe6162fbd59c2057d721ebbbc94402db4ab9c8073cd0089f2f871d07eb
|
|
BLAKE2b-256 checksum How to use checksums |
3e05a447b13f0f4c8c4d1261304ca92ccc72d68dd71632faaaeaad834518a2f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 2, 2026.
Transparency logRelease files / fastdxf-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | fastdxf-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 333.5 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
e47556d61f251ac88d59810deb9c4f4b986aa92b14bd0492e5085d8c8e693636
|
|
BLAKE2b-256 checksum How to use checksums |
eafb39d85cdc614d5bf8c331538cdffbd142a3935041a901de1404ae773918e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 2, 2026.
Transparency logRelease files / fastdxf-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | fastdxf-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 291.9 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7024c7cf8c5c531e8bf0f7c45bdd104c248e68b103a7f77896f818368bc39f8b
|
|
BLAKE2b-256 checksum How to use checksums |
cd5f5d389b026ab4a6d449cdd2f5f78ab84d19577d58cb940459fdc6b9e3a902
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 2, 2026.
Transparency logSecurity for fastdxf 0.1.0
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.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for fastdxf-0.1.0.tar.gz
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 Dec 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.