module documentation

Undocumented

Function is_cli_call Return whether the current process is running via the CLI.
Function is_pip_package Determine if the file at the given filepath is part of a pip package.
Function sanitize_net_name Sanitize net name or path. If input is a path, only sanitize the basename. If input is a name, sanitize the whole string. Collapse multiple underscores.
Function significant_update_available Return whether a newer version warrants notifying the user.
Function version_check Check PyPI for a newer SDK version and exit on major/minor updates.
Constant PYPI_URL Undocumented
Function _normalize_underscores Collapse consecutive underscores into a single underscore.
def is_cli_call() -> bool:

Return whether the current process is running via the CLI.

def is_pip_package(filepath: str = __name__) -> bool:

Determine if the file at the given filepath is part of a pip package.

Parameters
filepath:strThe filepath to check.
Returns
boolWhether the file is part of an installed package.
def sanitize_net_name(name: str, with_suffix: bool = False) -> str:

Sanitize net name or path. If input is a path, only sanitize the basename. If input is a name, sanitize the whole string. Collapse multiple underscores.

Parameters
name:strThe name or path to sanitize.
with_suffix:boolWhether to preserve the suffix (file extension) without sanitizing it.
Returns
strUndocumented
def significant_update_available(cur: Version, new: Version) -> bool:

Return whether a newer version warrants notifying the user.

def version_check(current_version: str):

Check PyPI for a newer SDK version and exit on major/minor updates.

PYPI_URL: str =

Undocumented

Value
'https://pypi.org/pypi/hubai-sdk/json'
def _normalize_underscores(s: str) -> str:

Collapse consecutive underscores into a single underscore.