Skip to main content
This module provides basic functions for handling mime-types. It can handle

matching mime-types against a list of media-ranges. See section 14.1 of the HTTP specification [RFC 2616] for a complete explanation.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1

Contents:
  • parse_mime_type(): Parses a mime-type into its component parts.

  • parse_media_range(): Media-ranges are mime-types with wild-cards and a ‘q’ quality parameter.

  • quality(): Determines the quality (‘q’) of a mime-type when compared against a list of media-ranges.

  • quality_parsed(): Just like quality() except the second parameter must be pre-parsed.

  • best_match(): Choose the mime-type with the highest quality (‘q’) from a list of candidates.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mimeparse-0.1.3.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file mimeparse-0.1.3.tar.gz.

File metadata

  • Download URL: mimeparse-0.1.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mimeparse-0.1.3.tar.gz
Algorithm Hash digest
SHA256 534ff6feefe1cd03984f444e6415aacc79c0a85f3b868ec41a2fd5003004c31e
MD5 03ce207391454db37279e78ce2112365
BLAKE2b-256 380c7b02c30765658744acc51876781c580234cb1110296b231a3a524722f9c7

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.4

This release

0.1.3 This release

1 file

0.1.2

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page