Skip to content

Commit b705bb6

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#191)
1 parent 54b6344 commit b705bb6

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/cloudflare/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from ._models import BaseModel
1818
from ._version import __title__, __version__
1919
from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse
20+
from ._constants import DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_CONNECTION_LIMITS
2021
from ._exceptions import (
2122
APIError,
2223
ConflictError,
@@ -68,6 +69,9 @@
6869
"AsyncCloudflare",
6970
"file_from_path",
7071
"BaseModel",
72+
"DEFAULT_TIMEOUT",
73+
"DEFAULT_MAX_RETRIES",
74+
"DEFAULT_CONNECTION_LIMITS",
7175
]
7276

7377
_setup_logging()

src/cloudflare/_base_client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@
7171
extract_response_type,
7272
)
7373
from ._constants import (
74-
DEFAULT_LIMITS,
7574
DEFAULT_TIMEOUT,
7675
MAX_RETRY_DELAY,
7776
DEFAULT_MAX_RETRIES,
7877
INITIAL_RETRY_DELAY,
7978
RAW_RESPONSE_HEADER,
8079
OVERRIDE_CAST_TO_HEADER,
80+
DEFAULT_CONNECTION_LIMITS,
8181
)
8282
from ._streaming import Stream, SSEDecoder, AsyncStream, SSEBytesDecoder
8383
from ._exceptions import (
@@ -746,7 +746,7 @@ def __init__(
746746
if http_client is not None:
747747
raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
748748
else:
749-
limits = DEFAULT_LIMITS
749+
limits = DEFAULT_CONNECTION_LIMITS
750750

751751
if transport is not None:
752752
warnings.warn(
@@ -1280,7 +1280,7 @@ def __init__(
12801280
if http_client is not None:
12811281
raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
12821282
else:
1283-
limits = DEFAULT_LIMITS
1283+
limits = DEFAULT_CONNECTION_LIMITS
12841284

12851285
if transport is not None:
12861286
warnings.warn(

src/cloudflare/_constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# default timeout is 1 minute
99
DEFAULT_TIMEOUT = httpx.Timeout(timeout=60.0, connect=5.0)
1010
DEFAULT_MAX_RETRIES = 2
11-
DEFAULT_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
11+
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
1212

1313
INITIAL_RETRY_DELAY = 0.5
1414
MAX_RETRY_DELAY = 8.0

0 commit comments

Comments
 (0)