Registry / data / fabio
library2025.10.0pypypi✓ verified 89d ago

FabIO is a Python library for reading and writing images produced by 2D X-ray detectors. It supports over 20 file formats (e.g., EDF, Mar, Pilatus, TIFF, HDF5). Version 2025.10.0 requires Python >=3.10. Release cadence is roughly monthly, with versioning based on date (YYYY.MINOR.PATCH).

pip install fabio
INSTALL
IMPORT
SIG · FABIO
F
fabio
datapythonv2025.10.0
Install
6.4s avg
Import
552ms
Disk
321MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v2025.10.0 · 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
musl
py 3.10–3.95 runs
build_error
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 6.4s · import 0.552s · 319MB
321MB installed
● package 321MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fabio
✓ import fabio
openimage
✓ fabio.openimage(filename)
✗ from fabio import openimage
openimage is a function, not a direct importable symbol from the top-level package.

Basic read and write operations using FabIO.

import fabio import numpy as np # Read an image img = fabio.openimage('example.edf') data = img.data print('Shape:', data.shape) # Create and write a simple image from fabio.edfimage import EdfImage new_data = np.random.rand(100, 100) new_img = EdfImage(data=new_data) new_img.write('output.edf') print('Written output.edf')
fabio --version
Debug
Known issues
breakingIn version 2020.x, the 'cbf' module was refactored. Import paths for CBF-specific readers have changed. Use 'from fabio.cbfimage import CbfImage' instead of old 'from fabio.cbf import Cbf'. Affects code written before 2020.
fix
Update imports to use 'fabio.<format>image' submodule pattern.
affects: <2020
deprecatedThe 'fabio.input' and 'fabio.output' modules are deprecated since version 2023. Use the format-specific image classes (e.g., EdfImage, Mar345Image) directly.
fix
Replace 'from fabio.input import EdfInput' with 'from fabio.edfimage import EdfImage' and use the object's methods.
affects: >=2023
gotchaFabIO's openimage() does not guess the file format from extension alone; it reads the header. If the file is malformed, it may raise an unexpected error.
fix
Wrap openimage() in a try/except to catch IOError or ValueError. Validate files offline with 'fabio -c file.edf' command-line tool.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'fabio'
FabIO is not installed, or installed in a different environment.
fix
Run 'pip install fabio' in your active Python environment.
fabio.fabioimage.FabIOImage cannot be instantiated directly
FabIOImage is an abstract base class; users mistakenly try to instantiate it.
fix
Use a concrete subclass like 'from fabio.edfimage import EdfImage' or obtain an image via 'fabio.openimage()'.
AttributeError: 'NoneType' object has no attribute 'data'
openimage() returns None if the file is not recognized. User assumes it always returns an image object.
fix
Check the return value: 'img = fabio.openimage(filename); if img is None: raise IOError("Unsupported format")'.
Upgrade
Version history
2025.10.0latest on PyPI · released Oct 29, 2025
Audit
Dependencies
numpyrequiredCore dependency for array handling
h5pyoptionalRequired for HDF5 support (e.g., Eiger, P10)
PILoptionalRequired for TIFF support
lxmloptionalRequired for Mar/CCP4 format
Agent activity
17 hits · last 30 days
node
14
Resources
fabio — pip install fabio · libregistry