Skip to content

miniproto.auth.dc.dc_options_from_env

dc_options_from_env(environ: Mapping[str, str] | None = None) -> tuple[DCOption, ...]

Read local test-DC overrides from environment-style mappings.

Parameters:

  • environ (Mapping[str, str] | None) – Mapping to read instead of :data:os.environ; defaults to the process environment.

Returns:

  • tuple[DCOption, …] – Static options for populated MINIPROTO_TEST_DC1 through MINIPROTO_TEST_DC5 entries.

Raises:

  • ValueError – If an override is not a valid host:port or [ipv6]:port endpoint.