Skip to main content

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 nom parser combinators and parallelized with rayon for 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 a LASFile object.
  • 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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

las_read_rs-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl (908.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

Details for the file las_read_rs-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for las_read_rs-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9cf941ba65fb06db5ac23518f9f9bd04e847f6733af2368f5eb13d6ba46bb0e4
MD5 0fcd817aac4470ce3011230f7b19ac51
BLAKE2b-256 486415b879427e92f705ece2ae91dacf95a69f44d10372986a9e5e451079612c

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page