summaryrefslogtreecommitdiff
path: root/gnu/packages/python-web.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2025-02-19 13:07:29 +0100
committerRicardo Wurmus <rekado@elephly.net>2025-02-19 13:24:32 +0100
commit9ee08f233bf3394dc49349ffd25806bf84eccd40 (patch)
tree25c7997c78884045fe1a250e232c162975be7f72 /gnu/packages/python-web.scm
parent915552a63830b3e9bf1da68a96a31a77940d8cd6 (diff)
gnu: Add python-slowapi.
* gnu/packages/python-web.scm (python-slowapi): New variable. Change-Id: I61c093f60a40ff1ed3a65ed935b7b9ab3be0400c
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r--gnu/packages/python-web.scm35
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index d2d5a25e81..3430997abc 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -7011,6 +7011,41 @@ such as IoT applications or multi-user database-driven business applications.")
Python.")
(license license:bsd-3)))
+(define-public python-slowapi
+ (package
+ (name "python-slowapi")
+ (version "0.1.9")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/laurents/slowapi")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1lc1n6lvh01dhhrc507qri9rz1w72l2riii03ixh7n7n1gwjpws7"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags
+ ;; These tests fail because the timestamp contains more decimal points
+ ;; than expected, so a simple equality comparison fails.
+ '(list "-k" (string-append "not test_headers_no_breach"
+ " and not test_headers_breach"))))
+ (propagated-inputs (list python-limits python-redis))
+ (native-inputs
+ (list python-fastapi
+ python-hiro
+ python-mock
+ python-poetry-core
+ python-pytest))
+ (home-page "https://github.com/laurents/slowapi")
+ (synopsis "Rate limiting extension for Starlette and Fastapi")
+ (description
+ "This package provides a rate limiting extension for Starlette and
+Fastapi.")
+ (license license:expat)))
+
(define-public python-slugify
(package
(name "python-slugify")