Repository
Documentation
Install
python3 -m pip install openldap-config-parser
Command Usage
$ slapd-parser --help
Usage: slapd-parser [OPTIONS] TARGET
TARGET parse target file
Options:
--version Show the version and exit.
-h, --help Show this message and exit.
$ slapd-parser test.slapd.conf
[16:45:11] run script command.py:24
SlapdConfig(global_conig={'include': [['/opt/osstech/etc/openldap/schema/core.schema'], command.py:26
['/opt/osstech/etc/openldap/schema/cosine.schema'], ['/opt/osstech/etc/openldap/schema/nis.schema'],
['/opt/osstech/etc/openldap/schema/inetorgperson.schema'], ['/opt/osstech/etc/openldap/schema/misc.schema'],
['/opt/osstech/etc/openldap/schema/ppolicy.schema']], 'moduleload': [['ppolicy']], 'password-hash': [['{CRYPT}']],
'password-crypt-salt-format': [['"$5$%.16s"']], 'attributeoptions': [['lang-', 'phonetic']], 'sortvals':
[['memberUid', 'member', 'host']], 'access': [['to', 'dn.exact=""', 'attrs=supportedSASLMechanisms', 'by', '*',
'none'], ['to', 'dn.subtree=""', 'by', '*', 'read']]}, databases=[Database(type='bdb', config={'suffix':
[['"dc=example,dc=com"']], 'rootdn': [['"cn=master,dc=example,dc=com"']], 'monitoring': [['on']], 'dbconfig':
[['set_data_dir', '.'], ['set_lg_dir', '.']], 'index': [['objectClass', 'eq'], ['modifyTimestamp', 'eq'], ['cn',
'eq,sub']], 'limits': [['dn="uid=user,dc=example,dc=com"', 'time=unlimited', 'size=unlimited']], 'access': [['to',
'*', 'by', 'dn="uid=user,dc=example,dc=com"', 'manage', 'by', '*', 'break'], ['to', 'attrs=userPassword', 'by',
'self', '=wx', 'by', 'anonymous', 'auth', 'by', '*', 'none'], ['to', '*', 'by', '*', 'none']], 'overlay':
[['syncprov']], 'syncprov-checkpoint': [['128', '5']], 'syncprov-sessionlog': [['128']], 'serverID': [['1']],
'syncrepl': [['rid=1', 'provider="ldap://ldap.example.com/"', 'type=refreshAndPersist',
'binddn="cn=slave,dc=example,dc=com"', 'credentials="xxxxx"']], 'mirrormode': [['on']]}), Database(type='monitor',
config={'access': [['to', '*', 'by', 'dn="uid=user,dc=example,dc=com"', 'read', 'by', '*', 'none']]})])
Library Usage
from openldap_config_parser.parser import parse
from openldap_config_parser.config import SlapdConfig
result = parse("slapd.conf")
assert isinstance(result, SlapdConfig)
Metadata
Release files for openldap-config-parser 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openldap-config-parser-1.0.4.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openldap_config_parser-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.6 kB
Release files / openldap-config-parser-1.0.4.tar.gz
| Download URL | openldap-config-parser-1.0.4.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf62bb9c7ca007dd278636b6fe59906e0cac7ca3d64e77cde995f810037b9a28
|
|
BLAKE2b-256 checksum How to use checksums |
8abcdbb8ec54576ecdf7d80accf93c1f463a59bc520abe74eeded6232ff3e270
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.12 Linux/5.13.0-1021-azure
|
Release files / openldap_config_parser-1.0.4-py3-none-any.whl
| Download URL | openldap_config_parser-1.0.4-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44bea04826dcc094b54a333fb17ba8c9c224e66a3ef6a5924c7bb735d662126d
|
|
BLAKE2b-256 checksum How to use checksums |
be6fa63231ae9d6311a1efaa181a07cc47c2f7b3c655af247969526dd98e4aae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.12 Linux/5.13.0-1021-azure
|