Skip to main content

ezjww

ezjww is a JWW parser and DXF conversion library. The core parser/writer is implemented in Rust and exposed to Python with PyO3.

Current Features

  • Validate and parse .jww files by their JwwData. binary signature.
  • Report structured CP932 replacement diagnostics with source byte offsets.
  • Read JWW files written by Jw_cad 8 (version 700, Unicode builds): CStrings with the MFC FF FE FF marker are decoded as UTF-16LE, and block definitions (whose list count is a WORD) are loaded.
  • Read damaged files best-effort: a main entity list that cannot be read to its end keeps the entities parsed so far and reports ENTITY_LIST_TRUNCATED (see docs/DIAGNOSTICS.md); MFC CArchive escaped counts (65535+ entities), NULL tags and big object tags are honoured.
  • Read document/header data from Python.
  • Expose Jw_cad's sentinel-positioned printer/view settings separately as metadata_settings while preserving the original source entities.
  • Convert parsed JWW entities to DXF intermediate entities.
  • Write ASCII DXF files.
  • Emit DXF handles, BLOCK_RECORD table, and OBJECTS section for better CAD compatibility.

Installation

Install the package from PyPI:

pip install ezjww

If you want to use the optional plotting feature, install the package with the plot extra:

pip install "ezjww[plot]"

Install the package from source:

git clone https://github.com/neka-nat/ezjww.git
cd ezjww
uv sync

Python API

from ezjww import (
    ALL_ISSUE_CODES,
    audit,
    bbox,
    is_jww_file,
    readfile,
    plot_jww,
    read_document,
    read_dxf_document,
    report,
    stats,
    to_dxf_string,
    write_dxf,
    write_dxf_with_report,
)

ok = is_jww_file("sample.jww")
doc = read_document("sample.jww")
for setting in doc["metadata_settings"]:
    print(setting["key"], setting["value"])
dxf_doc = read_dxf_document("sample.jww")
dxf_text = to_dxf_string("sample.jww")
write_dxf("sample.jww", "sample.dxf")
conversion = write_dxf_with_report(
    "sample.jww",
    "sample-r2010.dxf",
    target_version="AC1024",
)
plot_jww("sample.jww", save_path="sample.png")

drawing = readfile("sample.jww")
msp = drawing.modelspace()
lines = msp.query("LINE", layer="#lv4")
mix = msp.query('LINE POINT[layer=="#lv4", color==5]')  # ezdxf-like selector
extents = drawing.bbox(explode_inserts=True)
raw_dxf = drawing.to_dxf_string()
dist = drawing.stats()
health = drawing.audit()  # or: audit("sample.jww")
for diagnostic in health["diagnostics"]:
    print(diagnostic["code"], diagnostic["details"])

# Stable machine-readable catalog for integrations and CI.
assert set(health["issue_codes"]) <= set(ALL_ISSUE_CODES)
full = report("sample.jww", explode_inserts=True)

# expand INSERT references (nested block aware)
flat = drawing.to_dxf(explode_inserts=True, max_block_nesting=32)
flat_count = len(flat["entities"])
# max_block_nesting must be >= 1

CLI

The package installs the ezjww command.

# show summary
ezjww info jww_samples/Test1.jww

# run health checks
ezjww audit jww_samples/Test1.jww --json

# calculate drawing extents
ezjww bbox jww_samples/Test1.jww --json --explode-inserts

# show entity distribution
ezjww stats jww_samples/Test1.jww --json

# show combined audit+bbox+stats
ezjww report jww_samples/Test1.jww --json --explode-inserts

# convert one file
ezjww to-dxf jww_samples/Test1.jww -o /tmp/Test1.dxf

# convert one file + JSON report
ezjww to-dxf jww_samples/Test1.jww -o /tmp/Test1.dxf --report json

# convert one file with INSERT expansion
ezjww to-dxf jww_samples/Test1.jww -o /tmp/Test1.dxf --explode-inserts

# convert directory (recursive)
ezjww to-dxf-dir jww_samples -o /tmp/dxf_out -r

# render with matplotlib
ezjww plot jww_samples/Test1.jww -o /tmp/Test1.png --explode-inserts

Public contracts

is_jww_file(path) checks file content, not the filename extension. A matching signature is only a lightweight format check; parsing still validates the remaining structure.

Development

cargo fmt --all
cargo test
maturin develop

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ezjww-0.2.13.tar.gz (566.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ezjww-0.2.13-cp39-abi3-win_amd64.whl (398.4 kB view details)

Uploaded CPython 3.9+Windows x86-64

ezjww-0.2.13-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (539.8 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

ezjww-0.2.13-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (953.8 kB view details)

Uploaded CPython 3.9+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file ezjww-0.2.13.tar.gz.

File metadata

  • Download URL: ezjww-0.2.13.tar.gz
  • Upload date:
  • Size: 566.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ezjww-0.2.13.tar.gz
Algorithm Hash digest
SHA256 ee16614fb14a81a33db4b750285bf832f14cd0e63cf7b323e462280831782df3
MD5 a448952ef6145590658bfdf25de808d0
BLAKE2b-256 43f0c4a7d51b53a2f58a55a666ec901d9d7b85d544daaf6913d5a630fc066938

See more details on using hashes here.

File details

Details for the file ezjww-0.2.13-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: ezjww-0.2.13-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 398.4 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ezjww-0.2.13-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 1d7e8d546057c849dfef309ccccbbab9980473985e373bc18473fb520752e959
MD5 50457d3bc80cbd4a916fc978672f7b14
BLAKE2b-256 1c430e2f61f9db0067bb9e58a554850faecc7e331c00b16546765d88d8c71861

See more details on using hashes here.

File details

Details for the file ezjww-0.2.13-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: ezjww-0.2.13-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 539.8 kB
  • Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ezjww-0.2.13-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 658acc8474111955486a9b4dbb998cd6db22d42c8373975bca1c4d2cf1234cf4
MD5 dc535f66987336a9313abbb8f91ce183
BLAKE2b-256 139da124bb870b275948f50e47580729f6efbbf1005b257571388e5aca4d7e53

See more details on using hashes here.

File details

Details for the file ezjww-0.2.13-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

  • Download URL: ezjww-0.2.13-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
  • Upload date:
  • Size: 953.8 kB
  • Tags: CPython 3.9+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ezjww-0.2.13-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 17c5a866e020b3529a6d6bd28ac99748498a17877ac357757abdb2ce19a53b89
MD5 7a0f9da4315743bb11036fa04e3fc756
BLAKE2b-256 d6b2607bb0de8377dfc5dbed478a6c2bb638e58b04d34c58c9389b03d028e1b2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.13 This release

4 files

0.2.12

4 files

0.2.11

4 files

0.2.10

4 files

0.2.9

4 files

0.2.8

4 files

0.2.7

4 files

0.2.6

4 files

0.2.5

4 files

0.2.4

4 files

0.2.3

4 files

0.2.2

4 files

0.2.1

4 files

0.2.0

4 files

0.1.0

4 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page