--- id: typecode-libmagic version: "5.39.210531" license: apache-2.0 AND bsd-simplified-darwin AND (bsd-simplified AND public-domain AND bsd-new AND isc AND (bsd-new OR gpl-1.0-plus) AND bsd-original) license_treatment: copyleft maintenance: active --- # typecode-libmagic — A ScanCode path provider plugin to provide a prebuilt native libmagic binary and database. License: copyleft · Maintenance: active · Downloads: 125.8K/mo ## What it is and what it does typecode-libmagic is a plugin for the ScanCode toolkit that bundles a prebuilt native libmagic binary and its associated file-type database. It enables file type detection and analysis by providing the underlying libmagic library as a managed dependency, rather than requiring users to install libmagic separately on their system. The package distributes platform-specific wheels for macOS, Linux, and Windows, handling the complexity of cross-platform binary distribution. The plugin is part of the ScanCode ecosystem and integrates transparently into ScanCode's path provider system. It is licensed under a composite of Apache 2.0 and multiple open-source licenses covering the bundled binaries. The repository is actively maintained, though the most recent release dates to 2021; it serves primarily as a stable, prebuilt dependency for ScanCode users who need reliable file type identification without managing native library installations. Use it for: - Integrate file type detection into ScanCode-based software composition analysis workflows. - Avoid system-level libmagic installation by using a prebuilt, versioned binary via pip. - Ensure consistent file type identification across macOS, Linux, and Windows CI/CD environments. - Bundle libmagic with ScanCode in containerized or isolated Python environments. - Extend ScanCode toolkit with native binary capabilities without manual compilation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a prebuilt native libmagic binary and database as a ScanCode plugin for file type detection and analysis. Yes, if you are using ScanCode toolkit and need reliable file type detection without managing system libmagic installations. The prebuilt binaries simplify cross-platform deployment. However, review the composite license terms carefully if you have proprietary or restricted licensing requirements. The 2021 release date warrants verification that it remains compatible with your ScanCode version. ## Install pip install typecode-libmagic uv add typecode-libmagic poetry add typecode-libmagic ## Installing typecode-libmagic Before you install: Medium install friction due to platform-specific prebuilt binaries (macOS, Linux, Windows wheels provided). Repository is actively maintained with recent commits, though the latest release is from 2021. License in practice: Complex multi-license composition (Apache 2.0 plus multiple BSD, ISC, GPL, and public-domain components) classified as copyleft. Users must comply with the most restrictive terms of bundled binaries; review the full license stack before using in proprietary or restricted contexts. Quickstart: pip install typecode-libmagic import typecode_libmagic # Plugin integrates with ScanCode toolkit for file type detection Requires ScanCode toolkit to be installed; plugin is designed as an extension to ScanCode, not standalone. Verify before relying: - Whether the 2021 release date reflects actual maintenance or if the package is in maintenance-only mode. - Compatibility with current ScanCode toolkit versions and Python 3.9+. - Performance characteristics and accuracy of the bundled libmagic version. ## Package facts - License: apache-2.0 AND bsd-simplified-darwin AND (bsd-simplified AND public-domain AND bsd-new AND isc AND (bsd-new OR gpl-1.0-plus) AND bsd-original) (copyleft) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 125.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags libmagic file type detection, scancode plugin binary, file magic number identification, prebuilt native library plugin, file format recognition, scancode toolkit extension, magic database provider, scancode-plugin, file-type-detection, prebuilt-binary [View on SkillFed](https://skillfed.io/packages/typecode-libmagic) · [View on PyPI](https://pypi.org/project/typecode-libmagic/)