You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import time
import httpx
# Benchmark with httpx.Client()
start = time.time()
with httpx.Client() as client:
for _ in range(10):
client.get("https://google.com")
end = time.time()
print(f"With httpx.Client(): {end - start} seconds")
# Benchmark with httpx.get()
start = time.time()
for _ in range(10):
httpx.get("https://google.com")
end = time.time()
print(f"With httpx.get(): {end - start} seconds")
httpx.Client is generally faster
The text was updated successfully, but these errors were encountered:
https://github.com/SuperteamDAO/solathon/blob/master/solathon/core/http.py#L28
A similar library uses httpx.Client which is generally faster than httpx.post. This will also help adding proxy easily: #424 since you need to pass proxy to Client()
httpx.Client is generally faster
The text was updated successfully, but these errors were encountered: