segyio
Simple & fast IO for SEG-Y files
What it is and what it does
Segyio is a Python binding to a lightweight C library for reading and writing SEG-Y formatted seismic data files. It provides low-level access to binary headers, textual headers, individual traces, and trace metadata with a native Python interface that integrates with numpy. The library makes assumptions to keep the implementation simple—all traces in a file must have the same sample size, and all lines must have the same number of traces—and is designed primarily for modifying or adapting existing files rather than creating fully spec-compliant files from scratch.
The package targets geophysicists, seismic data processors, and embedded applications that need straightforward SEG-Y interaction without the complexity of a full-featured geophysical framework. It has been in production use since 2016 and supports current Python versions (3.10–3.14). The single runtime dependency is numpy, keeping the footprint minimal.
Use it for:
- Load seismic survey data from SEG-Y files into numpy arrays for analysis and visualization in Jupyter notebooks or scientific pipelines.
- Extract and modify trace headers and binary metadata from SEG-Y files for quality control or data preprocessing workflows.
- Batch convert or resample seismic traces by reading SEG-Y, processing in numpy, and writing modified traces back to disk.
- Integrate SEG-Y file access into custom geophysical applications or embedded systems without heavyweight dependencies.
- Inspect and validate SEG-Y file structure and geometry before feeding data into specialized seismic processing software.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Segyio reads and writes SEG-Y formatted seismic data files, providing a Python interface with numpy integration for accessing binary headers, textual headers, traces, and trace metadata.
Yes, if you work with SEG-Y seismic data and need straightforward Python access. The package is stable (Production/Stable status), has no known vulnerabilities, and carries minimal dependencies. Install friction is moderate due to C bindings, but pre-built wheels are available for common platforms. The copyleft license (LGPL-3.0-or-later) requires derivative works to remain open-source; review this if you plan to modify or embed the library in proprietary code. Maintenance is aging (255 days since last release), so expect slower response to new issues.
Install
segyio on PyPI
pip
pip install segyiouv
uv add segyiopoetry
poetry add segyioInstalling segyio
Before you install
Medium install friction due to compiled C bindings, but pre-built wheels cover Python 3.10–3.12 across macOS, Linux, and Windows architectures. Last release was 255 days ago; repository is active and not archived, though maintenance status is aging.
License in practice
Licensed under LGPL-3.0-or-later (copyleft). Any derivative work or modification must remain open-source under the same license; proprietary applications cannot link statically without compliance review.
Quickstart
pip install segyio
import segyio
import numpy as np
with segyio.open('file.sgy') as f:
traces = np.array([f.trace[i] for i in range(f.tracecount)])
Requires a C compiler and development headers at build time if wheels are unavailable for your platform; Python >=3.10 required.
Verify before relying
- Whether segyio handles SEG-Y variants beyond the documented assumptions (uniform trace length, uniform traces-per-line) without data loss or corruption.
- Performance characteristics for large files (file size thresholds, memory usage patterns).
- Compatibility with non-standard or legacy SEG-Y dialects used in specific geophysical workflows.
Package facts
| License | LGPL-3.0-or-later (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | aging — 255 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 210,953/month — #9,486 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: segyio-1.9.14-cp310-cp310-macosx_10_9_x86_64.whl; segyio-1.9.14-cp310-cp310-macosx_11_0_arm64.whl; segyio-1.9.14-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; segyio-1.9.14-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; segyio-1.9.14-cp310-cp310-manylinux_2_26_i686.manylinux_2_28_i686.whl; segyio-1.9.14-cp310-cp310-win32.whl; segyio-1.9.14-cp310-cp310-win_amd64.whl; segyio-1.9.14-cp311-cp311-macosx_10_9_x86_64.whl; segyio-1.9.14-cp311-cp311-macosx_11_0_arm64.whl; segyio-1.9.14-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; segyio-1.9.14-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; segyio-1.9.14-cp311-cp311-manylinux_2_26_i686.manylinux_2_28_i686.whl; segyio-1.9.14-cp311-cp311-win32.whl; segyio-1.9.14-cp311-cp311-win_amd64.whl; segyio-1.9.14-cp312-cp312-macosx_10_13_x86_64.whl; segyio-1.9.14-cp312-cp312-macosx_11_0_arm64.whl; segyio-1.9.14-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; segyio-1.9.14-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; segyio-1.9.14-cp312-cp312-manylinux_2_26_i686.manylinux_2_28_i686.whl; segyio-1.9.14-cp312-cp312-win32.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
xtgeoXTGeo manipulates subsurface reservoir…
copyleft · top 15,000 on PyPI
obspyObsPy provides a Python framework for…
copyleft · top 15,000 on PyPI
georss-ign-sismologia-clientFetches and parses earthquake event data from…
permissive · top 15,000 on PyPI
kekeWrites trace events in Perfetto/Chrome trace…
permissive · top 15,000 on PyPI
aiofileProvides asynchronous file I/O operations for…
permissive · top 1,000 on PyPI
pyjlsReads and writes JLS (Joulescope) files, a…
permissive · top 15,000 on PyPI
pygtailPygtail reads only the new lines from a log…
copyleft · top 15,000 on PyPI
openseespyOpenSeesPy is a Python interpreter for…
unclear · top 15,000 on PyPI
pyorcPyORC reads and writes Apache ORC files using…
permissive · top 15,000 on PyPI
kaldi-python-ioReads and writes Kaldi binary archives,…
permissive · top 15,000 on PyPI