kdbxtool.models.attachment

Attachment model for KDBX binary attachments.

Classes

Attachment(filename, id, entry)

An attachment (binary file) associated with an entry.

class kdbxtool.models.attachment.Attachment(filename, id, entry)[source]

Bases: object

An attachment (binary file) associated with an entry.

Attachments represent files attached to entries in the database. The binary data is stored at the database level and referenced by ID.

Parameters:
filename

Name of the attached file

Type:

str

id

Reference ID to the binary data in the database

Type:

int

entry

The entry this attachment belongs to

Type:

Entry

filename: str
id: int
entry: Entry
property data: bytes | None

Get the binary data for this attachment.

Returns:

Binary data if available, None if not found or entry has no database

__init__(filename, id, entry)
Parameters:
Return type:

None