Skip to content

Commit 93a6360

Browse files
committed
added throttle parameter in NinjaExtraAPI
1 parent ff1b06c commit 93a6360

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ninja_extra/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from ninja.openapi.docs import DocsBase, Swagger
2222
from ninja.parser import Parser
2323
from ninja.renderers import BaseRenderer
24+
from ninja.throttling import BaseThrottle
2425
from ninja.types import DictStrAny, TCallable
2526

2627
from ninja_extra import exceptions, router
@@ -48,6 +49,7 @@ def __init__(
4849
urls_namespace: Optional[str] = None,
4950
csrf: bool = False,
5051
auth: Optional[Union[Sequence[Callable], Callable, NOT_SET_TYPE]] = NOT_SET,
52+
throttle: Union[BaseThrottle, List[BaseThrottle], NOT_SET_TYPE] = NOT_SET,
5153
renderer: Optional[BaseRenderer] = None,
5254
parser: Optional[Parser] = None,
5355
openapi_extra: Optional[Dict[str, Any]] = None,

0 commit comments

Comments
 (0)