Skip to content

lang_tools.exercises.wordle_config

Wordle exercise configuration.

This module defines WordleConfig, which carries the exercise-level settings for a Wordle game session. It follows the Config side of the project's Config / Params pattern: field defaults are the single canonical place where the values [4, 5, 6, 7] and 5 are defined. No Params class is needed because there are no environment variables or secrets to load.

Callers instantiate WordleConfig directly, with or without overrides:

Example

Default settings::

config = WordleConfig()

Five-letter-only variant::

config = WordleConfig(word_lengths=[5], default_word_length=5)

Classes:

  • WordleConfig

    Configuration for a Wordle exercise session.

WordleConfig

Bases: BaseModelKwargs

Configuration for a Wordle exercise session.

Attributes:

  • word_lengths (list[int]) –

    Allowed word lengths offered in the word-length selector. Defaults to [4, 5, 6, 7].

  • default_word_length (int) –

    Pre-selected word length when no user preference is stored. Defaults to 5.