Log-rate-limit

Latest version: v1.4.2

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

Scan your dependencies

Page 2 of 2

1.2.0

Changed

- Default rate-limiting now applies to identical log messages (instead of to logs originating from the same line of code).
- Replaced boolean `all_unique` parameter with `default_stream_id` which can have multiple options, including ones that achieve the same functionality as before:
- `default_stream_id=None` (or `default_stream_id=DefaultSID.NONE`) is equivalent to `all_unique=False`.
- `default_stream_id="file_line_no"` (or `default_stream_id=DefaultSID.FILE_LINE_NO`) is equivalent to `all_unique=True`.

Added

- New `default_stream_id` parameter includes a third option that wasn't previously available:
- `default_stream_id="log_message"` (or `default_stream_id=DefaultSID.LOG_MESSAGE`) which will set the default stream ID such that repeated log messages will be rate limited.

1.1.0

Added

- Add methods `trigger()`, `should_trigger()` and `reset_trigger()` that are used to evaluate rate-limiting and trigger logs. These functions can also be used separately from logging for other purposes, e.g. to trigger custom rate-limited events.

1.0.1

Changed

- Expanded usage examples in documentation, as well as other small improvements.
- Slight spacing change to default summary message.

Added

- Allow summary message to contain `stream_id` and `period_sec`.

Fixed

- Set PyPI package description.

1.0.0

Initial release to PyPI.

Page 2 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.