A simple, fast, and highly configurable command-line tool for generating dummy files.
Project description
FileSpawn
FileSpawn is a simple, fast, and highly configurable command-line tool for generating dummy files of specific sizes and quantities. It's perfect for developers, testers, and system administrators who need to create test data, simulate disk usage, or prepare files for benchmarking.
Key Features
- Precise Control: Specify the exact number of files and the size of each file.
- Human-Readable Sizes: Use intuitive size suffixes like
10KB,25MB, or1GB. - Custom Naming: Define custom base names and extensions for your files.
- Efficient & Fast: Optimized for performance, even when creating gigabytes of data.
- User-Friendly: A clean CLI with progress bars and clear feedback, powered by
ClickandRich. - Safe: Creates output directories if they don't exist and provides clear error messages.
Installation
Install filespawn directly from PyPI using pip:
pip install filespawn
How to Use
The filespawn command allows you to generate files with just one line.
Basic Usage
To create 5 files, each 1 kilobyte in size, in the current directory:
filespawn --count 5 --size 1KB
Advanced Usage
To create 100 files, each 10 megabytes, in a directory named test-data, with a base name of "report" and a .dat extension:
filespawn --count 100 --size 10MB --dir ./test-data --name report --ext dat
This will generate files like report_1.dat, report_2.dat, ..., report_100.dat inside the ./test-data/ directory.
Command-Line Options
Here are all the available options for the filespawn command:
| Option | Short | Description | Required |
|---|---|---|---|
--count |
-c |
The total number of files to create. | Yes |
--size |
-s |
The size of each file. Accepts bytes (e.g., 1024) or suffixes like KB, MB, GB. |
Yes |
--dir |
-d |
The output directory for the created files. Defaults to the current directory. | No |
--name |
The base name for the files (e.g., file becomes file_1, file_2). Defaults to file. |
No | |
--ext |
The file extension. Defaults to dummy. |
No | |
--help |
Show the help message and exit. | No |
Use Cases
filespawn is useful for:
- Testing: Generating files to test application behavior with large datasets or specific file types.
- Benchmarking: Creating files to benchmark disk I/O performance.
- Simulation: Simulating log file generation or user data creation.
- Placeholders: Quickly creating placeholder files for a project structure.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 filespawn-1.0.0.tar.gz.
File metadata
- Download URL: filespawn-1.0.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d18f60cadcca0cfb7347708c1d32ae8da8e6c58cda984dabb9904b8e4a00fcb
|
|
| MD5 |
dda3c3ec45a63a4de38865d6495ca3bc
|
|
| BLAKE2b-256 |
a8ed2401e37517cc803bc0cee4bac799ef04d86516ab3c4757715288824de25a
|
Provenance
The following attestation bundles were made for filespawn-1.0.0.tar.gz:
Publisher:
workflow.yml on aikmeng/filespawn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
filespawn-1.0.0.tar.gz -
Subject digest:
9d18f60cadcca0cfb7347708c1d32ae8da8e6c58cda984dabb9904b8e4a00fcb - Sigstore transparency entry: 453841578
- Sigstore integration time:
-
Permalink:
aikmeng/filespawn@ca813a5dae79df578ff4fa8d4aed53543441e4b7 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/aikmeng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@ca813a5dae79df578ff4fa8d4aed53543441e4b7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file filespawn-1.0.0-py3-none-any.whl.
File metadata
- Download URL: filespawn-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01859a1e9aefa979c592caa00c1711d638075b2240c18bec0bdefdde1b294179
|
|
| MD5 |
1547eb3e7e1f46c9c749ea6c638b128e
|
|
| BLAKE2b-256 |
7a3cf9ccbc786297e02df9424800f42c0c31f24088c2c436e5c0166829ab5d78
|
Provenance
The following attestation bundles were made for filespawn-1.0.0-py3-none-any.whl:
Publisher:
workflow.yml on aikmeng/filespawn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
filespawn-1.0.0-py3-none-any.whl -
Subject digest:
01859a1e9aefa979c592caa00c1711d638075b2240c18bec0bdefdde1b294179 - Sigstore transparency entry: 453841579
- Sigstore integration time:
-
Permalink:
aikmeng/filespawn@ca813a5dae79df578ff4fa8d4aed53543441e4b7 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/aikmeng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@ca813a5dae79df578ff4fa8d4aed53543441e4b7 -
Trigger Event:
push
-
Statement type: