src/dirbs/utils.py
def cli_db_params_from_dsn(dsn, user=None, database=None, port=None, host=None):
    """
    Convert DB-related command-line arguments from a DSN into a format appropriate for DIRBS CLI commands.

    Arguments:
        dsn: data source name for the current database to format
        user: db user name, default None
        database: db name, default None
        port: db port, default None
        host: db host name, default None
    Returns:
        compatible cmd arguments for dirbs cli
    """
    db_args = []
    db_args.append('--db-user={0}'.format(user if user is not None else dsn.get('user')))
    db_args.append('--db-name={0}'.format(database if database is not None else dsn.get('database')))
    db_args.append('--db-port={0}'.format(port if port is not None else dsn.get('port')))
    db_args.append('--db-host={0}'.format(host if host is not None else dsn.get('host')))
    return db_args

    Convert DB-related command-line arguments from a DSN into a format appropriate for DIRBS CLI commands.

    Arguments:
        dsn: data source name for the current database to format
        user: db user name, default None
        database: db name, default None
        port: db port, default None
        host: db host name, default None
    Returns:
        compatible cmd arguments for dirbs cli
    
Convert DB-related command-line arguments from a DSN into a format appropriate for DIRBS CLI commands.
Convert DB - related command - line arguments from a DSN into a format appropriate for DIRBS CLI commands .
def cli_db_params_from_dsn(dsn, user=None, database=None, port=None, host=None):
    db_args = []
    db_args.append('--db-user={0}'.format(user if user is not None else dsn.get('user')))
    db_args.append('--db-name={0}'.format(database if database is not None else dsn.get('database')))
    db_args.append('--db-port={0}'.format(port if port is not None else dsn.get('port')))
    db_args.append('--db-host={0}'.format(host if host is not None else dsn.get('host')))
    return db_args
def cli_db_params_from_dsn ( dsn , user = None , database = None , port = None , host = None ) : db_args = [ ] db_args . append ( '--db-user={0}' . format ( user if user is not None else dsn . get ( 'user' ) ) ) db_args . append ( '--db-name={0}' . format ( database if database is not None else dsn . get ( 'database' ) ) ) db_args . append ( '--db-port={0}' . format ( port if port is not None else dsn . get ( 'port' ) ) ) db_args . append ( '--db-host={0}' . format ( host if host is not None else dsn . get ( 'host' ) ) ) return db_args
Convert DB-related command-line arguments from a DSN into a format appropriate for DIRBS CLI commands.
Convert DB - related command - line arguments from a DSN into a format appropriate for DIRBS CLI commands .
"""
    Convert DB-related command-line arguments from a DSN into a format appropriate for DIRBS CLI commands.

    Arguments:
        dsn: data source name for the current database to format
        user: db user name, default None
        database: db name, default None
        port: db port, default None
        host: db host name, default None
    Returns:
        compatible cmd arguments for dirbs cli
    """
compatible cmd arguments for dirbs cli
compatible cmd arguments for dirbs cli
dsn
data source name for the current database to format
data source name for the current database to format
user
db user name, default None
db user name default None
database
db name, default None
db name default None
port
db port, default None
db port default None
host
db host name, default None
db host name default None