def get_pip_config(key, default=None):
    """Configured pip key, if available (from ~/.config/pip/pip.conf or /etc/pip.conf)"""
    try:
        from pip._internal.configuration import Configuration
        cc = Configuration(isolated=False)
        cc.load()
        return cc.get_value(key)
    except (Exception, ImportError):
        return default
