Package tlslite :: Module basedb :: Class BaseDB
[hide private]
[frames] | no frames]

Class BaseDB

source code


Instance Methods [hide private]
bool
__contains__(self, username)
Check if the database contains the specified username.
source code
 
__delitem__(self, username) source code
 
__getitem__(self, username) source code
 
__init__(self, filename, type)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__setitem__(self, username, value) source code
 
check(self, username, param) source code
 
create(self)
Create a new on-disk database.
source code
list
keys(self)
Return a list of usernames in the database.
source code
 
open(self)
Open a pre-existing on-disk database.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__contains__(self, username)
(In operator)

source code 

Check if the database contains the specified username.

Parameters:
  • username (str) - The username to check for.
Returns: bool
True if the database contains the username, False otherwise.

__init__(self, filename, type)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

create(self)

source code 

Create a new on-disk database.

Raises:
  • anydbm.error - If there's a problem creating the database.

keys(self)

source code 

Return a list of usernames in the database.

Returns: list
The usernames in the database.

open(self)

source code 

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.