File extension metadata and platform selection utilities
Project description
FilesInfo
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.
Installation
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.
Command-Line Usage
# 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-issues
For backwards compatibility the legacy run_demo.py script simply forwards to the same CLI entry point.
Python API Example
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])
Updating the Dataset
Regenerate the MIME-driven extension dataset whenever you want the latest upstream metadata:
python3 scripts/update_extension_dataset.py
The command writes a fresh filesinfo/data/external_extensions.json file that is packaged with the library.
Tests
python3 -m unittest
The test suite verifies the core lookups, platform alias behaviour, and integration with the external dataset.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file filesinfo-0.1.2.tar.gz.
File metadata
- Download URL: filesinfo-0.1.2.tar.gz
- Upload date:
- Size: 73.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7935f9450313c93b6f5e44daf31504e39bc9107ec1a10472977865b8d7727029
|
|
| MD5 |
483533d1d717ca686c5df09ed485bcd2
|
|
| BLAKE2b-256 |
cfc1b3d44da628f2187ebc1aafb6f6185406b73fabb0c442bd4946546c41bb0f
|
File details
Details for the file filesinfo-0.1.2-py3-none-any.whl.
File metadata
- Download URL: filesinfo-0.1.2-py3-none-any.whl
- Upload date:
- Size: 74.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33819e50a94d5d120093d4d4c6e5ca20c84169d113e8801b88d02d02a0034890
|
|
| MD5 |
57b05649571dd4fa7bc228b72a0a453e
|
|
| BLAKE2b-256 |
85f80ca3d227c7906427a0209972b65995ac12285caf641a7736e6690d704507
|