Generalpy

Latest version: v1.17.0

Safety actively analyzes 714792 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

1.8.0

💠 [NEW] `DatabaseCollection` class
- Handles the data of a collection `collectionName` in 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.e `dataID: {dataType: dataValue, ...}, ...`

💠 Added method in `general` module
- [NEW] `replace_multiple_chars`: Replace multiple characters from a string.

---

- `Settings` class moved to `database` module, where `DatabaseCollection` class is present. (`settings` module would be deprecated in future releases).
- Docstring improvements in various classes and methods.
- `test.py` improved a little.

1.7.1

- Now `logger: Logger` can be set for `ICACLS` class during `__init__` _(class construction)_

1.7.0

Added New classes

💠 `Attrib` class _(windows OS only)_
- Handles the `attrib` command from windows OS.
- To set/modify/remove the `A/H/I/R/S` attributes for files/folders.
- Use `attrib /?` in CMD for more info.


💠 `ICACLS` class _(windows OS only)_
- Handles functions related to `icacls` command 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 `tasklist` command 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 the `supportedPlatforms`

💠 `general` module
- `get_digit_from_text`: Returns the digit from the first occurrence of `(digit)`.
- `is_python`: Returns `True` if current running app is `python`.
- `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

1.6.0

[Added] `time_it` decorator function in `decorator` module:
- Prints the time taken by the decorated function

1.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 in `Settings`, `LevelFormatter` and `CustomLogging` classes
- Refactoring in `Settings` class

1.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_path` method was not creating filepaths correctly
- Now `Settings.get_setting` takes `default` argument. It would be returned, if setting not present
- Improved docstring of `Settings` class
- Added docstring in `IgnoreError` class
- Readme updated
- Deleted `test-settings.py` file _(not necessary any more)_ _(doesn't affect the package)_

Page 4 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.