From 062e399880f1c4332d3ab80d1d061681dadb7db9 Mon Sep 17 00:00:00 2001 From: gemmaro Date: Mon, 5 May 2025 09:09:55 +0900 Subject: gnu: Add python-aiohttp-client-cache. * gnu/packages/python-web.scm (python-aiohttp-client-cache): New variable. Change-Id: Iea3f8ad33cbb2ee8979cb59071653ddb54e5111b Reviewed-by: Nicolas Graves Co-authored-by: Sharlatan Hellseher Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-web.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 1895eb94cfe..f2a34c59b90 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -72,6 +72,7 @@ ;;; Copyright © 2024 Spencer King ;;; Copyright © 2024 Attila Lendvai ;;; Copyright © 2025 Daniel Ziltener +;;; Copyright © 2025 gemmaro ;;; Copyright © 2025 Sergio Pastor Pérez ;;; ;;; This file is part of GNU Guix. @@ -1212,6 +1213,52 @@ Callback Hell. @end itemize") (license license:asl2.0))) +(define-public python-aiohttp-client-cache + (package + (name "python-aiohttp-client-cache") + (version "0.13.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "aiohttp_client_cache" version)) + (sha256 + (base32 "0lrq8fh94whvfmfr9ncfizq2ssa2fp1v1izd1y7f3gmd80ixcp6w")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; Run unit tests only which not require networking or additional setup. + #~(list "--ignore=test/integration"))) + (native-inputs + (list python-poetry-core + ;; TODO: Missing packages: pytest-clarity, + ;; nox-poetry, types-aiofiles. + python-async-timeout + python-brotli + python-faker + python-pytest + python-pytest-aiohttp + python-pytest-asyncio + python-pytest-cov + python-pytest-xdist)) + (propagated-inputs + (list python-aiofiles + python-aiohttp + python-aiosqlite + python-attrs + python-itsdangerous + python-redis + python-url-normalize)) + (home-page "https://github.com/requests-cache/aiohttp-client-cache") + (synopsis "Persistent cache for aiohttp requests") + (description + "This package is an asynchronous persistent caching library specifically +designed for @samp{aiohttp} requests in Python. With support for various +storage backends, it offers flexibility in how and where the cache is stored. +Please note that MongoDB and DynamoDB backends are not currently supported due +to the absence of the @samp{motor} and @samp{aioboto3} package dependencies.") + (license license:expat))) + (define-public python-aiohttp-cors (package (name "python-aiohttp-cors") -- cgit v1.3