{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/8"}],"enrichment":{"capability":"Identifies file types by examining file headers using libmagic, exposing the Unix `file` command's functionality to Python with pre-built binaries for Windows, macOS, and Linux.","skillfed_tags":["file-identification","mime-type-detection","binary-analysis"],"use_cases":["Detect file types in upload handlers to validate user-submitted files without relying on extensions.","Identify MIME types for web servers or APIs serving files with correct Content-Type headers.","Analyze compressed archives by detecting both the outer format and decompressed content type.","Validate binary file integrity by confirming expected file signatures before processing.","Build content-aware file routing or filtering systems that classify files by their actual type."],"what_it_does":"python-magic-bin is a Python wrapper around libmagic, the file-type identification library that powers the Unix `file` command. It identifies files by examining their headers against a predefined database of file signatures, returning human-readable descriptions or MIME types. The package is a fork of python-magic that bundles pre-compiled libmagic binaries for Windows, macOS, and Linux, eliminating the need to install libmagic separately on those platforms.\n\nYou can use it two ways: the simple functional API (magic.from_file, magic.from_buffer) for quick file identification, or the Magic class for finer control over options like MIME mode, compression detection, and character encoding. The package has no runtime dependencies beyond the bundled libmagic binaries, making it straightforward to integrate into file-processing pipelines, content-type detection systems, or validation workflows.","worth_installing":"Yes, if you need reliable file-type detection and want to avoid installing libmagic separately on Windows or macOS. The package is stable with no known vulnerabilities. However, verify compatibility with your Python version; the fork's last release was 2017-10-02 and the project is dormant."},"id":"python-magic-bin","links":{"html":"https://skillfed.io/packages/python-magic-bin","md":"https://skillfed.io/packages/python-magic-bin.md","pypi":"https://pypi.org/project/python-magic-bin/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2017-10-02","license_spdx":null,"license_treatment":"permissive","name":"python-magic-bin","python_support":"unspecified","summary":"File type identification using libmagic binary package"},"popularity":{"monthly_downloads":204568,"position":9604,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.4.14"}
