Module: sarpyx.cli.unzip
File: sarpyx/cli/unzip.py
Unzip CLI Tool for SARPyX. This module provides a command-line interface for extracting SAR data from zip archives.
Exported Symbols (__all__)
No explicit __all__ list. Public symbols inferred from implementation.
Public Functions (4)
create_parser function
Create the argument parser for unzip command.
File location: sarpyx/cli/unzip.py:26
Signature
create_parser() -> argparse.ArgumentParser
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
- | - | no | - | No explicit public parameters; behavior inferred from implementation. |
Return Type
argparse.ArgumentParser
Configured ArgumentParser instance.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.cli.unzip import create_parser
result = create_parser()
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
extract_zip function
Extract a zip file to the specified directory.
File location: sarpyx/cli/unzip.py:80
Signature
extract_zip(zip_path: Path, extract_to: Path) -> bool
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
zip_path | Path | yes | - | Path to the zip file |
extract_to | Path | yes | - | Directory to extract to |
Return Type
bool
True if extraction was successful, False otherwise
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.cli.unzip import extract_zip
result = extract_zip(zip_path=<zip_path>, extract_to=<extract_to>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
find_zip_files function
Find all zip files in the given path.
File location: sarpyx/cli/unzip.py:101
Signature
find_zip_files(input_path: Path, recursive: bool=False) -> list[Path]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
input_path | Path | yes | - | Path to search for zip files |
recursive | bool | no | False | Whether to search recursively |
Return Type
list[Path]
List of paths to zip files
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.cli.unzip import find_zip_files
result = find_zip_files(input_path=<input_path>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
main function
Main entry point for unzip CLI.
File location: sarpyx/cli/unzip.py:127
Signature
main() -> None
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
- | - | no | - | No explicit public parameters; behavior inferred from implementation. |
Return Type
None
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- io
Example Usage
from sarpyx.cli.unzip import main
result = main()
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
Public Classes (0)
No public classes detected.