Skip to main content

forfiles

Utilities for files and images.

Installation

Use the package manager pip to install forfiles.

pip install --upgrade forfiles

Usage

from forfiles import fs, image

# file tools
fs.filter_type("directory-to-filter/", [".png", ".txt", "md"])
fs.dir_create("directory-to-create/")
fs.dir_delete("directory-to-delete/")

# image tools
image.scale("boat.png", 1, 1.5)
image.resize("car.jpg", 1000, 1000)
image.to_png("plane.jpg")

# you can also process all files in a directory with a callback function
# arguments after the function are passed to the callback in addition to the file path
fs.process_files("cats/", image.scale, 2, 2)
fs.process_files("giraffes/", image.resize, 1000, 1000)
fs.process_files("tortoises/", image.to_png)

# you can also iterate using a generator syntax
for file in fs.iterate_files('gorillas/'):
    if file.suffix == '.py':
        print(file.name)

Metadata

Release files for forfiles 6.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forfiles 6.0.0
File Size Uploaded
forfiles-6.0.0.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for forfiles 6.0.0
File Interpreter ABI Platform
forfiles-6.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / forfiles-6.0.0.tar.gz

Download URL forfiles-6.0.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cb62ca835b427a60ec183e607fa96f7fd6f7746d282cecb5250dadb17e5cbf68
BLAKE2b-256 checksum
How to use checksums
d1bb82f1fc612fd36f2a393be9893b47553437a8716673bc90a5e2bf4a995745
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / forfiles-6.0.0-py3-none-any.whl

Download URL forfiles-6.0.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ec77241e93499371c878e55fc9f63bd071519f303cc18932f198ef65ac86ddc
BLAKE2b-256 checksum
How to use checksums
9793a6c911095e2b701a9dd86113c06a60af43617250b4bbbb7aaaf9de4c399f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

6.0.0 This release

2 release files

5.0.0

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page