Skip to main content

lsdtt3 Python bindings

lsdtt3 is a nanobind-based Python interface to LSDTopoTools3.

Documentation: guides at https://lsdtopotools.github.io/lsdtt3/python/index.html and the reference for every function at https://lsdtopotools.github.io/lsdtt3/python_api/index.html. In Python, help(lsdtt3.<function>) shows its docstring.

Install

python -m pip install lsdtt3

Python 3.12 or later, on Linux (x86_64), macOS (Apple Silicon and Intel, macOS 15 or later) and Windows (x64). Install into a virtual, conda or pixi environment rather than your system Python. The wheels bundle GDAL and PROJ, so nothing else needs installing, and they also install the lsdtt3 command-line tools (lsdtt-*) as commands. In Google Colab, run !pip install lsdtt3 in a cell.

There is one wheel per platform, cp312-abi3: it is built against Python's stable ABI, so the same file installs on 3.12, 3.13, 3.14 and later. The same wheels are attached to every GitHub release, together with wheels for older lsdtt3 versions that are not on PyPI; the installation guide explains how to install one of those.

To install from a clone of the repository instead (needs a C++17 compiler, CMake and the GDAL development files), from the repository root:

python -m pip install ./python_bindings

Documentation in the package

Everything is documented in the installed package, so no repository access is needed: help(lsdtt3.fill_pits), help(lsdtt3.FlowInfo) and inspect.signature(...) show parameters, units and return values. For a compact overview written for you or for an AI assistant (Gemini in Colab, for example), print the LLM helper:

import lsdtt3
print(lsdtt3.helper_for_llm("all"))

Quickstart

import numpy as np
import lsdtt3

dem = lsdtt3.Raster.read("input.tif")
resampled = lsdtt3.reproject(dem, epsg=32612, cell_size=30.0)
filled = lsdtt3.fill_pits(resampled)

np.save("filled_dem.npy", filled.to_numpy())
filled.write("filled_dem.tif", format="gtiff")

flow = lsdtt3.FlowInfo(filled)
scope = flow.channel_scope(threshold_contributing_pixels=1000)
network = flow.channel_network(scope)
network.lines_geodataframe().to_file("channels.gpkg")

Structure

python_bindings/
├── CMakeLists.txt          standalone runtime and package build
├── pyproject.toml          Python package metadata
├── bindings/               nanobind module and feature-specific C++ bindings
├── src/lsdtt3/             Python import package
├── examples/               small plotting workflows to check the framework
└── tests/                  synthetic binding tests

Design

The binding exposes minimal data-owning RasterMeta and Raster classes for grid metadata, values, and nodata masks. Analysis is deliberately functional: operations accept rasters and return new rasters rather than wrapping CLI parameter files or mutating inputs.

See Python bindings architecture and API contracts for the backend/API distinction, contract manifests, extension workflow, and verification commands.

Versioning

The Python package shares its version number with lsdtt3: the lsdtt3 0.7.1 wheels are built from the lsdtt3 v0.7.1 release, the same source as the 0.7.1 command-line tools and backend bundles.

Versions up to 0.9.3 are not on PyPI; their wheels (one per Python version) are attached to their GitHub releases. Some early releases have no wheels at all, because the Python API was not supported for every version of the C++ core; that is expected, not a withdrawn release.

A version ending in .postN (for example 0.7.1.post1) is the same source as 0.7.1, rebuilt or repackaged.

Authors

Boris Gailleton — boris.gailleton@univ-rennes.fr Simon Mudd

Metadata

Release files for lsdtt3 0.9.5

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

Built distributions (wheels)

Table of built distributions (wheels) for lsdtt3 0.9.5
File Actions
lsdtt3-0.9.5-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for lsdtt3-0.9.5-cp312-abi3-win_amd64.whl
lsdtt3-0.9.5-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details for lsdtt3-0.9.5-cp312-abi3-manylinux_2_28_x86_64.whl
lsdtt3-0.9.5-cp312-abi3-macosx_15_0_x86_64.whl CPython 3.12 abi3 macOS 15.0+ x86-64 Details for lsdtt3-0.9.5-cp312-abi3-macosx_15_0_x86_64.whl
lsdtt3-0.9.5-cp312-abi3-macosx_15_0_arm64.whl CPython 3.12 abi3 macOS 15.0+ ARM64 Details for lsdtt3-0.9.5-cp312-abi3-macosx_15_0_arm64.whl

Total release size: 209.8 MB

Release files / lsdtt3-0.9.5-cp312-abi3-win_amd64.whl

Download URL lsdtt3-0.9.5-cp312-abi3-win_amd64.whl
Size 47.7 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e52da9c0a2e4cc45a6d1f13d714fcfee1353e57230e2d6ab958640ce044c135f
BLAKE2b-256 checksum
How to use checksums
c16c33de4976816e1cd7e4e6f8ed7a299c8681cc3174a5dc35ceb707284d4a03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / lsdtt3-0.9.5-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL lsdtt3-0.9.5-cp312-abi3-manylinux_2_28_x86_64.whl
Size 35.7 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
04e577a500d06cd4f47b48a8885627e12e54d8a630cdd67f65eaff52c0cde4b1
BLAKE2b-256 checksum
How to use checksums
6759f2c0e9f0ac9239983be0b6b590c01018e1587543a2437c32bda9474f9c2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / lsdtt3-0.9.5-cp312-abi3-macosx_15_0_x86_64.whl

Download URL lsdtt3-0.9.5-cp312-abi3-macosx_15_0_x86_64.whl
Size 66.8 MB
Tags CPython 3.12 abi3 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
daa47cd2493322f7a0adb30178a1fe0adb5a7bf51e1c8299e29a8402fd72580d
BLAKE2b-256 checksum
How to use checksums
bb35a8427d1371b2b02fdcb2d6f992cba5e4d9495c74c95c38d84087465238cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / lsdtt3-0.9.5-cp312-abi3-macosx_15_0_arm64.whl

Download URL lsdtt3-0.9.5-cp312-abi3-macosx_15_0_arm64.whl
Size 59.6 MB
Tags CPython 3.12 abi3 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
998ea1ef70e590cc8982647da87af9ab69d2bf1f5368c0761f505d2e42edc0e8
BLAKE2b-256 checksum
How to use checksums
ebe31d7b2aa5e4c461cac53d3a6613ad547280627fcfd7fbe566199b601eec76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for lsdtt3 0.9.5

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.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for lsdtt3-0.9.5-cp312-abi3-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.9.5 This release

4 release files Full provenance

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