Skip to main content

FilesInfo

CI

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

# Output in JSON format for automated systems
filesinfo payload.exe archive.tar.gz --json

# 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])

Developer Commands (Makefile)

For developers contributing to this repository, a Makefile is provided to easily install dev dependencies, run tests, and format code:

make install  # Installs the package with [dev] dependencies
make test     # Runs the unittest suite
make lint     # Runs ruff and black check
make format   # Automatically formats the codebase with ruff and black
make build    # Builds the .tar.gz and .whl packages
make publish  # Uploads the built packages manually to PyPI via twine

Releasing to PyPI

This project is configured with GitHub Actions to automatically publish to PyPI using Trusted Publishing.

To publish a new release:

  1. Update the version string in pyproject.toml.
  2. Commit and push your changes to GitHub.
  3. On GitHub, go to Releases > Draft a new release.
  4. Create a new tag (e.g. v0.1.3) and publish the release.

The .github/workflows/publish.yml action will automatically build and upload the package to PyPI without needing any tokens (provided Trusted Publishing is configured in your PyPI project settings).

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.

Release files for filesinfo 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for filesinfo 0.2.0
File Size Uploaded
filesinfo-0.2.0.tar.gz 77.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for filesinfo 0.2.0
File Interpreter ABI Platform
filesinfo-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 155.5 kB

Release files / filesinfo-0.2.0.tar.gz

Download URL filesinfo-0.2.0.tar.gz
Size 77.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f5269e8269eeb23ee30cb72121ddf8868787f899d67029adbc45deb28216fcb6
BLAKE2b-256 checksum
How to use checksums
ebc0a10849656ab71e0996bcd08fcdc431b10b939921bfa9fcd505f3023ff2ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / filesinfo-0.2.0-py3-none-any.whl

Download URL filesinfo-0.2.0-py3-none-any.whl
Size 78.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55f893ce637a5d56fb302251aa631c4366283be2ce77fc332025b2e8f7834dc0
BLAKE2b-256 checksum
How to use checksums
1463b693b4be62bf2b3e5232f09971cd67329a4e925a7da0d2428ebea017a068
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page