identify
File identification library for Python
Install
identify on PyPI
pip
pip install identifyuv
uv add identifypoetry
poetry add identifyPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 118 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: identify-2.6.19-py2.py3-none-any.whl
About identify
from the package's own PyPI description — quoted content, verbatim
build status (image) pre-commit.ci status (image)
identify
File identification library for Python.
Given a file (or some information about a file), return a set of standardized tags identifying what the file is.
Installation
pip install identify
Usage
With a file on disk
If you have an actual file on disk, you can get the most information possible (a superset of all other methods):
>>> from identify import identify
>>> identify.tags_from_path('/path/to/file.py')
{'file', 'text', 'python', 'non-executable'}
>>> identify.tags_from_path('/path/to/file-with-shebang')
{'file', 'text', 'shell', 'bash', 'executable'}
>>> identify.tags_from_path('/bin/bash')
{'file', 'binary', 'executable'}
>>> identify.tags_from_path('/path/to/directory')
{'directory'}
>>> identify.tags_from_path('/path/to/symlink')
{'symlink'}
When using a file on disk, the checks...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Identifies file types by examining file paths, names, shebangs, and content, returning standardized tags for classification. Optionally identifies license types from LICENSE files.
Low friction: pure Python wheel with no runtime dependencies and active maintenance (118 days since last release, last commit 2026-07-15).
MIT license permits commercial and private use with minimal restrictions; attribution required.
Usage
pip install identify
from identify import identify
tags = identify.tags_from_path('/path/to/file.py')
print(tags) # {'file', 'text', 'python', 'non-executable'}
Requires Python 3.10 or later.
Verdict: Lightweight, actively maintained file identification library with no dependencies and permissive licensing. Suitable for build tools, linters, and file-processing workflows. No known vulnerabilities and top-1000 PyPI popularity.
Needs verification
- Performance characteristics on large files or high-volume classification tasks
- Accuracy of license detection compared to other identification methods
- Completeness of file type coverage for less common formats
Similar packages
permissive · top 1,000 on PyPI
shellinghampermissive · top 1,000 on PyPI
watchdogpermissive · top 1,000 on PyPI
license-expressionpermissive · top 1,000 on PyPI
Levenshteincopyleft · top 1,000 on PyPI
cbor2permissive · top 1,000 on PyPI
executingpermissive · top 1,000 on PyPI
tensorboardpermissive · top 1,000 on PyPI
referencingpermissive · top 100 on PyPI
cfgvpermissive · top 1,000 on PyPI