cigam
magic
What it is and what it does
cigam is a file type detection library that reads magic bytes from files to determine their type, MIME classification, and appropriate extension. It wraps the core logic needed to inspect a file's binary signature and report back structured metadata about what kind of file it is.
The package is no longer maintained—the last release was in 2018 and the repository was archived. The author has explicitly directed users to a successor project for ongoing support. While installation is frictionless and the MIT license is permissive, adopting this package means accepting that no bug fixes or compatibility updates will be provided.
Use it for:
- Identify file types in a batch processing pipeline by reading magic bytes instead of relying on file extensions.
- Determine the MIME type of uploaded files in a web application to validate content before processing.
- Extract the correct file extension for files that may have been renamed or stripped of their original extension.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Detects and reports file types, MIME types, and extensions by analyzing file magic bytes.
No. The package is abandoned and explicitly superseded by the author's newer project. Although it has no dependencies and installs easily, you should use the recommended successor instead. If you are already using cigam in legacy code, it may continue to work, but do not start new projects with it.
Install
cigam on PyPI
pip
pip install cigamuv
uv add cigampoetry
poetry add cigamInstalling cigam
Before you install
Installation is frictionless with no runtime dependencies, but the package is abandoned and has not been maintained since 2021. The repository is archived and the author has explicitly directed users to a successor project.
License in practice
Licensed under MIT (permissive), so you may use, modify, and distribute it freely with minimal restrictions.
Quickstart
pip install cigam
from cigam import Magic
m = Magic('test.dex')
print(m.get_type())
print(m.get_extension())
print(m.get_mime())
Verify before relying
- Whether the package works correctly with modern Python versions despite lack of maintenance
- Whether file type detection remains accurate for current file formats
- Why monthly downloads remain at 247670 despite the package being abandoned and explicitly superseded
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,068 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 247,670/month — #8,687 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cigam-0.0.3-py3-none-any.whl
Keywords: file type, file magic
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
python-magicIdentifies file types by reading file headers…
permissive · top 1,000 on PyPI
filetypeInfers file type and MIME type by examining…
permissive · top 1,000 on PyPI
python-magic-binIdentifies file types by examining file headers…
permissive · top 15,000 on PyPI
magikaMagika identifies file types using deep…
permissive · top 5,000 on PyPI
file-magicfile-magic provides a Python interface to…
permissive · top 15,000 on PyPI
libmagicProvides Python bindings to the libmagic…
copyleft · top 15,000 on PyPI
puremagicIdentifies file types by analyzing magic…
permissive · top 5,000 on PyPI
typecodeDetects file types and MIME types using…
permissive · top 15,000 on PyPI
zope.contenttypeGuesses MIME types from filenames and body…
unclear · top 15,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI