--- id: standard-imghdr version: "3.13.0" license: PSF-2.0 license_treatment: permissive maintenance: dormant --- # standard-imghdr — Standard library imghdr redistribution. "dead battery". License: permissive · Maintenance: dormant · Downloads: 987.7K/mo ## What it is and what it does This package redistributes the `imghdr` module, which was removed from Python's standard library in version 3.13 as part of PEP 594's "dead batteries" initiative. The module provides a simple utility to determine image file types by reading and analyzing their file headers, returning a string identifier like 'png', 'jpeg', 'gif', or None if the format is not recognized. It is intended for projects that depend on the original `imghdr` module and need to maintain compatibility with Python 3.13 and later. The package contains minimal compatibility support only—it is an archive of the removed standard library code made installable via pip, not an actively developed alternative. If you need advanced image format detection or additional features, you should consider other actively maintained packages. Use it for: - Migrate legacy code that uses `imghdr` to Python 3.13+ without rewriting image type detection logic. - Quickly identify image file formats in batch processing or validation workflows where only basic format detection is needed. - Maintain backward compatibility in libraries that expose `imghdr` as part of their public API. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides the `imghdr` module, a Python standard library utility removed in Python 3.13 that identifies image file types by examining their headers. Yes, if you have existing code that depends on `imghdr` and need to run it on Python 3.13+. Install it as a drop-in replacement for the removed standard library module. No, if you are starting a new project—consider a more actively maintained image library instead. The package itself is stable (it is a static archive of removed code) but receives no active development. ## Install pip install standard-imghdr uv add standard-imghdr poetry add standard-imghdr ## Installing standard-imghdr Before you install: Low install friction with no runtime dependencies. Maintenance is dormant (last release 653 days ago), but the package is archived only as a redistribution of removed standard library code, so inactivity is expected and not a signal of neglect. License in practice: Licensed under PSF-2.0 (Python Software Foundation License), a permissive license. You can use this package freely in most contexts without license concerns. Quickstart: pip install standard-imghdr import imghdr image_type = imghdr.what('image.png') print(image_type) # Returns 'png' or None if not recognized Verify before relying: - Whether the redistributed imghdr module maintains full compatibility with the original standard library implementation across all supported Python versions. - Whether this package will receive updates if Python's removal of imghdr introduces breaking changes in future versions. ## Package facts - License: PSF-2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 987.7K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags image file type detection, imghdr standard library, removed stdlib modules, image format identification, python dead batteries, identify image headers, stdlib-redistribution, image-detection [View on SkillFed](https://skillfed.io/packages/standard-imghdr) · [View on PyPI](https://pypi.org/project/standard-imghdr/)