fdutils/db/vendors.py
def create_from_vendor(vendor='', host='', db='', port=0, username='', password='', **db_kwargs):
    """ Creates an instance of a subclass of SQLDB given the type as string

        Arguments:
          - dbtype (str): the type of DB we want (sqllite, oracle or postgres)

    """

    vendor = vendor.lower()
    if vendor in ('sqllite', 'sqlite'):
        sqldb = SQLite
    elif vendor.startswith('postgres'):
        sqldb = PostgresDB
    elif vendor == 'oracle':
        sqldb = OracleDB
    elif vendor == 'mysql':
        sqldb = MysqlDB
    else:
        raise NotImplementedError('We have only implemented this method for sqllite, oracle and postgresql')

    return sqldb(username=username, password=password, host=host, port=port, db=db, **db_kwargs)
 Creates an instance of a subclass of SQLDB given the type as string

        Arguments:
          - dbtype (str): the type of DB we want (sqllite, oracle or postgres)

    
Creates an instance of a subclass of SQLDB given the type as string
Creates an instance of a subclass of SQLDB given the type as string
def create_from_vendor(vendor='', host='', db='', port=0, username='', password='', **db_kwargs):
    vendor = vendor.lower()
    if vendor in ('sqllite', 'sqlite'):
        sqldb = SQLite
    elif vendor.startswith('postgres'):
        sqldb = PostgresDB
    elif vendor == 'oracle':
        sqldb = OracleDB
    elif vendor == 'mysql':
        sqldb = MysqlDB
    else:
        raise NotImplementedError('We have only implemented this method for sqllite, oracle and postgresql')
    return sqldb(username=username, password=password, host=host, port=port, db=db, **db_kwargs)
def create_from_vendor ( vendor = '' , host = '' , db = '' , port = 0 , username = '' , password = '' , ** db_kwargs ) : vendor = vendor . lower ( ) if vendor in ( 'sqllite' , 'sqlite' ) : sqldb = SQLite elif vendor . startswith ( 'postgres' ) : sqldb = PostgresDB elif vendor == 'oracle' : sqldb = OracleDB elif vendor == 'mysql' : sqldb = MysqlDB else : raise NotImplementedError ( 'We have only implemented this method for sqllite, oracle and postgresql' ) return sqldb ( username = username , password = password , host = host , port = port , db = db , ** db_kwargs )
Creates an instance of a subclass of SQLDB given the type as string
Creates an instance of a subclass of SQLDB given the type as string
""" Creates an instance of a subclass of SQLDB given the type as string

        Arguments:
          - dbtype (str): the type of DB we want (sqllite, oracle or postgres)

    """
vendor
host
db
port
username
password
- dbtype
the type of DB we want (sqllite, oracle or postgres)
the type of DB we want ( sqllite oracle or postgres )