
The group argument determines what Group to search under, and the recursive boolean controls whether to search recursively. The string dict allows for searching custom string fields. All other arguments are ignored when this is given.

The path list is a full path to an entry (ex. This function has optional regex boolean and flags string arguments, which means to interpret search strings as XSLT style regular expressions with flags. Returns entries which match all provided parameters, where title, username, password, url, notes, otp, and autotype_sequence are strings, path is a list, string is a dict, autotype_enabled is a boolean, uuid is a uuid.UUID and tags is a list of strings. save () Finding Entriesįind_entries (title=None, username=None, password=None, url=None, notes=None, otp=None, path=None, uuid=None, tags=None, string=None, group=None, recursive=True, regex=False, flags=None, history=False, first=False) add_entry ( group, 'gmail', 'myusername', 'myPassw0rdXX' ) Entry : "email/gmail (myusername)" # save database > kp. root_group, 'email' ) # create a new entry > kp. notes = 'primary facebook account' # create a new group > group = kp. password 's3cure_p455w0rd' # update an entry > entry. find_entries ( title = 'facebook', first = True ) # retrieve the associated password > entry. entries # find any entry by its title > entry = kp.

find_groups ( name = 'social', first = True ) # get the entries in a group > group. Example from pykeepass import PyKeePass # load database > kp = PyKeePass ( 'db.kdbx', password = 'somePassw0rd' ) # find any group by its name > group = kp. Also, the number of iterations is configurable (6000 is only the default value).This library allows you to write entries to a KeePass database.Ĭome chat at #pykeepass on Freenode or #pykeepass: on Matrix. In "custom password derivation process", the "custom" is a scary word.

This assumes that the password derivation process is not flawed in some way. But with two PC that's only 25 million years. You're in for 10 20*0.5/32000 seconds, also known as 50 million years. With ten random characters chosen uniformly among the hundred-of-so of characters which can be typed on a keyboard, there are 10 20 potential passwords, and brute force will, on average, try half of them.

With a quad-core recent PC (those with the spiffy AES instructions), you should be able to test about 32000 potential passwords per second. The default number of iterations is 6000, so that's 12000 AES invocations for processing one password (encryption is done on a 256-bit value, AES uses 128-bit blocks, so there must be two AES invocations at least for each round). KeePass uses a custom password derivation process which includes multiple iterations of symmetric encryption with a random key (which then serves as salt), as explained there.
