Python requests ignores proxies

You have to set a https entry in your dict:

#      HERE  ---v
proxies = {"https" : "socks4://51.254.162.207:5678"}
ip = requests.get('https://api.ipify.org',proxies=proxies).content.decode('utf8')

Don't forget to install requests with socks support:

# pip install requests[socks]