def is_ascii_encoding(encoding):
    """Checks if a given encoding is ascii."""
    try:
        return codecs.lookup(encoding).name == "ascii"
    except LookupError:
        return False
Checks if a given encoding is ascii.
dynaconf/vendor/click/_compat.py