A high-performance LAS (Log ASCII Standard) file reader written in Rust
Project description
LAS_read_rs
LAS_read_rs is a high-performance Python library for reading LAS (Log ASCII Standard) files, written in Rust using pyo3 and nom. It is designed to be a faster alternative to pure Python implementations, capable of parsing large geophysical log files efficiently.
Features
- 🚀 High Performance: Built with Rust's
nomparser combinators and parallelized withrayonfor maximum speed. - 🧵 Multi-threaded: parses the data section (
~ASCII) in parallel chunks. - 📦 Easy Installation: Distributed as a standard Python wheel via PyPI.
- 🐍 Pythonic Interface: Simple
read()function returning aLASFileobject. - ✅ Standard Compliant: Supports LAS 2.0 (and 1.2 compatible structure).
Benchmarks
Parsed a LAS file with 100,000 lines of data:
- LAS_read_rs: ~0.8s (Pure parsing time) / ~3.8s (Including CLI overhead benchmarks)
- Pure Python: Significantly slower (typically 10x-50x slower depending on implementation).
Installation
pip install LAS_read_rs
Usage
import lasio_rs
# Read a LAS file
las = lasio_rs.read("path/to/well_log.las")
# Access Version Information
print(las.version)
# Output (JSON representation):
# {
# "VERS": {"mnemonic": "VERS", "value": "2.0", "descr": "CWLS LOG ASCII STANDARD - VERSION 2.0"},
# "WRAP": {"mnemonic": "WRAP", "value": "NO", "descr": "One line per depth step"}
# }
# Access Well Metadata (e.g., STRT, STOP, NULL)
# Note: Currently exposed mainly via debug getters or verifying structure
# Future versions will expose a full dictionary-like interface.
print(f"Well Name: {las.well_name}")
Structure
The library maps LAS sections to Rust structs:
~Version->las.version~Well->las.well~Curves->las.curves(Metadata)~ASCII-> Data columns (Stored internally as efficient vectors)
Building from Source
Requirements:
- Python 3.7+
- Rust (cargo, rustc)
maturin
pip install maturin
maturin develop --release
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
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 las_read_rs-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: las_read_rs-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 908.7 kB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cf941ba65fb06db5ac23518f9f9bd04e847f6733af2368f5eb13d6ba46bb0e4
|
|
| MD5 |
0fcd817aac4470ce3011230f7b19ac51
|
|
| BLAKE2b-256 |
486415b879427e92f705ece2ae91dacf95a69f44d10372986a9e5e451079612c
|
Provenance
The following attestation bundles were made for las_read_rs-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl:
Publisher:
flujodetrabajo.yml on jemilianofl/lasio-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
las_read_rs-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl -
Subject digest:
9cf941ba65fb06db5ac23518f9f9bd04e847f6733af2368f5eb13d6ba46bb0e4 - Sigstore transparency entry: 911237956
- Sigstore integration time:
-
Permalink:
jemilianofl/lasio-rs@85813c9a62a866c4f01e65cb40d48690b31b2ae8 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/jemilianofl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
flujodetrabajo.yml@85813c9a62a866c4f01e65cb40d48690b31b2ae8 -
Trigger Event:
push
-
Statement type: