RoffIO
A (lazy) parser and writer for the Roxar Open File Format (ROFF).
What it is and what it does
Roffio is a parser and writer for Roxar Open File Format (ROFF), a structured binary and ASCII file format used primarily in geoscience applications. It provides both eager and lazy reading modes: eager read loads the entire file into a nested dictionary structure keyed by tag and tag-key names, while lazy read iterates through tags and keys on-demand, useful for extracting specific values from large files without loading everything into memory.
The package handles ROFF's type system (int, float, double, bool, byte, char, and arrays thereof) and maps them to Python and numpy types. It supports files with duplicate tag names by returning lists of dictionaries when collisions occur. Binary ROFF files are automatically distinguished from ASCII variants, and endianness is managed through a filedata tag convention. The library depends on numpy for array handling and dataclasses for internal structure.
Use it for:
- Extract specific values from large geoscience ROFF files without loading the entire file into memory using lazy read.
- Convert ROFF data to Python dictionaries for further processing or analysis in scientific workflows.
- Write structured geoscience data back to ROFF format, preserving type information and tag hierarchy.
- Parse binary ROFF files from legacy geoscience software and convert to modern formats.
- Handle ROFF files with repeated tag names by reading them as lists of dictionaries.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Roffio reads and writes Roxar Open File Format (ROFF) files in both binary and ASCII variants, with support for lazy parsing to minimize memory and disk overhead.
Yes, if you work with Roxar Open File Format data. Install friction is low, maintenance is active, and there are no known vulnerabilities. The copyleft LGPL-3.0 license is a consideration only if you plan to distribute modified versions. The Planning development status suggests the API may not be fully stable, so pin the version or monitor releases if stability is critical.
Install
roffio on PyPI
pip
pip install roffiouv
uv add roffiopoetry
poetry add roffioInstalling RoffIO
Before you install
Low install friction—pure Python wheel with only dataclasses and numpy as runtime dependencies. Active maintenance with recent commits; however, development status is marked as Planning, which may indicate the API is not yet stabilized.
License in practice
Licensed under LGPL-3.0 (copyleft). Any derivative work or modification must be distributed under the same license; static linking or closed-source distribution of modified versions is not permitted.
Quickstart
import roffio
# Read a ROFF file
contents = roffio.read("my/file.roff")
value = contents["tagname"]["keyname"]
# Write a ROFF file
roffio.write("my/file.roff", {"tagname": {"keyname": 1.0}})
# Lazy read to avoid loading entire file
with roffio.lazyread("my/file.roff") as contents:
for tagname, tagkeys in contents:
for keyname, value in tagkeys:
print(tagname, keyname, value)
Verify before relying
- Whether the Planning development status indicates breaking API changes are expected or if it is simply outdated metadata.
- Performance characteristics when handling large ROFF files or deeply nested tag structures.
- Whether endianness detection via the filedata tag's byteswaptest is automatic or requires manual configuration.
Package facts
| License | LGPL-3.0 (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — dataclasses, numpy |
| Maintenance | actively maintained — 478 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 120,388/month — #12,026 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: roffio-1.1.1-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
binaryornotDetermines whether a file is binary or text by…
permissive · top 1,000 on PyPI
fitsiofitsio reads and writes FITS (Flexible Image…
copyleft · top 15,000 on PyPI
bincopyConverts between binary file formats (Motorola…
permissive · top 15,000 on PyPI
dissect.cstructParse binary data using C-like structure…
permissive · top 15,000 on PyPI
fabioFabIO reads and writes 2D X-ray detector images…
permissive · top 15,000 on PyPI
lasioRead and write Log ASCII Standard (LAS) files…
permissive · top 15,000 on PyPI
pyorcPyORC reads and writes Apache ORC files using…
permissive · top 15,000 on PyPI
hurry.filesizeConverts byte counts into human-readable file…
unclear · top 15,000 on PyPI
linear-tsvParses and writes tabular data in Linear TSV…
permissive · top 15,000 on PyPI
resforesfo parses binary and ASCII output files from…
copyleft · top 15,000 on PyPI