pic_scanner.core package

Submodules

pic_scanner.core.cli module

pic_scanner.core.cli.load_modules()
pic_scanner.core.cli.main()

Module contents

pic_scanner.core.scan_image(image_path, base_url=None)

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:

ScannedImage

Raises:

ValueError – If the image path is invalid.

pic_scanner.core.scan_images(image_paths, base_url=None, do_not_convert_paths=False, do_not_provision_paths=False, prog_bar=False, threaded=False, num_threads=8, **kwargs)

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:

ScannedImageCollection

Raises:

ValueError – If the image paths are invalid.