pic_scanner.core
Submodules
Functions
|
Scan an image for NSFW content. |
|
Scan a collection of images for NSFW content. |
Package Contents
- pic_scanner.core.scan_image(image_path: str | pathlib.Path, base_url: str | None = None) pic_scanner.models.image.ScannedImage
Scan an image for NSFW content.
- Parameters:
image_path (Union[str, Path]) – The path to the image to scan.
base_url (Optional[str]) – The base URL of the API to use.
- Returns:
The scanned image.
- Return type:
- Raises:
ValueError – If the image path is invalid.
- pic_scanner.core.scan_images(image_paths: list[str | pathlib.Path] | pathlib.Path, base_url: str | None = None, do_not_convert_paths: bool = False, do_not_provision_paths: bool = False, prog_bar: bool = False, threaded: bool = False, num_threads: int = 8, **kwargs) pic_scanner.models.image.ScannedImageCollection
Scan a collection of images for NSFW content.
- Parameters:
image_paths (Union[list[Union[str, Path]], Path]) – The paths to the images to scan.
base_url (Optional[str]) – The base URL of the API to use.
do_not_convert_paths (bool) – A flag indicating whether to convert the paths to strings.
do_not_provision_paths (bool) – A flag indicating whether to provision the paths.
prog_bar (bool) – A flag indicating whether to display a progress bar.
threaded (bool)
num_threads (int)
- Returns:
The scanned images.
- Return type:
- Raises:
ValueError – If the image paths are invalid.