Skip to main content

Creates folder structures and puts data in it

Project description

Description

Creates folder structures and puts data in it.

Installation

pip install dtgn

Usage

From command line:

python -m dtgn [-h] [--mode {fixed,random}] --path PATH [--rootName ROOTNAME] [--depth DEPTH] [--fileCount FILECOUNT] [--fileMinSize FILEMINSIZE] [--fileMaxSize FILEMAXSIZE] [--purge | --no-purge | -u]

Option Short Type Default Description
--mode -m String fixed Data Creation Mode
fixed: all files will be created the same size. Size is taken fom fileMinSize argument.
random: the files created will have a random size between fileMinSize and fileMaxSize argument.
--path -p String - Path under which the folder structure shall be located
--rootName -r String dtgn The name of the root folder created under path argument
--depth -d Integer 1 The depth of the folder structure
--fileCount -f Integer 1 Nr. of files per folder depth
--fileMinSize -g Integer 2000 The minium file size in bytes
--fileMaxSize -i Integer 2000 The maximum file size in bytes
--purge -u Boolean False If true, all files in path+rootName will be deleted. No folder structure is created. Use it carefully.

Example

python -m dtgn -m random -p ./path/to -r dir -d 5 -f 10 -g 2048 -i 4096

Creates 5 subfolders under ./path/to/dir with 10 files per folder with a random size between 2048 and 4096 bytes per file.

################################################################################

dtgn (datagen) by 5f0
Creates folder structures and puts data in it

Current working directory: path/to/dtgn

Datetime: 01/01/1970 10:20:30

################################################################################

Mode: random
Create folder structure under ./path/to/dir
Create folder depth of 5
Create 10 files per folder
Size per file: between 2048 and 4096 Bytes

################################################################################

Total File Size created: 162008 Bytes
                         162.008 KB
                         0.162008 MB
                         0.00016200800000000003 GB

################################################################################

Execution Time: 0.004547 sec

License

MIT

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

dtgn-1.0.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dtgn-1.0.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file dtgn-1.0.1.tar.gz.

File metadata

  • Download URL: dtgn-1.0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for dtgn-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2bc30a5dca76739e232e79107f882880e0c980497a526ec4b60720f931ac7693
MD5 5a0156440f1c541364996182a7ce2327
BLAKE2b-256 532c6aff6e991c0049eb0b0b04e54cefdd7ec7046467a1e47ab0422d2b420f24

See more details on using hashes here.

File details

Details for the file dtgn-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: dtgn-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for dtgn-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1c666615bf0afad55fa36fa187b3b35311e4dd31fd1b08c69668deda25afedb
MD5 1e75dbd8ffc6016ebfe24a8ceec795f9
BLAKE2b-256 caea8a610501d3215a176af82a6ec7bfce204e580c879e8e2e53947fc105e4ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page