A Python library for parsing, validating, and creating media types (MIME types) per RFC 7231. Current version 0.1.6, with monthly releases. Actively maintained.
pip install mediatypeVerified import paths — ran on the pinned version, not inferred.
Parse and create media type objects.
Manually validate parameter values if strict compliance required.
Compare using .type and .subtype and .suffix separately or convert to string.
Use: from mediatype import MediaType
Provide a valid media type string with a slash, e.g., 'text/plain'.
No dependency data recorded yet.