mediatypes is
- a very simple but fully featured media type (also known as MIME type) mapper for Python.
- written in Python Standard Library
mediatypes supports to
- map filenames to media types
pip install mediatypes
import mediatypes
mediatypes has a BSD-3-Clause license, as found in the LICENSE file.