adding keepalive_expiry param to docs and docstring (#2090)

This commit is contained in:
Udasi Tharani 2022-02-22 16:10:14 +05:30 committed by GitHub
parent 7883c98556
commit 2a08edc471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -672,8 +672,9 @@ argument on the client. It takes instances of `httpx.Limits` which define:
- `max_keepalive`, number of allowable keep-alive connections, or `None` to always
allow. (Defaults 20)
- `max_connections`, maximum number of allowable connections, or` None` for no limits.
- `max_connections`, maximum number of allowable connections, or `None` for no limits.
(Default 100)
- `keepalive_expiry`, time limit on idle keep-alive connections in seconds, or `None` for no limits. (Default 5)
```python
limits = httpx.Limits(max_keepalive_connections=5, max_connections=10)

View File

@ -284,6 +284,7 @@ class Limits:
* **max_keepalive_connections** - Allow the connection pool to maintain
keep-alive connections below this point. Should be less than or equal
to `max_connections`.
* **keepalive_expiry** - Time limit on idle keep-alive connections in seconds.
"""
def __init__(