Small utility helpers for images, parallelism, and list logic.
Project description
derptools
Small utility helpers for images, parallelism, and list logic.
Functions
img_download(url, save_path, retries=3)— download an image with retriesimg_resize(fn, size=1200)— resize an image to a target width, preserving aspectimg_resize_over_background(address, out_size)— pad to square on white, then resizeimages_dl(urls, save_folder)— download a batch of image URLs to a folderparallel_map(func, *iterables, max_workers=8, **kwargs)— threaded map over zipped iterables, order preservedor_list(*args)— first truthy value (callables are called)and_list(*args)— last value if all truthy, else first falsyifdo(x, y)— cally()ifx()is truthytryreturn(func, *args, **kwargs)— call func, return0on exceptionordered_set(lis)— dedupe a list, preserving order
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
derptools-0.1.0.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file derptools-0.1.0.tar.gz.
File metadata
- Download URL: derptools-0.1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48e3715003fbfbf96cfda7fe3a94e353b4a2ca8559accee8d148ce345d03b67e
|
|
| MD5 |
b30c176fd9c1952daded6612c862c7e8
|
|
| BLAKE2b-256 |
6b374c250507685ed42478823ab92b66aea5de9b522c9251ddde919312344f7c
|
File details
Details for the file derptools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: derptools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0194374eb4ad315237694f90da16e396095834fbe2499c7c422ae7d6070fa9a0
|
|
| MD5 |
bcf6c4fb2ef9babaccebe4a3c42df53e
|
|
| BLAKE2b-256 |
54496c9f9f3897e8e2ec35236efc0d6dca1d6f42570b2168272c34dd6fe01ab6
|