Registry / data / pmtiles

pmtiles

JSON →
library3.7.0pypypi✓ verified 83d ago

Library and utilities to write and read PMTiles archives — cloud-optimized archives of map tiles. Version 3.7.0, actively maintained with frequent releases.

pip install pmtiles
INSTALL
IMPORT
SIG · PMTILES
P
pmtiles
datapythonv3.7.0
Install
1.5s avg
Import
20ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.022s · 17.9MB
glibc
py 3.103.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
Debug
Known issues
breakingIn v3, the main import changed from `pmtiles` to submodules. Code using `import pmtiles` and accessing `pmtiles.Reader` will break.
fix
Use `from pmtiles.reader import Reader` or `from pmtiles.writer import Writer`.
affects: >=3.0.0
deprecatedThe `Reader` no longer accepts an `open` keyword argument for custom file opening. Use a file-like object or a path.
fix
Pass a file path or a file-like object directly.
affects: >=3.0.0
gotchaTile coordinates use the Slippy Map tilename convention (x, y, z) with origin at top-left. y increases southward.
fix
Ensure tile coordinates follow the TMS standard (y=0 at top).
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'Reader' from 'pmtiles'
In v3, Reader is no longer in the top-level package.
fix
Replace `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.
fix
Call `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.

Agent activity
35 hits · last 30 days
node
30
OpenAI (training)
1
Resources
pmtiles — pip install pmtiles · libregistry