In httpx, the parameter is proxy="http://username:password@IP:20001", both on Client and on AsyncClient. For SOCKS5 use socks5:// and port 20481, with the support package installed.
Reusing the connection
Create the client once and make many requests with it. Creating a client per request opens and closes a connection for nothing and makes everything slower than the address is.
The old parameter proxies, plural, was removed in recent versions. If you get an argument error, that is why.