$npx skillfedfor your agent

python-mimeparse

A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.

Worth itPyPI Python ModulesReleased Aug 2024865.7K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — python_mimeparse-2.0.0-py3-none-any.whl
v2.0.0 · released 2024-08-25 · Python >=3.8

Yes. This is a stable, dependency-free utility for a standard HTTP task. Install it if your application handles content negotiation or needs to parse media-ranges; the low friction and active maintenance make it a safe choice. Skip it only if your framework already provides this functionality built-in.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python wheel with no runtime dependencies.
  • Actively maintained with recent commits and broad Python version support from 3.8 through 3.13 on both CPython and PyPy.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2024-08-25 (719 days) · last repo commit 2026-04-20 · 20 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 865,700 downloads/mo, #4,863 on PyPI

Verify before relying

pip install python-mimeparse

import mimeparse
best = mimeparse.best_match(['application/json', 'text/html'], 'application/json, text/html;q=0.9')
  • Whether the package is actively developed beyond maintenance mode or if it is in stable-only status
  • Real-world performance characteristics when matching against large lists of media-ranges
Same gist for agents: .md · .json

What it is and what it does

Python-MimeParse is a lightweight utility for parsing and matching MIME types in HTTP content negotiation. It implements the media-range matching logic from RFC 7231 Section 5.3.2, allowing applications to determine which content type best satisfies a client's Accept header. The package provides functions to parse MIME types into components, extract quality parameters, and select the highest-quality match from a list of candidates.

It has no external runtime dependencies and supports Python 3.8 through 3.13 on both CPython and PyPy. The module is mature (first released in 2012) and actively maintained, making it a stable choice for any HTTP framework or API server that needs to negotiate content types with clients.

Use it for

  • REST API servers selecting response format (JSON vs XML vs HTML) based on client Accept headers
  • Web frameworks implementing HTTP content negotiation during request routing
  • Middleware that must parse and rank media-ranges to determine the best response encoding
  • Testing HTTP clients that need to verify correct Accept header handling
  • Proxy or gateway applications filtering or transforming responses by MIME type preference

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is a stable, dependency-free utility for a standard HTTP task. Install it if your application handles content negotiation or needs to parse media-ranges; the low friction and active maintenance make it a safe choice. Skip it only if your framework already provides this functionality built-in.

Install

python-mimeparse on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits and broad Python version support from 3.8 through 3.13 on both CPython and PyPy.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install python-mimeparse

import mimeparse
best = mimeparse.best_match(['application/json', 'text/html'], 'application/json, text/html;q=0.9')

Verify before relying

  • Whether the package is actively developed beyond maintenance mode or if it is in stable-only status
  • Real-world performance characteristics when matching against large lists of media-ranges

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 719 days since the last release
Last repo commit
First released
Downloads865,700 / month, #4,863 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 6 - MatureIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python Modules

Evidence: python_mimeparse-2.0.0-py3-none-any.whl

Tags

Capabilities
mime type parsingmedia range matchinghttp content negotiationquality parameter matchingmime type comparisonrfc 7231 mime handlingbest match mime type
Topics
http-content-negotiationmime-type-handling
PyPI keywords
mime-typemedia-type

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “media range matching”

  • python-mimeparseParses and matches MIME types against media-ranges according to RFC…
  • node-semverParses and compares semantic version strings using Node.js semver…
  • rangehttpserverA drop-in replacement for Python's SimpleHTTPServer that adds support…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also mediatype · zope.contenttype · filetype · rfc3339 · rfc3987 · pyRFC3339 · mail-parser · tika · uritools · pyas2lib