filetype.py is a small, dependency-free Python package that infers a file type and MIME type by checking a file’s magic number signatures. It also supports getting an inferred extension, discovering types by extension or MIME, and can work from the first 261 bytes of a file or buffer.
Project status
- The upstream repo shows an activity signal, with a last push on 2025-05-02, suggesting ongoing maintenance, but the provided “updates” history does not include any tagged updates after 2022-11-08.
- Apparent update cadence (based only on the provided update summaries) is slow, with the latest described update v1.2.0 dated 2022-11-08, and the previous described update v1.0.11 dated 2022-04-19.
AI summary generated 2 weeks ago
Recent updates
v1.2.0
11/8/2022v1.2.0 expands file type detection significantly by adding new matchers for APNG, AVIF, Zstd, and multiple Microsoft and OpenDocument office document formats. The code also adjusts several signature-matching routines for robustness and to reduce false positives (or broaden detection), including changes that can affect which type is chosen when multiple matchers could match.
v1.0.11
4/19/2022Release v1.0.11 was published on 2022-04-19. No release notes were provided, so the specific changes, bug fixes, or potential breaking changes cannot be determined from the release description alone.