Ratelimit-io

Latest version: v0.6.5

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

Scan your dependencies

Page 1 of 3

0.6.5

Misc

- Updated README with examples for:
- Using outgoing request handling.

0.6.4

Misc

- Updated README with examples for:
- Using outgoing request handling.
- Updated pre-commit hooks versions

0.6.3

Misc

- Updated README with examples for:
- Using context managers for async workflows.

0.6.2

Features

- **Asynchronous Context Manager Support**:
- Added `__aenter__` and `__aexit__` methods to `RatelimitIO` for use as an asynchronous context manager.
- Ensures Lua scripts are automatically loaded into Redis when entering the context.
- Simplifies resource management and integration in async frameworks like FastAPI and aiohttp.

0.6.1

Misc

- Update version in pyproject.toml, README.md

0.6.0

Features

- Improved Error Handling:
- Introduced specific exception classes for better error categorization:
- `RatelimitIOError`: Base class for rate limit-related errors.
- `RatelimitExceededError`: Raised when the rate limit is exceeded.
- `ScriptLoadError`: Raised when the Lua script fails to load into Redis.
- Enhanced error messages for clarity and debugging.
- Logging Support:
- Added logging for critical operations and errors:
- Logs errors when the Lua script fails to load into Redis.
- Logs exception details for debugging unexpected issues.

Misc

- Code Simplification and Readability:
- Refactored exception handling for better readability and maintainability.
- Consolidated duplicated logic between synchronous and asynchronous methods.
- Documentation and Examples:
- Updated inline comments and docstrings for clarity.
- Included examples of error handling and logging usage.
- Testing Improvements:
- Increased test coverage for key generation, rate limit enforcement, and exception handling.
- Added edge case tests for `LimitSpec` and Redis Lua script loading.

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.