Skip to main content

lsdtt3 Python bindings

lsdtt3 is a nanobind-based Python interface to LSDTopoTools3.

It contains many of the key functions of the full lsdtt3 topographic analysis environnment. It should be noted that it does not have complete coverage of every tool in lsdtt3. For that you should use the command line interface, which you can read about in the installation guide

Documentation: guides for the python bindings are 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

lsdtt3 python bindings are supported on Python 3.12 or later, on Linux (x86_64), macOS (Apple Silicon and Intel, macOS 15 or later) and Windows (x64). We strongly suggest you install it into a virtual, conda or pixi environment rather than your system Python. The wheels bundle GDAL and PROJ, so nothing else needs installing. You can thank us later since GDAL and PROJ lead to the vast majority of geospatial python conflict. The wheels Salso 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.11.1

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

Total release size: 244.1 MB

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

Download URL lsdtt3-0.11.1-cp312-abi3-win_amd64.whl
Size 55.6 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
b7853271ec0308f0e2c9ecad85253ef1896ea68d6ec381938cc4f0713c967f7e
BLAKE2b-256 checksum
How to use checksums
db154003a1de71bd24201647d0a1d8e328140e4e46edf06b9a4442a0d32b7918
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 26, 2026.

Transparency log

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

Download URL lsdtt3-0.11.1-cp312-abi3-manylinux_2_28_x86_64.whl
Size 42.5 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
6ef5f033ba9902d8984349f3c838f75e49465475fc4e1a4667c3ef1bde82a33e
BLAKE2b-256 checksum
How to use checksums
eeae1ee1ba565e65d21279b9498f55bf50641e7c80873939fe45ae61f6279249
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 26, 2026.

Transparency log

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

Download URL lsdtt3-0.11.1-cp312-abi3-macosx_15_0_x86_64.whl
Size 76.6 MB
Tags CPython 3.12 abi3 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
a2dcd2ddfdb982a944c07acc7fefb351c7c561b9e63156c77b136f97e9ec24ac
BLAKE2b-256 checksum
How to use checksums
9dfb97e9d268d33be71282006bf2ebec996c5b3e1ddf1a60c27dbfb0911b1150
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 26, 2026.

Transparency log

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

Download URL lsdtt3-0.11.1-cp312-abi3-macosx_15_0_arm64.whl
Size 69.5 MB
Tags CPython 3.12 abi3 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
1dca59e6ac48027925a8e8fa92c6b3f1829bac481bc4f0d4d90b4c75e5c9c1d7
BLAKE2b-256 checksum
How to use checksums
a6194dd1147ef4652704c3bb9994e2f65c78c4510afaacf3faec062346dab5d3
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 26, 2026.

Transparency log

Security for lsdtt3 0.11.1

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.11.1-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 26, 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