Registry / data / dissect-util

dissect-util

JSON →
library3.24pypypiunverified

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-util
INSTALL
IMPORT
SIG · DISSECT-UTIL
D
dissect-util
datapythonv3.24
Install
1.7s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.24 · 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.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

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

bytes_to_human
from dissect.util.humanize import bytes_to_human
from dissect.util.humanize import bytes_to_human

This quickstart demonstrates common utility functions from `dissect.util`, including humanizing byte and time values, and using a simple console progress bar.

from dissect.util.humanize import bytes_to_human, time_to_human from dissect.util.progressbar import ProgressBar import time print(f"Humanized bytes: {bytes_to_human(1_234_567_890)}") print(f"Humanized time: {time_to_human(3600 * 24 * 7 * 3 + 12345)}") # Example of using a progress bar print("\nDemonstrating ProgressBar:") with ProgressBar(total=10) as bar: for i in range(10): time.sleep(0.1) # Simulate work bar.next() print("Progress bar complete!")
Debug
Known issues
breakingdissect-util version 3.0.0 and later requires Python 3.10 or higher. Earlier versions supported Python 3.8+.
fix
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.
affects: >=3.0.0
breakingThe `dissect.util.enum` module was moved to `dissect.enum` in version 3.0.0, and `dissect.util.structures` was entirely removed. Code relying on these modules will break.
fix
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`.
affects: >=3.0.0
gotchaAdvanced JSON features, such as `msgspec` backend support for faster serialization/deserialization, require installing the `msgspec` optional dependency.
fix
Install `dissect-util` with the `msgspec` extra: `pip install dissect-util[msgspec]`.
affects: >=3.20.0
Upgrade
Version history
3.24latest on PyPI · released Feb 24, 2026
Audit
Dependencies
msgspecoptionalOptional dependency for faster JSON serialization/deserialization. Enabled via 'msgspec' extra.
Agent activity
27 hits · last 30 days
node
26
OpenAI (training)
1
Resources
dissect-util — pip install dissect-util · libregistry