Media Type (aka MIME Type) parsing and creation
pip install mediatype
>>> import mediatype
>>> media_type = mediatype.parse('application/manifest+json')
>>>
>>> media_type
MediaType(
type='application',
subtype='manifest',
suffix='json',
parameters=None
)
>>>
>>> str(media_type)
'application/manifest+json'
>>> media_type = mediatype.MediaType(
type='application',
subtype='manifest',
suffix='json',
parameters=None
)
>>>
>>> str(media_type)
'application/manifest+json'