enpassreaderlib package

Submodules

enpassreaderlib.enpassreaderlib module

Main code for enpassreaderlib.

class enpassreaderlib.enpassreaderlib.EnpassDB(database_path, password, keyfile=None, pbkdf2_rounds=100000)[source]

Bases: object

Manages the database object exposing useful methods to interact with it.

property cipher_key

The cipher key to decrypt entries in the database.

Returns:

The cipher key to decrypt the database entries.

Return type:

cipher_key (string)

property entries

All the entries in the database.

Returns:

The password entries in the database.

Return type:

entries (list)

get_entry(name)[source]

Retrieves a single entry matching the name.

Parameters:

name – The name of the password entry to retrieve.

Returns:

A password entry object if match found else None.

Return type:

entry (Entry)

property master_password

The master password calculated along with the key if provided else the password provided.

Returns:

The master password to decrypt the database.

Return type:

master_password (bytearray)

search_entries(name)[source]

Retrieves any entry that matches the name provided (fuzzy matching).

Parameters:

name – The name to search the password entries for.

Returns:

A list of password entries matching the fuzzy search for the given name.

Return type:

entries (list)

class enpassreaderlib.enpassreaderlib.Entry(database_row)[source]

Bases: object

Models a password entry and exposes some useful attributes about it.

property password

The plaintext password of the entry.

Returns:

The plaintext password of the entry.

Return type:

password (text)

property totp_seed

enpassreaderlib.enpassreaderlibexceptions module

Custom exception code for enpassreaderlib.

exception enpassreaderlib.enpassreaderlibexceptions.EnpassDatabaseError[source]

Bases: Exception

The database is not a valid enpass 6 database or master password or key provided cannot decrypt it.

Module contents

enpassreaderlib package.

Import all parts from enpassreaderlib here