Exemplo n.º 1
0
def parse_platsbank_dsn(dsn, platsbanker=None, default=None):
    if platsbanker is None:
        platsbanker = get_all_platsbanker()
    platsbank_map = dict((pb.dsn_name, pb) for pb in platsbanker)
    platsbank_cls, opts = parse_dsn(dsn, platsbank_map, default)
    return platsbank_cls.from_dsn(opts)
Exemplo n.º 2
0
Arquivo: app.py Projeto: yostudios/ams
def parse_conf_dsn(dsn, conf_types=all_conf_types):
    conf_type_map = dict((ct.dsn_name, ct) for ct in conf_types)
    conf_cls, opts = parse_dsn(dsn, conf_type_map)
    return conf_cls.from_dsn(opts)