Skip to main content

High-performance LAS file parser and writer for Python, written in Rust

Project description

las-rs

A high-performance LAS file parser and writer for Python, written in Rust.

Reads and writes LAS 1.2, 2.0, and 3.0 well log files. Designed as a fast, drop-in alternative to lasio.

Installation

pip install las-rs

Prebuilt wheels are available for Python 3.10 -- 3.13 on Linux (x86_64), macOS (ARM), and Windows (x64).

Quick start

import las_rs

# Read a LAS file
las = las_rs.read("welllog.las")

# Access header metadata
print(las.well["WELL"].value)   # Well name
print(las.well["STRT"].value)   # Start depth
print(las.index_unit)           # "M", "FT", etc.

# Access curve data (numpy arrays)
gr = las["GR"]
depth = las.index

# Iterate curves
for name, data in las.items():
    print(name, data.shape)

# Convert to pandas DataFrame
df = las.df()

Reading options

las = las_rs.read(
    "welllog.las",
    encoding="latin-1",              # Auto-detected if omitted
    ignore_header_errors=True,       # Continue past malformed headers
    ignore_data=True,                # Parse headers only (fast)
    null_policy=["-999", "-999.25"], # Custom null markers
    dtypes={"STATUS": str},          # Keep specific curves as strings
)

read() accepts a file path, a pathlib.Path, a string containing LAS content, or any file-like object with a .read() method.

Working with curves

import numpy as np

# Add a curve
las.append_curve("CALC", data=np.zeros(len(las.index)), unit="GAPI", descr="Computed")

# Update a curve
las.update_curve(mnemonic="GR", data=new_data)

# Delete a curve
las.delete_curve(mnemonic="CALC")

# Stack selected curves into a 2D array
matrix = las.stack_curves(["GR", "NPHI", "RHOB"])

# Get full curve metadata
curve = las.get_curve("GR")
print(curve.mnemonic, curve.unit, curve.descr)

Writing and export

# Write LAS file
las.write("output.las", version=2.0)

# Export to CSV
las.to_csv("output.csv", units=True)

# JSON
json_str = las.json

Depth conversion

depth_m  = las.depth_m    # Index converted to meters
depth_ft = las.depth_ft   # Index converted to feet

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 Distribution

las_rs-0.1.1.tar.gz (105.2 kB view details)

Uploaded Source

Built Distributions

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

las_rs-0.1.1-cp313-cp313-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.13Windows x86-64

las_rs-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

las_rs-0.1.1-cp313-cp313-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

las_rs-0.1.1-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12Windows x86-64

las_rs-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

las_rs-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

las_rs-0.1.1-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11Windows x86-64

las_rs-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

las_rs-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

las_rs-0.1.1-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10Windows x86-64

las_rs-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

las_rs-0.1.1-cp310-cp310-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file las_rs-0.1.1.tar.gz.

File metadata

  • Download URL: las_rs-0.1.1.tar.gz
  • Upload date:
  • Size: 105.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for las_rs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 15119ec2181dec49f5264631e17199b8e5bfa0bfd0155435be7233252dd029b6
MD5 c66a01f5b817903fae7dc9caa61d732a
BLAKE2b-256 8d8b6c347d8de966fd5e91916aad5fda0c90298c2c238042d19e9123a24545bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1.tar.gz:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: las_rs-0.1.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for las_rs-0.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ed33920a0e490f90a5576fb3623390fe5b26216e72ed77465511cc2d6f47f460
MD5 e825328e5a9af0a7e54f06f81e4787c4
BLAKE2b-256 103f18a9bb3896cf98be14f5e1bde69f1c62ef542c3e9d1682c92e6215fca3d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for las_rs-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1c37eed0788222b6f6692a80cba25821f96b416c4c5208103a10655e823ea582
MD5 2b9447380b69bf69c0da496e44a9c1d4
BLAKE2b-256 e343844e43098994e6a6e3691cd8af7ad99ed99944d71daf2b6ba66e228638df

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for las_rs-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a8bfe93d6eabf00e53699ab587228091defbb0c851a51dafe2eb4e5c0f31daae
MD5 9eae430834f9c2d97414d6efdddbda04
BLAKE2b-256 36546dfc49c27840fc179d8b41f97663d9e3f9b493fcd95b45778c5c2b6cede6

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: las_rs-0.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for las_rs-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f42ab8f7a3142889c2833de11c278e92f2f17189b29a1e8b23f6090096779bf2
MD5 750be2beff13f6ea95090a9306327cae
BLAKE2b-256 4e8a187a67fa79fcc9bee432fba159633ea157048514f1a659cc443ca72bde32

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for las_rs-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 377c28418c5d490bf25be591206e52a65d3ef7d2d9e6f705b7766ea2178e6c32
MD5 7ffb8448a42ab0cd37d4719b1445d091
BLAKE2b-256 0413afc3991700e4dc4ecb16aa223ba3ac9d7ca733c77963c57a39a97ad7a48a

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for las_rs-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 72989d305240191e063d79f0ebe89fe09859731ed6100a05b9df378bdb499be7
MD5 930c1ae42829f023129a03ae00070106
BLAKE2b-256 42d1036a4223eeb1af66b0ab075d39f10c0b3b15ce57c1355d4507a445501117

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: las_rs-0.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for las_rs-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f219d53018facc890b0b0902827fbc1c983f863e49f1f45b268784d61cc6f9ee
MD5 a0e272aec536fe71ec012b088b725848
BLAKE2b-256 2de1879ff50971ae2964a0f3966684cbb9d48769d57782d7136ec539f81900cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for las_rs-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5802f2dd84c6f35d8fd5d521c14f484f6d5e5242c6d0c13ccfee70aa87ae6b5d
MD5 b740b5e0b459c3fb9da48e8d9f18ca50
BLAKE2b-256 f7c13818e3a8c76a279b1fa3f466f3cabeee06c1945311572150d43054b70ef0

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for las_rs-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bdbb113b3af5635cd7f62dec8a344f4c247947b55277ec840db35b88642396f4
MD5 f85b14bc4467a4b08f9118d05508a58f
BLAKE2b-256 59d7c1b92ac20c92b298791a6a86450061a92a112c91fb2c2a190951564848ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: las_rs-0.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for las_rs-0.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8b2c00ab5353d82bb166c1ddbbe8ae9cc42dc9d8d820a10f62358131c67688d1
MD5 9c1ae9b3d7dd30c3637069bd8421bc5e
BLAKE2b-256 7b977cf6ea0accf5fbe1908c8a7ac5a69ddae70c87328fc4103eae4455c93e58

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for las_rs-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 12619c504d3a2e3ec7ad13b6592bba420af6becd1508a785e094abb9202f628f
MD5 ac9bdc5e6094e6c41a1900f32d5d953b
BLAKE2b-256 483dac0e2f90b015d9d67b67edc4458cc1b913b563897dfe7f0fd2dd8675ea89

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on kkollsga/las-rs

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

File details

Details for the file las_rs-0.1.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for las_rs-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 abf67fd16d064050b1f8ac851d56f8fe438fffeef632916c87c547457087670e
MD5 4c15b069cfa51b3f23212a3bfbd16f44
BLAKE2b-256 3faa5d2ac7f0afe9692afad057f6469f072005fb628b3b480b92cef608822aa7

See more details on using hashes here.

Provenance

The following attestation bundles were made for las_rs-0.1.1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on kkollsga/las-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