laterite
A Rust-backed reader, writer and validator for the
AGS4 geotechnical data format, with a
modern, born-typed polars API. A faster drop-in for
python-ags4's
AGS4 module — swap from python_ags4 import AGS4 for
from laterite import compat as AGS4.
Install
pip install laterite # base AGS4 (polars + duckdb, pyarrow-free)
pip install "laterite[compat]" # + pandas (python-ags4 drop-in)
Requires Python ≥ 3.12.
Use
import laterite
# Validate — errors + warnings by default (FYI is opt-in)
report = laterite.validate("delivery.ags")
report.is_valid
for rule, findings in report.by_rule().items():
print(rule, len(findings))
# Read born-typed columns: a 2DP heading is a float, a DT a datetime
ags = laterite.read("delivery.ags")
ags.groups # ['PROJ', 'LOCA', 'SAMP', …]
ags["LOCA"]["LOCA_GL"][0] # → 12.3 (a polars DataFrame per group)
# Repair a dirty file into a fresh handle, then keep working with it
fixed = ags.fix(risky=True) # pads short rows, transliterates non-ASCII, …
# Typed graph: PROJ → LOCA → SAMP → …
from laterite.ags4 import read_typed
proj = read_typed("delivery.ags")
for loca in proj.locas:
print(loca.loca_id, loca.loca_gl)
# python-ags4 drop-in — swap the import, keep your code
from laterite import compat as AGS4
tables, headings = AGS4.AGS4_to_dataframe("delivery.ags")
AGS4.dataframe_to_AGS4(tables, headings, "round-trip.ags")
The native API returns born-typed polars frames by default (or pandas
with read(..., backend="pandas")) — both pyarrow-free, read back from a
Python-owned in-memory DuckDB engine.
One engine, every stack
laterite on PyPI is the Python surface of one Rust AGS4 engine, shared
across:
| Surface | Package | Get it |
|---|---|---|
| Python | laterite — PyPI |
pip install laterite |
| Node.js | laterite — npm |
npm install laterite |
| Rust / CLI | lat-check |
GitHub Releases |
| DuckDB | laterite_ags4 — community extension |
INSTALL laterite_ags4 FROM community; |
| Browser | validator + data explorer — WASM | open in a browser |
Faster than python-ags4
Validation throughput vs python-ags4 1.2.0 (macOS arm64), agreeing on the
same findings — speed not at the cost of diagnostic coverage: ~17× on a
512 KB file, ~8× from 50 MB to 1 GB (a 557 MB file validates in ~6.5 s vs
~53 s). Full tables + methodology in the
repo README.
Parity + clean-room
122 / 131 of python-ags4 1.2.0's own test suite passes through
laterite.compat (the 9 remaining are deliberate non-closures). The validator
is clean-room from the AGS4 spec — python-ags4 is LGPL-3.0, and the
separation is what lets laterite ship under MIT. Details:
COMPAT.md ·
OBSERVATIONS.md.
Docs
Full documentation — Learn, Cookbook, Concepts, and the Python API reference — at https://niko86.github.io/laterite/docs/.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file laterite-0.6.1.tar.gz.
File metadata
- Download URL: laterite-0.6.1.tar.gz
- Upload date:
- Size: 820.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaeba4922a9d1782c1c041b76b11071ed9bbebd46d87fdbfbb13dd7d29a76588
|
|
| MD5 |
2b3fc002704fd64fcd31f721a6570653
|
|
| BLAKE2b-256 |
734623f80073e832756e03303b76dbcf820cdde7d3ff4761e3eac78bdbe117c9
|
Provenance
The following attestation bundles were made for laterite-0.6.1.tar.gz:
Publisher:
release.yml on niko86/laterite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
laterite-0.6.1.tar.gz -
Subject digest:
eaeba4922a9d1782c1c041b76b11071ed9bbebd46d87fdbfbb13dd7d29a76588 - Sigstore transparency entry: 2072426742
- Sigstore integration time:
-
Permalink:
niko86/laterite@c3e44f9faf54b1d20eda83b0bd4229d278881305 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/niko86
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c3e44f9faf54b1d20eda83b0bd4229d278881305 -
Trigger Event:
push
-
Statement type:
File details
Details for the file laterite-0.6.1-cp312-abi3-win_amd64.whl.
File metadata
- Download URL: laterite-0.6.1-cp312-abi3-win_amd64.whl
- Upload date:
- Size: 7.0 MB
- Tags: CPython 3.12+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5b303b8723b39702d1738f4a67c4b38f83b76577f75cdb514803ffbf476bcbd
|
|
| MD5 |
7505b3eea8bed11f8ad9500f520a35e5
|
|
| BLAKE2b-256 |
3db080b38615e7b263a0cfc2c805557f7f2d2cc37306f6b80354d2b53a391648
|
Provenance
The following attestation bundles were made for laterite-0.6.1-cp312-abi3-win_amd64.whl:
Publisher:
release.yml on niko86/laterite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
laterite-0.6.1-cp312-abi3-win_amd64.whl -
Subject digest:
b5b303b8723b39702d1738f4a67c4b38f83b76577f75cdb514803ffbf476bcbd - Sigstore transparency entry: 2072426854
- Sigstore integration time:
-
Permalink:
niko86/laterite@c3e44f9faf54b1d20eda83b0bd4229d278881305 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/niko86
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c3e44f9faf54b1d20eda83b0bd4229d278881305 -
Trigger Event:
push
-
Statement type:
File details
Details for the file laterite-0.6.1-cp312-abi3-manylinux2014_x86_64.whl.
File metadata
- Download URL: laterite-0.6.1-cp312-abi3-manylinux2014_x86_64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.12+
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c1a8852b1c0d4c1eb3a28e31110e94cc8d521fb85a5faf2627eaa5d57f41b81
|
|
| MD5 |
a4fb107653c1bc3606ba4a28f4fb5dce
|
|
| BLAKE2b-256 |
5fbad707dcdf6af159b9ee48fbf57449ea9b265d106b66822ed16257d6cfcb32
|
Provenance
The following attestation bundles were made for laterite-0.6.1-cp312-abi3-manylinux2014_x86_64.whl:
Publisher:
release.yml on niko86/laterite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
laterite-0.6.1-cp312-abi3-manylinux2014_x86_64.whl -
Subject digest:
2c1a8852b1c0d4c1eb3a28e31110e94cc8d521fb85a5faf2627eaa5d57f41b81 - Sigstore transparency entry: 2072426794
- Sigstore integration time:
-
Permalink:
niko86/laterite@c3e44f9faf54b1d20eda83b0bd4229d278881305 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/niko86
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c3e44f9faf54b1d20eda83b0bd4229d278881305 -
Trigger Event:
push
-
Statement type:
File details
Details for the file laterite-0.6.1-cp312-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: laterite-0.6.1-cp312-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.0 MB
- Tags: CPython 3.12+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6814fbbbc7d0ebc5045a3b5b70f58e8968eb7ed1b6299edc27f01a6808521ec3
|
|
| MD5 |
c6db73de0bb0ea37f6aad387828edc78
|
|
| BLAKE2b-256 |
0594c5cc0c1ce4a01bf278897ffd905990b0489329591cce8be0eec1f4fe839c
|
Provenance
The following attestation bundles were made for laterite-0.6.1-cp312-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on niko86/laterite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
laterite-0.6.1-cp312-abi3-macosx_11_0_arm64.whl -
Subject digest:
6814fbbbc7d0ebc5045a3b5b70f58e8968eb7ed1b6299edc27f01a6808521ec3 - Sigstore transparency entry: 2072426903
- Sigstore integration time:
-
Permalink:
niko86/laterite@c3e44f9faf54b1d20eda83b0bd4229d278881305 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/niko86
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c3e44f9faf54b1d20eda83b0bd4229d278881305 -
Trigger Event:
push
-
Statement type: