class documentation
class LDIFParser: (source)
Constructor: LDIFParser(input_file, ignored_attr_types, process_url_schemes, line_sep, ...)
Read LDIF entry or change records from file object.
Parameters | |
input | file to read the LDIF input from |
ignored | List of attribute types that will be ignored |
process | List of URL schemes to process with urllib. An empty list turns off all URL processing and the attribute is ignored completely. |
line | line separator |
encoding | Encoding to use for converting values to unicode strings. If decoding failes, the raw bytestring will be used instead. You can also pass None which will skip decoding and always produce bytestrings. Note that this only applies to entry values. dn and entry keys will always be unicode strings. |
strict | If set to False, recoverable parse errors will produce log warnings rather than exceptions. |
Method | __init__ |
Undocumented |
Method | parse |
Iterate LDIF entry records. |
Instance Variable | byte |
Undocumented |
Instance Variable | line |
Undocumented |
Instance Variable | records |
Undocumented |
Static Method | _strip |
Strip trailing line separators from s, but no other whitespaces. |
Method | _check |
Check changetype attribute for issues. |
Method | _check |
Check dn attribute for issues. |
Method | _decode |
Undocumented |
Method | _error |
Undocumented |
Method | _iter |
Iter input lines in blocks separated by blank lines. |
Method | _iter |
Iter input unfoled lines. |
Method | _parse |
Parse a single attribute type/value pair. |
Method | _parse |
Parse a single entry record from a list of lines. |
Instance Variable | _encoding |
Undocumented |
Instance Variable | _ignored |
Undocumented |
Instance Variable | _input |
Undocumented |
Instance Variable | _line |
Undocumented |
Instance Variable | _process |
Undocumented |
Instance Variable | _strict |
Undocumented |
def __init__(self, input_file, ignored_attr_types=(), process_url_schemes=(), line_sep=b'\n', encoding:
str | None
= 'utf8', strict=True):
(source)
¶
Undocumented