data Package

convertdb Module

class pwman.data.convertdb.DBConverter(args, config)

Bases: object

A general class to provide a base template for converting a database from one version to another

backup_old_db()
convert_nodes()
create_new_db(new_version=0.4)
static detect_db_version(filename)

This method should accept a pwman db file name, and it should try to detect which database version it is.

static invoke_converter(dbversion, future_version)

this method should accept the two parameters and according to them invoke the right converter

print_success()
read_old_db()
run()
save_new_nodes_to_db()
save_old_key()
class pwman.data.convertdb.PwmanConvertKey(args, config)

Bases: pwman.data.convertdb.DBConverter

read_old_db()
save_old_key()

database Module

class pwman.data.database.Database

Bases: object

addnodes(nodes)
changepassword()

Change the databases password.

close()
editnode(id, node)
get_user_password()

get the databases password from the user

listnodes()
listtags(all=False)
loadkey()
open(dbver=None)

Open the database, by calling the _open method of the class inherited for the specific database. When done validation that the file is OK, check if it has encryption key, by calling enc = CryptoEngine.get() key = self.loadkey()

removenodes(nodes)
savekey(key)
exception pwman.data.database.DatabaseException

Bases: exceptions.Exception

factory Module

Factory to create Database instances A Generic interface for all DB engines. Usage:

import pwman.data.factory as DBFactory

db = DBFactory.create(params) db.open() .....

pwman.data.factory.check_db_version(dburi)
pwman.data.factory.createdb(dburi, version)

nodes Module

class pwman.data.nodes.Node(clear_text=True, **kwargs)

Bases: object

classmethod from_encrypted_entries(username, password, url, notes, tags)

We use this alternatively, to create a node instance when reading the encrypted entities from the database

notes

Get the current notes.

password

Get the current password.

tags
to_encdict()

Return a dictionary of encrypted records

url

Get the current url.

username

Get the current username.

Table Of Contents

This Page