Installed Modules¶
installed_modules
¶
Read/write convention for the installed_modules.txt file at the project root.
The file format is one module name per non-comment line. Two optional header lines are supported:
# generated_at: 2026-05-09T11:46:14Z
# generated_by: <free-form>
Other # lines are treated as plain comments and ignored.
Classes:
| Name | Description |
|---|---|
InstalledModules |
Contents and metadata of an |
Functions:
| Name | Description |
|---|---|
installed_modules_path |
Return the conventional path of the installed-modules file. |
read_installed_modules |
Read installed_modules.txt at the project root. |
InstalledModules
dataclass
¶
InstalledModules(modules: list[str], generated_at: datetime | None, generated_by: str | None, path: Path)
Contents and metadata of an installed_modules.txt file.
Attributes:
| Name | Type | Description |
|---|---|---|
modules |
list[str]
|
Ordered, deduplicated list of module names. |
generated_at |
datetime | None
|
Timestamp parsed from the |
generated_by |
str | None
|
Free-form string from the |
path |
Path
|
Absolute path of the file. |
-
Reference
IO
Installed Modules
installed_modulesread_installed_modules
installed_modules_path
¶
read_installed_modules
¶
read_installed_modules(repo_root: Path) -> InstalledModules | None
Read installed_modules.txt at the project root.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Path
|
Repository root directory. |
required |
Returns:
| Type | Description |
|---|---|
InstalledModules | None
|
Parsed |
InstalledModules | None
|
exist. The caller decides whether absence is fatal or informational. |
Header lines accepted (case-sensitive)::
# generated_at: 2026-05-09T11:46:14Z
# generated_by: <free-form>
Other # lines are treated as plain comments and ignored.
Blank lines are ignored. One module name per non-comment line.