{
 "kind": "tool",
 "slug": "filetype",
 "path": "tools/filetype/",
 "name": "filetype",
 "maker": null,
 "density": "basic",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Files, images and media",
   "tools/files-media/"
  ]
 ],
 "lead": "Detect file type and MIME type from file data without external dependencies.",
 "chips": [
  {
   "label": "Files, images and media",
   "path": "tools/files-media/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install filetype"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/h2non/filetype.py"
  },
  {
   "label": "Website",
   "href": "https://github.com/h2non/filetype.py"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from PyPI classifier.",
   "src": "https://github.com/h2non/filetype.py"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Quiet for a year",
   "status": "cond",
   "sub": "Last change May 2, 2025",
   "note": "Latest GitHub release Nov 8, 2022. ",
   "src": "https://github.com/h2non/filetype.py"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "3 projects",
   "status": "info",
   "sub": "#127 of 281 in its category",
   "note": "Dependency in 3 public GitHub projects set up for AI coding agents that we scanned (0.0%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What filetype does",
   "parts": [
    {
     "t": "prose",
     "text": "Detect file type and MIME type from file data without external dependencies."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "filetype popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "58",
       "of": "/ 100",
       "l": "Gid Score, #1156 overall"
      },
      {
       "n": "11.8M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "779",
       "l": "GitHub stars"
      },
      {
       "n": "3",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How filetype is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "filetype is a dependency in 3 of the 6,258 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750); counting those, it appears in 363 projects, and what it is used with below comes from all of them.",
      "Projects that use it most often also use Pydantic (96.7%), NumPy (96.4%), AnyIO (95.3%)."
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 96.7% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 96.4% of its projects",
       "v": "NumPy",
       "path": "tools/numpy/"
      },
      {
       "l": "In 95.3% of its projects",
       "v": "AnyIO",
       "path": "tools/anyio/"
      },
      {
       "l": "In 95.0% of its projects",
       "v": "charset-normalizer",
       "path": "tools/charset-normalizer/"
      },
      {
       "l": "In 94.8% of its projects",
       "v": "Click",
       "path": "tools/click-py/"
      },
      {
       "l": "In 94.5% of its projects",
       "v": "OpenAI Python Library",
       "path": "tools/openai-pypi/"
      },
      {
       "l": "In 93.9% of its projects",
       "v": "PyYAML",
       "path": "tools/pyyaml/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about filetype",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "More in Files, images and media",
       "path": "tools/files-media/",
       "items": [
        {
         "text": "Sharp",
         "path": "tools/sharp/"
        },
        {
         "text": "Pillow",
         "path": "tools/pillow/"
        },
        {
         "text": "Nodemailer",
         "path": "tools/nodemailer/"
        },
        {
         "text": "jsPDF",
         "path": "tools/jspdf/"
        },
        {
         "text": "SheetJS",
         "path": "tools/xlsx/"
        },
        {
         "text": "qrcode (JavaScript)",
         "path": "tools/qrcode-npm/"
        },
        {
         "text": "JSZip",
         "path": "tools/jszip/"
        },
        {
         "text": "PDF.js",
         "path": "tools/pdfjs-dist/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "filetype",
       "me": true,
       "facts": [
        "MIT",
        "Gid 58",
        "11.8M/wk"
       ]
      }
     ],
     "more": "Compare filetype with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "pip install filetype"
    },
    {
     "t": "gap",
     "text": "No step-by-step start for filetype yet: we have not written its hand-checked card."
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi filetype"
  ],
  [
   "Category",
   "Files, images and media"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Gid Score",
   "58.3"
  ],
  [
   "Rank in category",
   "#127 of 281"
  ],
  [
   "GitHub",
   "h2non/filetype.py"
  ],
  [
   "Last change",
   "May 2, 2025"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/h2non.png"
}