Package cdbx :: Module _cdb :: Class CDBMaker
[frames] | no frames]

Class CDBMaker

object --+
         |
        CDBMaker

CDBMaker - use CDB.make to create instance
Instance Methods
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
 
add(self, key, value)
Add the key/value pair to the CDB-to-be.
 
close(self)
Close the CDBMaker and destroy the file (if it was created by the maker)
CDB
commit(self)
Commit to the current dataset and finish the CDB creation.
int
fileno(self)
Find underlying file descriptor

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

Class Variables
  __hash__ = None
hash(x)
Properties

Inherited from object: __class__

Method Details

__getattribute__(...)

 
x.__getattribute__('name') <==> x.name
Overrides: object.__getattribute__

add(self, key, value)

 

Add the key/value pair to the CDB-to-be.

Note that in case of a unicode key or value, it will be transformed to a byte string using the ascii encoding.

Parameters:
  • key (bytes) - Key
  • value (bytes) - Value

close(self)

 
Close the CDBMaker and destroy the file (if it was created by the maker)

commit(self)

 

Commit to the current dataset and finish the CDB creation.

The commit method returns a new CDB instance based on the file just committed.

Returns: CDB
New CDB instance

fileno(self)

 
Find underlying file descriptor
Returns: int
The file descriptor

Class Variable Details

__hash__

hash(x)

Value:
None