importosfromgroupdocs.searchimportIndexindex=Index("./index")passwords=index.dictionaries.document_passwords# The key is the full path of the documentdocument_path=os.path.abspath("./documents/protected.pdf")passwords.add(document_path,"123456")print(passwords.get_password(document_path))
Aliases
These names call get_password too, limited to the overloads listed.