skillfed

RoffIO

A (lazy) parser and writer for the Roxar Open File Format (ROFF).

roffio v1.1.1 120.4K downloads/30d#12,026 on PyPI5
Copyleft license LGPL-3.0 Active released

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 roffio

uv

uv add roffio

poetry

poetry add roffio

Installing 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

Development Status :: 1 - PlanningLicense :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Programming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

ROFF file parserRoxar Open File Formatbinary file format readerlazy file parsinggeoscience data formatstructured tag-based file I/O
file-formatgeosciencelazy-loading

More Scientific/Engineering packages