Skip to content

sartoriuslib.config

SartoriusConfig and config_from_env() — package-level configuration overrides.

sartoriuslib.config

Runtime configuration for :mod:sartoriuslib (stub).

Environment-variable overrides follow the same pattern as alicatlib. See design doc §15 slice 0 for the skeleton scope.

SartoriusConfig dataclass

SartoriusConfig(
    default_baud=19200,
    default_parity="O",
    default_stopbits=1,
    default_bytesize=8,
    open_timeout=2.0,
    read_timeout=1.0,
    write_timeout=1.0,
    strict_capability_gating=False,
)

Frozen runtime configuration.

All fields have safe defaults; overrides come from environment via :func:config_from_env or are passed explicitly at open_device.

config_from_env

config_from_env()

Build a :class:SartoriusConfig from environment variables.

Not yet implemented; returns the default configuration.

Source code in src/sartoriuslib/config.py
def config_from_env() -> SartoriusConfig:
    """Build a :class:`SartoriusConfig` from environment variables.

    Not yet implemented; returns the default configuration.
    """
    return SartoriusConfig()