same as parse_environ() but will also check name_1, name_2, ..., name_N and
    return all the found dsn strings from the environment

    this will look for name, and name_N (where N is 1 through infinity) in the environment,
    if it finds them, it will assume they are dsn urls and will parse them. 

    The num checks (eg PROM_DSN_1, PROM_DSN_2) go in order, so you can't do PROM_DSN_1, PROM_DSN_3,
    because it will fail on _2 and move on, so make sure your num dsns are in order (eg, 1, 2, 3, ...)

    example --
        export DSN_1=some.Interface://host:port/dbname#i1
        export DSN_2=some.Interface://host2:port/dbname2#i2
        $ python
        >>> import dsnparse
        >>> print dsnparse.parse_environs('DSN') # prints list with 2 parsed dsn objects

    :param dsn_env_name: string, the name of the environment variables, _1, ... will be appended
    :param parse_class: ParseResult, the class that will be used to hold parsed values
    :returns: list all the found dsn strings in the environment with the given name prefix

def parse_environs(name, parse_class=ParseResult, **defaults):
    """
    same as parse_environ() but will also check name_1, name_2, ..., name_N and
    return all the found dsn strings from the environment

    this will look for name, and name_N (where N is 1 through infinity) in the environment,
    if it finds them, it will assume they are dsn urls and will parse them. 

    The num checks (eg PROM_DSN_1, PROM_DSN_2) go in order, so you can't do PROM_DSN_1, PROM_DSN_3,
    because it will fail on _2 and move on, so make sure your num dsns are in order (eg, 1, 2, 3, ...)

    example --
        export DSN_1=some.Interface://host:port/dbname#i1
        export DSN_2=some.Interface://host2:port/dbname2#i2
        $ python
        >>> import dsnparse
        >>> print dsnparse.parse_environs('DSN') # prints list with 2 parsed dsn objects

    :param dsn_env_name: string, the name of the environment variables, _1, ... will be appended
    :param parse_class: ParseResult, the class that will be used to hold parsed values
    :returns: list all the found dsn strings in the environment with the given name prefix
    """
    ret = []
    if name in os.environ:
        ret.append(parse_environ(name, parse_class, **defaults))

    # now try importing _1 -> _N dsns
    increment_name = lambda name, num: '{name}_{num}'.format(name=name, num=num)
    dsn_num = 0 if increment_name(name, 0) in os.environ else 1
    dsn_env_num_name = increment_name(name, dsn_num)
    if dsn_env_num_name in os.environ:
        try:
            while True:
                ret.append(parse_environ(dsn_env_num_name, parse_class, **defaults))
                dsn_num += 1
                dsn_env_num_name = increment_name(name, dsn_num)

        except KeyError:
            pass

    return ret