skillfed

cigam

magic

cigam v0.0.3 247.7K downloads/30d#8,687 on PyPI0
Permissive license MIT Abandoned released

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 cigam

uv

uv add cigam

poetry

poetry add cigam

Installing 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

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3 :: OnlyTopic :: Utilities

Tags

file type detectionmagic bytesfile mime typefile extension detectionfile format identificationmagic number detection
file-analysisabandoned

More Utilities packages