FilesInfo is a Python toolkit for mapping file extensions to rich metadata and recommended execution platforms. It ships with an extensive extension catalog, powerful lookup helpers, and a convenient CLI for exploring the data.
Clone the repository and install the package in editable mode (or publish to PyPI/TestPyPI and install from there):
pip install .The installation exposes the filesinfo command-line tool automatically.
# Inspect platform recommendations for file names
filesinfo payload.exe archive.tar.gz
# List extensions supported on specific platforms
filesinfo --platform windows --platform linux --include-cross-platform
# Show detailed metadata for each match
filesinfo --platform macos --details
# Review dataset validation warnings
filesinfo --show-dataset-issuesFor backwards compatibility the legacy run_demo.py script simply forwards to the same CLI entry point.
from filesinfo import file_info_expert, get_extensions_for_platform
print(file_info_expert("payload.exe"))
# ['windows']
print(get_extensions_for_platform("linux", include_cross_platform=False)[:10])Regenerate the MIME-driven extension dataset whenever you want the latest upstream metadata:
python3 scripts/update_extension_dataset.pyThe command writes a fresh filesinfo/data/external_extensions.json file that is packaged with the library.
python3 -m unittestThe test suite verifies the core lookups, platform alias behaviour, and integration with the external dataset.