package documentation

ldif - generate and parse LDIF data (see RFC 2849).

From __init__.py:

Class LDIFParser Read LDIF entry or change records from file object.
Class LDIFWriter Write LDIF entry or change records to file object.
Function is_dn Return True if s is a LDAP DN.
Function lower Return a list with the lowercased items of l.
Constant ATTR_PATTERN Undocumented
Constant ATTRTYPE_PATTERN Undocumented
Constant ATTRVALUE_PATTERN Undocumented
Constant CHANGE_TYPES Undocumented
Constant DN_PATTERN Undocumented
Constant DN_REGEX Undocumented
Constant LDIF_PATTERN Undocumented
Constant MOD_OPS Undocumented
Constant RDN_PATTERN Undocumented
Constant UNSAFE_STRING_PATTERN Undocumented
Constant UNSAFE_STRING_RE Undocumented
Variable __version__ Undocumented
Variable log Undocumented
def is_dn(s: str) -> bool: (source)

Return True if s is a LDAP DN.

def lower(string_list: Collection[str] | None) -> list[str]: (source)

Return a list with the lowercased items of l.

ATTR_PATTERN = (source)

Undocumented

Value
ATTRTYPE_PATTERN + '[ ]*=[ ]*' + ATTRVALUE_PATTERN
ATTRTYPE_PATTERN: str = (source)

Undocumented

Value
'[\\w;.-]+(;[\\w_-]+)*'
ATTRVALUE_PATTERN: str = (source)

Undocumented

Value
'(([^,]|\\\\,)+|".*?")'
CHANGE_TYPES: list[str] = (source)

Undocumented

Value
['add', 'delete', 'modify', 'modrdn']
DN_PATTERN = (source)

Undocumented

Value
RDN_PATTERN + '([ ]*,[ ]*' + RDN_PATTERN + ')*[ ]*'
DN_REGEX = (source)

Undocumented

Value
re.compile(f'^{DN_PATTERN}$')
LDIF_PATTERN = (source)

Undocumented

Value
f"^((dn(:|::) {vars()['DN_PATTERN']})|(%(ATTRTYPE_PATTERN) s(:|::) .*)$)+"

Undocumented

Value
['add', 'delete', 'replace']
RDN_PATTERN = (source)

Undocumented

Value
ATTR_PATTERN + '([ ]*\\+[ ]*' + ATTR_PATTERN + ')*[ ]*'
UNSAFE_STRING_PATTERN: str = (source)

Undocumented

Value
'(^[^\x01-\t\v-\f\x0e-\x1f!-9;=-]|[^\x01-\t\v-\f\x0e-])'
UNSAFE_STRING_RE = (source)

Undocumented

Value
re.compile(UNSAFE_STRING_PATTERN)
__version__: str = (source)

Undocumented

Undocumented