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 for Python 3.9 through 3.14:

  • 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.

Hexagonal binning

freestile_h3() aggregates points into H3 hexagons at zoom-appropriate resolutions, writing a multi-layer archive where low zooms show coarse hexagons, intermediate zooms show finer ones, and base_zoom and above show the raw points. It needs the H3 extra (pip install 'freestiler[h3]') for DuckDB and the DuckDB H3 community extension.

from freestiler import freestile_h3

freestile_h3(
    points,
    "wind.pmtiles",
    agg={"n": "COUNT(*)", "avg_mw": "AVG(capacity_mw)"},
    min_zoom=2, max_zoom=12, base_zoom=10,
)

agg also accepts (fn, column) tuples (e.g. {"n": ("count", "*")}) if you would rather not write SQL.

Performance note:

  • freestile(gdf, ...) is convenient for GeoDataFrames that already fit comfortably in memory.
  • For larger datasets, freestile_file() and freestile_query() are usually faster because they avoid a heavier GeoPandas-to-Rust handoff.
  • If your GeoDataFrame still needs to_crs(4326) before tiling, that reprojection step can dominate startup time on large layers.

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 Distribution

freestiler-0.2.0.tar.gz (131.0 kB view details)

Uploaded Source

Built Distributions

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

freestiler-0.2.0-cp314-cp314-win_amd64.whl (13.5 MB view details)

Uploaded CPython 3.14Windows x86-64

freestiler-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl (18.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

freestiler-0.2.0-cp314-cp314-macosx_11_0_arm64.whl (14.9 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

freestiler-0.2.0-cp313-cp313-win_amd64.whl (13.5 MB view details)

Uploaded CPython 3.13Windows x86-64

freestiler-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl (18.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

freestiler-0.2.0-cp313-cp313-macosx_11_0_arm64.whl (14.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

freestiler-0.2.0-cp312-cp312-win_amd64.whl (13.5 MB view details)

Uploaded CPython 3.12Windows x86-64

freestiler-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl (18.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

freestiler-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (14.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

freestiler-0.2.0-cp311-cp311-win_amd64.whl (13.5 MB view details)

Uploaded CPython 3.11Windows x86-64

freestiler-0.2.0-cp311-cp311-manylinux_2_28_x86_64.whl (18.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

freestiler-0.2.0-cp310-cp310-manylinux_2_28_x86_64.whl (18.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

freestiler-0.2.0-cp39-cp39-win_amd64.whl (13.5 MB view details)

Uploaded CPython 3.9Windows x86-64

freestiler-0.2.0-cp39-cp39-manylinux_2_28_x86_64.whl (18.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

freestiler-0.2.0-cp39-cp39-macosx_11_0_arm64.whl (14.9 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file freestiler-0.2.0.tar.gz.

File metadata

  • Download URL: freestiler-0.2.0.tar.gz
  • Upload date:
  • Size: 131.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for freestiler-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b5006bc7f26e71b980c849398088d2078c1aa6c1a62aef5345adf7d5bc2b51c5
MD5 c5995cfa29e86826ebde716521efe41b
BLAKE2b-256 19feba1306830844567f0a14eba4861b0ced30af48ae91adfeaa62589495d6cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0.tar.gz:

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.2.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: freestiler-0.2.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 13.5 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for freestiler-0.2.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 470fdb1d2acb14df141743e576ff2b152874f37d88ef9a43c5392ed2bc530306
MD5 10d525ac68062866089f9b52a6489f82
BLAKE2b-256 76ccf1d9dad161fcde28eadaff16d8af4f62b9f6ddc6462a71bde6f2420e3a57

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp314-cp314-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.2.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eb1476fef8d5088117bd10ab98cc003110761e6e8e0c93d3e8047d14ad80b51b
MD5 312e65196ebf4797cb4680dd9ada5f8d
BLAKE2b-256 220f360266e5bef898cf275b19d268b2ceaf1fe34c764cc37362108891827de3

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp314-cp314-manylinux_2_28_x86_64.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.2.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f174f69bde5ec92cd8a49491df95b357b72b1fbc79ed9d701f936600b0374a3e
MD5 2ae8c36fba70cab78ce75efc879c674b
BLAKE2b-256 f7745ed51805835ab046e32c1dcb82663a0fb3feade0bc78f40974b1c762dad3

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp314-cp314-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.2.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: freestiler-0.2.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 13.5 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for freestiler-0.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 47befc4b03ad385955d0fccdca083f76a9d3a7f62fa20c5d9ce51479ff215ead
MD5 c15465cb0ef269de6bd4b42ba612a36c
BLAKE2b-256 337ba56af873d898384993bce6c4b903f160a97c80e32985722eae35237abb1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp313-cp313-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.2.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 df8b99e4ddc4978531798e39cb45ac03d45723b49e07946002482f811426f09d
MD5 9bf2f1307cdd11554efd21f3a4840cd4
BLAKE2b-256 109e40501f60d94a7e0467e3dd2562f0c6cffdadfa69cb7ab5a425922f7c4753

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp313-cp313-manylinux_2_28_x86_64.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.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44b31434f3cd8937fbdf8f916eb39a83bda412d952ee7a323ccf1a65df4d56d8
MD5 3b61d86dd054fe16f5c98e7812b633f3
BLAKE2b-256 88f54bef2d7e0c5ad645a9c11047e39e53d361a4316bb0eda3b8ad3b8ced2f17

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp313-cp313-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.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: freestiler-0.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 13.5 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for freestiler-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 036c9c46dc6b9b0db1f6c94e8dc6e4858a7475baf2252d2ee0d001a325b1ba10
MD5 e9d2ad56313f124fc4ef98c0fcb44de3
BLAKE2b-256 ea29ff123dda22378f727902d9508de72e8498961bf1d0ccef01253748c11f4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp312-cp312-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.2.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a8a414be3f519fbd3aaef9a851094919fe6209dcf85eff9968a4ca793e967f3b
MD5 676be30bf7be4dda65dae0c0d7df4cdd
BLAKE2b-256 d30a248dc4cf4245a9856bb58b48290c61af5e1fe5bcc43435f2dca1328d9fef

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp312-cp312-manylinux_2_28_x86_64.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.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 67f8433cd3cab939e1e2947a43b49ead2bb8e93a17f1df53182a7b6ee17ca464
MD5 4a789b2937ff44681b9f72d8574b690b
BLAKE2b-256 623a4beacaa7ca6a916ad2324ce5ff8428ec9c5c9e43135140c923d036fdd9d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp312-cp312-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.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: freestiler-0.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 13.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for freestiler-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 687263535303a9ecc79129612b1c0f660ccabe18437950c33afc0c8786ea198e
MD5 efff99f72cd1393a005d207ca1ec04e2
BLAKE2b-256 d4aeb6f3377df9babb087384493523315a26be33cbbe49ebd65ad92f0d8cf2b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp311-cp311-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.2.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8b88e4612b7c88181bcac621585be379cad2149ab0f994e8088e90d38c819ce2
MD5 958fb14615cafd3a9e72921aa6f2ffea
BLAKE2b-256 43e6c8ffa367162f0807c3e0ca18b27b1e536a61bac0fef893e6074494671886

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp311-cp311-manylinux_2_28_x86_64.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.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eb65e2232fb3fe6d69088117f27f9fb1a23b544de57796236438446e41d05007
MD5 ce29e8017dc126c38a459b3625ec907a
BLAKE2b-256 d0baac412c06123e35ac94930e99cb95a030c241344895db39b298a5b28ee2e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-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.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: freestiler-0.2.0-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.12

File hashes

Hashes for freestiler-0.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ba7b4ab01538455b2ef09d89babf59f572940a0b82df27522814b26ade264e07
MD5 44ad279210093ec7f5ce8792145f4e9a
BLAKE2b-256 3029033d4774c30d9d5d2f04b459ef6b5834f4a78a4ffc0f6f7ba2da06033397

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-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.2.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4b8525c1a2486a88f5b3dab98f63a176e28ea612164c021cd52db4ba746136c6
MD5 113e4b8ff447b94d3ef1aaef28f79957
BLAKE2b-256 fecb748b79a58fc4b6bd8bf8d3e7bebffd81e3ea293fc46dac955e7d0698a5ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp310-cp310-manylinux_2_28_x86_64.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.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed8905c1fcaec146537d8aba2762be3b22924e574e485aef432b150e9ec0bea7
MD5 f55942331dc1d6d17596acfb92037e37
BLAKE2b-256 15ee7dbfeb393048a782d03ab6630f837b50b207616cc82558c838a022290fc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-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.

File details

Details for the file freestiler-0.2.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: freestiler-0.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 13.5 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for freestiler-0.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8cce305b2d608b167c9d58d95503e872c82ebf6cea7ea5eae178d83b8b538d20
MD5 250e1a077e1c59c2b646c5f8324c31da
BLAKE2b-256 a6772d03ca6a15f11a6c53e36334ca2ccac696ce0cdda36310440de155bfb5a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp39-cp39-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.2.0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1905119369c91375b8dd8fa60d2054074783a04de0bec776de0d122e06a3009e
MD5 902cf3d14419abeb644269f161eafeec
BLAKE2b-256 97743ca7caec276f2ef46648d8ad4973cbaba758ccaca3fa13c17f54c8ef745b

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp39-cp39-manylinux_2_28_x86_64.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.2.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for freestiler-0.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 182a5da408497b5ac1a4a2541b80db327dd9b271e2b8b75fc0a6a0ea35569b5d
MD5 f00fb50541006b1d73308455d4d1d0be
BLAKE2b-256 24da0edfe6a2643ee9990f9a595bedaf1ba01f64d52cdf389f225380874eb46d

See more details on using hashes here.

Provenance

The following attestation bundles were made for freestiler-0.2.0-cp39-cp39-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