Headers: Keep-It=Simple; And=Stupid.
Project description
Welcome to Headers for Human 👋 
So simple, you may fall in love at first sight ! With auto-completion !
Why ?
No matters your religion, IMAP4 or HTTP, you should not worries about accessing easily header and associated attributes, adjectives or values.
Installation
Whatever you like, use Pipenv or pip, it simply work. We are expecting you to have python 3.6+ installed.
pip install kiss-headers
Usage
parse_it() method take bytes, str, fp or dict and give you back a Headers object.
from requests import get
from kiss_headers import parse_it
response = get('https://httpbin.org/get')
headers = parse_it(response.headers)
'Content-Type' in headers # output: True
'Content_type' in headers # output: True
headers.content_type # output : application/json
'application/json' in headers.content_type # output: True
headers.content_type.charset # output : utf-8
👤 Contributing
Contributions, issues and feature requests are very much welcome.
Feel free to check issues page if you want to contribute.
📝 License
Copyright © 2020 Ahmed TAHRI @Ousret.
This project is MIT licensed.
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
File details
Details for the file kiss-headers-1.0.0.tar.gz.
File metadata
- Download URL: kiss-headers-1.0.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47cafeec720328cc36e08d46116fbd4ec497a0bd3965e377436a6349c787c62e
|
|
| MD5 |
55ac70243e002164a229f3f1656cc30f
|
|
| BLAKE2b-256 |
8923f4974e926c1b41021c144477dab4b36c3b132a1341afb4009a2a583085d8
|