Registry / web-framework / localtileserver

localtileserver

JSON →
library1.0.0pypypi✓ verified 84d ago

Locally serve geospatial raster tiles in the Slippy Map standard. Version 1.0.0, active development, monthly releases.

pip install localtileserver
INSTALL
IMPORT
SIG · LOCALTILESERVER
L
localtileserver
web-frameworkpythonv1.0.0
Install
19.5s avg
Import
Disk
383MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.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
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 19.5s · import 0.000s · 406MB
383MB installed
● package 383MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TileClient
from localtileserver import TileClient
Correct import path.
get_leaflet_tile_layer
from localtileserver import get_leaflet_tile_layer
from localtileserver.tileserver import get_leaflet_tile_layer
Wrong submodule; the function is re-exported at top level.

Serve a local GeoTIFF as slippy map tiles and display in a Jupyter notebook with ipyleaflet.

from localtileserver import TileClient, get_leaflet_tile_layer from ipyleaflet import Map client = TileClient('path/to/raster.tif') tile_layer = get_leaflet_tile_layer(client) m = Map(center=(40.7128, -74.0060), zoom=10) m.add_layer(tile_layer) m
localtileserver --version
Debug
Known issues
gotchaThe tile server runs in the background and uses a random port by default. If you have firewall or Docker issues, set the port explicitly with `TileClient('file.tif', port=5000)` to avoid conflicts.
fix
Use `port` parameter: `TileClient('file.tif', port=8080)`.
affects: all
gotchaTileClient's `__del__` method stops the server garbage collection may not run immediately in interactive sessions. Call `client.close()` explicitly to free the port, or use `with TileClient(...) as client:`.
fix
Use context manager: `with TileClient('file.tif') as client:` or call `client.close()` after use.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'localtileserver'
The package is not installed or installed in a different environment.
fix
Run `pip install localtileserver` in the correct Python environment.
ImportError: cannot import name 'get_leaflet_tile_layer' from 'localtileserver'
Trying to import a function that was renamed or moved. Prior to version 1.0.0, it was `get_leaflet_tile_layer`, now it's available at top level.
fix
Use `from localtileserver import get_leaflet_tile_layer`.
Upgrade
Version history
1.0.0latest on PyPI · released Apr 24, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
localtileserver — pip install localtileserver · libregistry