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
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
contenttype-0.1.3.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for contenttype-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bf1af61c3658a1a96e5d7ebc0da5ab6d49dbf988d9ff374aa01bd5410a41875 |
|
MD5 | 33b9a1cd7bb604bc038cfc4341b340e7 |
|
BLAKE2b-256 | 918716399364beb4ccf112490b42221278b5998f398f830a49f6cd6d9061666e |