httk.core.datastream.network_policy

Policy and timeout helpers for network-backed datastream opens.

Attributes

DEFAULT_NETWORK_TIMEOUT

Default timeout for each network open; read freshly for every open, or None to disable.

NETWORK_SCHEMES

Schemes treated as network access; file is local I/O and deliberately absent.

Functions

require_network_consent(url)

Future seam for an opt-in network policy; currently all implicit access is refused.

resolve_timeout(hint)

Return an explicit timeout or the current module default.

Module Contents

httk.core.datastream.network_policy.DEFAULT_NETWORK_TIMEOUT: float | None = 30.0

Default timeout for each network open; read freshly for every open, or None to disable.

httk.core.datastream.network_policy.NETWORK_SCHEMES

Schemes treated as network access; file is local I/O and deliberately absent.

Future seam for an opt-in network policy; currently all implicit access is refused.

Parameters:

url (str) – URL whose implicit access was requested.

Raises:

PermissionError – Always for implicit network access.

httk.core.datastream.network_policy.resolve_timeout(hint)

Return an explicit timeout or the current module default.

Parameters:

hint (float | None) – Explicit timeout, or None to use the module default.

Returns:

The timeout to pass to the network opener.

Return type:

float | None