semvec/pypi-packages huggingface dataset:
growing-tree-base-mentalblood 1.6
Tool for saving files to continually growing dir tree
Requires Python: >=3.7

# Growing Tree Base

Tool for saving files to continually growing dir tree (you can set maximum files/dirs number on level).
Allows filesystem access files fast (as there are not so many files in one directory).



## Installation

```bash
pip install growing-tree-base-mentalblood
```



## Usage

Basic usage:

```python
from growing_tree_base import *

saveToDirTree(
    b'some content in bytes',
    'path/to/root/dir',
    'some_file_name.xml',
)
```

Advanced usage:

```python
from growing_tree_base import *

# custom functions for basic operations can be provided:
saveToDirTree(
    b'some content in bytes',
    'path/to/root/dir',
    base_file_name='some base name', # so files are named as f'{files_in_dir}_{base_file_name}',
    max_files_on_level=512, # default
    max_dirs_on_level=512, # default
    save_file_function=saveFile,
    get_amount_of_dirs_created_function=getAmountOfDirsCreated,
    set_dir_info_function=setDirInfo,
    get_first_not_full_dir_function=getFirstNotFullDir
)
```