Skip to main content

A package for parsing content-type headers.

Project description

Parse Content-Type Headers

Python package for parsing Content-Type HTTP headers

Usage

from contenttype import ContentType

result = ContentType.parse('application/rss+xml; charset=utf-8')

result.type       # => 'application'
result.subtype    # => 'rss'
result.suffix     # => 'xml'
result.parameters # => {'charset': 'utf-8'}
result.charset    # => 'utf-8'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contenttype-0.1.3.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

contenttype-0.1.3-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file contenttype-0.1.3.tar.gz.

File metadata

  • Download URL: contenttype-0.1.3.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.10

File hashes

Hashes for contenttype-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4108e655d71c90c2121c3f18e8e2e7ca0abcab08f42af8663f2777a79a44003b
MD5 8b62d684ebc171ad24bedb56a6d2f3ea
BLAKE2b-256 b2857ef45233346dee6a9f0fe2a7cb771d08aa3a535ed3530065c77136de9fce

See more details on using hashes here.

File details

Details for the file contenttype-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: contenttype-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.10

File hashes

Hashes for contenttype-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9bf1af61c3658a1a96e5d7ebc0da5ab6d49dbf988d9ff374aa01bd5410a41875
MD5 33b9a1cd7bb604bc038cfc4341b340e7
BLAKE2b-256 918716399364beb4ccf112490b42221278b5998f398f830a49f6cd6d9061666e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page