diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2025-02-19 13:07:29 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2025-02-19 13:24:32 +0100 |
commit | 9ee08f233bf3394dc49349ffd25806bf84eccd40 (patch) | |
tree | 25c7997c78884045fe1a250e232c162975be7f72 | |
parent | 915552a63830b3e9bf1da68a96a31a77940d8cd6 (diff) |
gnu: Add python-slowapi.
* gnu/packages/python-web.scm (python-slowapi): New variable.
Change-Id: I61c093f60a40ff1ed3a65ed935b7b9ab3be0400c
-rw-r--r-- | gnu/packages/python-web.scm | 35 |
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") |