You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns entries which match all provided parameters, where ``title``, ``username``, ``password``, ``url``, ``notes``, 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. This function has optional ``regex`` boolean and ``flags`` string arguments, which means to interpret search strings as `XSLT style`_ regular expressions with `flags`_.
69
+
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. This function has optional ``regex`` boolean and ``flags`` string arguments, which means to interpret search strings as `XSLT style`_ regular expressions with `flags`_.
move a group to the recycle bin. The recycle bin is created if it does not exit. ``entry`` must be an empty Entry.
175
+
164
176
**move_entry** (entry, destination_group)
165
177
166
178
where ``destination_group`` is a ``Group`` instance. ``entry`` is an ``Entry`` instance. ``title``, ``username``, ``password``, ``url``, ``notes``, ``tags``, ``icon`` are strings. ``expiry_time`` is a ``datetime`` instance.
@@ -174,7 +186,7 @@ If ``expiry_time`` is a naive datetime object (i.e. ``expiry_time.tzinfo`` is no
174
186
Entry: "testing (foo_user)"
175
187
176
188
# add a new entry to the social group
177
-
>>> group = find_groups(name='social', first=True)
189
+
>>> group =kp.find_groups(name='social', first=True)
move a group to the recycle bin. The recycle bin is created if it does not exit. ``group`` must be an empty Group.
214
+
215
+
**empty_group** (group)
216
+
217
+
delete all entries and subgroups of a group. ``group`` is an instance of ``Group``.
218
+
199
219
**move_group** (group, destination_group)
200
220
201
221
``destination_group`` and ``group`` are instances of ``Group``. ``group_name`` is a string
@@ -224,11 +244,11 @@ Adding Groups
224
244
Attachments
225
245
-----------
226
246
227
-
In this section, *binary* refers to the bytes of the attached data (stored at the root level of the database), while *attachment* is a reference to a binary (stored in an entry). A binary can have none, one or many attachments.
247
+
In this section, *binary* refers to the bytes of the attached data (stored at the root level of the database), while *attachment* is a reference to a binary (stored in an entry). A binary can be referenced by none, one or many attachments.
where ``data`` is bytes. Adds a blob of data to the database. The attachment reference must still be added to an entry (see below). ``compressed`` only applies to KDBX3 and ``protected`` only applies to KDBX4. Returns id of attachment.
251
+
where ``data`` is bytes. Adds a blob of data to the database. The attachment reference must still be added to an entry (see below). ``compressed`` only applies to KDBX3 and ``protected`` only applies to KDBX4 (no effect if used on wrong database version). Returns id of attachment.
232
252
233
253
**delete_binary** (id)
234
254
@@ -243,7 +263,7 @@ where ``id`` is an int, ``filename`` is a string, and element is an ``Entry`` or
243
263
244
264
**binaries**
245
265
246
-
list of bytestrings containing binary data. List index corresponds to attachment id.
266
+
list of bytestrings containing binary data. List index corresponds to attachment id
247
267
248
268
**attachments**
249
269
@@ -310,13 +330,37 @@ the entry that this attachment is attached to
310
330
311
331
# search attachments
312
332
>>> kp.find_attachments(filename='hello.txt')
313
-
[Attachment: 'hello.txt'->0]
333
+
[Attachment: 'hello.txt** -> 0]
314
334
315
335
# delete attachment reference
316
336
>>> e.delete_attachment(a)
317
337
318
338
# or, delete both attachment reference and binary
319
-
>>> kp.delete_binary(binary_id)
339
+
>>> kp.delete_binary(binary_id**
340
+
341
+
Credential Expiry
342
+
-----------------
343
+
344
+
**credchange_date**
345
+
346
+
datetime objectwith date of last credentials change
347
+
348
+
**credchange_required**
349
+
350
+
boolean whether database credentials have expired and are required to change
351
+
352
+
**credchange_recommended**
353
+
354
+
boolean whether database credentials have expired and are recommended to change
355
+
356
+
**credchange_required_days**
357
+
358
+
days after **credchange_date** that credential update is required
359
+
360
+
**credchange_recommended_days**
361
+
362
+
days after **credchange_date** that credential update is recommended
363
+
320
364
321
365
Miscellaneous
322
366
-------------
@@ -326,13 +370,21 @@ where ``filename``, ``password``, and ``keyfile`` are strings. ``filename`` is
326
370
327
371
Can raise``CredentialsError``, ``HeaderChecksumError``, or``PayloadChecksumError``.
328
372
373
+
**reload** ()
374
+
375
+
reload database from disk using previous credentials
376
+
329
377
**save** (filename=None)
330
378
331
379
where ``filename``is the path of the file to save to. If ``filename``isnot given, the path given in``read`` will be used.
332
380
333
381
**password**
334
382
335
-
string containing database password. Can also be set. Use ``None`` for no password.
383
+
string containing database password. Can also be set. Use ``None**for no password.
384
+
385
+
**filename**
386
+
387
+
string containing path to database. Can also be set
336
388
337
389
**keyfile**
338
390
@@ -350,15 +402,32 @@ string containing algorithm used to encrypt database. Possible values are ``aes
350
402
351
403
create a new database at ``filename``with supplied credentials. Returns ``PyKeePass``object
352
404
353
-
**trash_group** (group)
405
+
**tree**
354
406
355
-
move a group to the recycle bin. The recycle bin is created if it does not exit. ``group`` must be an empty Group.
407
+
database lxml tree
356
408
357
-
**empty_group** (group)
409
+
**xml**
358
410
359
-
delete all entries and subgroups of a group. ``group`` is an instance of ``Group``.
411
+
get database XML data as string
360
412
361
-
Tests
362
-
-------------
413
+
**dump_xml** (filename)
414
+
415
+
pretty print database XML to file
416
+
417
+
418
+
Tests and Debugging
419
+
-------------------
420
+
421
+
Run tests with :code:`python tests/tests.py`or :code:`python tests/tests.py SomeSpecificTest`
0 commit comments