Releases: sayyid5416/generalpy
Releases · sayyid5416/generalpy
Release list
v1.11.2
Breaking change
- Removed
threadedargument from.emit(...)method ofSignalclass (It was inconvenient)
v1.11.1
Improvements in DatabaseCollection(...).get_data_of_dataType(...)
- If
default != None, andtype(data-of-dataType) != type(default),TypeErrorwill be raised (UseignoreErrorto suppress this behavior) - Proper type hints
v1.11.0
💠 [New] Signal class
- A signal object that can be used to connect callback.
- Simply connect a callback using
.connect(...)method. - Emit the signal using
.emit(...)method.
v1.10.2
v1.10.1
Improved
remove_extra_spacesnow removed invisible characters and html whitespace i.e 
v1.10.0
New
- Added
ignoreparameter toreplace_html_tags - [New function]
remove_extra_spaces: Removed extra spaces between words.
v1.9.1
Improved
- Added
ignoreparameter forretry_supportdecorator.
v1.9.0
New decorators:
retry_support: Retry the decorated function gracefully.
New general functions:
first_capital: Make first letter capital without changing any other thing.get_first_non_alphabet: Returns the first non-alphabet character from string.punctuate: Adds punctuation after string, if not present.replace_html_tags: Replace html tags from a string.similarized: Takes a list of strings and returns a list of sublists of similar-strings.sliced_list: Slice a list into a list of sublists, where each sublist contains specific no. of items.
v1.8.0
💠 [NEW] DatabaseCollection class
- Handles the data of a collection
collectionNamein some database. - This database will be in memory, but you can extend this functionality by using this class as a base class.
- And you can create a class which handles db locally or on cloud like MongoDB.
- Database structure should be:
DataBase > collection > collection-data. - Structure of collection-data:
dict[str, dict[str, Any]]i.edataID: {dataType: dataValue, ...}, ...
💠 Added method in general module
- [NEW]
replace_multiple_chars: Replace multiple characters from a string.
Settingsclass moved todatabasemodule, whereDatabaseCollectionclass is present. (settingsmodule would be deprecated in future releases).- Docstring improvements in various classes and methods.
test.pyimproved a little.
v1.7.1
- Now
logger: Loggercan be set forICACLSclass during__init__(class construction)