TiTiler Core
raw JSON → 2.0.1 verified Mon Apr 27 auth: no python
A modern dynamic tile server built on top of FastAPI and Rasterio/GDAL, enabling on-the-fly map tile generation from various geospatial raster sources. Version 2.0.1 requires Python >=3.11 and includes breaking changes from the 1.x series, such as mandatory assets parameter and removal of deprecated endpoints. The library is actively maintained with frequent releases.
pip install titiler-core Common errors
error ModuleNotFoundError: No module named 'titiler' ↓
cause Installed 'titiler-core' but tried to import 'titiler' (old metapackage).
fix
Import from subpackages: 'from titiler.core.factory import TilerFactory'
error ValueError: assets is required ↓
cause In v2, the 'assets' parameter is mandatory for tile endpoints.
fix
Provide 'assets' as a query parameter or set multiple via comma-separated values: '?assets=B01,B02'
Warnings
breaking In v2.0.0, the `assets` parameter in tile requests became required. Use `assets=` or `assets=:all:` to specify assets. ↓
fix Add `assets` query parameter to all requests, e.g., `?assets=B01&url=...`
deprecated The `titiler` metapackage is deprecated. Replace with `titiler-core`, `titiler-application`, or other subpackages. ↓
fix Install subpackages individually: `pip install titiler-core titiler-application`
gotcha When using `titiler.core.algorithm`, the Contour algorithm may fail with non-8-bit masks (e.g., continuous data) causing compatibility errors. ↓
fix Ensure mask type is appropriate (e.g., uint8) or use custom algorithm handling.
Imports
- TilerFactory wrong
from titiler.factory import TilerFactory (pre-v2)correctfrom titiler.core.factory import TilerFactory - TilerSettings wrong
from titiler.settings import TilerSettings (pre-v2)correctfrom titiler.core.settings import TilerSettings
Quickstart
from titiler.core.factory import TilerFactory
from fastapi import FastAPI
app = FastAPI()
tiler = TilerFactory()
app.include_router(tiler.router)
# Access: http://localhost:8000/cog/tiles/12/2048/1536?url=https://example.com/cog.tif
# Check health: http://localhost:8000/health