feature: add default ssl ctx to all httpx clients to speed up initialization.

This commit is contained in:
Upstream Data
2023-11-25 01:08:04 -07:00
parent 92bbb21c11
commit c3972f9524
7 changed files with 22 additions and 18 deletions

View File

@@ -16,6 +16,8 @@
from typing import Any
import httpx
_settings = { # defaults
"network_ping_retries": 1,
"network_ping_timeout": 3,
@@ -39,3 +41,5 @@ def get(key: str, other: Any = None) -> Any:
def update(key: str, val: Any) -> Any:
_settings[key] = val
ssl_cxt = httpx.create_ssl_context()