Intervaltree with Rust Back End
github.com·8h·
Discuss: Hacker News
Flag this post

Intervaltree in rust

This crate exposes an interval tree implementation written in Rust to Python via PyO3. The Python wrapper provides the ability to build a tree from tuples, insert additional intervals, search for overlaps, and delete intervals by their (left, right) key.

Requirements

  • Rust toolchain (for compiling the extension module)
  • Python 3.8+
  • maturin for building/installing the package

Quick start

python -m venv .venv
source .venv/bin/activate
pip install maturin
maturin develop

You can install the package with (also with uv)

pip install intervaltree_rs

maturin develop builds the extension module in-place and installs it into the active virtual environment, making it importa…

Similar Posts

Loading similar posts...