Generalpy

Latest version: v1.16.2

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

Scan your dependencies

Page 3 of 6

1.10.2

Bug fix in `replace_html_tags`

1.10.1

Improved
- `remove_extra_spaces` now removed invisible characters and html whitespace i.e `&32;`

1.10.0

New
- Added `ignore` parameter to `replace_html_tags`
- [New function] `remove_extra_spaces`: Removed extra spaces between words.

1.9.1

Improved
- Added `ignore` parameter for `retry_support` decorator.

1.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.

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.

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.