cbtiles - Tile Caching Proxy¶
CartoDB tile caching proxy with intelligent look-ahead prefetching.
Features¶
- On-demand caching: Tiles downloaded and cached on first request
- Look-ahead prefetching: Nearby tiles prefetched in background
- Multiple styles: All CartoDB basemap styles supported
- FastAPI: Modern async Python web framework
Quick Start¶
# Service runs on port 32216
# Swagger docs: http://tiles.nominate.ai:32216/docs
# Fetch a tile
curl "http://tiles.nominate.ai:32216/light_all/10/234/567.png"
# Check status
curl "http://tiles.nominate.ai:32216/status"
API Endpoints¶
| Endpoint | Description |
|---|---|
/{style}/{z}/{x}/{y}.png |
Fetch tile |
/status |
Server status |
/health |
Health check |
/docs |
OpenAPI documentation |
Supported Styles¶
dark_all,light_alldark_nolabels,light_nolabelsdark_only_labels,light_only_labelsvoyager,voyager_nolabels,voyager_only_labels
Installation¶
# Activate environment
source ~/.pyenv/versions/nominates/bin/activate
# Install dependencies
pip install -e ".[dev]"
# Run server
uvicorn src.api.main:app --host 127.0.0.1 --port 32216 --reload
Deployment¶
Service runs via systemd at tiles.nominate.ai:32216.