Skip to content

tombulled/mediatype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mediatype

Media Type (aka MIME Type) parsing and creation

Installation

pip install mediatype

Usage

>>> import mediatype

Parsing

>>> media_type = mediatype.parse('application/manifest+json')
>>>
>>> media_type
MediaType(
    type='application',
    subtype='manifest',
    suffix='json',
    parameters=None
)
>>>
>>> str(media_type)
'application/manifest+json'

Creation

>>> media_type = mediatype.MediaType(
    type='application',
    subtype='manifest',
    suffix='json',
    parameters=None
)
>>>
>>> str(media_type)
'application/manifest+json'

References

About

Media Type (aka MIME Type) parsing and creation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages