Install & Compatibility
Where this runs
tested against v5.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.360s · 89.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.7s · import 0.354s · 86MB
89MB installed
● package 89MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
lazy_read
✓ from resfo import lazy_read
✗ from resfo.lazy_read import ...
lazy_read is a top-level function, not a submodule.
read
✓ from resfo import read
✗ import resfo; resfo.read()
read is also top-level, but lazy_read is preferred for large files.
write
✓ from resfo import write
write is top-level; arguments changed in v5: no longer accepts dict for data.
Format
✓ from resfo import Format
Enum for FORMATTED/UNFORMATTED file format.
Entry
✓ from resfo import Entry
TypedDict representing a single keyword entry.
Lazily read an unformatted reservoir output file and print each keyword name and data size.
from resfo import lazy_read, Format
# Path to a small .FEGRID file
filepath = 'sample.FEGRID' # replace with actual path
for entry in lazy_read(filepath, fileformat=Format.UNFORMATTED):
print(f"Keyword: {entry.keyword}, Size: {len(entry.data)}")
Errors
Common errors & fixes
TypeError: write() got an unexpected keyword argument 'fileformat'
In older versions, fileformat was a positional argument; in v5 it is a keyword-only argument.
fixUse write(filename, data, fileformat=Format.FORMATTED) instead of positional.
ModuleNotFoundError: No module named 'resfo.lazy_read'
lazy_read is a function, not a submodule; incorrect import path.
fixUse 'from resfo import lazy_read'.
ValueError: data parameter must be an iterable of Entry objects, not dict
Version 5 no longer accepts dict for write(). Data must be a list/tuple of Entry.
fixConstruct a list of Entry objects with keyword and data (numpy array).
Upgrade
Version history
5.0.1latest on PyPI · released Dec 12, 2025
Audit
Dependencies
No dependency data recorded yet.