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

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.10.0
File Actions
lsdtt3-0.10.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for lsdtt3-0.10.0-cp312-abi3-win_amd64.whl
lsdtt3-0.10.0-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details for lsdtt3-0.10.0-cp312-abi3-manylinux_2_28_x86_64.whl
lsdtt3-0.10.0-cp312-abi3-macosx_15_0_x86_64.whl CPython 3.12 abi3 macOS 15.0+ x86-64 Details for lsdtt3-0.10.0-cp312-abi3-macosx_15_0_x86_64.whl
lsdtt3-0.10.0-cp312-abi3-macosx_15_0_arm64.whl CPython 3.12 abi3 macOS 15.0+ ARM64 Details for lsdtt3-0.10.0-cp312-abi3-macosx_15_0_arm64.whl

Total release size: 210.4 MB

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

Download URL lsdtt3-0.10.0-cp312-abi3-win_amd64.whl
Size 47.9 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
da98a58adef94f6343d7f4d1bdfb04492b8cc53761f67346d2077fa86d0a7251
BLAKE2b-256 checksum
How to use checksums
e61b6471471f83bf5dbc1c83467d9a37b6b81b90c1e92a471999adacec8aca88
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 19, 2026.

Transparency log

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

Download URL lsdtt3-0.10.0-cp312-abi3-manylinux_2_28_x86_64.whl
Size 35.8 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
46e0c0b311ef71d94b2c12f32fe6c3b0e9f4b2b0635ba0e2a477486caba3cf02
BLAKE2b-256 checksum
How to use checksums
99e4c71dcea545300dbf1e32f73dc53610cdf231985a1d13f7b7501e4c2a062d
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 19, 2026.

Transparency log

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

Download URL lsdtt3-0.10.0-cp312-abi3-macosx_15_0_x86_64.whl
Size 66.9 MB
Tags CPython 3.12 abi3 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
7654443b59925066fe800e1682d95a5ad495a683606f7ba9e475e107459a704f
BLAKE2b-256 checksum
How to use checksums
75302e126550a187788834e800d5432fc6a02a08697a4c744427cf5aa19a1cfb
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 19, 2026.

Transparency log

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

Download URL lsdtt3-0.10.0-cp312-abi3-macosx_15_0_arm64.whl
Size 59.7 MB
Tags CPython 3.12 abi3 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
0f682c976b0f79c901e7eb182ac51dd4d8631e00ed8f5a095ebca8e77e8a6a3a
BLAKE2b-256 checksum
How to use checksums
a04f38cc6486a2ba17ea4301560c8d3f92fb914893b4d7e8bdc253aa052b7641
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 19, 2026.

Transparency log

Security for lsdtt3 0.10.0

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.10.0-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 19, 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.

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