Sage
sage-directory is a python package that offers a detailed overview of folder contents and streamlines the process of copying and managing directories. It is designed to enhance productivity and simplify file management. It provides details of folder contents, including the file types, size, and subfolder structures, enabling quick insights into the organization of your directory.
Beyond analysis, the tool offers robust functionality for copying entire folders, ensuring seamless management and replication of data environments. Whether you're organizing complex project files, backing up critical datasets, or duplicating environments, this tool is built to optimize your workflow.
Installation
pip install sage-directory
Usage
Main Features
Comprehensive Folder Overview
Generate detailed summaries of folder contents, including file types, sizes, and subfolder structures,
import sage
sage.get_folder_overview('.')
| Path | Folder Name | Is Folder? | File Name | File Size (Bytes) | File Extensions | Number of Files in Folder | Depth |
| ./bathoom.py | . | False | bathoom_cal.py | 2151 | .py | 0 | 0 |
| ./kitchen.png | . | False | kitchen.png | 2151 | .png | 0 | 0 |
| ./shops | shops | True | N/A | 0 | N/A | 2 | 1 |
Selective Copying
Choose a specific file to overwrite another in multiple directories
import sage
# overwrites the entered filename (basement.png) in the renovated_kitchen folder with the file in kitchen_catelog folder
sage.batch_file_overwrite(./kitchen_catelog, ./renovated_kitchen, "basement.png")
Batch Operations
Perform operations on multiple directories
import sage
# only copies 10 folders that are in the kitchen_catelog that share the same folder names as those in the old_kitchen folder in the renovated_kitchen folder
sage.copy_num_folders(./old_kitchen, ./kitchen_catelog, ./renovated_kitchen, 10)
# only copies folders that are in the kitchen_catelog that share the same folder names as those in the old_kitchen folder in the renovated_kitchen folder
sage.copy_folders(./old_kitchen, ./kitchen_catelog, ./renovated_kitchen)
Release files for sage-directory 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sage-directory-0.0.8.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sage_directory-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.8 kB
Release files / sage-directory-0.0.8.tar.gz
| Download URL | sage-directory-0.0.8.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6e84cd3cbd45750d543e79adc47d495397108e5ad7ad851ce40fce9ae03a16a
|
|
BLAKE2b-256 checksum How to use checksums |
a47348b8707d65f7e918fea87f326b915622c90bca4448e474f28b0beb0b3332
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.13
|
Release files / sage_directory-0.0.8-py3-none-any.whl
| Download URL | sage_directory-0.0.8-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c926ffa20800e8ee3693ad213131ea7716787f155b99aa02ba9e5e6700c54303
|
|
BLAKE2b-256 checksum How to use checksums |
fd585c7c790d572fc42fb9d76495afe9e2ff88360f131d3ea094ad785ad0eb06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.13
|