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.2.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.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dtgn-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 9454105b37a69c31ddd9949222cfd2b186348e036bfcf8f5e6611c0852f21f45
MD5 b3334ab36b24b2b745e6d3a25a77587d
BLAKE2b-256 6782362c972f592b90d6f858c68149a1c5b30578118019717bb5c557d820cf38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dtgn-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d70c5411cb6cdccc83f60e104adb5d0db5a765a9dedc4f182dcfd00d5a8b5201
MD5 853f8d5e8136d8f60a7e62b082f34210
BLAKE2b-256 0fc26c31a6013c36d2d7814cf4a6033f65428b92085744a65ec5edf96e61415e

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