kiss-headers stand for, headers, keep it sweet and simple. Principle KISS. It’s a basic library, small and concise to help you get things done regarding headers in a better way.
kiss-headers is a basic library that allows you to handle headers as objects.
- A backwards-compatible syntax using bracket style.
- Capability to alter headers using simple, human-readable operator notation
- Flexibility if headers are from an email or HTTP, use as you need with one library.
- Ability to parse any object and extract recognized headers from it, it also supports UTF-8 encoded headers.
- Fully type-annotated.
- Provide great auto-completion in Python interpreter or any capable IDE.
- No dependencies. And never will be.
- 90% test coverage.
Plus all the features that you would expect from handling headers…
- Properties syntax for headers and attribute in header.
- Supports headers and attributes OneToOne, OneToMany and ManySquashedIntoOne.
- Capable of parsing
- Automatically unquote and unfold the value of an attribute when retrieving it.
- Keep headers and attributes ordering.
- Case insensitive with header name and attribute key.
_in addition of above feature.
- Any syntax you like, we like.
Even if this library offers wide support to handle headers as they were objects you should know that headers are not obligated to follow any syntax. But we are pretty confident that this library cover at least 99 % of the use cases you could encounter. Feel free to address any issue you may encounter.
Whatever you like, use
pip, it simply works. Requires Python 3.6+ installed.
pip install kiss-headers