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 details)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4108e655d71c90c2121c3f18e8e2e7ca0abcab08f42af8663f2777a79a44003b |
|
MD5 | 8b62d684ebc171ad24bedb56a6d2f3ea |
|
BLAKE2b-256 | b2857ef45233346dee6a9f0fe2a7cb771d08aa3a535ed3530065c77136de9fce |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bf1af61c3658a1a96e5d7ebc0da5ab6d49dbf988d9ff374aa01bd5410a41875 |
|
MD5 | 33b9a1cd7bb604bc038cfc4341b340e7 |
|
BLAKE2b-256 | 918716399364beb4ccf112490b42221278b5998f398f830a49f6cd6d9061666e |