Using client.query will create a new txn for every single call. That’ll create a new timestamp which needs to get propogated to the entire cluster. Creating a single txn as you did the latter case is the better way to perform many read-only queries.
res = client.txn().query(query, variables=variables)
# If not doing a mutation in the same transaction, simply use:
# res = client.query(query, variables=variables)
I can see how the README can mean that it’s better to use client.query rather than client.txn().query, but they mean the same thing. This should be clarified.