Index
wrknv.wenv.operations
¶
wrknv Operations¶
Core operation modules for workenv functionality.
Functions¶
download_file
¶
download_file(
url: str,
output_path: Path,
show_progress: bool = True,
headers: dict[str, str] | None = None,
checksum: str | None = None,
) -> None
Synchronous wrapper for download_file_async.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
URL to download from |
required |
output_path
|
Path
|
Where to save the file |
required |
show_progress
|
bool
|
Whether to log progress |
True
|
headers
|
dict[str, str] | None
|
Optional custom headers |
None
|
checksum
|
str | None
|
Optional checksum for verification |
None
|
Source code in wrknv/wenv/operations/download.py
extract_archive
¶
Extract archive to specified directory.
Source code in wrknv/wenv/operations/install.py
get_architecture
¶
Get normalized architecture name for tool downloads.
Returns:
| Type | Description |
|---|---|
str
|
Architecture string suitable for tool downloads (amd64, arm64, etc). |
get_os_name
¶
Get normalized OS name for tool downloads.
DEPRECATED: Use provide.foundation.platform.get_os_name directly.
get_platform_info
¶
Get platform information for tool downloads.
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
Dictionary with platform details for tool compatibility. |
Source code in wrknv/wenv/operations/platform.py
make_executable
¶
Make file executable on Unix-like systems.
Source code in wrknv/wenv/operations/install.py
run_version_check
¶
Run version check command for a tool and return output.
Includes automatic retry with exponential backoff for transient failures.
Source code in wrknv/wenv/operations/verify.py
verify_checksum
¶
Verify file checksum using specified algorithm.
Source code in wrknv/wenv/operations/download.py
verify_tool_installation
¶
Verify that tool installation works and version matches.