![]() root_group, 'social' ) # add a new group to the social group > group2 = kp. group_name is a string # add a new group to the Root group > group = kp. group is an instance of Group.ĭestination_group and group are instances of Group. group must be an empty Group.ĭelete all entries and subgroups of a group. The recycle bin is created if it does not exit. save () Group FunctionsĪdd_group (destination_group, group_name, icon=None, notes=None) delete_entry ( entry ) # move an entry > kp. add_entry ( group, 'testing', 'foo_user', 'passw0rd' ) Entry : "testing (foo_user)" # save the database > kp. find_groups ( name = 'social', first = True ) > entry = kp. ![]() root_group, 'testing', 'foo_user', 'passw0rd' ) Entry : "testing (foo_user)" # add a new entry to the social group > group = kp. # add a new entry to the Root group > kp. expiry_time.tzinfo is not set), the timezone is retrieved from dateutil.tz.gettz(). If expiry_time is a naive datetime object (i.e. title, username, password, url, notes, tags, icon are strings. ![]() Where destination_group is a Group instance. root_group Group : "/" Entry FunctionsĪdd_entry (destination_group, title, username, password, url=None, notes=None, tags=None, expiry_time=None, icon=None, force_creation=False) find_groups ( name = 'social', first = True ). find_groups ( path =, regex = True ) > kp. find_groups ( name = 'foo.*', regex = True ) > kp. find_groups ( name = 'foo', first = True ) Group : "foo" > kp. If first=True, the function returns the first Group match, or None if there are no matchesĪ flattened list of all groups in the database > kp. If first=False, the function returns a list of Group s or if there are no matches All other arguments are ignored when this is given. The path list is a full path to a group (ex. This function has optional regex boolean and flags string arguments, which means to interpret search strings as XSLT style regular expressions with flags. Where name and notes are strings, path is a list, uuid is a uuid.UUID. otp otpauth : // totp / test : lkj ? secret = TEST % 3 D % 3 D % 3 D % 3 D & period = 30 & digits = 6 & issuer = test Finding Groupsįind_groups (name=None, path=None, uuid=None, notes=None, group=None, recursive=True, regex=False, flags=None, first=False) find_entries ( title = 'facebook', group = group, recursive = False, first = True ) Entry : "social/facebook (myusername)" > entry. find_group ( name = 'social', first = True ) > kp. find_entries ( title = 'foo.*', url = '.*facebook.*', regex = True, first = True ) > entry. find_entries ( title = 'foo.*', regex = True ) > entry = kp. find_entries ( title = 'gmail', first = True ) Entry : "social/gmail (myusername)" > kp. If first=True, the function returns the first Entry match, or None if there are no matchesĪ flattened list of all entries in the database > kp. If first=False, the function returns a list of Entry s or if there are no matches The first (default False) boolean controls whether to return the first matched item, or a list of matched items. The history (default False) boolean controls whether history entries should be included in the search results. 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. The path list is a full path to an entry (ex. 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. This library allows you to write entries to a KeePass database.Ĭome chat at #pykeepass on Freenode or #pykeepass: on Matrix. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |