# general

Python API: `hubai_sdk.utils.general`

## Functions

### is_cli_call

```python
def is_cli_call() -> bool:
```

Return whether the current process is running via the CLI.

### is_pip_package

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

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

Parameters

 * `filepath` (`str`): The filepath to check.

Returns

 * `bool`: Whether the file is part of an installed package.

### sanitize_net_name

```python
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` (`str`): The name or path to sanitize.
 * `with_suffix` (`bool`): Whether to preserve the suffix (file extension) without sanitizing it.

Returns

 * `str`

### significant_update_available

```python
def significant_update_available(cur: Version, new: Version) -> bool:
```

Return whether a newer version warrants notifying the user.

### version_check

```python
def version_check(current_version: str):
```

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

## Attributes

### PYPI_URL
