Install & Compatibility
Where this runs
tested against v3.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.022s · 17.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.018s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Reader
✓ from pmtiles.reader import Reader
✗ from pmtiles import Reader
Reader is in the reader module, not top-level.
Writer
✓ from pmtiles.writer import Writer
✗ from pmtiles import Writer
Writer is in the writer module.
Open a PMTiles archive, inspect header, and fetch a tile.
from pmtiles.reader import Reader
# Read from a local file or URL
reader = Reader('example.pmtiles')
header = reader.header()
print(header.tile_type, header.min_zoom, header.max_zoom)
# Fetch a tile at zoom 10, x 512, y 512
tile = reader.get_tile(10, 512, 512)
if tile:
print(f'Tile size: {len(tile)} bytes')
pmtiles --version
Errors
Common errors & fixes
ImportError: cannot import name 'Reader' from 'pmtiles'
In v3, Reader is no longer in the top-level package.
fixReplace `from pmtiles import Reader` with `from pmtiles.reader import Reader`.
AttributeError: 'Reader' object has no attribute 'open'
The `open` method was removed in v3; use the constructor directly.
fixCall `Reader('path.pmtiles')` instead of `Reader().open('path.pmtiles')`. Upgrade
Version history
3.7.0latest on PyPI · released Feb 10, 2026
Audit
Dependencies
No dependency data recorded yet.