hachoir
Package of Hachoir parsers used to open binary files
Decision gist · record as of 2026-08-14
Yes, if you need to inspect or parse binary files and accept the GPL v2 copyleft license. Hachoir is stable, actively maintained, has no external dependencies, and provides both a library API and useful command-line tools. It is not suitable for proprietary projects due to its copyleft license. For one-off binary inspection tasks or open-source work, it is a solid choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or newer.
- The hachoir-urwid command-line tool requires curses support (typically available on Unix-like systems).
- Installation is straightforward with no runtime dependencies.
License · maintenance · safety
GNU GPL v2 (copyleft) — Hachoir is licensed under GNU GPL v2 (copyleft). Any derivative work or modification must also be released under GPL v2; proprietary or closed-source projects cannot use it without separate licensing.
last release 2023-12-12 (976 days) · last repo commit 2026-03-06 · 667 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 430,992 downloads/mo, #6,723 on PyPI
Alternatives
Verify before relying
pip install hachoir
from hachoir.parser import createParser
from hachoir.stream import FileInputStream
parser = createParser("example.bin")
if parser:
for field in parser:
print(field.name, field.value)- Whether the package's binary parsing covers modern file formats or is limited to legacy formats.
- Performance characteristics when parsing very large binary files.
- Whether the editing capabilities support all field types or only a subset.
What it is and what it does
Hachoir is a Python library for parsing and inspecting binary files at the field level. It represents any binary stream as a tree where each node is a typed field—integers, strings, bits, padding, floats, and more—allowing you to navigate and understand the structure of binary data the way you would browse a filesystem. The library includes command-line tools for common tasks: hachoir-grep searches for text patterns in binary files, hachoir-metadata extracts metadata, hachoir-strip removes metadata, and hachoir-urwid provides a text-mode viewer for interactive browsing.
The package has no external runtime dependencies, making installation simple. It is actively maintained and marked as Production/Stable. However, it is licensed under GNU GPL v2 (copyleft), which means any code that uses or modifies it must also be released under GPL v2—a significant constraint for proprietary projects.
Use it for
- Extract metadata from image, audio, or video files without relying on format-specific libraries.
- Reverse-engineer or analyze binary file formats by visually inspecting their structure field by field.
- Search for text patterns or signatures within binary files using hachoir-grep.
- Strip or modify metadata from binary files to remove sensitive information before sharing.
- Develop custom binary parsers by extending Hachoir's field types and parser framework.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to inspect or parse binary files and accept the GPL v2 copyleft license.
Hachoir is stable, actively maintained, has no external dependencies, and provides both a library API and useful command-line tools. It is not suitable for proprietary projects due to its copyleft license. For one-off binary inspection tasks or open-source work, it is a solid choice.
Install
hachoir on PyPI
Before you install
Installation is straightforward with no runtime dependencies. The package is actively maintained as of 2026-03-06 and marked Production/Stable, though the last release was in 2023.
Requires Python 3.6 or newer. The hachoir-urwid command-line tool requires curses support (typically available on Unix-like systems).
License in practice
Hachoir is licensed under GNU GPL v2 (copyleft). Any derivative work or modification must also be released under GPL v2; proprietary or closed-source projects cannot use it without separate licensing.
Quickstart
pip install hachoir
from hachoir.parser import createParser
from hachoir.stream import FileInputStream
parser = createParser("example.bin")
if parser:
for field in parser:
print(field.name, field.value)
Verify before relying
- Whether the package's binary parsing covers modern file formats or is limited to legacy formats.
- Performance characteristics when parsing very large binary files.
- Whether the editing capabilities support all field types or only a subset.
Package facts
| License | GNU GPL v2 copyleft |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 976 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 430,992 / month, #6,723 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Console :: CursesEnvironment :: PluginsIntended Audience :: DevelopersIntended Audience :: EducationLicense :: OSI Approved :: GNU General Public License (GPL)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: MultimediaTopic :: Scientific/Engineering :: Information AnalysisTopic :: Software Development :: DisassemblersTopic :: Software Development :: InterpretersTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: FilesystemsTopic :: Text ProcessingTopic :: Utilities |
Evidence: hachoir-3.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “hex viewer field-based”
- hachoirHachoir parses and displays binary files as a tree of typed fields,…
- TwiggyTwiggy is a structured logging library that provides a Pythonic API…
- hexdumpConverts binary data to hexadecimal text representation and restores…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also tibs · bitstring · pycnite · pyxbe · binapy · graycode · polyfile-weave · streamlit-pdf · dissect.cstruct · dissect.hypervisor