Skip to main content

Rust-powered MLT/MVT vector tile engine for Python

Project description

freestiler for Python

freestiler builds PMTiles vector tile archives from GeoPandas data, GeoParquet files, and DuckDB spatial queries using a Rust tiling engine.

Features:

  • MapLibre Tiles (mlt) and Mapbox Vector Tiles (mvt)
  • Multi-layer tilesets
  • Point clustering
  • Feature coalescing
  • Exponential feature dropping for low zoom levels

Why this package exists

  • Python-native API backed by the same Rust tiler as the R package
  • PMTiles output instead of tile directory trees
  • Direct DuckDB SQL tiling
  • Streaming point tiling for large DuckDB query results

Installation

Install from PyPI:

pip install freestiler

Published PyPI wheels ship the native feature set:

  • GeoPandas input
  • Multi-layer tiling and feature management
  • Direct GeoParquet file input
  • DuckDB-backed file input
  • DuckDB SQL query support

If a wheel is not available for your platform, pip will build from source and requires a Rust toolchain.

Quick Start

import geopandas as gpd
from freestiler import freestile

gdf = gpd.read_file("counties.shp")

freestile(gdf, "counties.pmtiles", layer_name="counties")

That example is intentionally small. The more interesting path is tiling directly from DuckDB:

from freestiler import freestile_query

freestile_query(
    query="SELECT * FROM read_parquet('blocks.parquet') WHERE state = 'NC'",
    output="nc_blocks.pmtiles",
    layer_name="blocks",
)

For very large point tables, use streaming="always" and prefer tile_format="mvt" for maximum viewer compatibility.

Source Builds

Published wheels include GeoParquet and DuckDB support by default. To build from a local checkout:

git clone https://github.com/walkerke/freestiler.git
cd freestiler/python
python3 -m venv .venv
source .venv/bin/activate
pip install maturin
python3 -m maturin develop --release

To build an installable wheel instead of using an editable install:

python3 -m maturin build --release --out dist
pip install dist/freestiler-*.whl

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

freestiler-0.1.3-cp311-cp311-macosx_11_0_arm64.whl (14.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

freestiler-0.1.3-cp310-cp310-win_amd64.whl (13.5 MB view details)

Uploaded CPython 3.10Windows x86-64

freestiler-0.1.3-cp310-cp310-macosx_11_0_arm64.whl (14.9 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file freestiler-0.1.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for freestiler-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b845f6fc620ddc1f77643ac438eb3711d2e2b5a4847cfae5cc1272f768315407
MD5 f0f6bdcbe2dd208191d59afcc828bfbc
BLAKE2b-256 8a37df0ee020c7bfb7e24640d20adb8980a6860b6e64279239014c9fa92b18ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.1.3-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: python-package.yml on walkerke/freestiler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file freestiler-0.1.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: freestiler-0.1.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 13.5 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for freestiler-0.1.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c20b2ce712cc252a9d91b2bf95388b5518e1679d9ea232d8c95c91d142a37ae1
MD5 54896294b98662af817c0c2b5ee7b928
BLAKE2b-256 6151735e704443f77741a5c23500e6a86369126547bf008b0725dcd2a163f9ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.1.3-cp310-cp310-win_amd64.whl:

Publisher: python-package.yml on walkerke/freestiler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file freestiler-0.1.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for freestiler-0.1.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 008769a35830ba6e2529ce79b04b1382e93c07e15aeb0f250403928ff9df8d2f
MD5 f1f3b300f332d38d4c060d44ae5e4726
BLAKE2b-256 6f9fc2db98fd01879ec19ce122c7a15eba67b88c5239cc4ed1314f6bbd717e08

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.1.3-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: python-package.yml on walkerke/freestiler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page