Imports
feu.imports ¶
Contain to check if a package or module is available.
feu.imports.check_click ¶
check_click() -> None
Check if the click
package is installed.
Raises:
Type | Description |
---|---|
RuntimeError
|
if the |
Example usage:
>>> from feu.imports import check_click
>>> check_click()
feu.imports.check_git ¶
check_git() -> None
Check if the git
package is installed.
Raises:
Type | Description |
---|---|
RuntimeError
|
if the |
Example usage:
>>> from feu.imports import check_git
>>> check_git()
feu.imports.check_requests ¶
check_requests() -> None
Check if the requests
package is installed.
Raises:
Type | Description |
---|---|
RuntimeError
|
if the |
Example usage:
>>> from feu.imports import check_requests
>>> check_requests()
feu.imports.is_click_available
cached
¶
is_click_available() -> bool
Indicate if the click
package is installed or not.
Returns:
Type | Description |
---|---|
bool
|
|
Example usage:
>>> from feu.imports import is_click_available
>>> is_click_available()
feu.imports.is_git_available
cached
¶
is_git_available() -> bool
Indicate if the git
package is installed or not.
Returns:
Type | Description |
---|---|
bool
|
|
Example usage:
>>> from feu.imports import is_git_available
>>> is_git_available()
feu.imports.is_module_available
cached
¶
is_module_available(module: str) -> bool
Check if a module path is available.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
module
|
str
|
The module to check. |
required |
Example usage:
>>> from feu import is_module_available
>>> is_module_available("os")
True
>>> is_module_available("os.path")
True
>>> is_module_available("missing.module")
False
feu.imports.is_package_available
cached
¶
is_package_available(package: str) -> bool
Check if a package is available.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
package
|
str
|
The package name to check. |
required |
Returns:
Type | Description |
---|---|
bool
|
|
Example usage:
>>> from feu import is_package_available
>>> is_package_available("os")
True
>>> is_package_available("os.path")
True
>>> is_package_available("my_missing_package")
False
feu.imports.is_requests_available
cached
¶
is_requests_available() -> bool
Indicate if the requests
package is installed or not.
Returns:
Type | Description |
---|---|
bool
|
|
Example usage:
>>> from feu.imports import is_requests_available
>>> is_requests_available()