Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: add default connect and read timeout #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyzabbix/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ def __init__(
server: str = "http://localhost/zabbix",
session: Optional[Session] = None,
use_authenticate: bool = False,
timeout: Optional[Union[float, int, Tuple[int, int]]] = None,
timeout: Optional[Union[float, int, Tuple[int, int]]] = 30,
detect_version: bool = True,
):
"""
:param server: Base URI for zabbix web interface (omitting /api_jsonrpc.php)
:param session: optional pre-configured requests.Session instance
:param use_authenticate: Use old (Zabbix 1.8) style authentication
:param timeout: optional connect and read timeout in seconds, default: None
:param timeout: optional connect and read timeout in seconds, default: 30
If you're using Requests >= 2.4 you can set it as
tuple: "(connect, read)" which is used to set individual
connect and read timeouts.
Expand Down