Skip to main content

zope.contenttype

Latest release Supported Python versions https://github.com/zopefoundation/zope.contenttype/actions/workflows/tests.yml/badge.svg https://coveralls.io/repos/github/zopefoundation/zope.contenttype/badge.svg?branch=master Documentation Status

A utility module for content-type (MIME type) handling.

Functions include:

  • Guessing a content type given a name and (optional) body data.

  • Guessing a content type given some text.

  • Parsing MIME types.

Documentation is hosted at https://zopecontenttype.readthedocs.io/en/latest/

Change History

6.0 (2025-09-12)

  • Replace pkg_resources namespace with PEP 420 native namespace.

5.2 (2025-02-14)

  • Add support for Python 3.12, 3.13.

  • Drop support for Python 3.7, 3.8.

  • Call mimetypes.guess_type with parameter strict=False. This recognizes a few more content types related to midi, pict, xul and rtf; for details, see #14.

5.1 (2023-09-21)

  • Add some more MIME types and extensions.

5.0 (2023-03-27)

  • Add support for Python 3.11.

  • Drop support for Python 2.7, 3.5, 3.6.

  • Drop support for deprecated python setup.py test.

4.6 (2022-09-07)

  • Add support for Python 3.9, 3.10.

  • Drop support for Python 3.4.

4.5.0 (2019-12-19)

  • Fix tests on Python 3.8 (#7).

  • Add support for Python 3.8.

4.4 (2018-10-05)

  • Add support for Python 3.7.

4.3.0 (2017-08-10)

4.2.0 (2016-08-26)

  • Add support for Python 3.5.

  • Drop support for Python 2.6.

4.1.0 (2014-12-26)

  • Add support for Python 3.4 and PyPy3.

  • Add support for testing on Travis.

4.0.1 (2013-02-20)

  • Change the file contents argument of guess_content_type from string to bytes. This change has no effect on Python 2.

4.0.0 (2013-02-11)

  • Add some tests for better coverage.

  • Add tox.ini and manifest.

  • Add support for Python 3.3 and PyPy.

  • Drop support for Python 2.4 and 2.5.

3.5.5 (2011-07-27)

  • Properly restore the HTML snippet detection, by looking at the entire string and not just its start.

3.5.4 (2011-07-26)

  • Restore detection of HTML snippets from 3.4 series.

3.5.3 (2011-03-18)

  • Add new mime types for web fonts, cache manifest and new media formats.

3.5.2 (2011-02-11)

  • LP #717289: add video/x-m4v mimetype for the .m4v extension.

3.5.1 (2010-03-23)

  • LP #242321: fix IndexError raised when testing strings consisting solely of leading whitespace.

3.5.0 (2009-10-22)

  • Move the implementation of zope.publisher.contenttype to zope.contenttype.parse, moved tests along.

3.4.3 (2009-12-28)

  • Update mime-type for .js to be application/javascript.

3.4.2 (2009-05-28)

3.4.1 (2009-02-04)

3.4.0 (2007-09-13)

  • First stable release as an independent package.

Release files for zope.contenttype 6.0

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

Source distribution (sdist)

Source distribution for zope.contenttype 6.0
File Size Uploaded
zope_contenttype-6.0.tar.gz 21.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zope.contenttype 6.0
File Interpreter ABI Platform
zope_contenttype-6.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.8 kB

Release files / zope_contenttype-6.0.tar.gz

Download URL zope_contenttype-6.0.tar.gz
Size 21.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fce58a333d9b94a128dda8ceda475c976d13a1af8a3b123b6c768eafe1e92f63
BLAKE2b-256 checksum
How to use checksums
ab6eb37aaa7c02f580e0e68a8191340b56a16f9a733219f73fd2f2bfb7cb792e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / zope_contenttype-6.0-py3-none-any.whl

Download URL zope_contenttype-6.0-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97e992fa4b5a9c722cc4720eceabc624c0a79e8c17952bd3ddb8f7a3d6394a3a
BLAKE2b-256 checksum
How to use checksums
12be3e263fd3ca5a685e764ad1f7ef440ff55933ca176b3c350e3bdf45e9a901
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

6.0 This release

2 release files

5.2

2 release files

5.1

2 release files

5.0

2 release files

4.6

2 release files

4.5.0

2 release files

4.4

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.0

1 release file

4.0.1

1 release file

4.0.0

1 release file

3.5.5

1 release file

3.5.4

1 release file

3.5.3

1 release file

3.5.2

1 release file

3.5.1

1 release file

3.5.0

1 release file

3.4.3

1 release file

3.4.2

1 release file

3.4.1

1 release file

3.4.0

1 release file

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