Metadata-Version: 2.4
Name: derptools
Version: 0.1.0
Summary: Small utility helpers for images, parallelism, and list logic.
License: MIT
Project-URL: Homepage, https://pypi.org/project/derptools/
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: requests
Requires-Dist: opencv-python
Requires-Dist: numpy
Requires-Dist: Pillow

# derptools

Small utility helpers for images, parallelism, and list logic.

## Functions

- `img_download(url, save_path, retries=3)` — download an image with retries
- `img_resize(fn, size=1200)` — resize an image to a target width, preserving aspect
- `img_resize_over_background(address, out_size)` — pad to square on white, then resize
- `images_dl(urls, save_folder)` — download a batch of image URLs to a folder
- `parallel_map(func, *iterables, max_workers=8, **kwargs)` — threaded map over zipped iterables, order preserved
- `or_list(*args)` — first truthy value (callables are called)
- `and_list(*args)` — last value if all truthy, else first falsy
- `ifdo(x, y)` — call `y()` if `x()` is truthy
- `tryreturn(func, *args, **kwargs)` — call func, return `0` on exception
- `ordered_set(lis)` — dedupe a list, preserving order
