Package db3k
[hide private]
[frames] | no frames]

Package db3k

source code

3kong DB API 2 Interface

It saves the connection data for following connections. The data is stored as module space.

Classes [hide private]
  UnknownDatabaseManager
  DBData
  Connection
Creates a new checked connection to the database manager.
Functions [hide private]
 
set_database_data(user=None, password=None, host=None, database=None, name=None, manager='postgresql', preamble=(), kwargs=None, rewritesql=None, dbm=None)
Sets the data to connect to the database possible managers are: postgresql, mysql, sqlite2, sqlite3
source code
 
del_database_data(name)
Removes the database connection data
source code
 
get_database_data(name)
Retrieves the connection data
source code
 
create2(user=None, password=None, host=None, database=None, name=None, manager='postgresql', preamble=(), rewritesql=None, **kwargs)
Creates a new connection to the database.
source code
 
create(*args, **kwargs)
The same that create2 but only returns the connection
source code
Variables [hide private]
  __doc__ = ...
  warn = warn.Warn("db3k")
  __DB_pool__ = {}
Function Details [hide private]

create2(user=None, password=None, host=None, database=None, name=None, manager='postgresql', preamble=(), rewritesql=None, **kwargs)

source code 

Creates a new connection to the database. Returns a tuple (connection,module-of-connection)

module-of-connection is useful to manage exceptions

Variables Details [hide private]

__doc__

Value:
"""
3kong DB API 2 Interface

It saves the connection data for following connections. The data is st\
ored as module space.

"""