[bug#78228] gnu: Add python-aiohttp-client-cache.
Commit Message
* gnu/packages/python-web.scm (python-aiohttp-client-cache): New variable.
Change-Id: Ic3de76483f2ca955a26fcba27dfbf54387331238
---
gnu/packages/python-web.scm | 52 ++++++++++++++++++++++++++++++++++++-
1 file changed, 51 insertions(+), 1 deletion(-)
base-commit: 12467f2c91e7f9ec70239229f8186a93193a9185
@@ -71,6 +71,7 @@
;;; Copyright © 2024 Spencer King <spencer.king@geneoscopy.com>
;;; Copyright © 2024 Attila Lendvai <attila@lendvai.name>
;;; Copyright © 2025 Daniel Ziltener <dziltener@lyrion.ch>
+;;; Copyright © 2025 gemmaro <gemmaro.dev@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1123,6 +1124,55 @@ (define-public python-aiohttp
@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"))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ (delete-file "test/integration/test_dynamodb.py")
+ (delete-file "test/integration/test_mongodb.py")
+ ;; These tests require running Redis, SQLite, and HTTP
+ ;; servers.
+ (delete-file "test/integration/test_redis.py")
+ (delete-file "test/integration/test_sqlite.py")
+ (delete-file "test/integration/test_memory.py")
+ (delete-file "test/integration/test_filesystem.py")))))
+ (build-system pyproject-build-system)
+ (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-socks
(package
(name "python-aiohttp-socks")
@@ -1135,7 +1185,7 @@ (define-public python-aiohttp-socks
(base32
"0s70jpcr9wc8ld2v1w309cz7r8mm2bipf6zbkdqqaa0z0pwf3wj9"))))
(build-system pyproject-build-system)
- (arguments (list #:tests? #false)) ;none included
+ (arguments (list #:tests? #false)) ;none included
(propagated-inputs
(list python-aiohttp python-socks))
(native-inputs (list python-setuptools python-wheel))