thentgesMindee
3ae7154271
chg: ✅ minor change in testing
2022-11-08 17:58:11 +01:00
thentgesMindee
7f87a26201
chg: ✅ update tests to reflect behavior explained in docs
2022-11-07 18:39:01 +01:00
thentgesMindee
2ba9ed0630
fix: 🎨 apply black on tests files
2022-11-07 17:47:56 +01:00
thentgesMindee
b0d7bb03b7
chg: 🔀 update tests after rebase
2022-11-07 17:37:35 +01:00
thentgesMindee
17a514faef
new: ✨ add key_style parameter to choose between endpoint or url
2022-11-07 17:35:29 +01:00
thentgesMindee
366e14cce3
new: ✨ handle both sync and asynchronous handlers in ASGIMiddleware
2022-11-07 16:40:14 +01:00
thentgesMindee
bc69ebc8e5
chg: 🔀 update tests after rebase
2022-11-07 16:40:14 +01:00
thentgesMindee
bd9a1ecc55
chg: ✅ parametrize tests to use both HTTP and ASGI middlewares
2022-11-07 16:40:14 +01:00
Joris Hartog
5bb0edbd01
Add endpoints to cost/hit tests
2022-08-29 22:08:07 +02:00
Joris Hartog
c21ba98dcb
Add support for custom cost per hit
...
This commit adds a `cost` keyword to the `limit` and `shared_limit`
decorators which sets the cost of a hit.
This uses the `cost` keyword that was introduced in `limits` version
2.3.0, so this commit also updates the `limits` dependency from `^1.5`
to `^2.3`.
Closes #94 , #106
2022-08-26 23:40:00 +02:00
Trevor Currie
74fc1652a7
Adding workflow to enforce no unused imports.
2022-06-16 23:23:03 +02:00
Trevor Currie
657461b126
Removes all unused imports.
2022-06-16 23:18:07 +02:00
Marat Sarbasov
59d2cdd9de
Add test_dynamic_limit_provider_depending_on_key
2022-01-16 04:38:08 +03:00
Laurent Savaete
281e010680
Fix exempt decorator for async routes
2021-10-10 15:10:46 +01:00
Laurent Savaete
e5cd5a6899
Merge pull request #60 from twcurrie/twcurrie/multiple-decorators-with-headers
...
Resolving bug with handling the Retry-After header.
2021-08-28 15:13:33 +01:00
Trevor Currie
9f164179bc
Linting.
2021-08-24 09:02:44 -07:00
Trevor Currie
9bd22a1f00
Resolving bug with handling the Retry-After header.
2021-08-24 08:55:35 -07:00
Trevor Currie
21652645ef
Resolving bug of unregistered endpoints in the disabled state.
2021-04-05 15:38:18 -07:00
Laurent Savaete
458def2a72
Fix #35 Disable the limiter if enabled==False
2021-02-05 00:51:00 +00:00
Guillaume Gardey
b6fa460254
Fix formatting
2020-12-23 10:04:52 +00:00
Guillaume Gardey
755bf44e12
Fix copy/paste issue in test
2020-12-23 09:48:50 +00:00
Guillaume Gardey
acde458c45
fix: Address issue with decorator
...
The value returned by an endpoint may not be an instance or subclass
of `Response`, in this case FastAPI builds the actual Response
at an upper level in the middleware stack.
This patch allows the decorator to inspect the endpoint to retrieve the
associated `Response` to allow headers to be injected.
2020-12-23 09:48:50 +00:00
Reuben Thomas-Davis
07e0e20be7
🎨 remove useless comments
2020-10-01 20:11:19 +01:00
Reuben Thomas-Davis
32205c5b25
🎨 format with black
2020-10-01 19:13:50 +01:00
Reuben Thomas-Davis
3753de763c
Merge branch 'master' of https://github.com/laurentS/slowapi
...
# Conflicts:
# slowapi/extension.py
merge with master conforming to new docstring style
2020-10-01 19:11:30 +01:00
Reuben Thomas-Davis
b8fa36ea83
✨ add override_defaults parameter and fix merge test
2020-10-01 19:05:13 +01:00
Laurent Savaete
b82536a669
Fix black and mypy errors
2020-09-28 00:53:41 +01:00
Thomas LEVEIL
a66a728e50
TESTS : cover cases of missing request: Request parameter or misuse
2020-09-27 20:20:16 +02:00
Reuben Thomas-Davis
272ae50d05
add default limit merging test
2020-09-13 19:33:31 +01:00
Reuben Thomas-Davis
cd79c35a39
✅ improve exempt decorator test
2020-07-11 21:56:44 +01:00
Reuben Thomas-Davis
6580bb0624
add middleware and exempt decorator
2020-07-04 03:16:46 +01:00
Laurent Savaete
9880ff7625
First version
2020-02-21 13:51:35 +00:00