Skip to content

0.0.2

Choose a tag to compare

@eadwinCode eadwinCode released this 26 Mar 13:41
· 151 commits to master since this release
8e89938

Throttling Feature for Ellar

Setup with Module

from ellar.common import Module
from ellar_throttler import ThrottlerModule

@Module(modules=[
    ThrottlerModule.setup(ttl=60, limit=10)
])
class ApplicationModule:
    pass

Apply to Controller

# project_name/controller.py
from ellar.common import Controller, guards
from ellar_throttler import throttle, ThrottlerGuard

@Controller()
class AppController:

  @guards(ThrottlerGuard)
  @throttle(limit=5, ttl=30)
  def normal(self):
      pass

Full Changelog: https://github.com/eadwinCode/ellar-throttler/commits/0.0.2