Media Type parsing and creation
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mediatype-0.1.6.tar.gz
(27.2 kB
view hashes)
Built Distribution
mediatype-0.1.6-py3-none-any.whl
(27.3 kB
view hashes)
Close
Hashes for mediatype-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce468de263736801fe9a5ba2e7a9aa51e8cc8358c31841d91a5c9fa3ee12aa26 |
|
MD5 | cc28cee10099ce9a59f3fdcda51d7988 |
|
BLAKE2b-256 | 28231537392ca622cd7f9715da2adf746757886e28de9bef219b70e202e4b946 |