Module: sarpyx.cli.upload
File: sarpyx/cli/upload.py
Upload CLI Tool for SARPyX. This module provides a command-line interface for uploading data to Hugging Face Hub.
Exported Symbols (__all__)
No explicit __all__ list. Public symbols inferred from implementation.
Public Functions (3)
create_parser function
Create the argument parser for upload command.
File location: sarpyx/cli/upload.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.upload import create_parser
result = create_parser()
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
upload_to_huggingface function
Upload a local folder to the Hugging Face Hub.
File location: sarpyx/cli/upload.py:85
Signature
upload_to_huggingface(folder_path: Path, repo_id: str, repo_type: str='dataset') -> None
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
folder_path | Path | yes | - | Path to the local folder. |
repo_id | str | yes | - | Repository ID (username/repo-name). |
repo_type | str | no | 'dataset' | Type of repository ('dataset', 'model', or 'space'). |
Return Type
None
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.cli.upload import upload_to_huggingface
result = upload_to_huggingface(folder_path=<folder_path>, repo_id=<repo_id>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
main function
Main entry point for upload CLI.
File location: sarpyx/cli/upload.py:112
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.upload import main
result = main()
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
Public Classes (0)
No public classes detected.