flask-limiter

Rate Limiting extension for Flask

MIT License

Downloads
19.7M
Stars
1.1K
Committers
44

Bot releases are hidden (Show)

flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.4.0

Published by alisaifee over 2 years ago

Feature

  • Add CLI for inspecting & clearing rate limits

Bug Fix

  • Ensure exempt decorator can be used with flags for view functions

Chores

  • Refactor rate limit resolution to limit manager
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.3.3

Published by alisaifee over 2 years ago

Bug Fix

  • Ensure request.blueprint is actually registered on the current app before
    using it for blueprint limits or exemptions. (Issue 336)
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.3.2

Published by alisaifee over 2 years ago

Feature

  • Extend cost parameter to default & application limits

Chore

  • Improve type strictness / checking
  • Improve documentation on landing page
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.3.1

Published by alisaifee over 2 years ago

Bug Fixes

  • Add missing extras requirements for installation
  • Add py.typed for PEP 561 compliance
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.3.0

Published by alisaifee over 2 years ago

Features

  • Expose option to register a callback for rate limit breaches
    of default limits via the ~flask_limiter.Limiter.on_breach
    constructor parameter
  • Replace use of flask.g with request context for keeping track of
    extension state (327)
  • Rework implementation of ~flask_limiter.Limiter.exempt to accomodate
    nested blueprints. (326)

Chores

  • Add python 3.11 to CI
  • Extract management and filtering of limits to LimitManager
  • Improve correctness of resolving inherited limits & extensions
    when working with Blueprints (especially nested ones)
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.2.0

Published by alisaifee over 2 years ago

Feature

  • Allow a function to be used for the cost parameter
    to limiter decorators.
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.1.1

Published by alisaifee over 2 years ago

Chore

  • Update documentation theme
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.1

Published by alisaifee over 2 years ago

Feature

  • Add current_limit attribute to extension to
    allow clients to fetch the relevant current limit
    that was evaluated.
  • Update extension constructor parameters to match
    flask config for header control
  • Add on_breach callback for limit and shared_limit
    decorators to be used as hooks for when a limit is breached
  • Add cost argument to limit and shared_limit to control
    how much is deducted when a hit occurs.

Chore

  • Improve documentation around configuration

Deprecation

  • Remove hacks for managing incorrectly ordered
    limit/route decorators
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.0.4

Published by alisaifee over 2 years ago

Chore

  • Documentation theme upgrades
  • Integrate pytest-docker plugin
  • Mass linting

Deprecation

  • Removed deprecated RATELIMIT_GLOBAL config
  • Added deprecation doc for RATELIMIT_STORAGE_URL config
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.0.3

Published by alisaifee over 2 years ago

Documentation & test tweaks

flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.0.2

Published by alisaifee over 2 years ago

Features

  • Pin Flask, limits to >= 2
  • Add type hints
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.0.1

Published by alisaifee over 2 years ago

Deprecations

  • Remove deprecated get_ipaddr method
  • Remove use of six
  • Remove backward compatibility hacks for RateLimit exceptions
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/2.0.0

Published by alisaifee over 2 years ago

Drop support for python < 3.7 & Flask < 2.0

flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/1.5

Published by alisaifee over 2 years ago

Final Release for python < 3.7

Features

  • Prepend key_prefix to extension variables attached to g
  • Expose g.view_limits
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/1.4

Published by alisaifee over 2 years ago

Bug Fix

  • Always set headers for conditional limits
  • Skip init_app sequence when the rate limiter is disabled
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/1.3.1

Published by alisaifee over 2 years ago

Bug Fix

  • Ensure headers provided explictely by setting _header_mapping
    take precedence over configuration values.
flask-limiter -

Published by alisaifee over 2 years ago

Features

  • Add new deduct_when argument that accepts a function to decorated limits
    to conditionally perform depletion of a rate limit (Pull Request 248)
  • Add new default_limits_deduct_when argument to Limiter constructor to
    conditionally perform depletion of default rate limits
  • Add default_limits_exempt_when argument that accepts a function to
    allow skipping the default limits in the before_request phase

Bug Fix

  • Fix handling of storage failures during after_request phase.

Code Quality

  • Use github-actions instead of travis for CI
  • Use pytest instaad of nosetests
  • Add docker configuration for test dependencies
  • Increase code coverage to 100%
  • Ensure pyflake8 compliance
flask-limiter - https://github.com/alisaifee/flask-limiter/releases/tag/1.2.1

Published by alisaifee over 2 years ago

  • Syntax error in version 1.2.0 when application limits are provided through
    configuration file (Issue 241)
flask-limiter -

Published by alisaifee over 2 years ago

Features

  • Add configuration parameter RATELIMIT_DEFAULTS_PER_METHOD to control whether defaults are applied per method.
  • Add support for in memory fallback without override (Pull Request 236)

Bug fix

  • Ensure defaults are enforced when decorated limits are skipped (Issue 238)
flask-limiter -

Published by alisaifee over 2 years ago

  • Respect existing Retry-After header values (Pull Request 143)
  • Documentation improvements