Skip to content

Python package for parsing Content-Type HTTP headers

License

Notifications You must be signed in to change notification settings

koenwoortman/contenttype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parse Content-Type Headers

Python package for parsing Content-Type HTTP headers

PyPI

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'

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Python package for parsing Content-Type HTTP headers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages