Dissect.util (dissect-util on PyPI) is a module within the Dissect forensics framework, providing a collection of essential utility functions. It offers functionalities for humanizing data (e.g., bytes, time), robust JSON serialization and deserialization, typecasting, progress bars, and packaging introspection. It is currently at version 3.24 and receives regular updates as part of the broader Dissect project.
pip install dissect-utilVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates common utility functions from `dissect.util`, including humanizing byte and time values, and using a simple console progress bar.
Upgrade your Python environment to 3.10 or newer, or pin your dissect-util dependency to <3.0.0 if compatible with other project requirements.
For `enum`, update imports from `from dissect.util.enum import ...` to `from dissect.enum import ...`. For `structures`, refactor your code as the module has no direct replacement in `dissect.util`.
Install `dissect-util` with the `msgspec` extra: `pip install dissect-util[msgspec]`.