pzmap
Python bindings for libpzmap, which parses Project
Zomboid's on-disk map formats: .lotheader, world_*.lotpack, and .pack texture atlases.
It does not decode images or draw anything. A texture page comes back as the bytes of a PNG file, and a square's tiles come back as positions in a list of tile names.
Install
pip install pzmap
Use
The map is divided into cells, square areas of 256 by 256 squares in Build 42 (300 by 300 in
Build 41). Each cell is stored as two files that you read together. The .lotheader lists every
tile name the cell uses. The matching world_*.lotpack places tiles on squares, storing each tile
as a position in that list.
import pzmap
header = pzmap.LotHeader.from_path("0_18.lotheader", 0, 18, pzmap.Build.B42)
cell = pzmap.Cell.from_path(
"world_0_18.lotpack", 0, 18, pzmap.Build.B42, header.min_layer, header.max_layer
)
for square in cell.squares:
names = [header.strings[tile] for tile in square.tiles]
print(square.layer, square.x, square.y, names)
x and y must be the cell coordinates from the file name. The header uses them to convert room
and object positions to world coordinates. Wrong values give a header that parses without error
but puts every room in the wrong place.
from_path reads the file itself. Each class also has parse, which takes the file's contents as
bytes and copies them.
Bulk access
A cell can hold hundreds of thousands of squares and millions of tile indices, so creating one Python object per square is slow. The buffer methods return the whole cell at once:
import numpy
tiles = numpy.frombuffer(cell.tiles_bytes(), dtype="<i4")
offsets = numpy.frombuffer(cell.offsets_bytes(), dtype="<u8")
dtype = numpy.dtype([("block", "<u4"), ("layer", "<i4"),
("x", "<u4"), ("y", "<u4"), ("room", "<i4")])
squares = numpy.frombuffer(cell.squares_bytes(), dtype=dtype)
# Tiles of square i are tiles[offsets[i]:offsets[i + 1]].
offsets has one more entry than there are squares, so the last square needs no special case.
Builds
Build 41 and Build 42 use different cell sizes, block sizes and layer ranges. Every parser takes
a Build argument instead of guessing it from the file. Each file records the version it was
written for, so passing the wrong build raises ParseError.
Errors
A malformed file raises pzmap.ParseError, a subclass of ValueError. Its offset attribute is
the byte offset where the problem was found. Its format attribute is the kind of file being read:
"lotheader", "lotpack" or "texture pack".
A file that cannot be read raises OSError or one of its subclasses, such as FileNotFoundError.
Threads and processes
Parsing releases the GIL, so a thread pool can parse several files at the same time.
Build, LotHeader, TexturePack and ParseError can be pickled, so they can be sent to
multiprocessing workers. A header or pack pickles as its file bytes and is parsed again when it
is unpickled. Cell cannot be pickled, so send the worker the file path instead.
License
MIT OR Apache-2.0.
The wheel's .dist-info/licenses/THIRD-PARTY-NOTICES.md lists the licenses of the Rust crates
compiled into its native module.
Project Zomboid is a trademark of The Indie Stone. This project is not affiliated with or endorsed by The Indie Stone, and it does not include any game files.
Metadata
Release files for pzmap 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 |
|---|---|---|---|---|
| pzmap-0.1.0.tar.gz | 134.7 kB | With provenance | Details for pzmap-0.1.0.tar.gz |
Built distributions (wheels)
Total release size: 5.6 MB
Release files / pzmap-0.1.0.tar.gz
| Download URL | pzmap-0.1.0.tar.gz |
|---|---|
| Size | 134.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a4e47d0a274503ff48b19a2cdc484ee912f09044bb502180df5bed98ae5159d
|
|
BLAKE2b-256 checksum How to use checksums |
6cc3dc9714012a31f90f5935129ffe7debb92f7ed72866e5e0b72b215090f0a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 18, 2026.
Transparency logRelease files / pzmap-0.1.0-cp39-abi3-win_amd64.whl
| Download URL | pzmap-0.1.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 223.6 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
03a6024479d88e34690bed4ea3845f12c7052492d326b91a493473ac00b804af
|
|
BLAKE2b-256 checksum How to use checksums |
b68ea9b9cc07e67e3e4a3c4e61e04ff06fe6545e0607c9099e25600ff28fc5b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 18, 2026.
Transparency logRelease files / pzmap-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl
| Download URL | pzmap-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
edcfad2e28680fca6577c8bf19327b6b9da1f33bb454cd6566594cde47340ed6
|
|
BLAKE2b-256 checksum How to use checksums |
60bbcd6896f036935f85be3784b0b66ddaf45d00c7dd45bd851157f3d866e49d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 18, 2026.
Transparency logRelease files / pzmap-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl
| Download URL | pzmap-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
b1c5cde4f17b404a56cd540cd5d3b768de4d0953af4c79139b1f8cdf9d0def20
|
|
BLAKE2b-256 checksum How to use checksums |
230d0cef92325f152bda7ed9aae8a4fa6eeae568ea3e68d3fad434f4b2218ab8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 18, 2026.
Transparency logRelease files / pzmap-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pzmap-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3809450d33472bc52ed89bc60ae29bba9ac216f6ea0dcaa59bdd7ccf0216c68e
|
|
BLAKE2b-256 checksum How to use checksums |
994ce6059deea293d21a0a0feff103934ecbd29e9b6b8d476fd89afde9af3b5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 18, 2026.
Transparency logRelease files / pzmap-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pzmap-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 999.8 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
4b9af3d189d3e1dd5c52908848c5fc1b17aac0b1c86836b448dc9734278e91df
|
|
BLAKE2b-256 checksum How to use checksums |
6ab7e63b0e1adc6e62038db7a1615071911f619cb3ab6020c2e2ec8caefd85ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 18, 2026.
Transparency logRelease files / pzmap-0.1.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | pzmap-0.1.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 635.4 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7f65c93b87ee8709ff096f023ad734c3a655698ef1f1f4f4ba3649b5b2bc42bb
|
|
BLAKE2b-256 checksum How to use checksums |
6982a07377f9c17b3551e05dc07ae0c7b3ec9e273823696ba7cdd570867e62d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 18, 2026.
Transparency logSecurity for pzmap 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 7 files in this release have been uploaded with provenance metadata.
Attestation for pzmap-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 Oct 18, 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.