Skip to main content

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

Metadata

Release files for mediatype 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mediatype 0.1.6
File Size Uploaded
mediatype-0.1.6.tar.gz 27.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mediatype 0.1.6
File Interpreter ABI Platform
mediatype-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 54.5 kB

Release files / mediatype-0.1.6.tar.gz

Download URL mediatype-0.1.6.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c8e6bd3b4eb7122d99b37982eeb72a482f086dcc13cdf7b8fd557c7009ecf7ae
BLAKE2b-256 checksum
How to use checksums
1b6bd926170bae50fa933c170bb012d8eb24fe3c0f0c815647d63539d65819b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.8.10 Linux/5.4.0-107-generic

Release files / mediatype-0.1.6-py3-none-any.whl

Download URL mediatype-0.1.6-py3-none-any.whl
Size 27.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce468de263736801fe9a5ba2e7a9aa51e8cc8358c31841d91a5c9fa3ee12aa26
BLAKE2b-256 checksum
How to use checksums
28231537392ca622cd7f9715da2adf746757886e28de9bef219b70e202e4b946
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.8.10 Linux/5.4.0-107-generic

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

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