datbase dialect

    :param key: a key for your dabtabase you wanna use
    :param slave boolean: If True the database can be read only, Defaults False.

def database(key='default', slave=False):
    """datbase dialect

    :param key: a key for your dabtabase you wanna use
    :param slave boolean: If True the database can be read only, Defaults False.
    """
    if slave:
        key += '.slave'
        return choice(__db[key])
    return __db.get(key)