venvstacks.stacks.EnvironmentLock¶
- class venvstacks.stacks.EnvironmentLock(locked_requirements_path: Path, declared_requirements: tuple[str, ...], other_inputs: tuple[str, ...], versioned: bool = False)¶
Layered environment dependency locking management.
Methods
append_other_input
(other_input)Supply an additional "other input" to use when determining lock validity.
extend_other_inputs
(other_inputs)Supply additional "other inputs" to use when determining lock validity.
get_deployed_name
(env_name)Report layer name with lock version (if any) appended.
invalidate_lock
()Mark the lock as invalid, even if it appears locally consistent.
load_valid_metadata
()Loads last locked metadata only if the requirements hash matches.
prepare_lock_inputs
()Write declared requirements to disk as a locking process input.
update_lock_metadata
()Update the recorded lock metadata for this environment lock.
Attributes
has_valid_lock
True
if layer has been locked and lock metadata is consistent.last_locked
Date and time when the layer requirements were last locked.
lock_version
Last recorded version of the layer requirements.
locked_at
ISO-formatted UTC string reporting the last locked date/time.
locked_requirements_path
other_inputs
requirements_hash
Hash of the last locked set of layer requirements.
versioned