It allows a user to instantiate the underlying httpx.AsyncClient with a auth tuple (which is btw mandatory, you cannot create a BitcoinRPC to connect to a server not requiring user/passwd!) and then somewhat awkwardly headers and other options...
However, to preserve the ease of one-shot testing and shield the users from dealing with the underlying httpx library, an option to instantiate the BitcoinRPC with (url, rpc_user, rpc_password) should be preserved.
As was already noted here - https://github.com/bibajz/bitcoin-python-async-rpc/pull/10#issuecomment-1001560293 - the way to instantiate
BitcoinRPC
is quite clunky.It allows a user to instantiate the underlying
httpx.AsyncClient
with aauth
tuple (which is btw mandatory, you cannot create aBitcoinRPC
to connect to a server not requiring user/passwd!) and then somewhat awkwardly headers and other options...To better accomodate for more advanced configurations of the
httpx.AsyncClient
(proxy support, connection pooling, timeouts - https://github.com/bibajz/bitcoin-python-async-rpc/issues/13#issuecomment-1510504359 ),BitcoinRPC
should be instantiated with an argumentclient: httpx.AsyncClient
.However, to preserve the ease of one-shot testing and shield the users from dealing with the underlying
httpx
library, an option to instantiate theBitcoinRPC
with (url, rpc_user, rpc_password
) should be preserved.Sketched roughly:
NOTE: This will result in a BREAKING change.