Releases: sayyid5416/generalpy
Releases · sayyid5416/generalpy
Release list
v1.7.0
Added New classes
💠 Attrib class (windows OS only)
- Handles the
attribcommand from windows OS. - To set/modify/remove the
A/H/I/R/Sattributes for files/folders. - Use
attrib /?in CMD for more info.
💠 ICACLS class (windows OS only)
- Handles functions related to
icaclscommand from windows OS. - To set/modify/remove the permissions for files/folders.
- Use
icacls /?in CMD for more info.
💠 TaskList class (windows OS only)
- Handles functions related to
tasklistcommand of windows OS. - Get running tasks/executables.
- Check if an exe is running or not, or how many of it's instances are running.
Added New methods in modules
💠 decorator module
platform_specific: Run decorated function only if current platform is one of thesupportedPlatforms
💠 general module
get_digit_from_text: Returns the digit from the first occurrence of(digit).is_python: ReturnsTrueif current running app ispython.set_app_user_model_id: Sets the App User Model ID for the current process on windows OS.
Other changes
- Refactored the internal imports
- Improved docstrings of many modules, classes and methods
v1.6.0
[Added] time_it decorator function in decorator module:
- Prints the time taken by the decorated function
v1.5.0
[NEW] Added new methods:
delete_files_by_condition: Deletes all files in directory and its subdirectories according to some condition.generate_repr_str: Returns a suitable string for__repr__method of classes.
Improved
- Added
__repr__method inSettings,LevelFormatterandCustomLoggingclasses - Refactoring in
Settingsclass
v1.4.0
[NEW] general module
This module contains general methods
get_digit_from_text: Returns the digit from the first occurrence of(digit).
Other changes
- [Bug Fix]
get_new_pathmethod was not creating filepaths correctly - Now
Settings.get_settingtakesdefaultargument. It would be returned, if setting not present - Improved docstring of
Settingsclass - Added docstring in
IgnoreErrorclass - Readme updated
- Deleted
test-settings.pyfile (not necessary any more) (doesn't affect the package)
v1.3.2
Nothing new in this release
Fixed the links in readme and pypi project
v1.3.1
[NEW] exceptions module
IgnoreErrorclass (read more about it in Readme)
v1.3.0
[NEW] decorator module: Contains decorators
combine_single_items: To combine item of sublists (which contain only one item) in a single sublist.conditional: To run the decorated function and return it's value, only when condition=Truerun_threaded: To run the decorated function in a new thread
[NEW] files module: Contains methods to work with files
delete_files_by_prefix_suffix: Deletes all files in directory and its subdirectories which haveprefixas prefix orsuffixas suffix in their name.get_new_path: Returns new filePath for files, which do not exist by appending (1/2/3/..).get_random_file_path: Returns a random path of a file which is not present, in parentDirectoryread_file_chunks: Read file and returns possible data of chunkSize
Settings class
- Added
__str__method
CustomLogging class
- Better formatting for log statements
- Logs for
logging.WARNINGwill have[!]as prefix
Other changes
- Minor docstring improvements
- Added
test.pyfile for internal testing (not for package)
Formatting improvements
Better formatting of logs in CustomLogging class
Improvements
CustomLogging class
- default value of
loggerName = __name__ - Better spacing in log statements
- Added
[!]for warning logs
Critical issue fix
Fixed missing required dependency pytz