Python Helper for Repetitive Tasks with File and Data Management
Project description
About UtilityLib
- Provided ready to use functions to process, read, write, list files and directories and more...
Installation
- Install using source from github using python's pip module
- Copy the UtilityLib directory in the project
pip install UtilityLib
under any python envrironment
Examples
# Append package path to PYTHONPATH or use sys.path.append method to append parent directory's path
# 1
from UtilityLib import EU
EU.filename("filepath/filename.ext1.ext2")
# 2
from UtilityLib import UtilityManager as UM
UM().filename("filepath/filename.ext1.ext2")
# 3
import UtilityLib as UL
UL.UM.filename("filepath/filename.ext1.ext2")
UL.UtilityManager().filename("filepath/filename.ext1.ext2")
# 4
from UtilityLib import ProjectManager
_pm = ProjectManager(
path_bases=("/mnt/D/DataDrive", "D:/path-windows")
version=2,
subversion=202211
)
_pm.config.new_key.deeper_new_key = "new_value"
# Update Old Config
_pm.update_config()
# Save as a new version but later change key
_pm.update_config(subversion=20221103)
Quickly compress files to tar.gz (tgz) format and remove the directory
Later the files can be read directly from the tgz compressed file
_wos_files = EU.search(f"{path_scrapped_queries}/WOS-Downloads", "*.csv")
EU.add_tgz_files(f"{path_scrapped_queries}/WOS-Downloads.tgz", _wos_files)
EU.delete_path(f"{path_scrapped_queries}/WOS-Downloads")
Version Updates
2.8
- Method aliases
- Setup whl build system
2.6
20221103
- Added
ProjectManager
- Dot notion to access or deep nested objected
- Can hold data by pickling and unpickling (Could there be any data loss due to protocol version change?)
- class to keep track of configuration
- persistent storage
- Storage by pickling and unpickling
20221018
- Class
DataUtility
for quick processing of text, numbers or objects or frequently used libraries require_form
method to include libraries from external folder
20220923
- Upgraded
FileSystemUtility.list_zipfile
toFileSystemUtility.list_zip_files
20220921
- Added cli argument parser
- ITERTOOLS product and combinations method
20220914
- Added single static
update_attributes
method and removed__update_attr
method from individual class
2.57.20220908
- Implemented ready to go import
from UtilityLib import EU
- Param changes in EU.combination method
2.56.20220905
- Added new methods
- Major changes (check commit)
- Removed json parameter from FileSystemUtility.get_file
- Minor changes (check commit)
2.5.20220818
- Package reusability enhancement
2.4.20220129
- Initial version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
UtilityLib-2.9.20240323.tar.gz
(24.7 kB
view details)
Built Distribution
File details
Details for the file UtilityLib-2.9.20240323.tar.gz
.
File metadata
- Download URL: UtilityLib-2.9.20240323.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef9d67925c0bf96821aa26f7ff3eec2ab72b7dfab8a364e19c52f9fd7499c14e |
|
MD5 | 0adf4b47328161200e49a3cb7e356f67 |
|
BLAKE2b-256 | fa04fb3274226ffbeae1a949003b6074bcbd21ca97ef6e15248ebaeaf81533d7 |
File details
Details for the file UtilityLib-2.9.20240323-py3-none-any.whl
.
File metadata
- Download URL: UtilityLib-2.9.20240323-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d958d7d1adbd06dbf9756b0eda3d17db7050a2ed767efc99661d84575b7e3aa8 |
|
MD5 | 35ff9669ad833ef38142102425bf5e88 |
|
BLAKE2b-256 | 44946b760f75e75dac114aabc261ab27baec8f421d5806ab4ef91b13a448cbf1 |