aiocoap.util.contenttype module¶
Helpers around content types
This uses the terminology clarified in 1, and primarily deals with content types in their usual string representation.
Unless content types get used a lot more in aiocoap, this provides only accessors to some of their relevant properties, without aiming to build semantically accessible objects to encapsulate them.
- aiocoap.util.contenttype.categorize(contenttype: str)¶
Return ‘cbor’, ‘json’ or ‘link-format’ if the content type indicates it is that format itself or derived from it.