Skip to main content

fast-pmtiles

A high-performance FastAPI-based vector tile server for PMTiles archives.

codecov

Features

  • Remote PMTiles Support: Serve tiles directly from PMTiles archives hosted anywhere (S3, HTTP, etc.)
  • XYZ Tile API: Standard /tiles/{z}/{x}/{y} endpoint compatible with any map client that supports MVT/PBF vector tiles
  • TileJSON Support: Automatic TileJSON generation for easy client integration
  • Built-in Viewer: Simple viewer included for instant visualization

Installation

Requires Python 3.11 or higher.

  • Install with uv:

    uv add fast-pmtiles
    
  • Or pip:

    pip install fast-pmtiles
    

Quick Start

  1. Run the server:

    uvicorn fast_pmtiles.main:app
    
  2. View interactive Swagger docs: https://localhost:8000/docs

  3. View tiles in your browser:

    http://localhost:8000/viewer?url=https://overturemaps-tiles-us-west-2-beta.s3.amazonaws.com/2026-01-21/places.pmtiles
    
  4. Get TileJSON description of the PMTiles source:

http://localhost:8000/tilejson.json?url=https://overturemaps-tiles-us-west-2-beta.s3.amazonaws.com/2026-01-21/places.pmtiles

Extending the application

from fast_pmtiles import app

@app.get("/my-new-route")
def my_new_route():
   return {"status": "ok"}

Configuration

See .env.example. Settings are defined in settings.py.

Development

Setup

  1. Clone the repository:

    git clone https://github.com/bmcandr/fast-pmtiles.git
    cd fast-pmtiles
    
  2. Install dependencies:

    uv sync
    
  3. Install pre-commit hooks:

    pre-commit install
    
  4. Run the server in development mode:

    fastapi dev src/fast_pmtiles/main.py
    

Running Tests

uv run pytest

Code Quality

This project uses:

  • Ruff for linting and formatting
  • pre-commit for automated checks on commit
# Format code
ruff format

# Lint code
ruff check

Acknowledgments

This project builds on the excellent work of:

  • PMTiles - Cloud-optimized archive format for pyramids of map tiles
  • async-pmtiles - Async Python reader for PMTiles
  • obstore - Highest-throughput Python interface to S3, GCS & Azure Storage
  • FastAPI - Modern, fast web framework for building APIs
  • MapLibre GL JS - Open-source map rendering library

Metadata

Release files for fast-pmtiles 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fast-pmtiles 0.1.2
File Size Uploaded Provenance Actions
fast_pmtiles-0.1.2.tar.gz 8.3 kB Without provenance Details for fast_pmtiles-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fast-pmtiles 0.1.2
File Interpreter ABI Platform Actions
fast_pmtiles-0.1.2-py3-none-any.whl Python 3 none any Details for fast_pmtiles-0.1.2-py3-none-any.whl

Total release size: 15.8 kB

Release files / fast_pmtiles-0.1.2.tar.gz

Download URL fast_pmtiles-0.1.2.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c0e020704150de8f9cad834b68d8a035a1a1fc78e53d44791b5e10687d8d227b
BLAKE2b-256 checksum
How to use checksums
d2f978eacc665b71338c64e993e30c3468860b36e6faa0e12dfb59ba5f308a6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fast_pmtiles-0.1.2-py3-none-any.whl

Download URL fast_pmtiles-0.1.2-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf5a6d39839336d762515ea300733c20bd94be0c4c2b5874846f40de2d4961e1
BLAKE2b-256 checksum
How to use checksums
f0d48749e0d46dce5ac2195a622905568957186c4e9ec508d1603fe8d773a950
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fast-pmtiles 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page