tlslite.basedb module

Base class for SharedKeyDB and VerifierDB.

class tlslite.basedb.BaseDB(filename, type)[source]

Bases: object

__contains__(username)[source]

Check if the database contains the specified username.

Parameters:

username (str) – The username to check for.

Return type:

bool

Returns:

True if the database contains the username, False otherwise.

__delitem__(username)[source]
__getitem__(username)[source]
__init__(filename, type)[source]
__setitem__(username, value)[source]
check(username, param)[source]
create()[source]

Create a new on-disk database.

Raises:

anydbm.error – If there’s a problem creating the database.

keys()[source]

Return a list of usernames in the database.

Return type:

list

Returns:

The usernames in the database.

open()[source]

Open a pre-existing on-disk database.

Raises:
  • anydbm.error – If there’s a problem opening the database.

  • ValueError – If the database is not of the right type.