Why use fastquadtree¶
- Just pip install: prebuilt wheels for Windows, macOS, and Linux (no Rust or compiler needed)
- The fastest quadtree Python package (>10x faster than pyqtree)
- Clean Python API with no external dependencies and modern typing hints
- Support for inserting bounding boxes or points
- Fast KNN and range queries
- Optional object tracking for id ↔ object mapping
- Fast serialization to/from bytes
- Support for multiple data types (f32, f64, i32, i64) for coordinates
- 100% test coverage and CI on GitHub Actions
Examples¶
See examples of how fastquadtree can be used in the runnables section.
Install¶
Import¶
from fastquadtree import QuadTree # Point handling
from fastquadtree import RectQuadTree # Bounding box handling
from fastquadtree import QuadTreeObjects # Point handling with object tracking
from fastquadtree import RectQuadTreeObjects # Bounding box handling with object tracking
from fastquadtree.pyqtree import Index # Drop-in replacement for pyqtree (~10x faster while keeping the same API)