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.0.tar.gz (5.5 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.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dtgn-1.0.0.tar.gz
  • Upload date:
  • Size: 5.5 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.0.tar.gz
Algorithm Hash digest
SHA256 80ea0aab1f5f7a6ba49b75f4b8b75ddc7f0c670a38165864c11af1c768b40b8e
MD5 5c20809441458b27d206df93dd66ac24
BLAKE2b-256 ea155265b05bee22705fdde3624f4d481dbc0fdf544626e4db290ca91e11b275

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dtgn-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c9e8f219b17dfc4c53d1da299ecf64764d35bdb633c078b409b9941b8ae9ddd
MD5 d552dd8c616912d8655879fc689beea7
BLAKE2b-256 020fb11d8abfef3dd9377cea3c713729478af4ab79b020d73de173a780650aee

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