structured_data
Parser for rfc5424 structured data and wrapper classes
-
class
StructuredData
(d=None)[source]
Bases: dict
Encapsulate RFC 5424 structured data
-
dump
()[source]
Dump the structured data as a RFC 5424 string
-
classmethod
parse
(s)[source]
Parse structured data from string into dict of dict
-
update
(e=None, **f)[source]
Update structured data using another dict. Values are added to the values sets.
-
class
StructuredDataNamesValues
(d=None)[source]
Bases: dict
Dict subclass. Values are sets of unicode strings. Keys are sanitized before used.
-
add
(key, values)[source]
Add values to the ‘key’ set
Parameters: |
- key – key
- values – iterable
|
-
dump
()[source]
Return string representation
-
update
(e=None, **f)[source]
Update the object using another dict. New values are added to the values set.
-
split_escape
(s)[source]
Split string by comma delimiter, excepted escaped commas
Parameters: | s (str) – string |
Return type: | str |