projects/guix·blob graal · refs

13635 lines · 494.2 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Eric Dvorsak <[email protected]>
3;;; Copyright © 2015-2025 Efraim Flashner <[email protected]>
4;;; Copyright © 2017 Christopher Baines <[email protected]>
5;;; Copyright © 2017 Muriithi Frederick Muriuki <[email protected]>
6;;; Copyright © 2016, 2017 Danny Milosavljevic <[email protected]>
7;;; Copyright © 2013, 2014, 2015, 2016, 2020, 2023 Andreas Enge <[email protected]>
8;;; Copyright © 2016-2023 Marius Bakke <[email protected]>
9;;; Copyright © 2015-2025 Ricardo Wurmus <[email protected]>
10;;; Copyright © 2017, 2021 Roel Janssen <[email protected]>
11;;; Copyright © 2016, 2017, 2020 Julien Lepiller <[email protected]>
12;;; Copyright © 2016, 2017 Nikita <[email protected]>
13;;; Copyright © 2014, 2017, 2021 Eric Bavier <[email protected]>
14;;; Copyright © 2014, 2015 Mark H Weaver <[email protected]>
15;;; Copyright © 2015 Cyril Roelandt <[email protected]>
16;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <[email protected]>
17;;; Copyright © 2016, 2019, 2022, 2025 Hartmut Goebel <[email protected]>
18;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <[email protected]>
19;;; Copyright © 2015, 2017 Ben Woodcroft <[email protected]>
20;;; Copyright © 2015, 2016 Christine Lemmer-Webber <[email protected]>
21;;; Copyright © 2017 Adriano Peluso <[email protected]>
22;;; Copyright © 2016 Dylan Jeffers <sapientech@[email protected]>
23;;; Copyright © 2016 David Craven <[email protected]>
24;;; Copyright © 2017 Oleg Pykhalov <[email protected]>
25;;; Copyright © 2015, 2016 David Thompson <[email protected]>
26;;; Copyright © 2017 Mark Meyer <[email protected]>
27;;; Copyright © 2018 Clément Lassieur <[email protected]>
28;;; Copyright © 2018 Tomáš Čech <[email protected]>
29;;; Copyright © 2018, 2019, 2021, 2024 Nicolas Goaziou <[email protected]>
30;;; Copyright © 2018 Mathieu Othacehe <[email protected]>
31;;; Copyright © 2018, 2020, 2021, 2022, 2023 Maxim Cournoyer <[email protected]>
32;;; Copyright © 2018 swedebugia <[email protected]>
33;;; Copyright © 2019 Vagrant Cascadian <[email protected]>
34;;; Copyright © 2019, 2023 Brendan Tildesley <[email protected]>
35;;; Copyright © 2019 Pierre Langlois <[email protected]>
36;;; Copyright © 2019, 2020 Tanguy Le Carrour <[email protected]>
37;;; Copyright © 2020 Jakub Kądziołka <[email protected]>
38;;; Copyright © 2020 Josh Marshall <[email protected]>
39;;; Copyright © 2020 Evan Straw <[email protected]>
40;;; Copyright © 2020 Alexandros Theodotou <[email protected]>
41;;; Copyright © 2020 Holger Peters <[email protected]>
42;;; Copyright © 2020 Noisytoot <[email protected]>
43;;; Copyright © 2020 Edouard Klein <[email protected]>
44;;; Copyright © 2020, 2021, 2022, 2023, 2025 Vinicius Monego <[email protected]>
45;;; Copyright © 2020 Konrad Hinsen <[email protected]>
46;;; Copyright © 2020, 2022, 2024 Giacomo Leidi <[email protected]>
47;;; Copyright © 2020 Raghav Gururajan <[email protected]>
48;;; Copyright © 2021 Ekaitz Zarraga <[email protected]>
49;;; Copyright © 2021 Greg Hogan <[email protected]>
50;;; Copyright © 2021 Maxime Devos <[email protected]>
51;;; Copyright © 2021 Pradana Aumars <[email protected]>
52;;; Copyright © 2021, 2022, 2024 Arun Isaac <[email protected]>
53;;; Copyright © 2021-2022, 2024-2025 jgart <[email protected]>
54;;; Copyright © 2021 Alice Brenon <[email protected]>
55;;; Copyright © 2021 Mekeor Melire <[email protected]>
56;;; Copyright © 2022 John Kehayias <[email protected]>
57;;; Copyright © 2022 Denis 'GNUtoo' Carikli <[email protected]>
58;;; Copyright © 2022, 2023, 2025 Felix Gruber <[email protected]>
59;;; Copyright © 2022 Peter Polidoro <[email protected]>
60;;; Copyright © 2022 Antero Mejr <[email protected]>
61;;; Copyright © 2022 Luis Henrique Gomes Higino <[email protected]>
62;;; Copyright © 2022, 2025 Nicolas Graves <[email protected]>
63;;; Copyright © 2022 Tomasz Jeneralczyk <[email protected]>
64;;; Copyright © 2022 msimonin <[email protected]>
65;;; Copyright © 2022 Michael Rohleder <[email protected]>
66;;; Copyright © 2022 Baptiste Strazzulla <[email protected]>
67;;; Copyright © 2023 dan <[email protected]>
68;;; Copyright © 2023 John Kehayias <[email protected]>
69;;; Copyright © 2023 Juliana Sims <[email protected]>
70;;; Copyright © 2023 Ivan Vilata-i-Balaguer <[email protected]>
71;;; Copyright © 2024 Fabio Natali <[email protected]>
72;;; Copyright © 2024 Steve George <[email protected]>
73;;; Copyright © 2024 Troy Figiel <[email protected]>
74;;; Copyright © 2024, 2025 Sharlatan Hellseher <[email protected]>
75;;; Copyright © 2024 normally_js <[email protected]>
76;;; Copyright © 2024 Markku Korkeala <[email protected]>
77;;; Copyright © 2024 Nguyễn Gia Phong <[email protected]>
78;;; Copyright © 2024 Zheng Junjie <[email protected]>
79;;; Copyright © 2024 Spencer King <[email protected]>
80;;; Copyright © 2024 Attila Lendvai <[email protected]>
81;;; Copyright © 2025 Daniel Ziltener <[email protected]>
82;;; Copyright © 2025 gemmaro <[email protected]>
83;;; Copyright © 2025 Sergio Pastor Pérez <[email protected]>
84;;; Copyright © 2025 Jake Forster <[email protected]>
85;;; Copyright © 2025 Janneke Nieuwenhuizen <[email protected]>
86;;; Copyright © 2025 Hugo Buddelmeijer <[email protected]>
87;;; Copyright © 2025 Artur Wroblewski <[email protected]>
88;;; Copyright © 2025 Allan Adair <[email protected]>
89;;; Copyright © 2025 Aaron Covrig <[email protected]>
90;;;
91;;; This file is part of GNU Guix.
92;;;
93;;; GNU Guix is free software; you can redistribute it and/or modify it
94;;; under the terms of the GNU General Public License as published by
95;;; the Free Software Foundation; either version 3 of the License, or (at
96;;; your option) any later version.
97;;;
98;;; GNU Guix is distributed in the hope that it will be useful, but
99;;; WITHOUT ANY WARRANTY; without even the implied warranty of
100;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
101;;; GNU General Public License for more details.
102;;;
103;;; You should have received a copy of the GNU General Public License
104;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
105
106(define-module (gnu packages python-web)
107 #:use-module ((guix licenses) #:prefix license:)
108 #:use-module (guix build-system cargo)
109 #:use-module (guix build-system copy)
110 #:use-module (guix build-system pyproject)
111 #:use-module (guix build-system python)
112 #:use-module (guix deprecation)
113 #:use-module (guix download)
114 #:use-module (guix gexp)
115 #:use-module (guix git-download)
116 #:use-module (guix packages)
117 #:use-module (guix utils)
118 #:use-module (gnu packages admin)
119 #:use-module (gnu packages adns)
120 #:use-module (gnu packages base)
121 #:use-module (gnu packages bash)
122 #:use-module (gnu packages nss)
123 #:use-module (gnu packages check)
124 #:use-module (gnu packages cmake)
125 #:use-module (gnu packages compression)
126 #:use-module (gnu packages curl)
127 #:use-module (gnu packages databases)
128 #:use-module (gnu packages django)
129 #:use-module (gnu packages freedesktop)
130 #:use-module (gnu packages glib)
131 #:use-module (gnu packages gnupg)
132 #:use-module (gnu packages graphviz)
133 #:use-module (gnu packages groff)
134 #:use-module (gnu packages iso-codes)
135 #:use-module (gnu packages libevent)
136 #:use-module (gnu packages libffi)
137 #:use-module (gnu packages libidn)
138 #:use-module (gnu packages linux)
139 #:use-module (gnu packages lsof)
140 #:use-module (gnu packages node)
141 #:use-module (gnu packages openstack)
142 #:use-module (gnu packages pcre)
143 #:use-module (gnu packages pkg-config)
144 #:use-module (gnu packages protobuf)
145 #:use-module (gnu packages python)
146 #:use-module (gnu packages python-build)
147 #:use-module (gnu packages python-check)
148 #:use-module (gnu packages python-compression)
149 #:use-module (gnu packages python-crypto)
150 #:use-module (gnu packages python-science)
151 #:use-module (gnu packages python-xyz)
152 #:use-module (gnu packages qt)
153 #:use-module (gnu packages rdf)
154 #:use-module (gnu packages rpc)
155 #:use-module (gnu packages rust)
156 #:use-module (gnu packages rust-apps)
157 #:use-module (gnu packages serialization)
158 #:use-module (gnu packages sphinx)
159 #:use-module (gnu packages texinfo)
160 #:use-module (gnu packages time)
161 #:use-module (gnu packages tls)
162 #:use-module (gnu packages version-control)
163 #:use-module (gnu packages web)
164 #:use-module (gnu packages xml)
165 #:use-module (gnu packages)
166 #:use-module (srfi srfi-1))
167
168(define-public python-aiocoap
169 (package
170 (name "python-aiocoap")
171 (version "0.4.14")
172 (source
173 (origin
174 (method git-fetch) ; tests miss data and module files in PyPI release
175 (uri (git-reference
176 (url "https://github.com/chrysn/aiocoap")
177 (commit version)))
178 (file-name (git-file-name name version))
179 (sha256
180 (base32 "0yxvcg5llgmccv0a9hfm4nr7zxv9al4wh257m95a06g5c52v6hxz"))))
181 (build-system pyproject-build-system)
182 (arguments
183 (list
184 #:test-flags
185 ;; OSError: [Errno 98] error while attempting to bind on address ('::1',
186 ;; 8683, 0, 0): address already in use
187 #~(list "--ignore=tests/test_server.py"
188 "-k" (string-join
189 ;; TypeError: can only concatenate str (not "NoneType") to
190 ;; str
191 (list "not test_options"
192 "test_uri_parser"
193 "test_help" ; returned non-zero exit status 1.
194 "test_routing" ; address already in use
195 "test_tls")
196 " and not "))))
197 (native-inputs
198 (list openssl ;for tests/test_tls.py
199 python-pytest
200 python-setuptools
201 python-wheel))
202 (propagated-inputs
203 (list ;; python-cbor-diag
204 python-cbor2
205 python-cryptography
206 ;; python-dtlssocket
207 python-filelock
208 ;; python-ge25519
209 python-pygments
210 python-termcolor
211 python-websockets))
212 (home-page "https://github.com/chrysn/aiocoap")
213 (synopsis "Python CoAP library")
214 (description
215 "The aiocoap package is an implementation of @url{@acronym{CoAP, the
216Constrained Application Protocol}, http://coap.space/}. It facilitates
217writing applications that talk to network enabled embedded
218@acronym{IoT,Internet of Things} devices.")
219 (license license:expat)))
220
221(define-public python-anaconda-client
222 (package
223 (name "python-anaconda-client")
224 (version "1.13.1")
225 (source
226 (origin
227 (method git-fetch)
228 (uri (git-reference
229 (url "https://github.com/Anaconda-Platform/anaconda-client")
230 (commit version)))
231 (file-name (git-file-name name version))
232 (sha256
233 (base32 "06nn3cwhrrajsbn9pils2539lzplfnyhn9java3xrpm3ksxq9g72"))))
234 (build-system pyproject-build-system)
235 (arguments
236 (list
237 #:test-flags
238 #~(list "--deselect=tests/utils/test_conda.py::test_find_conda"
239 "--deselect=tests/utils/test_conda.py::test_conda_vars")
240 #:phases
241 #~(modify-phases %standard-phases
242 (add-after 'unpack 'fix-pytest-config
243 (lambda _
244 (substitute* "setup.cfg"
245 (("addopts=.*") "addopts=\n")))))))
246 (native-inputs
247 (list python-freezegun
248 python-pytest
249 python-setuptools))
250 (propagated-inputs
251 (list python-anaconda-cli-base
252 python-conda-package-handling
253 python-conda-package-streaming
254 python-dateutil
255 python-defusedxml
256 python-nbformat
257 python-pillow
258 python-platformdirs
259 python-pytz
260 python-pyyaml
261 python-requests
262 python-requests-toolbelt
263 python-setuptools
264 python-tqdm
265 python-urllib3))
266 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
267 (synopsis "Anaconda Cloud command line client library")
268 (description
269 "Anaconda Cloud command line client library provides an interface to
270Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
271environments.")
272 (license license:bsd-3)))
273
274(define-public python-apprise
275 (package
276 (name "python-apprise")
277 (version "1.9.4")
278 (source
279 (origin
280 (method url-fetch)
281 (uri (pypi-uri "apprise" version))
282 (sha256
283 (base32 "126951n9lnlqrw5lbsvs9xs7jzg33bqqxm7cfnqag2csw6p24ca8"))))
284 (build-system pyproject-build-system)
285 (arguments
286 (list
287 ;; These tests used to be ran with --numprocesses, but that seems to have
288 ;; made them non-deterministic.
289 #:test-flags
290 #~(list "--ignore=tests/test_plugin_macosx.py"
291 "-k" "not test_plugin_glib_send_raises_generic")))
292 (native-inputs
293 (list python-babel
294 python-pytest
295 python-pytest-mock
296 python-setuptools))
297 (propagated-inputs
298 (list python-certifi
299 python-click
300 python-markdown
301 python-pygobject
302 python-pyyaml
303 python-requests
304 python-requests-oauthlib))
305 (home-page "https://github.com/caronc/apprise")
306 (synopsis "Push notification library")
307 (description
308 "Apprise is a Python library that allows sending push notifications to a
309broad range of notification services, such as Telegram, Discord, Slack, Amazon
310SNS, Gotify, etc.")
311 (license license:bsd-2)))
312
313(define-public python-behave-web-api
314 (package
315 (name "python-behave-web-api")
316 (version "2.3.0")
317 (source
318 (origin
319 (method git-fetch)
320 (uri (git-reference
321 (url "https://github.com/jefersondaniel/behave-web-api")
322 (commit (string-append "v" version))))
323 (file-name (git-file-name name version))
324 (sha256
325 (base32 "1r8yx8gb5m599cpdqfvk6z9ax3qj26fpvczdr84z8jya0dxfch4p"))))
326 (build-system pyproject-build-system)
327 (native-inputs
328 (list python-pytest
329 python-setuptools))
330 (propagated-inputs
331 (list behave
332 python-requests))
333 (home-page "https://github.com/jefersondaniel/behave-web-api")
334 (synopsis "Provides testing for JSON APIs with Behave for Python")
335 (description "This package provides testing utility modules for testing
336JSON APIs with Behave.")
337 (license license:expat)))
338
339(define-public python-blacksheep
340 (package
341 (name "python-blacksheep")
342 (version "2.4.2")
343 (source
344 (origin
345 (method git-fetch)
346 (uri (git-reference
347 (url "https://github.com/Neoteroi/BlackSheep")
348 (commit (string-append "v" version))))
349 (file-name (git-file-name name version))
350 (sha256
351 (base32 "0v9pkg3ffxxcdc8ynjjh5fgis5m49m65sbrgcrghmz0xkik5ny5w"))))
352 (build-system pyproject-build-system)
353 (arguments
354 (list
355 ;; tests: 1675 passed, 3 skipped
356 ;;
357 ;; Run all unit tests, but do not run integration tests from `itests`
358 ;; directory.
359 #:test-flags
360 #~(list "tests")
361 #:phases
362 #~(modify-phases %standard-phases
363 (add-before 'build 'cythonize
364 (lambda _
365 (with-directory-excursion "blacksheep"
366 (for-each (lambda (file)
367 (invoke "cython" "-3" file "-I" "."))
368 (find-files "." ".*\\.pyx$"))))))))
369 (native-inputs
370 (list nss-certs-for-test
371 python-cython
372 python-flask
373 python-jinja2
374 python-pydantic
375 python-pyjwt
376 python-pytest
377 python-pytest-asyncio
378 python-setuptools))
379 (propagated-inputs
380 (list python-certifi
381 python-essentials-openapi
382 python-guardpost
383 python-itsdangerous))
384 (home-page "https://github.com/Neoteroi/BlackSheep")
385 (synopsis "Asynchronous framework to build event based web applications")
386 (description
387 "BlackSheep is a lightweight, asynchronous, event driven Web framework.
388
389The framework offers
390@itemize
391@item A rich code API, based on dependency injection and inspired by Flask and
392ASP.NET Core.
393@item A typing-friendly codebase, which enables a comfortable development
394experience thanks to hints when coding with IDEs.
395@item Built-in generation of OpenAPI Documentation, supporting version 3, YAML,
396and JSON.
397@item A cross-platform framework, using the most modern versions of Python.
398@item Good performance.
399@end itemize")
400 (license license:expat)))
401
402(define-public python-cloudpathlib
403 (package
404 (name "python-cloudpathlib")
405 (version "0.23.0")
406 (source
407 (origin
408 (method git-fetch)
409 (uri (git-reference
410 (url "https://github.com/drivendataorg/cloudpathlib")
411 (commit (string-append "v" version))))
412 (file-name (git-file-name name version))
413 (sha256
414 (base32 "1dqwml269lpz51drgg3s27sqmvwa1vldw2rj34ssnqppcmc5h5lm"))))
415 (build-system pyproject-build-system)
416 (arguments
417 (list
418 ;; tests: 977 passed, 15 skipped, 8642 warnings
419 #:test-flags
420 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
421 ;; TODO: Package azure-identity (required for this file)
422 "--ignore=tests/test_azure_specific.py"
423 ;; TypeError: Retry.__init__() got an unexpected keyword
424 ;; argument 'timeout'
425 "--deselect=tests/test_gs_specific.py::test_timeout_and_retry")
426 #:phases
427 #~(modify-phases %standard-phases
428 (add-after 'unpack 'fix-pytest-config
429 (lambda _
430 (substitute* "pyproject.toml"
431 (("addopts =.*") "")))))))
432 (native-inputs
433 (list ;; python-azure-identity
434 python-dotenv
435 python-flit-core
436 python-pydantic-2
437 python-pytest
438 python-pytest-cases
439 python-pytest-xdist
440 python-shortuuid
441 python-tenacity))
442 (propagated-inputs
443 (list python-azure-storage-blob
444 python-azure-storage-file-datalake
445 python-boto3
446 python-google-cloud-storage
447 python-typing-extensions))
448 (home-page "https://github.com/drivendataorg/cloudpathlib")
449 (synopsis "Pathlib-style classes for cloud storage services")
450 (description
451 "This package provides a Python library with classes that mimic
452@code{pathlib.Path}'s interface for URIs from different cloud storage
453services.")
454 (license license:expat)))
455
456(define-public python-conda-package-handling
457 (package
458 (name "python-conda-package-handling")
459 (version "2.4.0")
460 (source
461 (origin
462 (method git-fetch)
463 (uri (git-reference
464 (url "https://github.com/conda/conda-package-handling/")
465 (commit version)))
466 (file-name (git-file-name name version))
467 (sha256
468 (base32 "1l2zbbwlxp9azpshixvxnb9354xajxkn88934grpwl70blgb3yq2"))))
469 (build-system pyproject-build-system)
470 (native-inputs
471 (list python-bottle
472 python-mock
473 python-pytest
474 python-pytest-cov
475 python-pytest-mock
476 python-setuptools))
477 (propagated-inputs
478 (list python-conda-package-streaming))
479 (home-page "https://conda.io")
480 (synopsis "Create and extract conda packages of various formats")
481 (description
482 "This library is an abstraction of Conda package handling and a tool for
483extracting, creating, and converting between formats.")
484 (license license:bsd-3)))
485
486(define-public python-conda-package-streaming
487 (package
488 (name "python-conda-package-streaming")
489 (version "0.12.0")
490 (source
491 (origin
492 (method url-fetch)
493 (uri (pypi-uri "conda_package_streaming" version))
494 (sha256
495 (base32 "1fcyx83swx1wfndrl0vdk8c2pixshn54gkjy7xchkra13kw2yas2"))))
496 (build-system pyproject-build-system)
497 (arguments
498 ;; TODO: Cycles with python-conda-package-handling, implement bootstrap.
499 (list #:tests? #f))
500 (native-inputs
501 (list python-flit-core))
502 (propagated-inputs
503 (list python-requests
504 python-zstandard))
505 (home-page "https://conda.github.io/conda-package-streaming/")
506 (synopsis "Conda formats (@code{.conda}, @code{.tar.bz2}) reader library")
507 (description
508 "This package provides an efficient library to read from new and old format
509@code{.conda} and @code{.tar.bz2} conda packages.")
510 (license license:bsd-3)))
511
512(define-public python-dependency-groups
513 (package
514 (name "python-dependency-groups")
515 (version "1.3.1")
516 (source
517 (origin
518 (method url-fetch)
519 (uri (pypi-uri "dependency_groups" version))
520 (sha256
521 (base32 "1zgymnk6k984h2wfdpp0vws2ihwqrr9lmxhrij9zs5q5140q61vq"))))
522 (build-system pyproject-build-system)
523 (propagated-inputs (list python-packaging python-tomli))
524 (native-inputs (list python-flit-core))
525 (home-page "https://dependency-groups.readthedocs.io/")
526 (synopsis "Tools and library for resolving PEP 735 Dependency Group data")
527 (description
528 "This package provides a library which is able to parse dependency groups (PEP
529735), following includes, and provide that data as output.")
530 (license license:expat)))
531
532(define-public python-devpi-common
533 (package
534 (name "python-devpi-common")
535 (version "4.0.4")
536 (source
537 (origin
538 (method url-fetch)
539 (uri (pypi-uri "devpi_common" version))
540 (sha256
541 (base32 "1k217b0fvsc7k2afw6wwlvqr1ksnv1vjzfm61g358vn98nd0lni3"))))
542 (build-system pyproject-build-system)
543 (propagated-inputs (list python-lazy python-packaging-legacy
544 python-requests))
545 (native-inputs
546 (list python-pytest
547 python-setuptools
548 python-wheel))
549 (home-page "https://github.com/devpi/devpi")
550 (synopsis
551 "Utilities jointly used by devpi-server, devpi-client and others")
552 (description
553 "This package provides utilities jointly used by devpi-server,
554devpi-client and others.")
555 (license license:expat)))
556
557(define-public python-devpi-client
558 (package
559 (name "python-devpi-client")
560 (version "7.2.0")
561 (source
562 (origin
563 (method url-fetch)
564 (uri (pypi-uri "devpi-client" version))
565 (sha256
566 (base32 "0ywx4ql8lsypb17n2miq39bmkrp232sdk8g6pskqp1y3b223chy1"))))
567 (build-system pyproject-build-system)
568 (arguments
569 (list
570 #:test-flags
571 ;; This wants to use pip install
572 '(list "--ignore=testing/test_upload.py"
573 ;; These complain about finding distutils. It's not my fault,
574 ;; mate, setuptools is right there, but you won't pick it!
575 "--ignore=testing/test_list_remove.py"
576 "--ignore=testing/test_main.py"
577 "--ignore=testing/test_install.py"
578 "--ignore=testing/test_functional.py"
579 "--ignore=testing/test_test.py")
580 #:phases
581 '(modify-phases %standard-phases
582 (add-after 'unpack 'patch-tests
583 (lambda _
584 ;; Do not replace the directory name of the store item.
585 (substitute* "testing/conftest.py"
586 (("\"devpi-server\", \"devpi-init\"")
587 "\"/bin/devpi-server\", \"/bin/devpi-init\""))))
588 (add-before 'check 'set-HOME
589 ;; Some tests need this
590 (lambda _ (setenv "HOME" "/tmp"))))))
591 (propagated-inputs (list python-pypa-build
592 python-check-manifest
593 python-colorama
594 python-devpi-common
595 python-iniconfig
596 python-pkginfo
597 python-platformdirs
598 python-pluggy
599 python-pypitoken
600 python-tomli))
601 (native-inputs
602 (list python-devpi-server
603 python-pytest
604 python-setuptools
605 python-virtualenv))
606 (home-page "https://github.com/devpi/devpi")
607 (synopsis "Devpi upload/install/... commands for Python developers")
608 (description
609 "The devpi command line tool is typically used in conjunction with
610devpi-server. It allows uploading, testing and installing packages from devpi
611indexes.")
612 (license license:expat)))
613
614(define-public python-devpi-process
615 (package
616 (name "python-devpi-process")
617 (version "1.0.2")
618 (source
619 (origin
620 (method url-fetch)
621 (uri (pypi-uri "devpi_process" version))
622 (sha256
623 (base32 "0v26i8bs0n8f2ikizwyvq77fw3l0nsyl4wj8yff0r3y351ydqbs1"))))
624 (build-system pyproject-build-system)
625 (arguments
626 (list
627 #:phases
628 '(modify-phases %standard-phases
629 (add-after 'unpack 'relax-requirements
630 (lambda _
631 ;; Our package is too old, sorry.
632 (substitute* "pyproject.toml"
633 (("typing-extensions>=4.12.2")
634 "typing-extensions>=4.10.0"))))
635 (add-after 'unpack 'patch-tool-locations
636 (lambda* (#:key inputs #:allow-other-keys)
637 (substitute* "src/devpi_process/__init__.py"
638 (("_exe\\(\"devpi-init\"\\)")
639 (string-append "\"" (search-input-file inputs "/bin/devpi-init") "\""))
640 (("_exe\\(\"devpi-server\"\\)")
641 (string-append "\"" (search-input-file inputs "/bin/devpi-server") "\""))
642 (("_exe\\(\"devpi\"\\)")
643 (string-append "\"" (search-input-file inputs "/bin/devpi") "\""))))))))
644 (propagated-inputs (list python-devpi-client python-devpi-server
645 python-typing-extensions))
646 (native-inputs
647 (list nss-certs-for-test
648 python-covdefaults
649 python-hatchling
650 python-hatch-vcs
651 python-httpx
652 python-pytest
653 python-pytest-cov))
654 (home-page "https://github.com/devpi/devpi")
655 (synopsis "API to create and use a devpi server process")
656 (description
657 "This package provides a programmatic API to create and use a devpi
658server process.")
659 (license license:expat)))
660
661(define-public python-devpi-server
662 (package
663 (name "python-devpi-server")
664 (version "6.17.0")
665 (source
666 (origin
667 (method url-fetch)
668 (uri (pypi-uri "devpi_server" version))
669 (sha256
670 (base32 "13lybrw8j6zjxwvx6sk7bw6854hd2m18s1xcvl0q100j4n06p6ml"))))
671 (build-system pyproject-build-system)
672 (arguments
673 (list
674 #:test-flags
675 ;; These all fail with: "module 'py' has no attribute 'io'"
676 #~(list "--ignore=test_devpi_server/test_importexport.py"
677 "--ignore=test_devpi_server/test_main.py"
678 "--ignore=test_devpi_server/test_genconfig.py")
679 #:phases
680 #~(modify-phases %standard-phases
681 (add-after 'unpack 'relax-requirements
682 (lambda _
683 (substitute* "pyproject.toml"
684 ;; It straggles to check argon2 in passlib on any versions
685 ;; starting from 6.14.0: UnknownExtra("passlib 1.7.4 has no
686 ;; such extra feature 'argon2'",).
687 (("passlib\\[argon2\\]") "passlib")))))))
688 (propagated-inputs (list python-argon2-cffi
689 python-attrs
690 python-defusedxml
691 python-devpi-common
692 python-httpx
693 python-itsdangerous
694 python-lazy
695 python-legacy-cgi
696 python-passlib
697 python-platformdirs
698 python-pluggy
699 python-py
700 python-pyramid
701 python-repoze-lru
702 python-ruamel.yaml-0.16 ;FIXME: rename
703 python-strictyaml
704 python-waitress))
705 (native-inputs
706 (list python-execnet
707 python-pytest
708 python-pytest-asyncio
709 python-pytest-timeout
710 python-setuptools
711 python-webtest))
712 (home-page "https://devpi.net")
713 (synopsis "Pypi.org caching server")
714 (description "This package implements a reliable private and pypi.org
715caching server.")
716 (license license:expat)))
717
718(define-public python-dicomweb-client
719 (package
720 (name "python-dicomweb-client")
721 (version "0.60.0")
722 (source
723 (origin
724 (method git-fetch)
725 (uri (git-reference
726 (url "https://github.com/ImagingDataCommons/dicomweb-client")
727 (commit (string-append "v" version))))
728 (file-name (git-file-name name version))
729 (sha256
730 (base32 "1zad0905cc4jy4hnh9yhcw63bg25f7xa33x9rj9fhh5r4fznha8d"))))
731 (build-system pyproject-build-system)
732 (arguments
733 (list
734 #:phases
735 #~(modify-phases %standard-phases
736 (add-after 'unpack 'remove-dynamic-versioning
737 (lambda _
738 (substitute* "pyproject.toml"
739 ;; Dynamic versioning via 'uv-dynamic-versioning' is
740 ;; not suitable for Guix.
741 (("dynamic = \\[\"version\"\\]")
742 (string-append "version = \""
743 #$version "\""))))))))
744 (native-inputs
745 (list python-hatchling
746 python-pytest
747 python-pytest-localserver))
748 (propagated-inputs
749 (list python-numpy
750 python-pillow
751 python-pydicom
752 python-requests
753 python-retrying))
754 (home-page "https://github.com/ImagingDataCommons/dicomweb-client")
755 (synopsis "Python client for DICOMweb RESTful services")
756 (description
757 "@code{dicomweb_client} provides client intefaces for DICOMweb RESTful
758services QIDO-RS, WADO-RS and STOW-RS to search, retrieve and store
759DICOM objects over the web, respectively.")
760 (license license:expat)))
761
762(define-public python-docusign-esign
763 (package
764 (name "python-docusign-esign")
765 (version "5.0.0")
766 (source
767 (origin
768 (method url-fetch)
769 (uri (pypi-uri "docusign-esign" version))
770 (sha256
771 (base32 "18n9szjxbmsccz4vlvsl4xa73jn0y16l0c344m83gil25v2amn69"))))
772 (build-system pyproject-build-system)
773 ;; Testing requires undocumented setup changes with network access to
774 ;; <demo.docusign.net>, and so testing is disabled here.
775 (arguments `(#:tests? #f))
776 (native-inputs
777 (list python-setuptools
778 python-wheel))
779 (propagated-inputs
780 (list python-certifi
781 python-dateutil
782 python-urllib3
783 python-pyjwt
784 python-cryptography))
785 (home-page "https://developers.docusign.com/")
786 (synopsis "DocuSign Python Client")
787 (description
788 "The Official DocuSign Python Client Library used to interact with the
789eSign REST API. Send, sign, and approve documents using this client.")
790 (license license:expat)))
791
792(define-public python-domain-connect
793 (package
794 (name "python-domain-connect")
795 (version "0.0.11")
796 (source
797 (origin
798 (method git-fetch) ;no tests in PyPI archive
799 (uri (git-reference
800 (url "https://github.com/Domain-Connect/domainconnect_python")
801 (commit (string-append "v" version))))
802 (file-name (git-file-name name version))
803 (sha256
804 (base32 "1dhqbx15h074g51mj73j9hlyvb11isjnj4s9ih5kbw1g4vf1q1jk"))))
805 (build-system pyproject-build-system)
806 (arguments
807 (list
808 ;; Check and sanity-check phases require /etc/resolv.conf, which is not
809 ;; present in container.
810 #:tests? #f
811 #:phases #~(modify-phases %standard-phases (delete 'sanity-check))))
812 (native-inputs
813 (list python-setuptools
814 python-wheel))
815 (propagated-inputs
816 (list python-cryptography
817 python-dnspython
818 python-future
819 python-publicsuffix
820 python-publicsuffixlist))
821 (home-page "https://github.com/Domain-Connect/domainconnect_python")
822 (synopsis "Client library for Domain Connect protocol")
823 (description
824 "This package provides a Service Provider functionality in both Sync and
825Async mode for @url{https://domainconnect.org/, Domain Connect protocol}.")
826 (license license:expat)))
827
828(define-public python-domain-connect-dyndns
829 (package
830 (name "python-domain-connect-dyndns")
831 (version "0.0.9")
832 (source
833 (origin
834 (method url-fetch)
835 (uri (pypi-uri "domain-connect-dyndns" version))
836 (sha256
837 (base32 "0srrblcb64bp7k5cqqivx4kykqdkmmzmspxwv66vix9k7wxdwqzx"))))
838 (build-system pyproject-build-system)
839 (arguments
840 (list
841 ;; Check and sanity-check phases require /etc/resolv.conf, which is not
842 ;; present in container.
843 #:tests? #f
844 #:phases #~(modify-phases %standard-phases (delete 'sanity-check))))
845 (native-inputs
846 (list python-setuptools
847 python-wheel))
848 (propagated-inputs
849 (list python-dnspython
850 python-domain-connect
851 python-requests
852 python-validators))
853 (home-page "https://github.com/Domain-Connect/DomainConnectDDNS-Python")
854 (synopsis "Domain Connect Dynamic DNS in Python")
855 ;; Project lacks meaningful description in README, see
856 ;; <https://github.com/Domain-Connect/DomainConnectDDNS-Python/issues/43>.
857 (description
858 "Python client library for Dynamic DNS using
859@url{https://www.domainconnect.org/, Domain Connect} protocol.")
860 (license license:expat)))
861
862(define-public python-dropbox
863 (package
864 (name "python-dropbox")
865 (version "12.0.2")
866 (source
867 (origin
868 (method git-fetch) ; no tests in PyPI release
869 (uri (git-reference
870 (url "https://github.com/dropbox/dropbox-sdk-python")
871 (commit (string-append "v" version))))
872 (file-name (git-file-name name version))
873 (sha256
874 (base32 "0pyvi2mbibah42kq8804d98ghypm46wr8swqr34apnvnlp9j2nzl"))))
875 (build-system pyproject-build-system)
876 (arguments
877 (list
878 #:test-flags
879 #~(list "-k" (string-join
880 ;; Network access is required.
881 (list "not test_bad_auth"
882 "test_app_auth"
883 "test_bad_pins"
884 "test_bad_pins_session"
885 "test_downscope"
886 "test_multi_auth"
887 "test_path_root"
888 "test_path_root_err"
889 "test_refresh"
890 "test_rpc"
891 "test_team"
892 "test_upload_download"
893 "test_versioned_route")
894 " and not "))
895 #:phases
896 #~(modify-phases %standard-phases
897 (add-after 'unpack 'relax-requirements
898 (lambda _
899 (substitute* "setup.py"
900 ;; 'stone>=2,<3.3.3',
901 ((">=2,<3.3.3") ">=2,<3.4.0"))))
902 (add-before 'check 'pre-check
903 (lambda _
904 ;; Otherwise tests setup erroring.
905 (setenv "LEGACY_USER_DROPBOX_TOKEN" "guix")
906 (setenv "LEGACY_USER_CLIENT_ID" "guix")
907 (setenv "LEGACY_USER_CLIENT_SECRET" "guix")
908 (setenv "LEGACY_USER_REFRESH_TOKEN" "guix")
909 (setenv "SCOPED_USER_DROPBOX_TOKEN" "guix")
910 (setenv "SCOPED_USER_CLIENT_ID" "guix")
911 (setenv "SCOPED_USER_CLIENT_SECRET" "guix")
912 (setenv "SCOPED_USER_REFRESH_TOKEN" "guix")
913 (setenv "SCOPED_TEAM_DROPBOX_TOKEN" "guix")
914 (setenv "SCOPED_TEAM_CLIENT_ID" "guix")
915 (setenv "SCOPED_TEAM_CLIENT_SECRET" "guix")
916 (setenv "SCOPED_TEAM_REFRESH_TOKEN" "guix")
917 (setenv "DROPBOX_SHARED_LINK" "guix"))))))
918 (native-inputs
919 (list nss-certs-for-test
920 python-mock
921 python-pytest
922 python-pytest-mock
923 python-setuptools
924 python-wheel))
925 (propagated-inputs
926 (list python-requests python-six python-stone))
927 (home-page "https://www.dropbox.com/developers")
928 (synopsis "Official Dropbox API Client")
929 (description "This package provides a Python SDK for integrating with the
930Dropbox API v2.")
931 (license license:expat)))
932
933(define-public python-essentials-openapi
934 (package
935 (name "python-essentials-openapi")
936 (version "1.2.1")
937 (source
938 (origin
939 (method git-fetch)
940 (uri (git-reference
941 (url "https://github.com/Neoteroi/essentials-openapi")
942 (commit (string-append "v" version))))
943 (file-name (git-file-name name version))
944 (sha256
945 (base32 "0f3lhpkqhvv8sr1c34cvzdqkc61306m03w3jp0zdih1v6is05j8x"))))
946 (build-system pyproject-build-system)
947 (native-inputs
948 (list python-flask
949 python-hatchling
950 python-pydantic
951 python-pytest
952 python-rich))
953 (propagated-inputs
954 (list python-essentials
955 python-httpx
956 python-jinja2
957 python-markupsafe
958 python-pyyaml))
959 (home-page "https://github.com/Neoteroi/essentials-openapi/")
960 (synopsis "Generator for OpenAPI Documentation")
961 (description
962 "Generator for OpenAPI Documentation version 2 and 3, in JSON and YAML
963formats. Generator for other kinds of documents from OpenAPI Documentation
964files.")
965 (license license:expat)))
966
967(define-public python-eventlet
968 (package
969 (name "python-eventlet")
970 (version "0.40.2")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "eventlet" version))
975 (sha256
976 (base32
977 "1c6qr1cnam79wxm1sh5y04061iyy3shs02yd0mlh47bngwknqqs2"))))
978 (build-system pyproject-build-system)
979 (arguments
980 (list
981 #:test-flags
982 '(list "-k"
983 (string-append
984 "not TestGetaddrinfo"
985 " and not TestProxyResolver"
986 " and not test_noraise_dns_tcp"
987 " and not test_raise_dns_tcp"
988 " and not test_hosts_no_network"
989 " and not test_import_rdtypes_then_eventlet"
990 " and not test_patcher_existing_locks"
991 " and not test_dns_methods_are_green"))
992 #:phases
993 #~(modify-phases %standard-phases
994 (add-after 'unpack 'avoid-OSError
995 (lambda _
996 ;; If eventlet tries to load greendns, an OSError is thrown when
997 ;; getprotobyname is called. Thankfully there is an environment
998 ;; variable to disable the greendns import, so use it. Note that
999 ;; this error is propagated to child packages too, so enforce the
1000 ;; changed default.
1001 (substitute* "eventlet/green/socket.py"
1002 (("os\\.environ\\.get\\(\"EVENTLET_NO_GREENDNS\", ''\\)")
1003 "os.environ.get(\"EVENTLET_NO_GREENDNS\", \"yes\")")))))))
1004 (native-inputs
1005 (list python-pypa-build
1006 python-hatch-vcs
1007 python-hatchling
1008 python-pytest))
1009 (propagated-inputs
1010 (list python-dnspython python-greenlet))
1011 (home-page "https://eventlet.net")
1012 (synopsis "Concurrent networking library for Python")
1013 (description
1014 "Eventlet is a concurrent networking library for Python that
1015allows you to change how you run your code, not how you write it.
1016It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1017Coroutines ensure that the developer uses a blocking style of programming
1018that is similar to threading, but provide the benefits of non-blocking I/O.
1019The event dispatch is implicit, which means you can easily use @code{Eventlet}
1020from the Python interpreter, or as a small part of a larger application.
1021
1022Note: In Guix, this package assumes the environment variable
1023@code{EVENTLET_NO_GREENDNS} defaults to @code{yes}. To try to use it, set it
1024to anything else.")
1025 (license license:expat)))
1026
1027(define-public python-flask-caching
1028 (package
1029 (name "python-flask-caching")
1030 (version "2.3.1")
1031 (source
1032 (origin
1033 (method url-fetch)
1034 (uri (pypi-uri "flask_caching" version))
1035 (sha256
1036 (base32 "1jcqgfzvqhgpngf9nhpfjs129cslh8jyczfy8kw11y7b9qdzvmv5"))))
1037 (build-system pyproject-build-system)
1038 (arguments
1039 (list
1040 #:test-flags
1041 ;; Tests requiring running Redis or dated python-cache.
1042 #~(list "--deselect=tests/test_init.py::test_init_nullcache[MemcachedCache]"
1043 "--deselect=tests/test_init.py::test_init_nullcache[RedisCache]"
1044 "--deselect=tests/test_init.py::test_init_nullcache[RedisSentinelCache]"
1045 "--deselect=tests/test_init.py::test_init_nullcache[SASLMemcachedCache]"
1046 "--deselect=tests/test_init.py::test_init_nullcache[SpreadSASLMemcachedCache]"
1047 "-k" "not test_client_override_reflected_on_cachelib_methods")))
1048 (native-inputs
1049 (list python-pytest
1050 python-pytest-asyncio
1051 python-pytest-xprocess
1052 python-setuptools))
1053 (propagated-inputs
1054 (list python-cachelib
1055 python-flask))
1056 (home-page "https://github.com/pallets-eco/flask-caching")
1057 (synopsis "Caching extension for Flask")
1058 (description
1059 "This package provides a caching support to Flask applications, it's a
1060fort ok https://github.com/thadeusb/flask-cache.")
1061 (license license:bsd-3)))
1062
1063(define-public python-gdown
1064 (package
1065 (name "python-gdown")
1066 (version "5.2.0")
1067 (source
1068 (origin
1069 (method url-fetch)
1070 (uri (pypi-uri "gdown" version))
1071 (sha256
1072 (base32 "11y7xx6zjipx15a5626lhiwmwb2jxp4mdcwqrnij0mfqc981ci91"))))
1073 (build-system pyproject-build-system)
1074 (arguments (list #:tests? #f)) ;network access is required
1075 (native-inputs
1076 (list python-hatch-fancy-pypi-readme
1077 python-hatch-vcs
1078 python-hatchling))
1079 (propagated-inputs
1080 (list python-beautifulsoup4
1081 python-filelock
1082 python-requests
1083 python-tqdm))
1084 (home-page "https://github.com/wkentaro/gdown")
1085 (synopsis "Google Drive Public File/Folder Downloader")
1086 (description
1087 "This package implements a functionality to download large files
1088recursivly from Google Drive with option to filter them by file
1089formats (PDF/XML/CSV).")
1090 (license license:expat)))
1091
1092(define-public python-globus-sdk
1093 (package
1094 (name "python-globus-sdk")
1095 (version "3.56.0")
1096 (source
1097 (origin
1098 (method git-fetch) ;no tests in PyPI archive
1099 (uri (git-reference
1100 (url "https://github.com/globus/globus-sdk-python")
1101 (commit version)))
1102 (file-name (git-file-name name version))
1103 (sha256
1104 (base32 "11nljda2ir4gna4xa5vkj5nzxnjwadkh97qplkk9nrj44szphnzw"))))
1105 (build-system pyproject-build-system)
1106 (arguments
1107 (list
1108 #:test-flags
1109 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count))))
1110 #:phases
1111 #~(modify-phases %standard-phases
1112 (add-before 'check 'pre-check
1113 (lambda _ (setenv "HOME" "/tmp"))))))
1114 (native-inputs
1115 (list python-flaky
1116 python-pytest
1117 python-pytest-randomly
1118 python-pytest-xdist
1119 python-responses
1120 python-setuptools
1121 python-wheel))
1122 (propagated-inputs
1123 (list python-cryptography
1124 python-importlib-resources
1125 python-pyjwt
1126 python-requests))
1127 (home-page "https://github.com/globus/globus-sdk-python")
1128 (synopsis "Globus SDK for Python")
1129 (description
1130 "This package provides a SDK for convenient Pythonic interface to
1131@url{https://www.globus.org/, Globus} APIs.")
1132 (license license:asl2.0)))
1133
1134(define-public python-guardpost
1135 (package
1136 (name "python-guardpost")
1137 (version "1.0.3")
1138 (source
1139 (origin
1140 (method git-fetch)
1141 (uri (git-reference
1142 (url "https://github.com/Neoteroi/guardpost")
1143 (commit (string-append "v" version))))
1144 (file-name (git-file-name name version))
1145 (sha256
1146 (base32 "1q09w953d4cjjvp8pp3kkkhw0y9kq2jgj6fihdz9np55pwxkfd15"))))
1147 (build-system pyproject-build-system)
1148 (arguments
1149 (list
1150 ;; Possible timing issue, see:
1151 ;; <https://github.com/Neoteroi/GuardPost/issues/18>.
1152 #:test-flags '(list "--ignore=tests/test_jwts.py")))
1153 (native-inputs
1154 (list python-cryptography
1155 python-flask
1156 python-hatchling
1157 python-pyjwt
1158 python-pytest
1159 python-pytest-asyncio))
1160 (propagated-inputs
1161 (list python-rodi))
1162 (home-page "https://github.com/Neoteroi/GuardPost/")
1163 (synopsis
1164 "Authentication and authorization framework for Python applications")
1165 (description
1166 "GuardPost is a framework to handle authentication and
1167authorization in asynchronous Python applications.
1168
1169Its features include
1170
1171@itemize
1172@item Strategy to implement authentication.
1173@item Strategy to implement authorization.
1174@item Support for dependency injection
1175@item Built-in support for JSON Web Tokens (JWTs) authentication.
1176@end itemize")
1177 (license license:expat)))
1178
1179(define-public python-hookdns
1180 (package
1181 (name "python-hookdns")
1182 (version "2.0.0")
1183 (source
1184 (origin
1185 (method url-fetch)
1186 (uri (pypi-uri "hookdns" version))
1187 (sha256
1188 (base32 "087x12dy6slhyqwqblby2fpjdcy61yk3lqp3fplami0rmbn02fb7"))))
1189 (build-system pyproject-build-system)
1190 (arguments
1191 (list
1192 #:test-flags
1193 #~(list "-k" (string-join
1194 ;; Tests requiring networking.
1195 (list
1196 "not test_patch_contextmanager_with_another_hostname"
1197 "test_patch_contextmanager_with_another_hostname_ipv6"
1198 "test_patch_contextmanager_with_ipv4"
1199 "test_patch_contextmanager_with_name"
1200 "test_patch_contextmanager_with_public_fqdn_and_"
1201 "test_patch_contextmanager_with_unknown_hostname"
1202 "test_patch_decorator_with_another_hostname"
1203 "test_patch_decorator_with_another_hostname_ipv6"
1204 "test_patch_decorator_with_ipv4"
1205 "test_patch_decorator_with_name"
1206 "test_patch_decorator_with_public_fqdn_and_a_name_for_"
1207 "test_patch_decorator_with_unknown_hostname"
1208 "test_real_getaddrinfo_with_name_ipv6"
1209 "test_real_getaddrinfo_with_public_fqdn_ipv4"
1210 "test_real_getaddrinfo_with_public_fqdn_ipv6"
1211 "test_real_gethostbyname_ex_with_public_fqdn"
1212 "test_real_gethostbyname_with_public_fqdn"
1213 "test_real_requests_ip"
1214 "test_real_requests_name"
1215 "test_real_requests_with_public_fqdn"
1216 "test_reentrant")
1217 " and not "))))
1218 (native-inputs
1219 (list python-pytest
1220 python-requests
1221 python-setuptools
1222 python-wheel))
1223 (home-page "https://github.com/cle-b/hookdns")
1224 (synopsis "DNS resolution customization library")
1225 (description
1226 "HookDNS implements functionality that allows for modifying name
1227resolution in a Python script without any changes to the hosts file or the use
1228of a fake DNS resolver.")
1229 (license license:asl2.0)))
1230
1231(define-public python-httpretty
1232 (package
1233 (name "python-httpretty")
1234 (version "1.1.4")
1235 (source
1236 (origin
1237 (method url-fetch)
1238 (uri (pypi-uri "httpretty" version))
1239 (sha256
1240 (base32 "0s1vjdaf3pk2xd0hvi5f7p3jm2rgwpbc734jdp9r50m1smfhxpi0"))))
1241 (build-system pyproject-build-system)
1242 (arguments
1243 (list
1244 #:test-flags
1245 ;; Only run Unit tests.
1246 #~(list "--ignore=tests/bugfixes"
1247 "--ignore=tests/functional"
1248 "--ignore=tests/pyopenssl"
1249 "-k" (string-join
1250 ;; Tests pattern failing with one of these errors:
1251 ;; AttributeError: '(str|bool|bytes|list|tuple)' object
1252 ;; has no attribute 'should'
1253 ;; AttributeError: 'function' object has no attribute
1254 ;; 'when'
1255 ;; AttributeError: 'AssertionBuilder' object has no
1256 ;; attribute 'should_not'
1257 (list "not fake_socket_passes_through"
1258 "fakesock_socket"
1259 "request_parse_body_when"
1260 "test_Entry_class_normalizes_headers"
1261 "test_has_request"
1262 "test_httpretty_should_raise_proper"
1263 "test_parse_request_line_connect"
1264 "test_request_parse_querystring"
1265 "test_request_string_representation"
1266 "test_request_stubs_internals")
1267 " and not "))))
1268 (native-inputs
1269 (list nss-certs-for-test
1270 python-freezegun
1271 python-mock
1272 python-pytest
1273 python-setuptools
1274 python-sure
1275 python-wheel))
1276 (home-page "https://httpretty.readthedocs.io")
1277 (synopsis "HTTP client mock for Python")
1278 (description
1279 "@code{httpretty} is a helper for faking web requests,inspired by Ruby's
1280@code{fakeweb}.")
1281 (license license:expat)))
1282
1283(define-public python-huggingface-hub
1284 (package
1285 (name "python-huggingface-hub")
1286 (version "0.31.4")
1287 (source
1288 (origin
1289 (method git-fetch)
1290 (uri (git-reference
1291 (url "https://github.com/huggingface/huggingface_hub")
1292 (commit (string-append "v" version))))
1293 (file-name (git-file-name name version))
1294 (sha256
1295 (base32 "1rjkrmvvyzxlbnbndrg4v9qq39grn46c26zrdjgpf114gci5pwap"))))
1296 (build-system pyproject-build-system)
1297 (arguments
1298 (list
1299 #:test-flags
1300 ;; We don't have sentence_transformers...
1301 '(list "--ignore=contrib/sentence_transformers/test_sentence_transformers.py"
1302 ;; ...nor do we have InquirerPy...
1303 "--ignore=tests/test_command_delete_cache.py"
1304 ;; ...or timm...
1305 "--ignore=contrib/timm/test_timm.py"
1306 ;; ...or spacy_huggingface_hub
1307 "--ignore=contrib/spacy/test_spacy.py"
1308 ;; These all require internet access
1309 "--ignore=tests/test_cache_no_symlinks.py"
1310 "--ignore=tests/test_cache_layout.py"
1311 "--ignore=tests/test_commit_scheduler.py"
1312 "--ignore=tests/test_file_download.py"
1313 "--ignore=tests/test_hf_api.py"
1314 "--ignore=tests/test_hf_file_system.py"
1315 "--ignore=tests/test_inference_api.py"
1316 "--ignore=tests/test_inference_async_client.py"
1317 "--ignore=tests/test_inference_client.py"
1318 "--ignore=tests/test_inference_text_generation.py"
1319 "--ignore=tests/test_login_utils.py"
1320 "--ignore=tests/test_offline_utils.py"
1321 "--ignore=tests/test_repocard.py"
1322 "--ignore=tests/test_repository.py"
1323 "--ignore=tests/test_snapshot_download.py"
1324 "--ignore=tests/test_utils_cache.py"
1325 "--ignore=tests/test_utils_git_credentials.py"
1326 "--ignore=tests/test_utils_http.py"
1327 "--ignore=tests/test_utils_pagination.py"
1328 "--ignore=tests/test_webhooks_server.py"
1329 "-k" (string-append
1330 "not test_push_to_hub"
1331 " and not test_from_pretrained_model_id_only"
1332 " and not test_from_pretrained_model_id_and_revision"
1333 ;; These all require internet access
1334 " and not test_auth"
1335 " and not test_oauth"
1336 " and not test_utils_sha"
1337 " and not test_inference_providers"
1338 " and not test_xet"))
1339 #:phases
1340 '(modify-phases %standard-phases
1341 (add-before 'check 'pre-check
1342 ;; Some tests need to write to HOME.
1343 (lambda _ (setenv "HOME" "/tmp"))))))
1344 (propagated-inputs
1345 (list python-filelock
1346 python-fsspec
1347 python-packaging
1348 python-pyyaml
1349 python-requests
1350 python-tqdm
1351 python-typing-extensions))
1352 (native-inputs
1353 (list python-aiohttp
1354 python-fastapi
1355 python-jedi
1356 python-jinja2
1357 python-mypy
1358 python-numpy
1359 python-pillow
1360 python-pydantic-2
1361 python-pytest
1362 python-pytest-asyncio
1363 python-pytest-cov
1364 python-pytest-env
1365 python-pytest-mock
1366 python-pytest-rerunfailures
1367 python-pytest-vcr
1368 python-pytest-xdist
1369 python-setuptools
1370 python-types-requests
1371 python-types-toml
1372 python-types-urllib3
1373 python-typing-extensions
1374 python-urllib3
1375 python-wheel))
1376 (home-page "https://huggingface.co/docs/huggingface_hub/")
1377 (synopsis "Client library for accessing the huggingface.co hub")
1378 (description
1379 "This package provides a client library to download and publish models,
1380datasets and other repos on the @url{huggingface.co} hub.")
1381 (license license:asl2.0)))
1382
1383(define-public python-kubernetes
1384 (package
1385 (name "python-kubernetes")
1386 (version "34.1.0")
1387 (source
1388 (origin
1389 (method url-fetch)
1390 (uri (pypi-uri "kubernetes" version))
1391 (sha256
1392 (base32 "04ir03887spls3wqspvbsivqjrbwz0innn86mkrs546jnnqfvs4g"))))
1393 (build-system pyproject-build-system)
1394 (arguments
1395 (list
1396 #:test-flags
1397 #~(list
1398 ;; The following tests expect a local running Kubernetes cluster.
1399 "--ignore=kubernetes/e2e_test"
1400 "--ignore=kubernetes/dynamic")))
1401 (native-inputs
1402 (list python-pytest
1403 python-setuptools))
1404 (propagated-inputs
1405 (list python-certifi
1406 python-dateutil
1407 python-durationpy
1408 python-google-auth
1409 python-pyyaml
1410 python-requests
1411 python-requests-oauthlib
1412 python-six ;XXX: hard dependency
1413 python-urllib3-1.26 ;sanity check, requires urllib3<2.4.0,>=1.24.2
1414 python-websocket-client))
1415 (home-page "https://github.com/kubernetes-client/python")
1416 (synopsis "Python client for Kubernetes")
1417 (description
1418 "This package provides an official Python client library for
1419@url{http://kubernetes.io, Kubernetes}.")
1420 (license license:asl2.0)))
1421
1422(define-public python-lazr-restfulclient
1423 (package
1424 (name "python-lazr-restfulclient")
1425 (version "0.14.6")
1426 (source
1427 (origin
1428 (method url-fetch)
1429 (uri (pypi-uri "lazr.restfulclient" version))
1430 (sha256
1431 (base32 "1nzzmp9aaaxh25jy3wm71cpf9dfw56s4g303c8a3nij874fjmwa3"))))
1432 (build-system pyproject-build-system)
1433 (arguments
1434 (list
1435 #:phases
1436 #~(modify-phases %standard-phases
1437 ;; Disable part of the test suite to avoid the lazr.authentication
1438 ;; requirement, which requires 'oauth', a Python 2 only library.
1439 (add-after 'unpack 'remove-some-checks
1440 (lambda _
1441 (with-directory-excursion "src/lazr/restfulclient/tests"
1442 (for-each delete-file '("test_oauth.py" "test_docs.py")))
1443 (substitute* "setup.py"
1444 (("\"(oauth|lazr\\.(authentication|restful>=0\\.11\\.0))\",")
1445 ""))))
1446 (replace 'check
1447 (lambda* (#:key tests? #:allow-other-keys)
1448 (if tests?
1449 (invoke "zope-testrunner" "--test-path=src")
1450 (format #t "test suite not run~%")))))))
1451 (native-inputs
1452 (list python-setuptools
1453 python-testtools
1454 python-wheel
1455 python-wsgi-intercept
1456 python-zope-testrunner))
1457 (propagated-inputs
1458 (list python-distro
1459 python-httplib2
1460 python-oauthlib
1461 python-pyparsing
1462 python-setuptools
1463 python-six
1464 python-wadllib))
1465 (home-page "https://launchpad.net/lazr.restfulclient")
1466 (synopsis "Web client Python library extending wadlib")
1467 (description "This package provides a programmable client library that
1468adds functionality on top of @code{wadlib}.")
1469 (license license:lgpl3+)))
1470
1471(define-public python-launchpadlib
1472 (package
1473 (name "python-launchpadlib")
1474 (version "2.1.0")
1475 (source
1476 (origin
1477 (method url-fetch)
1478 (uri (pypi-uri "launchpadlib" version))
1479 (sha256
1480 (base32 "0br4j76l83lvyrhm8psml9cqmdsn65rx48w1q1a0s1bmpf85ihml"))))
1481 (build-system pyproject-build-system)
1482 (arguments
1483 (list #:phases #~(modify-phases %standard-phases
1484 (add-before 'check 'set-home
1485 (lambda _
1486 ;; Tests require a writable home.
1487 (setenv "HOME" "/tmp"))))))
1488 (propagated-inputs
1489 (list python-httplib2 python-lazr-restfulclient python-lazr-uri))
1490 (native-inputs (list python-pytest python-testresources python-wadllib
1491 python-setuptools python-wheel))
1492 (home-page "https://documentation.ubuntu.com/launchpad")
1493 (synopsis "Python client library for Launchpad's web service")
1494 (description "@code{launchpadlib} is a Python library that allows
1495scripting Launchpad via its the web service API.")
1496 (license license:lgpl3+)))
1497
1498(define-public python-lazr-uri
1499 (package
1500 (name "python-lazr-uri")
1501 (version "1.0.7")
1502 (source
1503 (origin
1504 (method url-fetch)
1505 (uri (pypi-uri "lazr_uri" version))
1506 (sha256
1507 (base32 "1vm34pw8fksc6m8fnqwh215sqdlw546cxcdga93i2l746grzc37d"))))
1508 (build-system pyproject-build-system)
1509 (arguments
1510 (list
1511 #:phases
1512 #~(modify-phases %standard-phases
1513 (replace 'check
1514 (lambda* (#:key tests? #:allow-other-keys)
1515 (if tests?
1516 (invoke "zope-testrunner" "--test-path=src")
1517 (format #t "test suite not run~%")))))))
1518 (native-inputs (list python-setuptools python-zope-testrunner))
1519 (home-page "https://launchpad.net/lazr.uri")
1520 (synopsis "Python URI manipulation library")
1521 (description "This Python package provides a self-contained, easily
1522reusable library for parsing, manipulating, and generating URIs.")
1523 (license license:lgpl3)))
1524
1525(define-public python-ldaptor
1526 (package
1527 (name "python-ldaptor")
1528 (version "21.2.0")
1529 (source
1530 (origin
1531 (method url-fetch)
1532 (uri (pypi-uri "ldaptor" version))
1533 (sha256
1534 (base32 "0n53czn5pyh8923y282spdb7xc8c9rhn0n43bczanjjx6wcynjcc"))))
1535 (build-system pyproject-build-system)
1536 (arguments
1537 (list
1538 #:test-flags
1539 #~(list "-m" "twisted.trial"
1540 (string-append "-j" (number->string (parallel-job-count)))
1541 "ldaptor")
1542 #:phases
1543 #~(modify-phases %standard-phases
1544 (add-before 'check 'disable-failing-tests
1545 (lambda _
1546 ;; Testing with Twisted 22.4 results in infinite loop creating
1547 ;; temporary config files, see
1548 ;; <https://github.com/twisted/ldaptor/issues/238>.
1549 (delete-file "ldaptor/test/test_config.py")))
1550 (replace 'check
1551 (lambda* (#:key tests? test-flags #:allow-other-keys)
1552 (when tests?
1553 (apply invoke "python" test-flags)))))))
1554 (native-inputs
1555 (list python-setuptools
1556 python-wheel))
1557 (propagated-inputs
1558 (list python-passlib
1559 python-pyopenssl
1560 python-service-identity ; to pass sanity check, for Twisted[tls]
1561 python-pyparsing
1562 python-twisted
1563 python-zope-interface))
1564 (home-page "https://github.com/twisted/ldaptor")
1565 (synopsis "Pure-Python Twisted library for LDAP")
1566 (description
1567 "This package provides a Python Twisted library for LDAP, which key
1568feaatures are:
1569@itemize
1570@item LDAP client logic
1571@item separately-accessible LDAP and BER protocol message generation/parsing
1572@item ASCII-format LDAP filter generation and parsing
1573@item LDIF format data generation
1574@item Samba password changing logic
1575@end itemize")
1576 (license license:expat)))
1577
1578(define-public python-legacy-cgi
1579 (package
1580 (name "python-legacy-cgi")
1581 (version "2.6.1")
1582 (source
1583 (origin
1584 (method url-fetch)
1585 (uri (pypi-uri "legacy_cgi" version))
1586 (sha256
1587 (base32 "0hksizyq7awmwh3337zy0rmj47x6b5igzam6ffj74gbwfjfakbgj"))))
1588 (build-system pyproject-build-system)
1589 (native-inputs (list python-poetry-core python-pytest))
1590 (home-page "https://github.com/jackrosenthal/legacy-cgi")
1591 (synopsis "Fork of the legacy standard library cgi and cgitb modules")
1592 (description
1593 "This is a fork of the standard library modules @code{cgi} and
1594@code{cgitb}. They are slated to be removed from the Python standard library
1595in Python 3.13 by PEP-594.")
1596 (license license:psfl)))
1597
1598(define-public python-opentelemetry-api
1599 (package
1600 (name "python-opentelemetry-api")
1601 (version "1.37.0")
1602 (source
1603 (origin
1604 (method url-fetch)
1605 (uri (pypi-uri "opentelemetry_api" version))
1606 (sha256
1607 (base32 "19yr3hfwdc9sv8df4vydxcsxnpld3xi57siq4w8xanrm42qka1sl"))))
1608 (build-system pyproject-build-system)
1609 (propagated-inputs (list python-importlib-metadata
1610 python-typing-extensions))
1611 (native-inputs (list python-hatchling
1612 python-opentelemetry-test-utils-bootstrap))
1613 (home-page "https://opentelemetry.io/docs/languages/python/")
1614 (synopsis "OpenTelemetry Python API")
1615 (description "@code{OpenTelemetry} Python API.")
1616 (license license:asl2.0)))
1617
1618(define-public python-opentelemetry-api-bootstrap
1619 (hidden-package
1620 (package/inherit python-opentelemetry-api
1621 (name "python-opentelemetry-api-bootstrap")
1622 (arguments
1623 (list
1624 #:tests? #f))
1625 (native-inputs (list python-hatchling)))))
1626
1627(define-public python-opentelemetry-sdk
1628 (package
1629 (name "python-opentelemetry-sdk")
1630 (version "1.37.0")
1631 (source
1632 (origin
1633 (method url-fetch)
1634 (uri (pypi-uri "opentelemetry_sdk" version))
1635 (sha256
1636 (base32 "19fx8vf35kcss43i17zqngqhmglb36dnddasbdvfsgcm22f0i3nc"))))
1637 (build-system pyproject-build-system)
1638 (propagated-inputs (list python-opentelemetry-api
1639 python-opentelemetry-semantic-conventions
1640 python-typing-extensions))
1641 (native-inputs (list python-hatchling
1642 python-opentelemetry-test-utils-bootstrap
1643 python-pytest))
1644 (home-page "https://opentelemetry.io/docs/languages/python/")
1645 (synopsis "OpenTelemetry Python SDK")
1646 (description "@code{OpenTelemetry} Python SDK.")
1647 (license license:asl2.0)))
1648
1649(define-public python-opentelemetry-sdk-bootstrap
1650 (hidden-package
1651 (package/inherit python-opentelemetry-sdk
1652 (name "python-opentelemetry-sdk-bootstrap")
1653 (arguments (list #:tests? #f))
1654 (propagated-inputs (list python-opentelemetry-api-bootstrap
1655 python-opentelemetry-semantic-conventions-bootstrap))
1656 (native-inputs (list python-hatchling)))))
1657
1658(define-public python-opentelemetry-semantic-conventions
1659 (package
1660 (name "python-opentelemetry-semantic-conventions")
1661 (version "0.58b0")
1662 (source
1663 (origin
1664 (method url-fetch)
1665 (uri (pypi-uri "opentelemetry_semantic_conventions" version))
1666 (sha256
1667 (base32 "098czakcawikaspl46vy6vickw80mm2bnrspflrw8ya24r8nzm3b"))))
1668 (build-system pyproject-build-system)
1669 (propagated-inputs (list python-opentelemetry-api python-typing-extensions))
1670 (native-inputs (list python-hatchling))
1671 (home-page "https://opentelemetry.io/docs/languages/python/")
1672 (synopsis "OpenTelemetry Semantic Conventions")
1673 (description "@code{OpenTelemetry} Semantic Conventions.")
1674 (license license:asl2.0)))
1675
1676(define-public python-opentelemetry-semantic-conventions-bootstrap
1677 (hidden-package
1678 (package/inherit python-opentelemetry-semantic-conventions
1679 (name "python-opentelemetry-semantic-conventions-bootstrap")
1680 (arguments
1681 (list
1682 #:tests? #f))
1683 (propagated-inputs (list python-opentelemetry-api-bootstrap
1684 python-typing-extensions)))))
1685
1686(define-public python-opentelemetry-test-utils
1687 (package
1688 (name "python-opentelemetry-test-utils")
1689 (version "0.58b0")
1690 (source
1691 (origin
1692 (method url-fetch)
1693 (uri (pypi-uri "opentelemetry_test_utils" version))
1694 (sha256
1695 (base32 "0xjp04zjn7m79xsda9wp79rqyzy2c10347s967vp7xvmndwwa0ds"))))
1696 (build-system pyproject-build-system)
1697 (propagated-inputs (list python-asgiref python-opentelemetry-api
1698 python-opentelemetry-sdk))
1699 (native-inputs (list python-hatchling))
1700 (home-page "https://opentelemetry.io/docs/languages/python/")
1701 (synopsis "Test utilities for OpenTelemetry unit tests")
1702 (description "Test utilities for @code{OpenTelemetry} unit tests.")
1703 (license license:asl2.0)))
1704
1705(define-public python-opentelemetry-test-utils-bootstrap
1706 (hidden-package
1707 (package/inherit python-opentelemetry-test-utils
1708 (name "python-opentelemetry-test-utils-bootstrap")
1709 (arguments
1710 (list
1711 #:tests? #f))
1712 (propagated-inputs (list python-asgiref
1713 python-opentelemetry-api-bootstrap
1714 python-opentelemetry-sdk-bootstrap))
1715 (native-inputs (list python-hatchling)))))
1716
1717(define-public python-pathy
1718 (package
1719 (name "python-pathy")
1720 (version "0.11.0")
1721 (source
1722 (origin
1723 (method url-fetch)
1724 (uri (pypi-uri "pathy" version))
1725 (sha256
1726 (base32 "0vbhcfg8g74g90bzmdgxr1jyvwhadvlr2w9wyvs6xxwb1dmhwgdv"))))
1727 (build-system pyproject-build-system)
1728 (native-inputs
1729 (list python-mock
1730 python-pytest
1731 python-setuptools))
1732 (propagated-inputs
1733 (list python-pathlib-abc-for-python-pathy
1734 python-smart-open-6
1735 python-typer))
1736 (home-page "https://github.com/justindujardin/pathy")
1737 (synopsis "Path interface for local and cloud bucket storage")
1738 (description "Pathy is a python package (with type annotations) for
1739working with Cloud Bucket storage providers using a @code{pathlib} interface.
1740It provides @code{pathlib.Path} subclasses for local and cloud bucket
1741storage.")
1742 (license license:asl2.0)))
1743
1744(define-public python-portend
1745 (package
1746 (name "python-portend")
1747 (version "3.2.1")
1748 (source
1749 (origin
1750 (method url-fetch)
1751 (uri (pypi-uri "portend" version))
1752 (sha256
1753 (base32 "12b4ikxyv32n33mvm4brp74igl1mvw825x01sjvvs54y3yml17da"))))
1754 (build-system pyproject-build-system)
1755 ;; Do not test pyproject.toml with python-pytest-checkdocs as it tries to
1756 ;; download dependencies.
1757 (arguments
1758 '(#:test-flags '("-k" "not project")))
1759 (native-inputs
1760 (list python-pytest
1761 python-setuptools
1762 python-setuptools-scm))
1763 (propagated-inputs
1764 (list python-tempora))
1765 (home-page "https://github.com/jaraco/portend")
1766 (synopsis "Monitor TCP ports for bound or unbound states")
1767 (description
1768 "@code{python-portend} can be used to monitor TCP ports for bound or
1769unbound states. For example, waiting for a port to be occupied or freed
1770within a set timeout. @code{python-portend} can also be used directly from
1771the command line.")
1772 (license license:expat)))
1773
1774(define-public python-prawcore
1775 (package
1776 (name "python-prawcore")
1777 (version "2.4.0")
1778 (source
1779 (origin
1780 (method git-fetch)
1781 (uri (git-reference
1782 (url "https://github.com/praw-dev/prawcore")
1783 (commit (string-append "v" version))))
1784 (file-name (git-file-name name version))
1785 (sha256
1786 (base32 "1y7gh7kk002b2h1ppkr1llb2gjfnby28zvx11j4ji0wm3r3rjh5l"))))
1787 (build-system pyproject-build-system)
1788 (arguments
1789 ;; XXX: These tests fail with an incomplete request response.
1790 (list #:test-flags
1791 #~'("-k" #$(string-append
1792 "not test_revoke__access_token_with_refresh_set"
1793 " and not test_revoke__access_token_without_refresh_set"
1794 " and not test_revoke__refresh_token_with_access_set"
1795 " and not test_refresh__with_scopes"
1796 " and not test_request__patch"))))
1797 (native-inputs
1798 (list python-betamax
1799 python-betamax-matchers
1800 python-betamax-serializers
1801 python-flit-core
1802 python-mock
1803 python-pytest
1804 python-testfixtures))
1805 (propagated-inputs
1806 (list python-requests))
1807 (synopsis "Core component of PRAW")
1808 (description "PRAWcore is a low-level communication layer used by PRAW.")
1809 (home-page "https://praw.readthedocs.io/en/latest/")
1810 (license license:bsd-2)))
1811
1812(define-public python-praw
1813 (package
1814 (name "python-praw")
1815 (version "7.8.1")
1816 (source
1817 (origin
1818 (method git-fetch)
1819 (uri (git-reference
1820 (url "https://github.com/praw-dev/praw")
1821 (commit (string-append "v" version))))
1822 (file-name (git-file-name name version))
1823 (sha256
1824 (base32 "05qq43l4334cq8r8k731qnb45nq12vvfdxwbr6q84a1hafp7n4cg"))))
1825 (build-system pyproject-build-system)
1826 (arguments
1827 (list #:test-flags
1828 #~(list "--ignore=tests/units/models"
1829 "--ignore=tests/integration/models"
1830 "--ignore=tests/unit/test_config.py"
1831 "--ignore=tests/integration/test_reddit.py")))
1832 (native-inputs
1833 (list python-betamax
1834 python-betamax-matchers
1835 python-flit-core
1836 python-pytest))
1837 (propagated-inputs
1838 (list python-prawcore python-update-checker python-websocket-client))
1839 (synopsis "Python Reddit API Wrapper")
1840 (description "PRAW is a Python package that allows for simple access to
1841Reddit’s API. It aims to be easy to use and internally follows all of Reddit’s
1842API rules.")
1843 (home-page "https://praw.readthedocs.io/en/latest/")
1844 (license license:bsd-2)))
1845
1846(define-public python-frozenlist
1847 (package
1848 (name "python-frozenlist")
1849 ;; XXX: Any newer versions fail to build, check why.
1850 (version "1.3.3")
1851 (source
1852 (origin
1853 (method url-fetch)
1854 (uri (pypi-uri "frozenlist" version))
1855 (sha256
1856 (base32 "0sispcpras096fxrd0i35qs25fqy4r0x8v1d6f40pag845bwbg2q"))))
1857 (build-system pyproject-build-system)
1858 (native-inputs
1859 (list python-pytest
1860 python-setuptools
1861 python-wheel))
1862 (home-page "https://github.com/aio-libs/frozenlist")
1863 (synopsis "List-like data structure for Python")
1864 (description "@code{frozenlist.FrozenList} is a list-like structure which
1865implements @code{collections.abc.MutableSequence}. It can be made immutable
1866by calling @code{FrozenList.freeze}.")
1867 (license license:asl2.0)))
1868
1869(define-public python-aiobotocore
1870 (package
1871 (name "python-aiobotocore")
1872 (version "2.25.1")
1873 (source
1874 (origin
1875 (method url-fetch)
1876 (uri (pypi-uri "aiobotocore" version))
1877 (sha256
1878 (base32 "1g7dv81bw7vq55gv3c5jxdw7wp7dp6dwjbh79y3fiv6ppwwyg6za"))))
1879 (build-system pyproject-build-system)
1880 (arguments
1881 (list
1882 ;; TODO: Too many tests fail seemingly because they need Internet access.
1883 #:tests? #false))
1884 (propagated-inputs (list python-aiohttp
1885 python-aioitertools
1886 python-botocore
1887 python-jmespath
1888 python-multidict
1889 python-dateutil
1890 python-urllib3
1891 python-wrapt))
1892 (native-inputs
1893 (list python-setuptools))
1894 (home-page "https://pypi.org/project/aiobotocore/")
1895 (synopsis "Async client for AWS services using botocore and aiohttp")
1896 (description "This package provides an async client for Amazon services
1897using botocore and aiohttp/asyncio. This library is a mostly full featured
1898asynchronous version of botocore.")
1899 (license license:asl2.0)))
1900
1901(define-public python-aiohappyeyeballs
1902 (package
1903 (name "python-aiohappyeyeballs")
1904 (version "2.6.1")
1905 (source
1906 (origin
1907 (method url-fetch)
1908 (uri (pypi-uri "aiohappyeyeballs" version))
1909 (sha256
1910 (base32 "0n1mjip846fprc34ik6if9m8xisva2m0ygyzvz53r013648x1yf3"))))
1911 (build-system pyproject-build-system)
1912 (native-inputs
1913 (list python-poetry-core
1914 python-pytest
1915 python-pytest-asyncio-0.26
1916 python-pytest-cov))
1917 (home-page "https://github.com/aio-libs/aiohappyeyeballs")
1918 (synopsis "Happy Eyeballs for asyncio")
1919 (description "This library exists to allow connecting with Happy
1920Eyeballs (RFC 8305) when you already have a list of @code{addrinfo} and not a
1921DNS name.")
1922 (license license:psfl)))
1923
1924(define-public python-aioitertools
1925 (package
1926 (name "python-aioitertools")
1927 (version "0.12.0")
1928 (source
1929 (origin
1930 (method url-fetch)
1931 (uri (pypi-uri "aioitertools" version))
1932 (sha256
1933 (base32 "0syxv2r90d6410hc68jxhk610pdgx19n1n5rc7shaxxv9xdhbaf2"))))
1934 (build-system pyproject-build-system)
1935 (arguments
1936 (list #:test-backend #~'custom
1937 #:test-flags #~(list "-m" "aioitertools.tests")))
1938 (native-inputs
1939 (list python-flit-core))
1940 (home-page "https://pypi.org/project/aioitertools/")
1941 (synopsis "Itertools and builtins for AsyncIO and mixed iterables")
1942 (description
1943 "This package provides an implementation of itertools, builtins, and more
1944for AsyncIO and mixed-type iterables.")
1945 (license license:expat)))
1946
1947(define-public python-aiosignal
1948 (package
1949 (name "python-aiosignal")
1950 (version "1.4.0")
1951 (source
1952 (origin
1953 (method url-fetch)
1954 (uri (pypi-uri "aiosignal" version))
1955 (sha256
1956 (base32 "1isin9bp256scp59lbr35h48nw5p5i84b6f9kh1c50w08vcyqzpl"))))
1957 (build-system pyproject-build-system)
1958 (native-inputs
1959 (list python-pytest
1960 python-pytest-asyncio
1961 python-pytest-cov
1962 python-setuptools
1963 python-wheel))
1964 (propagated-inputs
1965 (list python-frozenlist))
1966 (home-page "https://github.com/aio-libs/aiosignal")
1967 (synopsis "Callback manager for Python @code{asyncio} projects")
1968 (description "This Python module provides @code{Signal}, an abstraction to
1969register asynchronous callbacks. The @code{Signal} abstraction can be used
1970for adding, removing and dropping callbacks.")
1971 (license license:asl2.0)))
1972
1973(define-public python-aiohttp
1974 (package
1975 (name "python-aiohttp")
1976 (version "3.11.11")
1977 (source
1978 (origin
1979 (method url-fetch)
1980 (uri (pypi-uri "aiohttp" version))
1981 (sha256
1982 (base32 "0gihj076nm3863sqfnbh786621w1ad7lj7fq88d85wzbwvqwfjdv"))
1983 (snippet
1984 #~(begin
1985 (use-modules ((guix build utils)))
1986 ;; TODO: Unbundle the llhttp sources.
1987 ;; (delete-file-recursively "vendor")
1988 (delete-file "aiohttp/_http_parser.c")
1989 (delete-file "aiohttp/_http_writer.c")))))
1990 (build-system pyproject-build-system)
1991 (arguments
1992 (list
1993 #:test-flags
1994 '(list
1995 ;; This tests requires the 'proxy.py' module, not yet packaged.
1996 "--ignore=tests/test_proxy_functional.py"
1997 ;; These tests need brotli.
1998 "--ignore=tests/test_web_sendfile_functional.py"
1999 "--ignore=tests/test_web_functional.py"
2000 ;; These tests need pytest_codspeed
2001 "--ignore-glob=tests/test_benchmarks*"
2002 ;; These tests need python_on_whales
2003 "--ignore=tests/autobahn/test_autobahn.py"
2004 "-k"
2005 ;; These tests fail for unknown reasons (see:
2006 ;; https://github.com/aio-libs/aiohttp/issues/7130)
2007 (string-append
2008 "not test_no_warnings "
2009 "and not test_default_loop "
2010 "and not test_ctor_global_loop "
2011 "and not test_set_loop_default_loop "
2012
2013 ;; Disable brotli tests, because we’re not providing that optional
2014 ;; library.
2015 "and not test_feed_eof_no_err_brotli "
2016
2017 ;; Disable the following tests as they require
2018 ;; networking.
2019 "and not TestDeflateBuffer "
2020 "and not test_client_session_timeout_zero "
2021 "and not test_empty_body "
2022 "and not test_mark_formdata_as_processed[pyloop] "
2023 "and not test_receive_runtime_err[pyloop] "
2024
2025 ;; assert 'gzip, deflate' == 'gzip, deflate, br'
2026 "and not test_headers[pyloop] "
2027 ;; ~/.. does not resolve
2028 "and not test_add_static_path_resolution"))
2029 #:phases
2030 '(modify-phases %standard-phases
2031 (add-after 'unpack 'fix-tests
2032 (lambda _
2033 ;; Make sure the timestamp of this file is > 1990, because a few
2034 ;; tests like test_static_file_if_modified_since_past_date depend
2035 ;; on it.
2036 (let ((late-90s (* 60 60 24 365 30)))
2037 (utime "tests/data.unknown_mime_type" late-90s late-90s))))
2038 (add-before 'build 'cythonize
2039 (lambda _
2040 ;; Adapted from the Makefile.
2041 (with-directory-excursion "aiohttp"
2042 (for-each
2043 (lambda (file)
2044 (invoke "cython" "-3"
2045 file "-I" "."))
2046 (find-files "." "_.*\\.pyx$"))))))))
2047 (propagated-inputs
2048 (list python-aiohappyeyeballs
2049 python-aiosignal
2050 python-async-timeout
2051 python-attrs
2052 python-frozenlist
2053 python-multidict
2054 python-propcache
2055 python-yarl))
2056 (native-inputs
2057 (list gunicorn-bootstrap
2058 python-cython
2059 python-freezegun
2060 python-pytest
2061 python-pytest-cov
2062 python-pytest-mock
2063 python-pytest-xdist
2064 python-re-assert
2065 python-setuptools
2066 python-wheel))
2067 (home-page "https://github.com/aio-libs/aiohttp/")
2068 (synopsis "Async HTTP client/server framework (asyncio)")
2069 (description "@code{aiohttp} is an asynchronous HTTP client/server
2070framework.
2071
2072Its main features are:
2073@itemize
2074@item Supports both client and server side of HTTP protocol.
2075@item Supports both client and server Web-Sockets out-of-the-box without the
2076Callback Hell.
2077@item Web-server has middlewares and pluggable routing.
2078@end itemize")
2079 (license license:asl2.0)))
2080
2081(define-public python-aiohttp-oauthlib
2082 (package
2083 (name "python-aiohttp-oauthlib")
2084 (version "0.1.0")
2085 (source
2086 (origin
2087 (method url-fetch)
2088 (uri (pypi-uri "aiohttp-oauthlib" version))
2089 (sha256
2090 (base32 "1dwk0gby27xm7384qyz2p7zw9dqhjx7m8fhfk172w36xknjx2g49"))))
2091 (build-system pyproject-build-system)
2092 (arguments (list #:tests? #f)) ; none included
2093 (propagated-inputs (list python-aiohttp python-oauthlib))
2094 (native-inputs (list python-setuptools python-setuptools-scm))
2095 (home-page "https://git.sr.ht/~whynothugo/aiohttp-oauthlib")
2096 (synopsis "OAuthlib authentication support for aiohttp")
2097 (description "Aiohttp-oauthlib uses the Python aiohttp and OAuthlib libraries to
2098provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
2099 (license license:isc)))
2100
2101(define-public python-aiohttp-client-cache
2102 (package
2103 (name "python-aiohttp-client-cache")
2104 (version "0.14.2")
2105 (source
2106 (origin
2107 (method git-fetch)
2108 (uri (git-reference
2109 (url "https://github.com/requests-cache/aiohttp-client-cache")
2110 (commit (string-append "v" version))))
2111 (file-name (git-file-name name version))
2112 (sha256
2113 (base32
2114 "17qa2sh63wa7b9ma40y2b6k9sjscc5vfwlmf46sv36l1mz9rmd4y"))))
2115 (build-system pyproject-build-system)
2116 (arguments
2117 (list
2118 #:test-flags
2119 ;; Run unit tests only which not require networking or additional setup.
2120 #~(list "--ignore=test/integration")))
2121 (native-inputs
2122 (list python-hatchling
2123 ;; TODO: Missing packages: pytest-clarity,
2124 ;; nox-poetry, types-aiofiles.
2125 python-async-timeout
2126 python-brotli
2127 python-faker
2128 python-pytest
2129 python-pytest-aiohttp
2130 python-pytest-asyncio
2131 python-pytest-xdist))
2132 (propagated-inputs
2133 (list python-aiofiles
2134 python-aiohttp
2135 python-aiosqlite
2136 python-attrs
2137 python-itsdangerous
2138 python-redis
2139 python-url-normalize))
2140 (home-page "https://github.com/requests-cache/aiohttp-client-cache")
2141 (synopsis "Persistent cache for aiohttp requests")
2142 (description
2143 "This package is an asynchronous persistent caching library specifically
2144designed for @samp{aiohttp} requests in Python. With support for various
2145storage backends, it offers flexibility in how and where the cache is stored.
2146Please note that MongoDB and DynamoDB backends are not currently supported due
2147to the absence of the @samp{motor} and @samp{aioboto3} package dependencies.")
2148 (license license:expat)))
2149
2150(define-public python-aiohttp-cors
2151 (package
2152 (name "python-aiohttp-cors")
2153 (version "0.8.1")
2154 (source
2155 (origin
2156 (method url-fetch)
2157 (uri (pypi-uri "aiohttp_cors" version))
2158 (sha256
2159 (base32 "00qlzc2y65bkl1a5f5v83mmjlrhzmx3a2ngq2pm3jjdnhk5zkb6c"))))
2160 (build-system pyproject-build-system)
2161 (arguments
2162 (list
2163 #:tests? #f)) ; network access is required to run tests
2164 (native-inputs
2165 (list python-setuptools
2166 python-wheel))
2167 (propagated-inputs
2168 (list python-aiohttp))
2169 (home-page "https://github.com/aio-libs/aiohttp-cors")
2170 (synopsis "CORS support for aiohttp")
2171 (description
2172 "This library implements @acronym{CORS, Cross Origin Resource Sharing}
2173support for aiohttp asyncio-powered asynchronous HTTP server.")
2174 (license license:asl2.0)))
2175
2176(define-public python-aiohttp-retry
2177 (package
2178 (name "python-aiohttp-retry")
2179 (version "2.9.1")
2180 (source
2181 (origin
2182 (method git-fetch)
2183 (uri (git-reference
2184 (url "https://github.com/inyutin/aiohttp_retry")
2185 (commit (string-append "v" version))))
2186 (file-name (git-file-name name version))
2187 (sha256
2188 (base32 "0r5lxnxc4s8js7l86pfmdxl455v9lg3m41nz6m1xg4kwwf6j0bpi"))))
2189 (build-system pyproject-build-system)
2190 (native-inputs
2191 (list python-pytest
2192 python-pytest-aiohttp
2193 python-setuptools))
2194 (propagated-inputs
2195 (list python-aiohttp))
2196 (home-page "https://github.com/inyutin/aiohttp_retry")
2197 (synopsis "Simple retry client for aiohttp")
2198 (description
2199 "This package implements @code{RetryClient} for @code{aiohttp} to retry
2200connection to provided endpoint with timeouts logic or use:
2201
2202@itemize
2203@item @code{ExponentialRetry} with exponential backoff
2204@item @code{RandomRetry} for random backoff
2205@item @code{ListRetry} with backoff you predefine by list
2206@item @code{FibonacciRetry} with backoff that looks like fibonacci sequence
2207@item @code{JitterRetry} exponential retry with a bit of randomness
2208@end itemize")
2209 (license license:expat)))
2210
2211(define-public python-aiohttp-socks
2212 (package
2213 (name "python-aiohttp-socks")
2214 (version "0.10.1")
2215 (source
2216 (origin
2217 (method url-fetch)
2218 (uri (pypi-uri "aiohttp_socks" version))
2219 (sha256
2220 (base32
2221 "0s70jpcr9wc8ld2v1w309cz7r8mm2bipf6zbkdqqaa0z0pwf3wj9"))))
2222 (build-system pyproject-build-system)
2223 (arguments (list #:tests? #false)) ;none included
2224 (propagated-inputs
2225 (list python-aiohttp python-socks))
2226 (native-inputs (list python-setuptools python-wheel))
2227 (home-page "https://github.com/romis2012/aiohttp-socks")
2228 (synopsis "SOCKS proxy connector for aiohttp")
2229 (description "This package provides a SOCKS proxy connector for
2230aiohttp. It supports SOCKS4(a) and SOCKS5.")
2231 (license license:asl2.0)))
2232
2233(define-public python-aiodns
2234 (package
2235 (name "python-aiodns")
2236 (version "3.5.0")
2237 (source
2238 (origin
2239 (method git-fetch)
2240 (uri (git-reference
2241 (url "https://github.com/saghul/aiodns")
2242 (commit (string-append "v" version))))
2243 (file-name (git-file-name name version))
2244 (sha256
2245 (base32 "1as7l48962dpk3r4zdsifj761dks5nyr35hxs7m8crvkyb1dg9m9"))))
2246 (build-system pyproject-build-system)
2247 (arguments
2248 (list
2249 #:tests? #f)) ;tests require internet access
2250 (native-inputs
2251 (list python-pytest
2252 python-pytest-cov
2253 python-pytest-asyncio
2254 python-setuptools))
2255 (propagated-inputs (list python-pycares))
2256 (home-page "https://github.com/saghul/aiodns")
2257 (synopsis "Simple DNS resolver for asyncio")
2258 (description
2259 "@code{aiodns} provides a simple way for doing asynchronous DNS
2260resolutions with a synchronous looking interface by using
2261@url{https://github.com/saghul/pycares,pycares}.")
2262 (license license:expat)))
2263
2264(define-public python-aioquic
2265 (package
2266 (name "python-aioquic")
2267 (version "1.2.0")
2268 (source
2269 (origin
2270 (method url-fetch)
2271 (uri (pypi-uri "aioquic" version))
2272 (sha256
2273 (base32 "16bigrn5b46c7nmpzxhnlhh4y03hwc7dbd0mi5f8r53i7yxn64pr"))))
2274 (build-system pyproject-build-system)
2275 (arguments
2276 (list
2277 #:test-flags
2278 #~(list "-k" (string-join
2279 ;; AssertionError: AlertBadCertificate not raised
2280 (list "not test_verify_subject_no_subjaltname"
2281 ;; AttributeError: module
2282 ;; 'service_identity.cryptography' has no attribute
2283 ;; 'extract_patterns'
2284 "test_verify_subject_with_subjaltname"
2285 ;; AttributeError: module
2286 ;; 'service_identity.cryptography' has no attribute
2287 ;; 'extract_patterns'
2288 "test_verify_subject_with_subjaltname_ipaddress")
2289 " and not "))))
2290 (native-inputs
2291 (list nss-certs-for-test
2292 python-pytest
2293 python-setuptools
2294 python-wheel))
2295 (inputs
2296 (list openssl))
2297 (propagated-inputs
2298 (list python-certifi
2299 python-pylsqpack
2300 python-pyopenssl
2301 python-service-identity))
2302 (home-page "https://github.com/aiortc/aioquic")
2303 (synopsis "QUIC and HTTP3 implementation in Python")
2304 (description
2305 "@code{aioquic} is a library for the QUIC network protocol in Python.
2306It features a minimal TLS 1.3 implementation, a QUIC stack and an HTTP/3 stack.")
2307 (license license:bsd-3)))
2308
2309(define-public python-aiorpcx
2310 (package
2311 (name "python-aiorpcx")
2312 (version "0.25.0")
2313 (source
2314 (origin
2315 (method git-fetch)
2316 ;; PyPI misses the util.py file used for tests.
2317 (uri (git-reference
2318 (url "https://github.com/kyuupichan/aiorpcX")
2319 (commit version)))
2320 (file-name (git-file-name name version))
2321 (sha256
2322 (base32
2323 "0sn4xxlpy0kb5b25bqrjzh2m6bskdyydc6cq8bigb7g5dacksn4q"))))
2324 (build-system pyproject-build-system)
2325 (arguments
2326 (list
2327 #:test-flags
2328 ;; This test opens a remote connection.
2329 #~(list "-k" "not test_create_connection_resolve_good")))
2330 (native-inputs (list python-pytest
2331 python-pytest-asyncio-0.26
2332 python-setuptools))
2333 (propagated-inputs
2334 (list python-attrs python-websockets))
2335 (home-page "https://github.com/kyuupichan/aiorpcX")
2336 (synopsis "Generic asyncio RPC implementation")
2337 (description
2338 "The aiorpcX library is a generic asyncio implementation of RPC suitable
2339for an application that is a client, server or both.
2340
2341The package includes a module with full coverage of JSON RPC versions 1.0 and
23422.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
2343comes with a SOCKS proxy client.")
2344 (license (list license:expat license:bsd-2))))
2345
2346(define-public python-aiostream
2347 (package
2348 (name "python-aiostream")
2349 (version "0.7.0")
2350 (source
2351 (origin
2352 (method git-fetch) ;no tests in PyPI archvie
2353 (uri (git-reference
2354 (url "https://github.com/vxgmichel/aiostream")
2355 (commit (string-append "v" version))))
2356 (file-name (git-file-name name version))
2357 (sha256
2358 (base32 "1wf89l9f0ivlv796pklpgykx6j6ksfqrmvzikd8w5j6ldln7bv50"))))
2359 (build-system pyproject-build-system)
2360 (native-inputs
2361 (list python-pytest
2362 python-pytest-cov
2363 python-pytest-asyncio
2364 python-setuptools))
2365 (propagated-inputs
2366 (list python-typing-extensions))
2367 (home-page "https://github.com/vxgmichel/aiostream")
2368 (synopsis "Generator-based operators for asynchronous iteration")
2369 (description "@code{aiostream} provides a collection of stream operators that can
2370be combined to create asynchronous pipelines of operations. It can be seen as an
2371asynchronous version of @code{itertools}, although some aspects are slightly
2372different. All the provided operators return a unified interface called a stream. A
2373stream is an enhanced asynchronous iterable.")
2374 (license license:gpl3)))
2375
2376(define-public python-asgiref
2377 (package
2378 (name "python-asgiref")
2379 (version "3.8.1")
2380 (source (origin
2381 (method url-fetch)
2382 (uri (pypi-uri "asgiref" version))
2383 (sha256
2384 (base32 "146mhkn3zp2bqf7j6r3chdlvfzgs5x1lrnqahsllgjdyl20bshy3"))))
2385 (build-system pyproject-build-system)
2386 (native-inputs
2387 (list python-mypy python-pytest python-pytest-asyncio python-setuptools
2388 python-wheel))
2389 (home-page "https://github.com/django/asgiref/")
2390 (synopsis "ASGI specs, helper code, and adapters")
2391 (description
2392 "ASGI is a standard for Python asynchronous web apps and servers to
2393communicate with each other, and positioned as an asynchronous successor to
2394WSGI. This package includes libraries for implementing ASGI servers.")
2395 (license license:bsd-3)))
2396
2397(define-public python-asgi-csrf
2398 (package
2399 (name "python-asgi-csrf")
2400 (version "0.11")
2401 (source (origin
2402 (method git-fetch) ;for tests
2403 (uri (git-reference
2404 (url "https://github.com/simonw/asgi-csrf")
2405 (commit version)))
2406 (file-name (git-file-name name version))
2407 (sha256
2408 (base32
2409 "1dn9v47z2b599cnwahxvzsll2w28940ycgh5skxgq04vcqqssf29"))))
2410 (build-system pyproject-build-system)
2411 (propagated-inputs (list python-itsdangerous python-multipart))
2412 (native-inputs (list python-asgi-lifespan
2413 python-httpx
2414 python-pytest
2415 python-pytest-asyncio
2416 python-starlette
2417 python-setuptools
2418 python-wheel))
2419 (home-page "https://github.com/simonw/asgi-csrf")
2420 (synopsis "ASGI middleware for protecting against CSRF attacks")
2421 (description "This Asynchronous Server Gateway Interface (ASGI)
2422middleware protects against Cross-site request forgery (CSRF) attacks.
2423It implements the Double Submit Cookie pattern, where a cookie is set
2424that is then compared to a @code{csrftoken} hidden form field or a
2425@code{x-csrftoken} HTTP header.")
2426 (license license:asl2.0)))
2427
2428(define-public python-asgi-lifespan
2429 (package
2430 (name "python-asgi-lifespan")
2431 (version "2.1.0")
2432 (source (origin
2433 (method git-fetch) ;for tests
2434 (uri (git-reference
2435 (url "https://github.com/florimondmanca/asgi-lifespan")
2436 (commit version)))
2437 (file-name (git-file-name name version))
2438 (sha256
2439 (base32
2440 "0iqa3h61gsq1qd6j9v68k989596m9n9k1dx8zv6135rmhzzrs296"))))
2441 (build-system pyproject-build-system)
2442 (arguments
2443 (list
2444 #:test-flags
2445 '(list "-c" "/dev/null" ;ignore coverage-related options
2446 "-k"
2447 (string-append
2448 ;; XXX: Some tests fail because of "Exceptions from Trio nursery"
2449 "not (test_lifespan_manager[trio-None-None-StartupFailed]"
2450 " or test_lifespan_manager[trio-None-BodyFailed-None]"
2451 " or test_lifespan_manager[trio-None-BodyFailed-StartupFailed]"
2452 " or test_lifespan_manager[trio-ShutdownFailed-None-None]"
2453 " or test_lifespan_manager[trio-ShutdownFailed-None-StartupFailed]"
2454 " or test_lifespan_manager[trio-ShutdownFailed-BodyFailed-StartupFailed]"
2455 " or test_lifespan_timeout[trio-slow_shutdown]"
2456 " or test_lifespan_not_supported[trio-http_only]"
2457 " or test_lifespan_not_supported[trio-http_no_assert]"
2458 " or test_lifespan_not_supported[trio-http_no_assert_before_receive_request]"
2459 ")"))
2460 #:phases
2461 '(modify-phases %standard-phases
2462 (add-after 'unpack 'compatibility
2463 (lambda _
2464 ;; httpx version 0.28.0 removed the "app" shortcut.
2465 (substitute* "tests/test_manager.py"
2466 (("app=manager.app")
2467 "transport=httpx.ASGITransport(manager.app)")))))))
2468 (native-inputs (list python-httpx
2469 python-pytest
2470 python-pytest-asyncio
2471 python-pytest-trio
2472 python-starlette
2473 python-setuptools
2474 python-wheel))
2475 (propagated-inputs (list python-sniffio))
2476 (home-page "https://github.com/florimondmanca/asgi-lifespan")
2477 (synopsis "Programmatic startup/shutdown of ASGI apps")
2478 (description "Programmatically send startup/shutdown lifespan events
2479into Asynchronous Server Gateway Interface (ASGI) applications. When
2480used in combination with an ASGI-capable HTTP client such as HTTPX, this
2481allows mocking or testing ASGI applications without having to spin up an
2482ASGI server.")
2483 (license license:expat)))
2484
2485(define-public python-a2wsgi
2486 (package
2487 (name "python-a2wsgi")
2488 (version "1.10.7")
2489 (source (origin
2490 (method url-fetch)
2491 (uri (pypi-uri "a2wsgi" version))
2492 (sha256
2493 (base32
2494 "13ikyfmkx7hlrbg5rpcdm6kw4wcsy00giil3f72hpb6sw7vjyinf"))))
2495 (build-system pyproject-build-system)
2496 (arguments
2497 (list
2498 #:test-flags
2499 #~(list "-k" (string-join
2500 (list "not test_starlette_stream_response"
2501 "test_starlette_base_http_middleware"
2502 "test_baize_stream_response"
2503 ;; Fails because of harmless whitespace differences.
2504 "test_wsgi_post")
2505 " and not "))
2506 #:build-backend "pdm.backend"))
2507 (native-inputs
2508 (list python-pdm-backend
2509 python-pytest
2510 ;; python-baize ; not packed yet
2511 python-httpx-bootstrap
2512 ;; Cycle: python-a2wsgi->python-uvicorn->
2513 ;; python-httpx->python-starlette->python-a2wsgi
2514 ;; python-starlette
2515 python-pytest-asyncio))
2516 (home-page "https://github.com/abersheeran/a2wsgi")
2517 (synopsis "Convert WSGI to ASGI or vice versa")
2518 (description
2519 "This program converts a WSGI program to an ASGI program or the other
2520way around. It depends only on the Python standard library.")
2521 (license license:asl2.0)))
2522
2523(define-public python-httpauth
2524 (package
2525 (name "python-httpauth")
2526 (version "0.4.1")
2527 (source (origin
2528 (method url-fetch)
2529 (uri (pypi-uri "httpauth" version))
2530 (sha256
2531 (base32
2532 "1m6rwvivg61l3h34hf6p6gkqmr69sb1c4k5ha379nxq0p8bfgahb"))))
2533 (build-system pyproject-build-system)
2534 (native-inputs (list python-pytest python-setuptools python-wheel))
2535 (home-page "https://github.com/jonashaag/httpauth")
2536 (synopsis "WSGI HTTP Digest Authentication middleware")
2537 (description "@code{python-httpauth} is WSGI middleware that secures some/all
2538routes using HTTP Digest Authentication.")
2539 (license license:bsd-2)))
2540
2541(define-public python-css-html-js-minify
2542 (let ((commit "8f72452960e41bc5476e50d96481f633eff72750")
2543 (revision "0"))
2544 (package
2545 (name "python-css-html-js-minify")
2546 (version (git-version "2.5.5" revision commit))
2547 (source
2548 (origin
2549 (method git-fetch)
2550 (uri (git-reference
2551 (url "https://github.com/juancarlospaco/css-html-js-minify")
2552 (commit commit)))
2553 (file-name (git-file-name name version))
2554 (sha256
2555 (base32 "1lkx03720zk6q16w3d9r3l5kryikd1cmzwrcjzsjxwrq4zfh6vdf"))))
2556 (build-system pyproject-build-system)
2557 (arguments
2558 (list
2559 #:phases
2560 #~(modify-phases %standard-phases
2561 (add-after 'unpack 'relax-requirements
2562 (lambda _
2563 (substitute* "setup.cfg"
2564 (("^tests_require.*") "")))))))
2565 (native-inputs (list python-pytest python-setuptools))
2566 (home-page "https://github.com/juancarlospaco/css-html-js-minify")
2567 (synopsis "CSS/HTML/JS minifier")
2568 (description
2569 "This package provides a single-file minifier for CSS, HTML, and JavaScript.")
2570 ;; XXX: The README just says "GNU GPL and GNU LGPL and MIT". From
2571 ;; <https://github.com/juancarlospaco/css-html-js-minify/issues/9> it
2572 ;; looks like the user can choose a license.
2573 (license (list license:gpl3+ license:lgpl3+ license:expat)))))
2574
2575(define-public python-aws-sam-translator
2576 (package
2577 (name "python-aws-sam-translator")
2578 (version "1.99.0")
2579 (source
2580 (origin
2581 (method git-fetch) ; no tests in PyPI release
2582 (uri (git-reference
2583 (url "https://github.com/aws/serverless-application-model")
2584 (commit (string-append "v" version))))
2585 (file-name (git-file-name name version))
2586 (sha256
2587 (base32 "1k9a8r0kfjsrxk5z4yhipcynr2sqcl7lpc1xmdblxk76cqvsmkb3"))))
2588 (build-system pyproject-build-system)
2589 (arguments
2590 (list
2591 #:test-flags
2592 #~(list "--numprocesses" (number->string (parallel-job-count))
2593 "--ignore=tests/bin/test_public_interface.py"
2594 "tests")
2595 #:phases
2596 #~(modify-phases %standard-phases
2597 (add-after 'unpack 'fix-pytest-config
2598 (lambda _
2599 ;; Drop test coverage requirements.
2600 (substitute* "pytest.ini"
2601 ((".*addopts.*") ""))))
2602 (add-before 'check 'pre-check
2603 (lambda _
2604 (setenv "AWS_DEFAULT_REGION" "eu-west-3"))))))
2605 (native-inputs
2606 (list python-pytest
2607 python-setuptools
2608 python-pytest-xdist
2609 python-parameterized
2610 python-pyyaml))
2611 (propagated-inputs
2612 (list python-boto3
2613 python-jsonschema
2614 python-pydantic-2
2615 python-typing-extensions))
2616 (home-page "https://github.com/aws/serverless-application-model")
2617 (synopsis "Transform AWS SAM templates into AWS CloudFormation templates")
2618 (description
2619 "AWS SAM Translator is a library that transform @dfn{Serverless Application
2620Model} (SAM) templates into AWS CloudFormation templates.")
2621 (license license:asl2.0)))
2622
2623(define-public python-aws-xray-sdk
2624 (package
2625 (name "python-aws-xray-sdk")
2626 (version "2.14.0")
2627 (home-page "https://github.com/aws/aws-xray-sdk-python")
2628 (source (origin
2629 (method git-fetch)
2630 (uri (git-reference (url home-page) (commit version)))
2631 (file-name (git-file-name name version))
2632 (sha256
2633 (base32
2634 "0khm86218rfjmgfw0azk7gnq6y9gkj95i0i30wa5v2li1z4z8qxd"))))
2635 (build-system pyproject-build-system)
2636 (arguments
2637 (list
2638 #:test-flags
2639 '(list ;; Tries to connect to external network resources
2640 "--ignore=tests/ext/aiohttp/test_client.py"
2641 "--ignore=tests/ext/httplib/test_httplib.py"
2642 "--ignore=tests/ext/httpx"
2643 "--ignore=tests/ext/requests/test_requests.py"
2644 ;; TODO: How to configure Django for these tests?
2645 "--ignore=tests/ext/django"
2646 ;; These tests require packages not yet in Guix.
2647 "--ignore=tests/ext/aiobotocore/test_aiobotocore.py"
2648 "--ignore=tests/ext/aiohttp/test_middleware.py"
2649 "--ignore=tests/ext/pg8000/test_pg8000.py"
2650 "--ignore=tests/ext/psycopg2/test_psycopg2.py"
2651 "--ignore=tests/ext/pymysql/test_pymysql.py"
2652 "--ignore=tests/ext/pynamodb/test_pynamodb.py"
2653 "--ignore=tests/ext/sqlalchemy_core/test_postgres.py"
2654 "--ignore=tests/ext/sqlalchemy_core/test_dburl.py"
2655 "--ignore=tests/test_async_recorder.py"
2656 ;; FIXME: module 'sqlalchemy.orm' has no attribute 'DeclarativeBase'.
2657 "--ignore-glob=tests/ext/sqlalchemy*"
2658 "--ignore=tests/ext/flask_sqlalchemy/test_query.py"
2659 ;; FIXME: Why is this failing?
2660 "--ignore=tests/test_patcher.py"
2661 "--ignore=tests/test_lambda_context.py")
2662 #:phases
2663 '(modify-phases %standard-phases
2664 (add-before 'check 'pre-check
2665 (lambda _
2666 ;; Allow "import tests.utils" to work as expected.
2667 (setenv "PYTHONPATH" (getcwd)))))))
2668 (native-inputs
2669 (list ;; These are required for the test suite.
2670 python-aiohttp
2671 python-bottle
2672 python-flask
2673 python-flask-sqlalchemy
2674 python-httpx
2675 python-mock
2676 python-pymysql
2677 python-pytest
2678 python-pytest-asyncio-0.26
2679 python-pytest-benchmark
2680 python-setuptools
2681 python-sqlalchemy
2682 python-webtest))
2683 (propagated-inputs
2684 (list python-botocore
2685 python-jsonpickle
2686 python-requests
2687 python-wrapt))
2688 (synopsis "Profile applications on AWS X-Ray")
2689 (description
2690 "The AWS X-Ray SDK for Python enables Python developers to record and
2691emit information from within their applications to the AWS X-Ray service.")
2692 (license license:asl2.0)))
2693
2694(define-public python-publicsuffixlist
2695 (package
2696 (name "python-publicsuffixlist")
2697 (version "1.0.2.20250202")
2698 (source
2699 (origin
2700 (method url-fetch)
2701 (uri (pypi-uri "publicsuffixlist" version))
2702 (sha256
2703 (base32 "0llam7g7sv08lcfgy18iph8br8ldjmy2qbjaykc9pd3z4iisb0yd"))))
2704 (build-system pyproject-build-system)
2705 (arguments (list #:test-backend #~'unittest))
2706 (native-inputs (list python-setuptools))
2707 (home-page "https://github.com/ko-zu/psl")
2708 (synopsis "Public suffix list for Python")
2709 (description
2710 "This package provides an implementation of
2711@url{https://publicsuffix.org/, Public Suffix List } as Python library.
2712
2713Features:
2714@itemize
2715@item supports IDN (unicode and punycoded)
2716@item shipped with built-in PSL and an updater script
2717@item written in Pure Python with no library dependencies
2718@end itemize")
2719 (license license:mpl2.0)))
2720
2721(define-public python-pycognito
2722 (package
2723 (name "python-pycognito")
2724 (version "2024.5.1")
2725 (source
2726 (origin
2727 (method url-fetch)
2728 (uri (pypi-uri "pycognito" version))
2729 (sha256
2730 (base32 "1r1sq87spqcfgg17khgpqc2ga8m9nk10flg9h23drhy2k1kcc4g2"))))
2731 (build-system pyproject-build-system)
2732 (arguments
2733 ;; XXX: cycles with python-moto, bootstrap/minimal variant is required.
2734 (list #:tests? #f))
2735 (native-inputs
2736 (list python-setuptools))
2737 (propagated-inputs
2738 (list python-boto3
2739 python-envs
2740 python-pyjwt
2741 python-requests))
2742 (home-page "https://github.com/pvizeli/pycognito")
2743 (synopsis "Python library for using AWS Cognito")
2744 (description
2745 "This package provides a Python class to integrate Boto3's Cognito
2746client so it is easy to login users, with @acronym{Secure Remote Password,
2747SRP} support.")
2748 (license license:asl2.0)))
2749
2750(define-public python-python3-saml
2751 (package
2752 (name "python-python3-saml")
2753 (version "1.16.0")
2754 (source
2755 (origin
2756 (method git-fetch)
2757 (uri (git-reference
2758 (url "https://github.com/SAML-Toolkits/python3-saml")
2759 (commit (string-append "v" version))))
2760 (file-name (git-file-name name version))
2761 (sha256
2762 (base32 "1isisymhk8zblj5942jfl0zq392q5fpjikx52nywvzb0m2dcc81b"))))
2763 (build-system pyproject-build-system)
2764 (arguments
2765 (list
2766 ;; 214 tests pass, 50 fail; many fail because of required Internet
2767 ;; access or because of assumptions about the location of test files.
2768 #:tests? #false
2769 #:phases
2770 #~(modify-phases %standard-phases
2771 ;; FIXME: This should be fixed in python-xmlsec
2772 (add-before 'check 'pre-check
2773 (lambda* (#:key inputs #:allow-other-keys)
2774 (let ((lib (search-input-file inputs
2775 "lib/libxmlsec1-openssl.so")))
2776 (setenv "LD_LIBRARY_PATH" (dirname lib))))))))
2777 (native-inputs
2778 (list python-freezegun
2779 python-poetry-core))
2780 (inputs
2781 (list xmlsec-openssl))
2782 (propagated-inputs
2783 (list python-isodate
2784 python-lxml
2785 python-xmlsec))
2786 (home-page "https://github.com/SAML-Toolkits/python3-saml")
2787 (synopsis "Saml Python toolkit")
2788 (description
2789 "The SAML Python Toolkit lets you add SAML support to your Python
2790software.")
2791 (license license:expat)))
2792
2793(define-public python-ovh
2794 (package
2795 (name "python-ovh")
2796 (version "1.1.0")
2797 (source (origin
2798 (method url-fetch)
2799 (uri (pypi-uri "ovh" version))
2800 (sha256
2801 (base32
2802 "0ygniv12lixh9rvnjcd01gzbzk2b5xwcg2a59b7964a77dd9p3qh"))))
2803 (build-system pyproject-build-system)
2804 (arguments (list #:tests? #f)) ; XXX: tests require networking
2805 (propagated-inputs (list python-requests))
2806 (native-inputs (list python-setuptools))
2807 (home-page "https://api.ovh.com")
2808 (synopsis "Interact with OVHcloud APIs")
2809 (description "This package provides the official module to perform HTTP requests
2810to the OVHcloud APIs.")
2811 (license license:bsd-3)))
2812
2813(define-public python-cbor2
2814 (package
2815 (name "python-cbor2")
2816 (version "5.4.2.post1")
2817 (source
2818 (origin
2819 (method url-fetch)
2820 (uri (pypi-uri "cbor2" version))
2821 (sha256
2822 (base32 "15y78xcc3zkmvj1mdzz8gyhf3apbl91073kwhzbjk5abc1civwlw"))))
2823 (build-system pyproject-build-system)
2824 (native-inputs
2825 (list python-pytest
2826 python-pytest-cov
2827 python-setuptools
2828 python-setuptools-scm
2829 python-wheel))
2830 (home-page "https://github.com/agronholm/cbor2")
2831 (synopsis "Concise Binary Object Representation (CBOR) (de)serializer")
2832 (description "This Python library provides encoding and decoding for the
2833Concise Binary Object
2834Representation (CBOR) (@url{https://www.rfc-editor.org/rfc/rfc8949.html, RFC
28358949}) serialization format. The specification is fully compatible with the
2836original RFC 7049. Among its features are:
2837@itemize
2838@item Simple API like the @code{json} or @code{pickle} modules.
2839@item Support many CBOR tags with stdlib objects.
2840@item Generic tag decoding.
2841@item Shared value references including cyclic references.
2842@item String references compact encoding with repeated strings replaced with
2843indices.
2844@item Optional C module backend tested on big- and little-endian architectures.
2845@item Extensible tagged value handling using tag_hook and object_hook on
2846decode and default on encode.
2847@end itemize")
2848 (license license:expat)))
2849
2850(define-public python-cfn-lint
2851 (package
2852 (name "python-cfn-lint")
2853 (version "1.38.1")
2854 (source
2855 (origin
2856 (method git-fetch)
2857 (uri (git-reference
2858 (url "https://github.com/aws-cloudformation/cfn-lint")
2859 (commit (string-append "v" version))))
2860 (file-name (git-file-name name version))
2861 (sha256
2862 (base32 "1crwx0cp50h83xz8lc4ny504mx4dadpk80ln539syd4jd78qplgy"))))
2863 (build-system pyproject-build-system)
2864 (arguments
2865 (list
2866 ;; tests: 2136 passed, 11 deselected, 1 warning
2867 #:test-flags
2868 #~(list "--ignore=test/integration/"
2869 "-k" (string-join
2870 ;; Tests failing on doctest or comparing diff.
2871 (list "not test_build_graph"
2872 "test_good_template"
2873 "test_success_run"
2874 "test_update_docs"
2875 ;; ImportError: Missing optional dependencies sarif
2876 "test_sarif_formatter")
2877 " and not "))
2878 #:phases
2879 #~(modify-phases %standard-phases
2880 (add-after 'unpack 'remove-deprecated
2881 (lambda _
2882 (substitute* "src/cfnlint/data/AdditionalSpecs/LmbdRuntimeLifecycle.json"
2883 (("deprecated\": \"2025")
2884 "deprecated\": \"2125")))))))
2885 (native-inputs
2886 (list python-defusedxml
2887 python-pydot
2888 python-pytest
2889 python-setuptools))
2890 (propagated-inputs
2891 (list python-aws-sam-translator
2892 python-jsonpatch
2893 python-networkx
2894 python-pyyaml
2895 python-regex
2896 python-sympy
2897 python-typing-extensions
2898 ;; [optional]
2899 python-junit-xml))
2900 (home-page "https://github.com/aws-cloudformation/cfn-lint")
2901 (synopsis "Validate CloudFormation templates")
2902 (description
2903 "This package lets you validate CloudFormation YAML/JSON templates against
2904the CloudFormation spec and additional checks. Includes checking valid values
2905for resource properties and best practices.")
2906 (license license:expat)))
2907
2908(define-public python-pyzabbix
2909 (package
2910 (name "python-pyzabbix")
2911 (version "1.3.1")
2912 (source
2913 (origin
2914 (method git-fetch)
2915 (uri (git-reference
2916 (url "https://github.com/lukecyca/pyzabbix")
2917 (commit version)))
2918 (file-name (git-file-name name version))
2919 (sha256
2920 (base32 "1dbs3bz1mjlvlg46ikhg5j7agwni61ljlpiziknklv95yp29n86v"))))
2921 (build-system pyproject-build-system)
2922 (arguments
2923 (list #:test-flags #~(list "tests")))
2924 (native-inputs
2925 (list python-pytest
2926 python-requests-mock
2927 python-setuptools))
2928 (propagated-inputs
2929 (list python-packaging
2930 python-requests))
2931 (home-page "https://github.com/lukecyca/pyzabbix")
2932 (synopsis "Python interface to the Zabbix API")
2933 (description
2934 "@code{pyzabbix} is a Python module for working with the Zabbix API.")
2935 (license license:lgpl2.1+)))
2936
2937(define-public python-requests-cache
2938 (package
2939 (name "python-requests-cache")
2940 (version "1.2.1")
2941 (source
2942 (origin
2943 (method url-fetch)
2944 (uri (pypi-uri "requests_cache" version))
2945 (sha256
2946 (base32 "1l8i4l2pd26gbrlcdb5z056wvsqfr3vvbyqq2f8x1f65zn3ckav8"))))
2947 (build-system pyproject-build-system)
2948 (arguments
2949 (list
2950 #:test-flags
2951 #~(list "--numprocesses" (number->string (parallel-job-count))
2952 ;; These tests require access to external services, e.g. MongoDB
2953 ;; and Redis.
2954 "--ignore=tests/integration"
2955 ;; AttributeError: <class 'requests.adapters.HTTPAdapter'> does
2956 ;; not have the attribute 'get_connection_with_tls_context'
2957 "-k" "not test_mock_session")
2958 #:phases
2959 #~(modify-phases %standard-phases
2960 (add-before 'check 'pre-check
2961 (lambda _
2962 ;; PermissionError: [Errno 13] Permission denied:
2963 ;; '/homeless-shelter'
2964 (setenv "HOME" "/tmp"))))))
2965 (native-inputs
2966 (list python-poetry-core
2967 python-pytest
2968 python-pytest-rerunfailures
2969 python-pytest-xdist
2970 python-requests-mock
2971 python-responses
2972 python-rich
2973 python-tenacity
2974 python-time-machine
2975 python-timeout-decorator))
2976 (propagated-inputs
2977 (list python-attrs
2978 python-boto3
2979 python-bson
2980 python-cattrs
2981 python-itsdangerous
2982 python-orjson
2983 python-platformdirs
2984 python-pymongo
2985 python-pyyaml
2986 python-redis
2987 python-requests
2988 python-ujson
2989 python-url-normalize
2990 python-urllib3))
2991 (home-page "https://github.com/requests-cache/requests-cache")
2992 (synopsis "Persistent HTTP cache for Python requests")
2993 (description
2994 "This package provides a drop-in replacement for @code{requests.Session}
2995with caching offload to SQLite, Redis, MongoDB and AWS DynamoDB or save
2996responses as planin JSON/YAML file or save responses as plain JSON/YAML
2997files.")
2998 (license license:bsd-2)))
2999
3000(define-public python-requests-futures
3001 (package
3002 (name "python-requests-futures")
3003 (version "1.0.2")
3004 (source
3005 (origin
3006 (method url-fetch)
3007 (uri (pypi-uri "requests_futures" version))
3008 (sha256
3009 (base32 "1njqfjmd72l5f32jvcppg2afrvb0cd8angdwmq7q0vik81wvazkb"))))
3010 (build-system pyproject-build-system)
3011 (native-inputs
3012 (list python-greenlet
3013 python-pytest
3014 python-pytest-httpbin
3015 python-setuptools
3016 python-werkzeug))
3017 (propagated-inputs (list python-requests))
3018 (home-page "https://github.com/ross/requests-futures")
3019 (synopsis "Asynchronous Python HTTP for Humans")
3020 (description
3021 "This package provides and add-on the Python Requests HTTP library to run
3022code asynchronously.")
3023 (license license:asl2.0)))
3024
3025(define-public python-s3path
3026 (package
3027 (name "python-s3path")
3028 (version "0.6.4")
3029 (source
3030 (origin
3031 (method url-fetch)
3032 (uri (pypi-uri "s3path" version))
3033 (sha256
3034 (base32 "1lp5243jjf9ngqmajgnfr1px1kmpkfmgh248xlqz0nkww4wcy1hh"))))
3035 (build-system pyproject-build-system)
3036 (arguments
3037 (list
3038 ;; XXX: All tests fail with error: fixture 's3_mock' not found.
3039 #:tests? #f))
3040 (native-inputs
3041 (list python-setuptools
3042 python-wheel))
3043 (propagated-inputs
3044 (list python-boto3
3045 python-smart-open))
3046 (home-page "https://github.com/liormizr/s3path")
3047 (synopsis "Pathlib extension for AWS S3 Service")
3048 (description
3049 "S3Path provide a Python convenient File-System/Path like interface for
3050AWS S3 Service using boto3 S3 resource as a driver.")
3051 (license license:asl2.0)))
3052
3053(define-public python-falcon
3054 (package
3055 (name "python-falcon")
3056 (version "4.0.2")
3057 (source
3058 (origin
3059 ;; Use git, as there are some test files missing from the PyPI release,
3060 ;; such as 'examples' directory.
3061 (method git-fetch)
3062 (uri (git-reference
3063 (url "https://github.com/falconry/falcon")
3064 (commit version)))
3065 (file-name (git-file-name name version))
3066 (sha256
3067 (base32
3068 "1zhyvfbz4c1bxd4vbsgk19dzih6kkzgin10lmsr32x3b4qgnwqxs"))))
3069 (build-system pyproject-build-system)
3070 (arguments
3071 (list
3072 #:test-flags
3073 '(list "-k" "not slow"
3074 "--ignore-glob=examples/*" "--ignore-glob=bench/*" "tests")
3075 #:phases
3076 '(modify-phases %standard-phases
3077 (add-before 'check 'pre-check
3078 (lambda _
3079 (setenv "FALCON_ASGI_WRAP_NON_COROUTINES" "Y")
3080 (setenv "FALCON_TESTING_SESSION" "Y")
3081 (setenv "PYTHONASYNCIODEBUG" "1")
3082 (setenv "HOME" "/tmp"))))))
3083 (propagated-inputs
3084 (list python-mimeparse))
3085 (native-inputs
3086 (list python-aiofiles
3087 python-cbor2
3088 python-cython ;for faster binaries
3089 python-fakeredis
3090 python-httpx
3091 python-mujson
3092 python-msgpack
3093 python-orjson
3094 python-pecan
3095 python-pillow
3096 python-pytest
3097 python-pytest-asyncio
3098 python-pytest-runner
3099 python-pyyaml
3100 python-rapidjson
3101 python-requests
3102 python-setuptools
3103 python-testtools
3104 python-ujson
3105 python-websockets
3106 python-wheel))
3107 (home-page "https://falconframework.org")
3108 (synopsis "Web framework for building APIs and application backends")
3109 (description "Falcon is a web API framework for building microservices,
3110application backends and higher-level frameworks. Among its features are:
3111@itemize
3112@item Optimized and extensible code base
3113@item Routing via URI templates and REST-inspired resource
3114classes
3115@item Access to headers and bodies through request and response
3116classes
3117@item Request processing via middleware components and hooks
3118@item Idiomatic HTTP error responses
3119@item Straightforward exception handling
3120@item Unit testing support through WSGI helpers and mocks
3121@item Compatible with both CPython and PyPy
3122@item Cython support for better performance when used with CPython
3123@end itemize")
3124 (license license:asl2.0)))
3125
3126(define-public python-falcon-cors
3127 (package
3128 (name "python-falcon-cors")
3129 (properties '((commit . "41e9f075e193c1f76b26c0a8c67ad6e87462dfa6")
3130 (revision . "0")))
3131 (version (git-version "1.1.7"
3132 (assoc-ref properties 'revision)
3133 (assoc-ref properties 'commit)))
3134 (source
3135 (origin
3136 (method git-fetch)
3137 (uri (git-reference
3138 (url "https://github.com/lwcolton/falcon-cors")
3139 (commit (assoc-ref properties 'commit))))
3140 (file-name (git-file-name name version))
3141 (sha256
3142 (base32 "0iqz1i1p5xr32n34j77p2a86jmrkg1w90d2wcmmy1mhi5mgdm5gx"))))
3143 (build-system pyproject-build-system)
3144 (arguments
3145 (list
3146 ;; XXX: The last commit's tests are uncompatible with the more recent
3147 ;; version of python-falcon.
3148 #:tests? #f))
3149 (native-inputs
3150 (list python-falcon python-mock python-pynose python-setuptools))
3151 (home-page "https://github.com/lwcolton/falcon-cors")
3152 (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
3153 (description
3154 "This middleware provides @dfn{cross-origin resource sharing} (CORS)
3155support for Falcon. It allows applying a specially crafted CORS object to the
3156incoming requests, enabling the ability to serve resources over a different
3157origin than that of the web application.")
3158 (license license:asl2.0)))
3159
3160(define-public python-furl
3161 (package
3162 (name "python-furl")
3163 (version "2.1.4")
3164 (source
3165 (origin
3166 (method url-fetch)
3167 (uri (pypi-uri "furl" version))
3168 (sha256
3169 (base32 "05b058xisv8kghvcpaxvssml2jjkh1cmzyrrjwk2kjb62985fxl7"))))
3170 (build-system pyproject-build-system)
3171 (arguments
3172 (list #:test-flags
3173 #~(list "-k" (string-append "not test_hosts"
3174 " and not test_netloc"
3175 " and not test_odd_urls"))))
3176 (propagated-inputs
3177 (list python-orderedmultidict python-six))
3178 (native-inputs
3179 (list python-flake8 python-pytest python-setuptools python-wheel))
3180 (home-page "https://github.com/gruns/furl")
3181 (synopsis "URL manipulation in Python")
3182 (description "Furl provides an easy-to-use alternative to the
3183@code{urllib} and @code{urlparse} modules for manipulating URLs.")
3184 (license license:unlicense)))
3185
3186(define-public python-httplib2
3187 (package
3188 (name "python-httplib2")
3189 (version "0.22.0")
3190 (source
3191 (origin
3192 ;; Tests not included in the release tarball.
3193 (method git-fetch)
3194 (uri (git-reference
3195 (url "https://github.com/httplib2/httplib2")
3196 (commit (string-append "v" version))))
3197 (file-name (git-file-name name version))
3198 (sha256
3199 (base32
3200 "1zkp3glv0iha7p68p5m0sb8mrrammkdc0mx32517xry52s4iva7g"))))
3201 (build-system pyproject-build-system)
3202 (arguments
3203 (list
3204 #:phases
3205 #~(modify-phases %standard-phases
3206 (add-after 'unpack 'adjust-test-requirements
3207 (lambda _
3208 (substitute* "requirements-test.txt"
3209 (("==") ">=")))))))
3210 (native-inputs
3211 (list python-cryptography
3212 python-future
3213 python-mock
3214 python-pyparsing
3215 python-pytest
3216 python-pytest-cov
3217 python-pytest-randomly
3218 python-pytest-timeout
3219 python-setuptools))
3220 (home-page "https://github.com/httplib2/httplib2")
3221 (synopsis "Comprehensive HTTP client library")
3222 (description
3223 "A comprehensive HTTP client library supporting many features left out of
3224other HTTP libraries.")
3225 (license license:expat)))
3226
3227(define-public python-cheroot
3228 (package
3229 (name "python-cheroot")
3230 (version "10.0.1")
3231 (source
3232 (origin
3233 (method url-fetch)
3234 (uri (pypi-uri "cheroot" version))
3235 (sha256
3236 (base32
3237 "0h0p3fnpa4dxi589s7ljlzb6p3mhqdivb3pc2f36pljqfrwjzf70"))))
3238 (build-system pyproject-build-system)
3239 (arguments
3240 (list
3241 #:test-flags
3242 #~(list "--cov=cheroot"
3243 ;; Tests are flaky in parallel invocation.
3244 ;; "--numprocesses=auto"
3245 "--doctest-modules"
3246 "--showlocals"
3247 "-k" (string-append
3248 ;; Disable test requiring networking.
3249 "not test_tls_client_auth"
3250 ;; TypeError: HTTPConnection.request() got an unexpected keyword
3251 ;; argument 'chunked'
3252 " and not test_peercreds_unix_sock"
3253 " and not test_peercreds_unix_sock_with_lookup"))
3254 #:phases
3255 #~(modify-phases %standard-phases
3256 (replace 'check
3257 (lambda* (#:key tests? test-flags #:allow-other-keys)
3258 (when tests?
3259 (with-directory-excursion "/tmp"
3260 (apply invoke "pytest" "-v"
3261 (append test-flags (list #$output))))))))))
3262 (propagated-inputs
3263 (list python-jaraco-functools python-more-itertools))
3264 (native-inputs
3265 (list python-jaraco-text
3266 python-portend
3267 python-pyopenssl
3268 python-pypytools
3269 python-pytest-cov
3270 python-pytest-mock
3271 python-requests
3272 python-requests-toolbelt
3273 python-requests-unixsocket2
3274 python-setuptools
3275 python-setuptools-scm
3276 python-trustme
3277 python-wheel))
3278 (home-page "https://cheroot.cherrypy.dev")
3279 (synopsis "Highly-optimized, pure-python HTTP server")
3280 (description
3281 "Cheroot is a high-performance, pure-Python HTTP server.")
3282 (license license:bsd-3)))
3283
3284(define-public python-cherrypy
3285 (package
3286 (name "python-cherrypy")
3287 (version "18.10.0")
3288 (source
3289 (origin
3290 (method git-fetch)
3291 (uri (git-reference
3292 (url "https://github.com/cherrypy/cherrypy")
3293 (commit (string-append "v" version))))
3294 (file-name (git-file-name name version))
3295 (sha256
3296 (base32 "1mhs64z75mj3rk4rgxc3xm1yksaj253rj9czhk4632blz5yi0kbn"))))
3297 (build-system pyproject-build-system)
3298 (arguments
3299 (list
3300 #:test-flags
3301 #~(map
3302 (lambda (test)
3303 (string-append "--deselect=cherrypy/test/" test))
3304 (list
3305 ;; XXX: Unraisable exceptions.
3306 "test_config_server.py::ServerConfigTests::testMaxRequestSize"
3307 "test_core.py::CoreRequestHandlingTest::testRanges"
3308 "test_core.py::CoreRequestHandlingTest::testRedirect"
3309 "test_encoding.py::EncodingTests::\
3310test_multipart_decoding_bigger_maxrambytes"
3311 "test_encoding.py::EncodingTests::\
3312test_test_http.py::HTTPTests::test_post_filename_with_special_characters"
3313 "test_http.py::HTTPTests::test_post_multipart"
3314 "test_http.py::HTTPTests::test_post_filename_with_special_characters"
3315 "test_mime.py::SafeMultipartHandlingTest::test_Flash_Upload"
3316 "test_tutorials.py::TutorialTest::test09Files"))))
3317 (propagated-inputs
3318 (list python-cheroot
3319 python-jaraco-collections
3320 python-more-itertools
3321 python-portend
3322 python-zc-lockfile))
3323 (native-inputs
3324 (list python-objgraph
3325 python-path
3326 python-pytest
3327 python-pytest-cov
3328 python-pytest-forked
3329 python-pytest-services
3330 python-pytest-sugar
3331 python-requests-toolbelt
3332 python-setuptools))
3333 (home-page "https://www.cherrypy.dev")
3334 (synopsis "Object-Oriented HTTP framework")
3335 (description
3336 "CherryPy is a pythonic, object-oriented web framework. It helps in
3337building web applications in the same way any other object-oriented Python
3338program would be built.")
3339 (license license:bsd-3)))
3340
3341(define-public httpie
3342 (package
3343 (name "httpie")
3344 (version "3.2.4")
3345 (source
3346 (origin
3347 (method git-fetch)
3348 (uri (git-reference
3349 (url "https://github.com/httpie/cli")
3350 (commit version)))
3351 (file-name (git-file-name name version))
3352 (sha256
3353 (base32 "0ii11xfqkbawg1v8dlli4fqq5k3yc2v65z3j7k3p4gng998s94mr"))))
3354 (build-system pyproject-build-system)
3355 (arguments
3356 (list
3357 #:phases
3358 #~(modify-phases %standard-phases
3359 (add-before 'build 'remove-unnecessary-dependencies
3360 ;; Remove pip and setuptools dependencies so sanity-check.py passes.
3361 (lambda _
3362 (substitute* "setup.cfg"
3363 (("(pip|setuptools)") "")))))
3364 #:test-flags
3365 ;; test_plugins_cli.py communicates through subprocesses
3366 ;; mocking stdin, which does not work in the build container.
3367 ;; test_ssl.py cannot find the SSL certificates.
3368 ;; test_binary.py fails for an unknown reason.
3369 #~(list "--ignore=tests/test_plugins_cli.py"
3370 "--ignore=tests/test_ssl.py"
3371 "--ignore=tests/test_binary.py")))
3372 (native-inputs (list python-pytest
3373 python-pytest-httpbin
3374 python-pytest-mock
3375 python-responses
3376 python-setuptools
3377 python-werkzeug
3378 python-wheel))
3379 (propagated-inputs
3380 (list python-charset-normalizer
3381 python-defusedxml
3382 python-multidict
3383 python-pygments
3384 python-requests
3385 python-requests-toolbelt
3386 python-rich))
3387 (home-page "https://httpie.io")
3388 (synopsis "Modern, user-friendly command-line HTTP client for the API era")
3389 (description
3390 "A command line HTTP client with an intuitive UI, JSON support,
3391syntax highlighting, wget-like downloads, plugins, and more. It consists of
3392a single http command designed for painless debugging and interaction with
3393HTTP servers, RESTful APIs, and web services.")
3394 ;; CVE-2019-10751 was fixed in 1.0.3.
3395 (properties `((lint-hidden-cve "CVE-2019-10751")))
3396 (license license:bsd-3)))
3397
3398(define-public python-parfive
3399 (package
3400 (name "python-parfive")
3401 (version "2.2.0")
3402 (source
3403 (origin
3404 (method url-fetch)
3405 (uri (pypi-uri "parfive" version))
3406 (sha256
3407 (base32 "16rf02jhjr9lij8s2gqmvs01vx8kiv9f2535dnnziqwqv14d21yy"))))
3408 (build-system pyproject-build-system)
3409 (arguments
3410 (list
3411 #:test-flags
3412 ;; Disable tests requiring network access.
3413 #~(list "-k" (string-join
3414 (list "not test_ftp"
3415 "test_ftp_pasv_command"
3416 "test_ftp_http")
3417 " and not "))))
3418 (native-inputs
3419 (list python-pytest
3420 python-pytest-asyncio
3421 python-pytest-cov
3422 python-pytest-localserver
3423 python-pytest-socket
3424 python-setuptools
3425 python-setuptools-scm
3426 python-wheel))
3427 (propagated-inputs
3428 (list python-aiofiles
3429 python-aioftp
3430 python-aiohttp
3431 python-tqdm))
3432 (home-page "https://parfive.readthedocs.io/")
3433 (synopsis "HTTP and FTP parallel file downloader")
3434 (description
3435 "This package provides CLI tool and Python library @code{parallel} file
3436downloader using asyncio. parfive can handle downloading multiple files in
3437parallel as well as downloading each file in a number of chunks.
3438
3439asciicast demo of parfive parfive works by creating a downloader object,
3440appending files to it and then running the download. parfive has a synchronous
3441API, but uses asyncio to parallelise downloading the files.")
3442 (license license:expat)))
3443
3444(define-public python-html2text
3445 (package
3446 (name "python-html2text")
3447 (version "2020.1.16")
3448 (source
3449 (origin
3450 (method url-fetch)
3451 (uri (pypi-uri "html2text" version))
3452 (sha256
3453 (base32 "1fvv4z6dblii2wk1x82981ag8yhxbim1v2ksgywxsndh2s7335p2"))))
3454 (build-system pyproject-build-system)
3455 (native-inputs (list python-pytest python-setuptools python-wheel))
3456 (home-page "https://github.com/Alir3z4/html2text")
3457 (synopsis "Convert HTML into plain text")
3458 (description
3459 "html2text takes HTML and converts it into plain ASCII text
3460which is also valid markdown. html2text was originally written by Aaron
3461Swartz.")
3462 (license license:gpl3+)))
3463
3464(define-public python-jose
3465 (package
3466 (name "python-jose")
3467 (version "3.5.0")
3468 (home-page "https://github.com/mpdavis/python-jose")
3469 (source (origin
3470 (method git-fetch)
3471 (uri (git-reference (url home-page) (commit version)))
3472 (file-name (git-file-name name version))
3473 (sha256
3474 (base32
3475 "0frv7r6q43mjl7s82hh8qvqpdgyfvmyq2b6aq4402riq2i238d7h"))))
3476 (build-system pyproject-build-system)
3477 (native-inputs
3478 (list python-pyasn1 python-pytest python-setuptools))
3479 (propagated-inputs
3480 (list python-cryptography python-ecdsa python-rsa))
3481 (synopsis "JOSE implementation in Python")
3482 (description
3483 "The @dfn{JavaScript Object Signing and Encryption} (JOSE) technologies
3484- JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and
3485JSON Web Algorithms (JWA) - collectively can be used to encrypt and/or sign
3486content using a variety of algorithms.")
3487 (license license:expat)))
3488
3489(define-public python-joserfc
3490 (package
3491 (name "python-joserfc")
3492 (version "1.0.1")
3493 (source
3494 (origin
3495 (method url-fetch)
3496 (uri (pypi-uri "joserfc" version))
3497 (sha256
3498 (base32 "11m600bmj70bp96wxhwvyj4d57w0zahzq3vic7s4a4k85pl7nl64"))))
3499 (build-system pyproject-build-system)
3500 (arguments
3501 (list
3502 #:test-flags
3503 ;; No module named 'Crypto'
3504 '(list "--ignore=tests/jwe/test_chacha20.py"
3505 ;; Deprecation warnings are not raised.
3506 "-k" (string-append "not test_guess_bytes_key"
3507 " and not test_guess_callable_key"
3508 " and not test_guess_str_key"))))
3509 (propagated-inputs (list python-cryptography))
3510 (native-inputs (list python-pytest python-setuptools python-wheel))
3511 (home-page "https://github.com/authlib/joserfc")
3512 (synopsis "Python library for JOSE RFCs")
3513 (description
3514 "This package provides a Python library for JOSE RFCs, including JWS,
3515JWE, JWK, JWA, and JWT.")
3516 (license license:bsd-3)))
3517
3518(define-public python-jwcrypto
3519 (package
3520 (name "python-jwcrypto")
3521 (version "1.5.6")
3522 (source
3523 (origin
3524 (method url-fetch)
3525 (uri (pypi-uri "jwcrypto" version))
3526 (sha256
3527 (base32 "0fdhn5jrsdxqr1yr6rmh585q4j08z1aajn392vk1l20c59v8f6kp"))))
3528 (build-system pyproject-build-system)
3529 (native-inputs
3530 (list python-pytest
3531 python-setuptools))
3532 (propagated-inputs
3533 (list python-cryptography
3534 python-deprecated))
3535 (home-page "https://github.com/latchset/jwcrypto")
3536 (synopsis "Implementation of JOSE Web standards")
3537 (description
3538 "WCrypto is an implementation of the @dfn{Javascript Object Signing and
3539Encryption} (JOSE) Web Standards.")
3540 (license license:lgpl3+)))
3541
3542(define-public python-pypitoken
3543 (package
3544 (name "python-pypitoken")
3545 (version "7.0.1")
3546 (source
3547 (origin
3548 (method url-fetch)
3549 (uri (pypi-uri "pypitoken" version))
3550 (sha256
3551 (base32 "18hhwmdfs9y5ypl1n8z2h2ys2f52mv5xr043gzgb34mpmg0wi46x"))))
3552 (build-system pyproject-build-system)
3553 ;; There are no tests.
3554 (arguments (list #:tests? #false))
3555 (propagated-inputs (list python-jsonschema python-pymacaroons
3556 python-typing-extensions))
3557 (native-inputs (list python-poetry-core))
3558 (home-page "https://pypitoken.readthedocs.io/en/latest/")
3559 (synopsis "Manipulate PyPI API tokens")
3560 (description "This package lets you manipulate PyPI API tokens.")
3561 (license license:expat)))
3562
3563(define-public python-pyscss
3564 ;; XXX: no fresh release supporting Python 3.11, use the latest commit, see
3565 ;; <https://github.com/Kronuz/pyScss/issues/428>,
3566 ;; <https://github.com/Kronuz/pyScss/issues/431>.
3567 (let ((commit "73559d047706ccd4593cf6aa092de71f35164723")
3568 (revision "0"))
3569 (package
3570 (name "python-pyscss")
3571 (version (git-version "1.4.0" revision commit))
3572 (source
3573 (origin
3574 (method git-fetch) ; no tests in PyPI release
3575 (uri (git-reference
3576 (url "https://github.com/Kronuz/pyScss")
3577 (commit commit)))
3578 (file-name (git-file-name name version))
3579 (sha256
3580 (base32 "00msypxf5dm57gyfp3jxvjinigi4km84v33w83635pms9li2k3y7"))))
3581 (build-system pyproject-build-system)
3582 (native-inputs
3583 (list python-pytest
3584 python-setuptools))
3585 (inputs
3586 (list pcre))
3587 (propagated-inputs
3588 (list python-six)) ;hard dependency in scss/compiler.py
3589 (home-page "https://github.com/Kronuz/pyScss")
3590 (synopsis "Scss compiler for Python")
3591 (description
3592 "@code{pyScss} is a compiler for Sass, a superset language of
3593CSS3 that adds programming capabilities and some other syntactic sugar.")
3594 (license license:expat))))
3595
3596(define-public python-jsonpickle
3597 (package
3598 (name "python-jsonpickle")
3599 (version "4.0.0")
3600 (source (origin
3601 (method url-fetch)
3602 (uri (pypi-uri "jsonpickle" version))
3603 (sha256
3604 (base32
3605 "0dipys8p4hkqnp9nwkpysfv7mhws2hrr73wgn00pdmq4n990hrzw"))))
3606 (build-system pyproject-build-system)
3607 (arguments
3608 (list
3609 #:test-flags
3610 ;; Prevent running the flake8 and black pytest plugins, which only tests
3611 ;; style and frequently causes harmless failures.
3612 '(list "-o" "addopts=''" "tests")
3613 #:phases
3614 '(modify-phases %standard-phases
3615 (add-before 'check 'pre-check
3616 (lambda* (#:key inputs #:allow-other-keys)
3617 (setenv "TZ" "UTC")
3618 (setenv "TZDIR"
3619 (search-input-directory inputs "share/zoneinfo")))))))
3620 (propagated-inputs
3621 (list python-importlib-metadata))
3622 (native-inputs
3623 (list python-bson
3624 python-ecdsa
3625 python-feedparser
3626 python-pymongo
3627 python-pytest
3628 python-pytest-benchmark
3629 python-pytest-cov
3630 python-pytest-enabler
3631 python-setuptools
3632 python-setuptools-scm
3633 python-simplejson
3634 python-sqlalchemy
3635 python-ujson
3636 python-wheel
3637 tzdata-for-tests))
3638 (home-page "https://jsonpickle.github.io/")
3639 (synopsis "Serialize object graphs into JSON")
3640 (description
3641 "This package provides a Python library for serializing any arbitrary
3642object graph to and from JSON.")
3643 (license license:bsd-3)))
3644
3645(define-public python-mechanicalsoup
3646 (package
3647 (name "python-mechanicalsoup")
3648 (version "1.4.0")
3649 (source
3650 (origin
3651 (method url-fetch)
3652 (uri (pypi-uri "mechanicalsoup" version))
3653 (sha256
3654 (base32 "0k1ac77ld6jyjm5fsr44399l5gmiwnz5w6s74i3qqx2scfbsgs6w"))))
3655 (build-system pyproject-build-system)
3656 (arguments
3657 (list
3658 #:test-flags
3659 ;; Unclear why test fails.
3660 #~(list "-k" "not test_select_form_associated_elements")
3661 ;; The following dependencies are not directly required, the developer
3662 ;; only pinned versions because of vulnerabilities. They also break
3663 ;; sanity-check because it checks for a python-certifi version which is
3664 ;; more recent than the one available in Guix.
3665 #:phases #~(modify-phases %standard-phases
3666 (add-after 'unpack 'relax-dependencies
3667 (lambda _
3668 (substitute* "requirements.txt"
3669 (("certifi.*") "")
3670 (("urllib3.*") "")))))))
3671 (propagated-inputs
3672 (list python-beautifulsoup4 python-lxml python-requests))
3673 (native-inputs
3674 (list python-pytest
3675 python-pytest-cov
3676 python-pytest-flake8
3677 python-pytest-httpbin
3678 python-pytest-mock
3679 python-requests-mock
3680 python-setuptools
3681 python-wheel))
3682 (home-page "https://mechanicalsoup.readthedocs.io/")
3683 (synopsis "Python library for automating website interaction")
3684 (description
3685 "MechanicalSoup is a Python library for automating interaction with
3686websites. It automatically stores and sends cookies, follows redirects, and can
3687follow links and submit forms. It doesn’t do JavaScript.")
3688 (license license:expat)))
3689
3690(define-public python-hyperframe
3691 (package
3692 (name "python-hyperframe")
3693 (version "6.1.0")
3694 (source
3695 (origin
3696 (method url-fetch)
3697 (uri (pypi-uri "hyperframe" version))
3698 (sha256
3699 (base32 "021v58w1b7mbwqkvbz11p3a4qk1sj91jnf6nmgg7ljl502590c7n"))))
3700 (build-system pyproject-build-system)
3701 (native-inputs
3702 (list python-pytest python-setuptools))
3703 (home-page "https://github.com/python-hyper/hyperframe")
3704 (synopsis "HTTP/2 framing layer for Python")
3705 (description
3706 "This library contains the HTTP/2 framing code used in the hyper project.
3707It provides a pure-Python codebase that is capable of decoding a binary stream
3708into HTTP/2 frames.")
3709 (license license:expat)))
3710
3711(define-public python-hpack
3712 (package
3713 (name "python-hpack")
3714 (version "4.1.0")
3715 (source
3716 (origin
3717 ;; PyPI tarball is missing some files necessary for the tests.
3718 (method git-fetch)
3719 (uri (git-reference
3720 (url "https://github.com/python-hyper/hpack")
3721 (commit (string-append "v" version))))
3722 (file-name (git-file-name name version))
3723 (sha256
3724 (base32 "1kgbx38p3a48iz914dqbx7av750a3s3x5kj3rvpcbh23ah75zg5x"))))
3725 (build-system pyproject-build-system)
3726 (native-inputs
3727 (list python-pytest python-setuptools))
3728 (home-page "https://hyper.rtfd.org")
3729 (synopsis "Pure-Python HPACK header compression")
3730 (description
3731 "This module contains a pure-Python HTTP/2 header encoding (HPACK) logic
3732for use in Python programs that implement HTTP/2.")
3733 (license license:expat)))
3734
3735(define-public python-h11
3736 (package
3737 (name "python-h11")
3738 (version "0.16.0")
3739 (source
3740 (origin
3741 (method url-fetch)
3742 (uri (pypi-uri "h11" version))
3743 (sha256
3744 (base32 "1wazxq4b4jg5001h5ypvz9pvrg80pagyd1aqm962wya5rxbbjdaf"))))
3745 (build-system pyproject-build-system)
3746 (native-inputs
3747 (list python-pytest python-setuptools))
3748 (home-page "https://github.com/python-hyper/h11")
3749 (synopsis "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1")
3750 (description
3751 "This is a little HTTP/1.1 library written from scratch in Python, heavily
3752inspired by hyper-h2. It's a bring-your-own-I/O library; h11 contains no IO
3753code whatsoever. This means you can hook h11 up to your favorite network API,
3754and that could be anything you want.")
3755 (license license:expat)))
3756
3757(define-public python-h2
3758 (package
3759 (name "python-h2")
3760 (version "4.1.0")
3761 (source
3762 (origin
3763 (method url-fetch)
3764 (uri (pypi-uri "h2" version))
3765 (sha256
3766 (base32 "1fraip114fm1ha5w37pdc0sk8dn9pb0ck267zrwwpap7zc4clfm8"))))
3767 (build-system pyproject-build-system)
3768 (arguments
3769 (list
3770 ;; AssertionError: assert '<RemoteSettingsChanged
3771 ;; changed_settings:{ChangedSetting(setting=4, original_value=65536,
3772 ;; new_value=32768)}>' == '<RemoteSettingsChanged
3773 ;; changed_settings:{ChangedSetting(setting=SettingCodes.INITIAL_WINDOW_SIZE,
3774 ;; original_value=65536, new_value=32768)}>'
3775 #:test-flags
3776 #~(list "-k"
3777 (string-join
3778 (list "not test_remotesettingschanged_repr"
3779 ;; This test exceededs the Hypothesis deadline.
3780 #$@(if (target-riscv64?)
3781 #~("test_changing_max_frame_size")
3782 #~())
3783 "test_streamreset_repr"
3784 "test_settingsacknowledged_repr"
3785 "test_connectionterminated_repr[None-None]"
3786 "test_connectionterminated_repr[some"
3787 "test_remotesettingschanged_repr"
3788 "test_streamreset_repr"
3789 "test_settingsacknowledged_repr"
3790 "test_connectionterminated_repr[None-None]"
3791 "test_connectionterminated_repr[some")
3792 " and not "))))
3793 (native-inputs
3794 (list python-pytest
3795 python-setuptools
3796 python-wheel))
3797 (propagated-inputs
3798 (list python-hpack
3799 python-hyperframe))
3800 (home-page "https://github.com/python-hyper/h2")
3801 (synopsis "HTTP/2 State-Machine based protocol implementation")
3802 (description
3803 "This module contains a pure-Python implementation of a HTTP/2 protocol
3804stack. It does not provide a parsing layer, a network layer, or any rules
3805about concurrency. Instead, it's a purely in-memory solution, defined in
3806terms of data actions and HTTP/2 frames. This is one building block of a full
3807Python HTTP implementation.")
3808 (license license:expat)))
3809
3810(define-public python-slixmpp
3811 (package
3812 (name "python-slixmpp")
3813 (version "1.8.6") ; XXX: The latest version which does not requrie Rust
3814 (source
3815 (origin
3816 (method git-fetch)
3817 (uri (git-reference
3818 (url "https://codeberg.org/poezio/slixmpp")
3819 (commit (string-append "slix-" version))))
3820 (file-name (git-file-name name version))
3821 (sha256
3822 (base32 "0gpy6arwyk4lsx1hbcwbllxs6qbwn58adkp1rm1cfvfrjdv5kxx7"))))
3823 (build-system pyproject-build-system)
3824 (arguments
3825 (list
3826 #:phases
3827 #~(modify-phases %standard-phases
3828 (add-after 'unpack 'patch-setup.py
3829 (lambda _
3830 (substitute* "setup.py"
3831 (("'CC', 'cc'")
3832 "'CC', 'gcc'")))))))
3833 (native-inputs
3834 (list gnupg
3835 pkg-config
3836 python-cython
3837 python-setuptools
3838 python-wheel))
3839 (inputs
3840 (list libidn
3841 python)) ; We are building a Python extension.
3842 (propagated-inputs
3843 (list python-aiodns
3844 python-aiohttp
3845 python-cryptography
3846 python-defusedxml
3847 python-emoji
3848 python-pyasn1
3849 python-pyasn1-modules))
3850 (home-page "https://lab.louiz.org/poezio/slixmpp")
3851 (synopsis "XMPP library without threads")
3852 (description
3853 "Slixmpp is a XMPP library for Python 3.7+. It is a fork of SleekXMPP.
3854Its goal is to only rewrite the core of the library (the low level socket
3855handling, the timers, the events dispatching) in order to remove all
3856threads.")
3857 (license license:expat)))
3858
3859(define-public python-sockjs-tornado
3860 (package
3861 (name "python-sockjs-tornado")
3862 (version "1.0.6")
3863 (source
3864 (origin
3865 (method git-fetch)
3866 (uri (git-reference
3867 (url "https://github.com/mrjoes/sockjs-tornado/")
3868 (commit (string-append "v" version))))
3869 (file-name (git-file-name name version))
3870 (sha256
3871 (base32 "1y4wjca1776nvd0b79pz4d52i312xsyb2vahb883qmrw6s56mynk"))))
3872 (build-system pyproject-build-system)
3873 (arguments
3874 (list
3875 #:tests? #f)) ;The only test in examples/test/test.py runs a server.
3876 (native-inputs (list python-setuptools))
3877 (propagated-inputs (list python-tornado))
3878 (home-page "https://github.com/mrjoes/sockjs-tornado/")
3879 (synopsis
3880 "SockJS Python server implementation on top of the Tornado framework")
3881 (description
3882 "SockJS-tornado provides the server-side counterpart to a SockJS client
3883library, through the Tornado framework.
3884
3885SockJS provides a low-latency, full-duplex, cross-domain communication channel
3886between a web browser and web server.")
3887 (license license:expat)))
3888
3889(define-public python-flask-assets
3890 ;; The latest release still depends on the abandoned flask-script, whereas
3891 ;; at this later commit (already 2 years old at the time of this writing)
3892 ;; the dependency has been lifted.
3893 (let ((commit "62efd23fe95ee6a86fc1cfaa98fc1e2152093557")
3894 (revision "1"))
3895 (package
3896 (name "python-flask-assets")
3897 (version (git-version "2.1.0" revision commit))
3898 (source
3899 (origin
3900 (method git-fetch)
3901 (uri (git-reference
3902 (url "https://github.com/miracle2k/flask-assets/")
3903 (commit commit)))
3904 (file-name (git-file-name name version))
3905 (sha256
3906 (base32 "11q8vm2ipj4xrvawy9vl1l4k8kb4r72ghy1n8xrzci52v6lx8960"))))
3907 (build-system pyproject-build-system)
3908 (propagated-inputs
3909 (list python-flask python-webassets))
3910 (native-inputs
3911 (list nss-certs-for-test python-pytest python-setuptools python-wheel))
3912 (home-page "https://github.com/miracle2k/flask-assets")
3913 (synopsis "Asset management for Flask")
3914 (description "This package integrates @code{webassets} with Flask, adding
3915support for merging, minifying and compiling CSS and Javascript files.")
3916 (license license:bsd-2))))
3917
3918(define-public python-flask-babel
3919 (package
3920 (name "python-flask-babel")
3921 (version "4.0.0")
3922 (source
3923 (origin
3924 (method git-fetch) ;no tests in pypi release
3925 (uri (git-reference
3926 (url "https://github.com/python-babel/flask-babel")
3927 (commit (string-append "v" version))))
3928 (sha256
3929 (base32
3930 "19yq3f5rixbwhv7wxdarvi9hdj98a9dq8y76in9c1q3jxaigw104"))))
3931 (build-system pyproject-build-system)
3932 (native-inputs
3933 (list python-poetry-core
3934 python-pytest
3935 python-pytest-cov
3936 python-pytest-mock))
3937 (propagated-inputs
3938 (list python-babel
3939 python-flask
3940 python-jinja2
3941 python-pytz))
3942 (home-page "https://github.com/python-babel/flask-babel")
3943 (synopsis "Add i18n/l10n support to Flask applications")
3944 (description "This package implements internationalization and localization
3945support for Flask. This is based on the Python babel module as well as pytz -
3946both of which are installed automatically if you install this library.")
3947 (license license:bsd-3)))
3948
3949(define-public python-flask-cors
3950 (package
3951 (name "python-flask-cors")
3952 (version "6.0.1")
3953 (source
3954 (origin
3955 (method git-fetch) ;no tests in PyPI archive
3956 (uri (git-reference
3957 (url "https://github.com/CoryDolphin/flask-cors")
3958 (commit version)))
3959 (file-name (git-file-name name version))
3960 (sha256
3961 (base32 "01w77vfbzw994dpz6aw4vzy75nrykk6jgilc3qm2d543vjizjaf9"))))
3962 (build-system pyproject-build-system)
3963 (native-inputs
3964 (list python-pytest
3965 python-setuptools))
3966 (propagated-inputs
3967 (list python-flask
3968 python-werkzeug))
3969 (home-page "https://flask-cors.readthedocs.io/en/latest/")
3970 (synopsis "Handle Cross-Origin Resource Sharing with Flask")
3971 (description
3972 "This package provides a Flask extension for handling @acronym{CORS,Cross
3973Origin Resource Sharing}, making cross-origin AJAX possible.")
3974 (license license:expat)))
3975
3976(define-public python-flask-markdown
3977 (package
3978 (name "python-flask-markdown")
3979 (version "0.3")
3980 (source
3981 (origin
3982 (method git-fetch)
3983 (uri (git-reference
3984 (url "https://github.com/dcolish/flask-markdown")
3985 (commit version)))
3986 (file-name (git-file-name name version))
3987 (sha256
3988 (base32 "1rqqmvjc4rjal6l4y3caxw9b3157pl923h4i1ihbm0gziqv3g2hl"))))
3989 (build-system pyproject-build-system)
3990 (arguments
3991 (list
3992 #:tests? #f ;Tests seem to be incompatible with latest python
3993 #:phases
3994 #~(modify-phases %standard-phases
3995 (add-after 'unpack 'set-version
3996 (lambda _
3997 (substitute* "setup.py"
3998 (("dev")
3999 #$version)))))))
4000 (propagated-inputs (list python-markdown python-flask))
4001 (native-inputs (list python-pynose python-setuptools))
4002 (home-page "https://github.com/dcolish/flask-markdown")
4003 (synopsis "Small extension to help with using Markdown in Flask")
4004 (description
4005 "Flask-Markdown supports several extensions for Markdown and integrates
4006into Jinja2 by default.")
4007 (license license:bsd-3)))
4008
4009(define-public python-flask-session
4010 (package
4011 (name "python-flask-session")
4012 (version "0.8.0")
4013 (source
4014 (origin
4015 (method url-fetch)
4016 (uri (pypi-uri "flask_session" version))
4017 (sha256
4018 (base32
4019 "1zs20zpq6gxz9gsccbd2jrrbbcfvh0x9z9741gkr8dhh07mlbq10"))))
4020 (build-system pyproject-build-system)
4021 (arguments
4022 '(#:tests? #f)) ; Tests require the various storage backends to be present
4023 (native-inputs (list python-flit-core))
4024 (propagated-inputs
4025 (list python-cachelib python-flask python-msgspec))
4026 (home-page "https://github.com/pallets-eco/flask-session")
4027 (synopsis "Adds server-side session support to your Flask application")
4028 (description
4029 "Flask-Session is an extension for Flask that adds support for
4030Server-side sessions, with a variety of different backends for session
4031storage.")
4032 (license license:bsd-3)))
4033
4034(define-public python-html5lib
4035 (package
4036 (name "python-html5lib")
4037 (version "1.1")
4038 (source
4039 (origin
4040 (method url-fetch)
4041 (uri (pypi-uri "html5lib" version))
4042 (sha256
4043 (base32 "0vqlhk0hgbsfkh7ybmby93xhlx8dq6pr5blf356ka3z2c41b9rdj"))))
4044 (build-system pyproject-build-system)
4045 (arguments
4046 '(#:tests? #f)) ;tests depent on dated pytest-expect
4047 (native-inputs
4048 (list python-setuptools))
4049 (propagated-inputs
4050 (list python-six
4051 python-webencodings
4052 ;; Required by Calibre 5.
4053 python-chardet))
4054 (home-page "https://github.com/html5lib/html5lib-python")
4055 (synopsis "Python HTML parser based on the WHATWG HTML specification")
4056 (description
4057 "Html5lib is an HTML parser based on the WHATWG HTML specification
4058and written in Python.")
4059 (license license:expat)))
4060
4061(define-public python-html5-parser
4062 (package
4063 (name "python-html5-parser")
4064 (version "0.4.12")
4065 (source
4066 (origin
4067 (method git-fetch)
4068 (uri (git-reference
4069 (url "https://github.com/kovidgoyal/html5-parser")
4070 (commit (string-append "v" version))))
4071 (file-name (git-file-name name version))
4072 (sha256
4073 (base32 "0axrz2x67nhsh3kijy68wwy5hx8h8418d8g2qz6f3pyxix7gw2fi"))))
4074 (build-system pyproject-build-system)
4075 (arguments
4076 (list
4077 #:phases
4078 #~(modify-phases %standard-phases
4079 (add-before 'build 'set-configure-flags
4080 (lambda _
4081 (setenv "CFLAGS" "-Wno-error=implicit-function-declaration"))))))
4082 (native-inputs (list pkg-config python-setuptools))
4083 (inputs (list libxml2))
4084 (propagated-inputs (list python-lxml python-beautifulsoup4 python-chardet))
4085 (home-page "https://html5-parser.readthedocs.io")
4086 (synopsis "Fast C-based HTML5 parsing for Python")
4087 (description
4088 "This package provides a fast implementation of the HTML5 parsing spec
4089for Python. Parsing is done in C using a variant of the gumbo parser. The
4090gumbo parse tree is then transformed into an lxml tree, also in C, yielding
4091parse times that can be a thirtieth of the html5lib parse times.")
4092 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
4093 ;; indicate ASL2.0, including the LICENSE file for the whole project.
4094 (license (list license:asl2.0 license:gpl3))))
4095
4096(define-public python-html5tagger
4097 (package
4098 (name "python-html5tagger")
4099 (version "1.3.0")
4100 (source (origin
4101 (method url-fetch)
4102 (uri (pypi-uri "html5tagger" version))
4103 (sha256
4104 (base32
4105 "1acd1a4f66gi4plqnsml7cf33qp83mxsnmnqpdwkpj7597xkvyl4"))))
4106 (build-system pyproject-build-system)
4107 (arguments
4108 (list #:tests? #f)) ;no tests in PyPI or Git
4109 (native-inputs
4110 (list python-setuptools python-setuptools-scm python-wheel))
4111 (home-page "https://github.com/sanic-org/html5tagger")
4112 (synopsis "Create HTML documents from Python")
4113 (description
4114 "@code{html5tagger} provides a simplified HTML5 syntax that can
4115be written directly in Python without templates.")
4116 (license license:unlicense)))
4117
4118(define-public python-minio
4119 (package
4120 (name "python-minio")
4121 (version "7.1.9")
4122 (source
4123 (origin
4124 (method git-fetch)
4125 (uri (git-reference
4126 (url "https://github.com/minio/minio-py")
4127 (commit version)))
4128 (file-name (git-file-name name version))
4129 (sha256
4130 (base32 "01734ki3p7844dya366hy1kvmmgy3xr0l0zbkchnnv4p611510vc"))))
4131 (build-system pyproject-build-system)
4132 (arguments
4133 (list
4134 #:test-flags
4135 ;; XXX: requires network access.
4136 #~(list "--ignore=tests/unit/credentials_test.py")))
4137 (native-inputs (list python-pytest python-setuptools))
4138 (propagated-inputs
4139 (list python-certifi python-dateutil python-pytz python-urllib3))
4140 (home-page "https://github.com/minio/minio-py")
4141 (synopsis "Programmatically access Amazon S3 from Python")
4142 (description
4143 "This package provides a Python library for interacting with any
4144Amazon S3 compatible object storage server.")
4145 (license license:asl2.0)))
4146
4147(define-public python-pycurl
4148 (package
4149 (name "python-pycurl")
4150 (version "7.45.4")
4151 (source
4152 (origin
4153 (method git-fetch)
4154 (uri (git-reference
4155 (url "https://github.com/pycurl/pycurl")
4156 (commit (string-append
4157 "REL_" (string-replace-substring version "." "_")))))
4158 (file-name (git-file-name name version))
4159 (sha256
4160 (base32 "00cd1l0lsml0708hpv5k4qyhqfv0qphb0p317j9aci2wdspn1mpl"))))
4161 (build-system pyproject-build-system)
4162 (arguments
4163 '(#:test-flags
4164 ;; The test suite is not thread safe:
4165 ;; - some tests want to use the same port: address already in use
4166 ;; - some tests use signal.Signal, i.e. main-thread only
4167 (list "-k" (string-append
4168 ;; Disable hanginging tests
4169 "not test_multi_socket_select"
4170 ;; E assert None is not None
4171 ;; E+ where None =
4172 ;; <tests.multi_callback_test.MultiCallbackTest
4173 ;; testMethod=test_multi_socket_action>.timer_result
4174 " and not test_multi_socket_action"
4175 ;; OSError: tests/fake-curl/libcurl/with_gnutls.so: cannot
4176 ;; open shared object file: No such file or directory
4177 " and not test_libcurl_ssl_gnutls"
4178 ;; OSError: tests/fake-curl/libcurl/with_nss.so: cannot
4179 ;; open shared object file: No such file or directory
4180 " and not test_libcurl_ssl_nss"
4181 ;; OSError: tests/fake-curl/libcurl/with_openssl.so: cannot
4182 ;; open shared object file: No such file or directory
4183 " and not test_libcurl_ssl_openssl"
4184 ;; Probably due to an expired CA
4185 " and not test_request_without_certinfo"
4186 ;; "A libcurl function was given a bad argument"
4187 " and not test_proxy_tlsauth"))
4188 #:phases (modify-phases %standard-phases
4189 (add-before 'build 'configure-tls-backend
4190 (lambda _
4191 ;; XXX: PycURL fails to automatically determine which
4192 ;; TLS backend to use when cURL is built with
4193 ;; --disable-static. See setup.py and
4194 ;; <https://github.com/pycurl/pycurl/pull/147>.
4195 (setenv "PYCURL_SSL_LIBRARY" "gnutls"))))))
4196 (native-inputs
4197 (list python-bottle
4198 python-flaky
4199 python-flask
4200 python-pytest
4201 python-setuptools
4202 python-wheel))
4203 (inputs
4204 (list curl gnutls))
4205 (home-page "http://pycurl.io/")
4206 (synopsis "Lightweight Python wrapper around libcurl")
4207 (description "Pycurl is a lightweight wrapper around libcurl. It provides
4208high-speed transfers via libcurl and frequently outperforms alternatives.")
4209
4210 ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
4211 ;; under the terms of LGPLv2.1+ or Expat.
4212 (license (list license:lgpl2.1+ license:expat))))
4213
4214(define-public python-stripe
4215 (package
4216 (name "python-stripe")
4217 (version "13.2.0")
4218 (source
4219 (origin
4220 (method git-fetch)
4221 (uri (git-reference
4222 (url "https://github.com/stripe/stripe-python")
4223 (commit (string-append "v" version))))
4224 (file-name (git-file-name name version))
4225 (sha256
4226 (base32 "0f0d1hqias3qylrhk56w055lqrlzjs9s7wxva30v54ykmn9nj6dx"))))
4227 (build-system pyproject-build-system)
4228 (arguments
4229 '(#:tests? #f)) ;; tests require network
4230 (native-inputs
4231 (list python-flit-core))
4232 (propagated-inputs
4233 (list python-httpx
4234 python-requests))
4235 (home-page "https://github.com/stripe/stripe-python")
4236 (synopsis "Python bindings for the Stripe financial services' API")
4237 (description "This package provides access to the Stripe financial
4238services' API. It includes a pre-defined set of classes for API resources
4239that initialize themselves dynamically from API responses which makes it
4240compatible with a wide range of versions of the Stripe API.")
4241 (license license:expat)))
4242
4243(define-public python-stripe-12
4244 (hidden-package
4245 (package/inherit python-stripe
4246 (name "python-stripe")
4247 (version "12.5.1")
4248 (source
4249 (origin
4250 (inherit (package-source python-stripe))
4251 (uri (git-reference
4252 (url "https://github.com/stripe/stripe-python")
4253 (commit (string-append "v" version))))
4254 (file-name (git-file-name name version))
4255 (sha256 (base32
4256 "0jgixfb8ydlx387vm7rdaqrzsiqbvi99nszrpb1ghjqyn755xigd"))))
4257 (native-inputs
4258 (list python-setuptools)))))
4259
4260(define-public python-tldextract
4261 (package
4262 (name "python-tldextract")
4263 (version "5.3.0")
4264 (source
4265 (origin
4266 (method url-fetch)
4267 (uri (pypi-uri "tldextract" version))
4268 (sha256
4269 (base32 "02c6cyh8f3dagcw786m9nl5y0n3xa98p5mb7d7xfr84l2l5bglmk"))))
4270 (build-system pyproject-build-system)
4271 (arguments
4272 (list
4273 #:phases
4274 #~(modify-phases %standard-phases
4275 (add-after 'unpack 'relax-requirements
4276 (lambda _
4277 (substitute* "pyproject.toml"
4278 (("\"requests-file.*\",")
4279 "\"requests-file\",")))))))
4280 (native-inputs
4281 (list nss-certs-for-test
4282 python-pytest
4283 python-pytest-mock
4284 python-responses
4285 python-setuptools
4286 python-setuptools-scm
4287 python-syrupy))
4288 (propagated-inputs
4289 (list python-filelock
4290 python-idna
4291 python-requests
4292 python-requests-file))
4293 (home-page "https://github.com/john-kurkowski/tldextract")
4294 (synopsis
4295 "Separate the TLD from the registered domain and subdomains of a URL")
4296 (description
4297 "TLDExtract accurately separates the TLD from the registered domain and
4298subdomains of a URL, using the Public Suffix List. By default, this includes
4299the public ICANN TLDs and their exceptions. It can optionally support the
4300Public Suffix List's private domains as well.")
4301 (license license:bsd-3)))
4302
4303(define-public python-tracerite
4304 (package
4305 (name "python-tracerite")
4306 (version "1.1.3")
4307 (source
4308 (origin
4309 (method url-fetch)
4310 (uri (pypi-uri "tracerite" version))
4311 (sha256
4312 (base32 "07mkg0sl0h335kj6yjvxki2c19gxhb7rkks1zgzh7aj0y83c17qi"))))
4313 (build-system pyproject-build-system)
4314 (arguments
4315 (list #:tests? #f)) ;no tests in PyPI or Git
4316 (native-inputs
4317 (list python-setuptools
4318 python-setuptools-scm))
4319 (propagated-inputs
4320 (list python-html5tagger))
4321 (home-page "https://github.com/sanic-org/tracerite")
4322 (synopsis "Human-readable HTML tracebacks")
4323 (description
4324 "@code{tracerite} converts Python tracebacks into useful error messages
4325in human-readable HTML format.")
4326 (license license:unlicense)))
4327
4328(define-public python-trio-websocket
4329 (package
4330 (name "python-trio-websocket")
4331 (version "0.12.2")
4332 (source
4333 (origin
4334 (method git-fetch)
4335 (uri (git-reference
4336 (url "https://github.com/HyperionGray/trio-websocket")
4337 (commit version)))
4338 (file-name (git-file-name name version))
4339 (sha256
4340 (base32 "1lm712gakpskcn3adna22kj8m1hspz9l68pmlziklr0ycphmyqac"))))
4341 (build-system pyproject-build-system)
4342 (native-inputs
4343 (list python-pytest
4344 python-pytest-trio
4345 python-setuptools
4346 python-trustme))
4347 (propagated-inputs
4348 (list python-outcome
4349 python-trio
4350 python-wsproto))
4351 (home-page "https://github.com/HyperionGray/trio-websocket")
4352 (synopsis "WebSocket library for Trio")
4353 (description "This library implements both server and client aspects of
4354the @url{https://tools.ietf.org/html/rfc6455, the WebSocket protocol},
4355striving for safety, correctness, and ergonomics. It is based on the
4356@url{https://wsproto.readthedocs.io/en/latest/, wsproto project}, which is a
4357@url{https://sans-io.readthedocs.io/, Sans-IO} state machine that implements
4358the majority of the WebSocket protocol, including framing, codecs, and events.
4359This library handles I/O using @url{https://trio.readthedocs.io/en/latest/,
4360the Trio framework}.")
4361 (license license:expat)))
4362
4363(define-public python-txacme
4364 ;; 0.9.3 tag was placed in 2020 and there a lot of changes providing
4365 ;; compatibility wit twisted, use the latest commit from trunk branch.
4366 ;;
4367 ;;See: <https://github.com/twisted/txacme/issues/165>.
4368 (let ((commit "ac18f92f6dde971a6b38f2ecfae44665815db583")
4369 (revision "0"))
4370 (package
4371 (name "python-txacme")
4372 (version (git-version "0.9.3" revision commit))
4373 (source
4374 (origin
4375 (method git-fetch) ;no fresh release in PyPI
4376 (uri (git-reference
4377 (url "https://github.com/twisted/txacme")
4378 (commit commit)))
4379 (file-name (git-file-name name version))
4380 (sha256
4381 (base32 "0mgdfxldv8qflbn75ywslbarnd4i3l7c4krs4aibl2dpryclsjzs"))))
4382 (build-system pyproject-build-system)
4383 (arguments
4384 (list #:test-backend #~'custom
4385 #:test-flags #~(list "-m" "twisted.trial" "txacme")))
4386 (native-inputs
4387 (list python-setuptools))
4388 (propagated-inputs
4389 (list python-acme
4390 python-attrs
4391 python-eliot
4392 python-josepy
4393 python-pem
4394 python-treq
4395 python-twisted
4396 python-txsni))
4397 (home-page "https://github.com/twisted/txacme")
4398 (synopsis "Twisted implexmentation of the ACME protocol")
4399 (description
4400 "ACME is Automatic Certificate Management Environment, a protocol that
4401allows clients and certificate authorities to automate verification and
4402certificate issuance. The ACME protocol is used by the free Let's Encrypt
4403Certificate Authority.
4404
4405txacme is an implementation of the protocol for Twisted, the event-driven
4406networking engine for Python.")
4407 (license license:expat))))
4408
4409(define-public python-txaio
4410 (package
4411 (name "python-txaio")
4412 (version "25.9.2")
4413 (source
4414 (origin
4415 (method url-fetch)
4416 (uri (pypi-uri "txaio" version))
4417 (sha256
4418 (base32 "16ch62yk2gdikkak113h6qw13ns9ksca817hky0vabn0fyh08874"))))
4419 (build-system pyproject-build-system)
4420 (native-inputs
4421 (list python-pytest
4422 python-setuptools))
4423 (home-page "https://github.com/crossbario/txaio")
4424 (synopsis "Compatibility layer between Python asyncio and Twisted")
4425 (description
4426 "Txaio provides a compatibility layer between the Python @code{asyncio}
4427 bsmodule and @code{Twisted}.")
4428 (license license:expat)))
4429
4430;; XXX: Potentially abandonware since 2017, consider to remove when nothing
4431;; depends on it or fails to build.
4432(define-public python-txamqp
4433 (package
4434 (name "python-txamqp")
4435 (version "0.8.2")
4436 (source
4437 (origin
4438 (method url-fetch)
4439 (uri (pypi-uri "txAMQP" version))
4440 (sha256
4441 (base32 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
4442 (build-system pyproject-build-system)
4443 (arguments
4444 (list #:tests? #f)) ;all tests failed
4445 (native-inputs
4446 (list python-setuptools))
4447 (propagated-inputs
4448 (list python-six python-twisted))
4449 (home-page "https://github.com/txamqp/txamqp")
4450 (synopsis "Communicate with AMQP peers and brokers using Twisted")
4451 (description
4452 "This package provides a Python library for communicating with AMQP peers
4453and brokers using the asynchronous networking framework Twisted. It contains
4454all the necessary code to connect, send and receive messages to/from an
4455AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
4456also includes support for using Thrift RPC over AMQP in Twisted
4457applications.")
4458 (license license:asl2.0)))
4459
4460(define-public python-txsni
4461 (package
4462 (name "python-txsni")
4463 (version "0.2.0")
4464 (source
4465 (origin
4466 (method git-fetch)
4467 (uri (git-reference
4468 (url "https://github.com/glyph/txsni")
4469 (commit (string-append "v" version))))
4470 (file-name (git-file-name name version))
4471 (sha256
4472 (base32 "1fl8xi7vl24hwbva5v41l6nsrbkj2l2mlsgcvdjxgph61aznwywq"))))
4473 (build-system pyproject-build-system)
4474 (arguments
4475 (list #:test-backend #~'custom
4476 #:test-flags #~(list "-m" "twisted.trial"
4477 "--temp-directory=/tmp/_trial_temp"
4478 "txsni")))
4479 (native-inputs
4480 (list python-setuptools))
4481 (propagated-inputs
4482 (list python-pyopenssl
4483 python-service-identity
4484 python-twisted))
4485 (home-page "https://github.com/glyph/txsni")
4486 (synopsis "Run TLS servers with Twisted")
4487 (description
4488 "This package provides an easy-to-use SNI endpoint for use with the
4489Twisted web framework.")
4490 (license license:expat)))
4491
4492(define-public python-txtorcon
4493 (package
4494 (name "python-txtorcon")
4495 (version "24.8.0")
4496 (source
4497 (origin
4498 (method url-fetch)
4499 (uri (pypi-uri "txtorcon" version))
4500 (sha256
4501 (base32 "1l4ajw4h7nay4vmllh6cs7zh3hnh8vj4yvgfnq3m734wil9ikzmy"))))
4502 (build-system pyproject-build-system)
4503 (native-inputs
4504 (list python-pytest
4505 python-setuptools
4506 python-wheel))
4507 (inputs
4508 (list lsof))
4509 (propagated-inputs
4510 (list python-automat
4511 python-idna
4512 python-incremental
4513 python-pyopenssl
4514 python-service-identity
4515 python-twisted
4516 python-zope-interface))
4517 (home-page "https://github.com/meejah/txtorcon")
4518 (synopsis "Twisted-based Tor controller client")
4519 (description
4520 "This package provides a Twisted-based Tor controller client,with
4521state-tracking and configuration abstractions.")
4522 (license license:expat)))
4523
4524(define-public python-url-normalize
4525 (package
4526 (name "python-url-normalize")
4527 (version "2.2.1")
4528 (source
4529 (origin
4530 (method git-fetch) ; no tests in PyPI release
4531 (uri (git-reference
4532 (url "https://github.com/niksite/url-normalize")
4533 (commit (string-append "v" version))))
4534 (file-name (git-file-name name version))
4535 (sha256
4536 (base32 "1yhsf4sk6l6nznpnqigisbfz690a4g342dsk2n6dggh7q4l3amk4"))))
4537 (build-system pyproject-build-system)
4538 (arguments
4539 (list
4540 #:test-flags #~(list "--ignore=tests/test_cli.py")))
4541 (native-inputs
4542 (list python-pytest
4543 python-pytest-cov
4544 python-pytest-socket
4545 python-setuptools))
4546 (propagated-inputs
4547 (list python-idna))
4548 (home-page "https://github.com/niksite/url-normalize")
4549 (synopsis "URL normalization for Python")
4550 (description
4551 "This package provides a URI Normalization function with following
4552features:
4553@itemize
4554@item take care of IDN domains
4555@item always provide the URI scheme in lowercase characters
4556@item always provide the host, if any, in lowercase characters
4557@item only perform percent-encoding where it is essential
4558@item always use uppercase A-through-F characters when percent-encoding
4559@item prevent dot-segments appearing in non-relative URI paths
4560@item for schemes that define a default authority, use an empty authority if
4561the default is desired
4562@item for schemes that define an empty path to be equivalent to a path of
4563@code{/}, use @code{/}
4564@item for schemes that define a port, use an empty port if the default is
4565desired
4566@item all portions of the URI must be utf-8 encoded NFC from Unicode strings
4567@end itemize")
4568 (license license:expat)))
4569
4570(define-public python-waitress
4571 (package
4572 (name "python-waitress")
4573 (version "3.0.2")
4574 (source
4575 (origin
4576 (method url-fetch)
4577 (uri (pypi-uri "waitress" version))
4578 (sha256
4579 (base32
4580 "07y3xyx2006f2ni5d55byh3y7w4kcg9xww7vmfjasi0cmzralak8"))))
4581 (build-system pyproject-build-system)
4582 (arguments
4583 ;; https://github.com/Pylons/waitress/issues/443
4584 (list #:test-flags #~(list "-k" "not test_service_port")))
4585 (native-inputs
4586 (list python-pytest
4587 python-pytest-cov
4588 python-setuptools))
4589 (home-page "https://github.com/Pylons/waitress")
4590 (synopsis "Waitress WSGI server")
4591 (description
4592 "Waitress is meant to be a production-quality pure-Python WSGI server
4593with very acceptable performance.")
4594 (license license:zpl2.1)))
4595
4596(define-public python-weasel
4597 (package
4598 (name "python-weasel")
4599 (version "0.4.1")
4600 (source
4601 (origin
4602 (method url-fetch)
4603 (uri (pypi-uri "weasel" version))
4604 (sha256
4605 (base32 "1aas113r29y6yxrmdlsw80rj8w4kgw1jhfjw9rsgc4rf0w7j3g5a"))))
4606 (build-system pyproject-build-system)
4607 (arguments
4608 (list
4609 #:test-flags
4610 ;; Network access is required.
4611 #~(list #$@(map (lambda (test) (string-append "--deselect="
4612 "weasel/tests/cli/"
4613 test))
4614 (list "test_cli.py::test_project_git_dir_asset"
4615 "test_cli.py::test_project_git_file_asset"
4616 "test_cli_app.py::test_project_assets")))))
4617 (native-inputs
4618 (list python-pytest
4619 python-setuptools))
4620 (propagated-inputs
4621 (list python-cloudpathlib
4622 python-confection
4623 python-packaging
4624 python-pydantic-2
4625 python-requests
4626 python-smart-open
4627 python-srsly
4628 python-typer
4629 python-wasabi))
4630 (home-page "https://github.com/explosion/weasel/")
4631 (synopsis "Small and easy workflow system")
4632 (description
4633 "This package provides a minimalistic workflow system to manage and
4634share end-to-end workflows for different use cases and domains.")
4635 (license license:expat)))
4636
4637(define-public python-webencodings
4638 (package
4639 (name "python-webencodings")
4640 (version "0.5.1")
4641 (source
4642 (origin
4643 (method url-fetch)
4644 (uri (pypi-uri "webencodings" version))
4645 (sha256
4646 (base32 "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
4647 (build-system pyproject-build-system)
4648 (arguments
4649 (list #:test-flags #~(list "webencodings/tests.py")))
4650 (native-inputs
4651 (list python-pytest python-setuptools))
4652 (home-page "https://github.com/SimonSapin/python-webencodings")
4653 (synopsis "Character encoding aliases for legacy web content")
4654 (description
4655 "In order to be compatible with legacy web content when interpreting
4656something like @code{Content-Type: text/html; charset=latin1}, tools need to
4657use a particular set of aliases for encoding labels as well as some overriding
4658rules. For example, @code{US-ASCII} and @code{iso-8859-1} on the web are
4659actually aliases for @code{windows-1252}, and a @code{UTF-8} or @code{UTF-16}
4660BOM takes precedence over any other encoding declaration. The WHATWG
4661@url{https://encoding.spec.whatwg.org/,Encoding} standard defines all such
4662details so that implementations do not have to reverse-engineer each other.
4663
4664This module implements the Encoding standard and has encoding labels and BOM
4665detection, but the actual implementation for encoders and decoders is
4666Python’s.")
4667 (license license:bsd-3)))
4668
4669(define-public python-omnipath
4670 (package
4671 (name "python-omnipath")
4672 (version "1.0.10")
4673 (source
4674 (origin
4675 (method git-fetch)
4676 (uri (git-reference
4677 (url "https://github.com/saezlab/omnipath/")
4678 (commit (string-append "v" version))))
4679 (file-name (git-file-name name version))
4680 (sha256
4681 (base32 "0jnc7nsn6n5hqx5wlk928b7xmg0mpfqy8al9w2p707ihcwh4s1rf"))))
4682 (build-system pyproject-build-system)
4683 (arguments
4684 (list
4685 #:test-flags '(list "-k"
4686 (string-append
4687 ;; These require internet access
4688 "not test_download_homologene"
4689 " and not test_complex_genes"))
4690 #:phases
4691 #~(modify-phases %standard-phases
4692 (add-after 'unpack 'set-home
4693 (lambda _
4694 (setenv "HOME" "/tmp"))))))
4695 (propagated-inputs (list python-attrs
4696 python-docrep
4697 python-inflect
4698 python-networkx
4699 python-packaging
4700 python-pandas
4701 python-requests
4702 python-tqdm
4703 python-typing-extensions
4704 python-urllib3
4705 python-wrapt))
4706 (native-inputs (list nss-certs-for-test
4707 python-bump2version
4708 python-hatchling
4709 python-pytest
4710 python-pytest-mock
4711 python-pytest-socket
4712 python-requests-mock))
4713 (home-page "https://omnipathdb.org/")
4714 (synopsis "Python client for the OmniPath web service")
4715 (description "This package provides a Python client for the OmniPath web
4716service.")
4717 (license license:expat)))
4718
4719(define-public python-openai
4720 (package
4721 (name "python-openai")
4722 (version "1.3.5")
4723 (source (origin
4724 (method git-fetch)
4725 (uri (git-reference
4726 (url "https://github.com/openai/openai-python")
4727 (commit (string-append "v" version))))
4728 (file-name (git-file-name name version))
4729 (sha256
4730 (base32
4731 "0k1rwhj7v22x5bnv9xbk9nj9grxqmmclh9538qqjadgqxfn5x74q"))))
4732 (build-system pyproject-build-system)
4733 (arguments
4734 (list
4735 #:test-flags
4736 ;; These require internet access and an openai API key.
4737 '(list "--ignore=openai/tests/asyncio/test_endpoints.py"
4738 "--ignore=openai/tests/test_endpoints.py"
4739 "--ignore-glob=tests/api_resources/*"
4740 ;; Needs respx
4741 "--ignore=tests/api_resources/audio/test_speech.py"
4742 "--ignore=tests/api_resources/test_files.py"
4743 "--ignore=tests/test_client.py"
4744 "-k" "not test_requestor_cycle_sessions\
4745 and not test_requestor_sets_request_id\
4746 and not test_file_cli\
4747 and not test_basic_async\
4748 and not test_async\
4749 and not test_datetime_with_alias\
4750 and not test_pydantic")
4751 #:phases
4752 '(modify-phases %standard-phases
4753 (add-after 'unpack 'relax-requirements
4754 (lambda _
4755 (substitute* "pyproject.toml"
4756 (("distro>=1.7.0") "distro>=1.6.0")
4757 (("anyio>=3.5.0, <4") "anyio"))))
4758 (add-after 'unpack 'httpx-compatibility
4759 (lambda _
4760 (substitute* "src/openai/_base_client.py"
4761 (("proxies=proxies,") "")
4762 (("self._proxies = proxies") "")
4763 (("proxies: ProxiesTypes . None,") "")))))))
4764 (propagated-inputs
4765 (list python-aiohttp
4766 python-distro
4767 python-httpx
4768 python-pydantic-2
4769 python-requests
4770 python-tqdm
4771 python-typing-extensions))
4772 (native-inputs (list nss-certs-for-test
4773 python-dirty-equals
4774 python-hatchling
4775 python-pytest python-pytest-asyncio
4776 python-pytest-mock python-setuptools python-wheel))
4777 (home-page "https://github.com/openai/openai-python")
4778 (synopsis "Python client library for the OpenAI API")
4779 (description "This package provides a Python client library for the
4780OpenAI API.")
4781 (license license:expat)))
4782
4783(define-public python-openapi-schema-validator
4784 (package
4785 (name "python-openapi-schema-validator")
4786 (version "0.6.2")
4787 (source
4788 (origin
4789 (method git-fetch) ;no tests in pypi release
4790 (uri (git-reference
4791 (url "https://github.com/p1c2u/openapi-schema-validator")
4792 (commit version)))
4793 (file-name (git-file-name name version))
4794 (sha256
4795 (base32
4796 "0pgsm1x7lhc5ryj4l45ik8m5x9gqyi50dkflaiqqr4fnl0bsbx09"))))
4797 (build-system pyproject-build-system)
4798 (arguments
4799 (list
4800 #:test-flags
4801 ;; This one returns 5 instead of 4 elements
4802 '(list "-k" "not test_array_prefixitems_invalid")
4803 #:phases
4804 #~(modify-phases %standard-phases
4805 (add-after 'unpack 'remove-coverage-pytest-options
4806 (lambda _
4807 (substitute* "pyproject.toml"
4808 (("^--cov.*") ""))))
4809 ;; See https://github.com/python-openapi/openapi-schema-validator/issues/204
4810 (add-after 'unpack 'relax-requirements
4811 (lambda _
4812 (substitute* "pyproject.toml"
4813 (("jsonschema-specifications.*")
4814 "jsonschema-specifications = \">=2023.5.2\"\n")))))))
4815 (native-inputs (list python-poetry-core python-pytest))
4816 (propagated-inputs
4817 (list python-isodate
4818 python-jsonschema
4819 python-rfc3339-validator
4820 python-strict-rfc3339))
4821 (home-page "https://github.com/p1c2u/openapi-schema-validator")
4822 (synopsis "OpenAPI schema validation library for Python")
4823 (description "Openapi-schema-validator is a Python library that validates
4824a schema against:
4825@itemize
4826@item OpenAPI Schema Specification v3.0 which is an extended subset of the
4827JSON Schema Specification Wright Draft 00.
4828@item OpenAPI Schema Specification v3.1 which is an extended superset of the
4829JSON Schema Specification Draft 2020-12.
4830@end itemize")
4831 (license license:bsd-3)))
4832
4833(define-public python-openapi-spec-validator
4834 (package
4835 (name "python-openapi-spec-validator")
4836 (version "0.7.1")
4837 (source
4838 (origin
4839 (method git-fetch) ;no tests in pypi release
4840 (uri (git-reference
4841 (url "https://github.com/p1c2u/openapi-spec-validator")
4842 (commit version)))
4843 (file-name (git-file-name name version))
4844 (sha256
4845 (base32
4846 "0s5yd4dbr6knwd2g1g4v2931k14n1lm80l11n2ija18yfis8yisz"))))
4847 (build-system pyproject-build-system)
4848 (arguments
4849 (list
4850 ;; These tests attempt to fetch resources from the Internet
4851 #:test-flags '(list "--ignore-glob=tests/integration/validation/**"
4852 "-k" "not example")
4853 #:phases
4854 #~(modify-phases %standard-phases
4855 (add-after 'unpack 'remove-coverage-pytest-options
4856 (lambda _
4857 (substitute* "pyproject.toml"
4858 (("^--cov.*") "")))))))
4859 (native-inputs
4860 (list python-poetry-core
4861 python-pytest))
4862 (propagated-inputs
4863 (list python-jsonschema
4864 python-jsonschema-path
4865 python-lazy-object-proxy
4866 python-openapi-schema-validator
4867 python-pyyaml
4868 python-requests
4869 python-setuptools))
4870 (home-page "https://github.com/p1c2u/openapi-spec-validator")
4871 (synopsis "OpenAPI spec validator")
4872 (description "OpenAPI Spec Validator is a Python library that validates an
4873OpenAPI specification against the OpenAPI 2.0 (also known as Swagger), OpenAPI
48743.0 and OpenAPI 3.1 specifications. The validator aims to check for full
4875compliance with the specification.")
4876 (license license:asl2.0)))
4877
4878(define-public python-openapi-core
4879 (package
4880 (name "python-openapi-core")
4881 (version "0.19.4")
4882 (source
4883 (origin
4884 (method git-fetch)
4885 (uri (git-reference
4886 (url "https://github.com/p1c2u/openapi-core")
4887 (commit version)))
4888 (file-name (git-file-name name version))
4889 (sha256
4890 (base32
4891 "092sj2933jmvq5r76khr0vphih490vls1ga3s43gz8i47aqaxx96"))))
4892 (build-system pyproject-build-system)
4893 (arguments
4894 (list
4895 #:test-flags
4896 '(list "tests/unit"
4897 ;; Ignore Pytest configuration in setup.cfg that adds
4898 ;; unwanted flake8 and coverage options.
4899 "-c" "/dev/null"
4900 "-k" "not test_chars_valid")))
4901 (native-inputs (list python-django
4902 python-falcon
4903 python-flask
4904 python-mock
4905 python-poetry-core
4906 python-pytest
4907 python-responses))
4908 (propagated-inputs
4909 (list python-attrs
4910 python-aiohttp
4911 python-isodate
4912 python-jsonschema
4913 python-lazy-object-proxy
4914 python-more-itertools
4915 python-openapi-schema-validator
4916 python-openapi-spec-validator
4917 python-parse
4918 python-six
4919 python-werkzeug))
4920 (home-page "https://github.com/p1c2u/openapi-core")
4921 (synopsis "OpenAPI core library")
4922 (description "Openapi-core is a Python library that adds client-side and
4923server-side support for the OpenAPI Specification v3. It has features such
4924as:
4925@itemize
4926@item Validation of requests and responses
4927@item Schema casting and unmarshalling
4928@item Media type and parameters deserialization
4929@item Security providers (API keys, Cookie, Basic and Bearer HTTP
4930authentications)
4931@item Custom deserializers and formats
4932@item Integration with libraries and frameworks.
4933@end itemize")
4934 (license license:bsd-3)))
4935
4936(define-public python-openid
4937 (package
4938 (name "python-openid")
4939 (version "3.2.0")
4940 (source
4941 (origin
4942 (method url-fetch)
4943 (uri (pypi-uri "python3-openid" version))
4944 (sha256
4945 (base32
4946 "1bxf9a3ny1js422j962zfzl4a9dhj192pvai05whn7j0iy9gdyrk"))))
4947 (build-system pyproject-build-system)
4948 (arguments
4949 `(#:phases
4950 (modify-phases %standard-phases
4951 (replace 'check
4952 (lambda* (#:key tests? #:allow-other-keys)
4953 (when tests?
4954 (invoke "python" "-m" "unittest" "openid.test.test_suite")))))))
4955 (propagated-inputs
4956 (list python-defusedxml))
4957 (native-inputs
4958 (list python-psycopg2 python-django python-setuptools python-wheel))
4959 (home-page "https://github.com/necaris/python3-openid")
4960 (synopsis "OpenID support for servers and consumers")
4961 (description "This library provides OpenID authentication for Python, both
4962for clients and servers.")
4963 (license license:asl2.0)))
4964
4965(define-public python-cssutils
4966 (package
4967 (name "python-cssutils")
4968 (version "2.11.1")
4969 (source
4970 (origin
4971 (method url-fetch)
4972 (uri (pypi-uri "cssutils" version))
4973 (sha256
4974 (base32
4975 "1qpq7xvzqp4cfcb8837rnd30x4hws3rkp33qpvmnxbxn2djsfqq5"))))
4976 (build-system pyproject-build-system)
4977 (arguments
4978 (list
4979 #:phases
4980 #~(modify-phases %standard-phases
4981 (replace 'check
4982 (lambda _
4983 (invoke "pytest" "-vv" "-k"
4984 (string-append "not encutils "
4985 "and not website.logging")))))))
4986 (native-inputs
4987 (list python-cssselect
4988 python-jaraco-test
4989 python-lxml
4990 python-pytest
4991 python-setuptools
4992 python-wheel))
4993 (propagated-inputs
4994 (list python-more-itertools))
4995 (home-page "https://github.com/jaraco/cssutils")
4996 (synopsis
4997 "CSS Cascading Style Sheets library for Python")
4998 (description
4999 "Cssutils is a Python package for parsing and building CSS
5000Cascading Style Sheets. Currently it provides a DOM only and no rendering
5001options.")
5002 (license license:lgpl3+)))
5003
5004(define-public python-css-parser
5005 (package
5006 (inherit python-cssutils)
5007 (name "python-css-parser")
5008 (version "1.0.10")
5009 (source
5010 (origin
5011 (method url-fetch)
5012 (uri (pypi-uri "css-parser" version))
5013 (sha256
5014 (base32 "0qs375slcwqd7slizh6hzkwxx7cdj36v8kwn0qrfji1kscm9f7mz"))))
5015 (home-page "https://github.com/ebook-utils/css-parser")
5016 (synopsis "Fork of cssutils modified for parsing ebooks")
5017 (description
5018 "Css-parser is a Python package for parsing and building CSS
5019Cascading Style Sheets. Currently it provides a DOM only and no rendering
5020options.
5021
5022It's a fork of cssutils 1.0.2, updated and modified for parsing ebooks, due to
5023cssutils not receiving updates as of 1.0.2.")
5024 (license license:lgpl3+)))
5025
5026(define-public python-cssselect
5027 (package
5028 (name "python-cssselect")
5029 (version "1.2.0")
5030 (source (origin
5031 ;; The PyPI release does not contain tests.
5032 (method git-fetch)
5033 (uri (git-reference
5034 (url "https://github.com/scrapy/cssselect")
5035 (commit (string-append "v" version))))
5036 (file-name (git-file-name name version))
5037 (sha256
5038 (base32
5039 "1x4nrvb1p1byi1whmspik7lbh303akdlh762dayfxam3hycsh5kk"))))
5040 (build-system pyproject-build-system)
5041 (native-inputs
5042 (list python-lxml python-pytest python-setuptools python-wheel))
5043 (home-page "https://github.com/scrapy/cssselect")
5044 (synopsis "CSS3 selector parser and translator to XPath 1.0")
5045 (description
5046 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5047them to XPath 1.0 expressions. Such expressions can be used in lxml or
5048another XPath engine to find the matching elements in an XML or HTML document.")
5049 (license license:bsd-3)))
5050
5051(define-public python-databricks-cli
5052 (package
5053 (name "python-databricks-cli")
5054 (version "0.18.0")
5055 (home-page "https://github.com/databricks/databricks-cli")
5056 (source (origin
5057 (method git-fetch)
5058 (uri (git-reference (url home-page) (commit version)))
5059 (file-name (git-file-name name version))
5060 (sha256
5061 (base32
5062 "1avag4kwqk2f24r5i0vcmhm6s1gsw6maykhlyj2ixz0qc05pjzvl"))))
5063 (build-system pyproject-build-system)
5064 (arguments
5065 (list #:phases #~(modify-phases %standard-phases
5066 (replace 'check
5067 (lambda _
5068 (invoke "pytest" "tests" "-vv"))))))
5069 (native-inputs
5070 ;; For tests.
5071 (list python-decorator
5072 python-mock
5073 python-pytest
5074 python-requests-mock
5075 python-setuptools
5076 python-wheel))
5077 (propagated-inputs
5078 (list python-click
5079 python-oauthlib
5080 python-pyjwt
5081 python-requests
5082 python-six
5083 python-tabulate))
5084 (synopsis "Command line interface for Databricks")
5085 (description
5086 "The Databricks Command Line Interface is a tool which provides an easy
5087to use interface to the Databricks platform. The CLI is built on top of the
5088Databricks REST APIs.")
5089 (license license:asl2.0)))
5090
5091(define-public python-openid-cla
5092 ;; XXX: Last updated in 2015.
5093 (package
5094 (name "python-openid-cla")
5095 (version "1.2")
5096 (source
5097 (origin
5098 (method url-fetch)
5099 (uri (pypi-uri "python-openid-cla" version))
5100 (sha256
5101 (base32
5102 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5103 (build-system pyproject-build-system)
5104 (arguments '(#:tests? #f)) ; No tests.
5105 (native-inputs (list python-setuptools python-wheel))
5106 (propagated-inputs (list python-openid python-six))
5107 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5108 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5109 (description "@code{openid-cla} is an implementation of the OpenID
5110contributor license agreement extension for python-openid.")
5111 (license license:bsd-3)))
5112
5113(define-public python-openid-teams
5114 ;; XXX: Last updated in 2018.
5115 (package
5116 (name "python-openid-teams")
5117 (version "1.1")
5118 (source
5119 (origin
5120 (method url-fetch)
5121 (uri (pypi-uri "python-openid-teams" version))
5122 (sha256
5123 (base32
5124 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5125 (build-system pyproject-build-system)
5126 (arguments '(#:tests? #f)) ; No tests.
5127 (native-inputs (list python-setuptools python-wheel))
5128 (propagated-inputs (list python-openid python-six))
5129 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5130 (synopsis "Implementation of the OpenID teams extension for python-openid")
5131 (description
5132 "@code{openid-teams} is an implementation of the OpenID
5133teams extension for python-openid.")
5134 (license license:bsd-3)))
5135
5136(define-public python-priority
5137 (package
5138 (name "python-priority")
5139 (version "2.0.0")
5140 (source
5141 (origin
5142 (method url-fetch)
5143 (uri (pypi-uri "priority" version))
5144 (sha256
5145 (base32 "1h0qpa949bxx7za95v1apwnngkrngi695cwx8wchn3cd3d7xarf9"))))
5146 (build-system pyproject-build-system)
5147 (native-inputs
5148 (list python-pytest python-setuptools python-wheel))
5149 (home-page "https://python-hyper.org/projects/priority/en/latest/")
5150 (synopsis "Pure-Python implementation of the HTTP/2 priority tree")
5151 (description
5152 "Priority is a pure-Python implementation of the priority logic for HTTP/2,
5153set out in RFC 7540 Section 5.3 (Stream Priority).")
5154 (license license:expat)))
5155
5156(define-public python-weblate-language-data
5157 (package
5158 (name "python-weblate-language-data")
5159 (version "2025.8")
5160 (source
5161 (origin
5162 (method url-fetch)
5163 (uri (pypi-uri "weblate_language_data" version))
5164 (sha256
5165 (base32 "0byj1xl6xldam790b6wg62dk1b4i6qdlsp4lqzlv65wnp2klvrkf"))))
5166 (build-system pyproject-build-system)
5167 (arguments (list #:tests? #f)) ;not tests, just data files
5168 (native-inputs
5169 (list python-setuptools))
5170 (propagated-inputs
5171 (list python-translate-toolkit))
5172 (home-page "https://github.com/WeblateOrg/language-data")
5173 (synopsis "Language definitions for Weblate")
5174 (description
5175 "This package provides language definitions used by
5176@url{https://weblate.org/, Weblate}i.")
5177 (license license:expat)))
5178
5179(define-public python-wikidata
5180 (package
5181 (name "python-wikidata")
5182 (version "0.8.1")
5183 (source
5184 (origin
5185 (method git-fetch)
5186 (uri (git-reference
5187 (url "https://github.com/dahlia/wikidata")
5188 (commit version)))
5189 (file-name (git-file-name name version))
5190 (sha256
5191 (base32 "06zg74h249phszn1znfcjdz6c3lz350fiabdzn7iqb2xg4xh69a5"))))
5192 (build-system pyproject-build-system)
5193 (native-inputs
5194 (list python-pytest python-setuptools))
5195 (home-page "https://github.com/dahlia/wikidata")
5196 (synopsis "Wikidata client library")
5197 (description
5198 "This package provides a Python interface to @url{https://www.wikidata.org/,
5199Wikidata}.")
5200 (license license:gpl3+)))
5201
5202(define-public python-wsproto
5203 (package
5204 (name "python-wsproto")
5205 (version "1.2.0")
5206 (source
5207 (origin
5208 (method url-fetch)
5209 (uri (pypi-uri "wsproto" version))
5210 (sha256
5211 (base32 "0rahm1j9danv1l6i6as80acwv16ycihxkhrvwjiqh9drxhk5ymmd"))))
5212 (build-system pyproject-build-system)
5213 (native-inputs
5214 (list python-pytest python-setuptools python-wheel))
5215 (propagated-inputs
5216 (list python-h11))
5217 (home-page "https://github.com/python-hyper/wsproto/")
5218 (synopsis "WebSockets state-machine based protocol implementation")
5219 (description
5220 "@code{wsproto} is a pure-Python implementation of a WebSocket protocol
5221stack. It's written from the ground up to be embeddable in whatever program you
5222choose to use, ensuring that you can communicate via WebSockets, as defined in
5223RFC6455, regardless of your programming paradigm.")
5224 (license license:expat)))
5225
5226(define-public hypercorn
5227 (package
5228 (name "hypercorn")
5229 (version "0.17.3")
5230 (source
5231 (origin
5232 (method git-fetch) ;PyPI does not have tests
5233 (uri (git-reference
5234 (url "https://github.com/pgjones/hypercorn")
5235 (commit version)))
5236 (file-name (git-file-name name version))
5237 (sha256
5238 (base32 "13v6cy4frvnddv9zak06a4lmwxp121hjyfrlapxfmb7m3i8qrm02"))))
5239 (build-system pyproject-build-system)
5240 ;; Propagate because Hypercorn also exposes functionality over a module.
5241 (propagated-inputs (list python-exceptiongroup
5242 python-h11
5243 python-taskgroup
5244 python-h2
5245 python-priority
5246 python-tomli
5247 python-wsproto))
5248 (native-inputs (list nss-certs-for-test
5249 python-httpx
5250 python-poetry-core
5251 python-pytest
5252 python-pytest-asyncio
5253 python-pytest-cov
5254 python-pytest-trio
5255 python-trio))
5256 (home-page "https://gitlab.com/pgjones/hypercorn/")
5257 (synopsis "ASGI Server based on Hyper libraries")
5258 (description
5259 "Hypercorn is an ASGI web server based on the sans-io hyper, h11, h2, and
5260wsproto libraries and inspired by Gunicorn. It supports HTTP/1, HTTP/2,
5261WebSockets (over HTTP/1 and HTTP/2), ASGI/2, and ASGI/3 specifications. It
5262can utilise asyncio, uvloop, or trio worker types.")
5263 (license license:expat)))
5264
5265(define-deprecated-package python-hypercorn
5266 hypercorn)
5267
5268(define-public python-querystring-parser
5269 (package
5270 (name "python-querystring-parser")
5271 (version "1.2.4")
5272 (source
5273 (origin
5274 (method git-fetch)
5275 (uri (git-reference
5276 (url "https://github.com/bernii/querystring-parser")
5277 (commit version)))
5278 (file-name (git-file-name name version))
5279 (sha256
5280 (base32 "15n89bf1x9dgp1vi697pa238nvn0vbqp3ghf0xrcyqqa9gn1l6fb"))))
5281 (build-system pyproject-build-system)
5282 (arguments
5283 (list
5284 #:phases
5285 #~(modify-phases %standard-phases
5286 (replace 'check
5287 (lambda _
5288 ;; XXX FIXME: This test is broken with Python 3.7:
5289 ;; https://github.com/bernii/querystring-parser/issues/35
5290 (substitute* "querystring_parser/tests.py"
5291 (("self\\.assertEqual\\(self\\.knownValuesNormalized, result\\)")
5292 "True"))
5293 (invoke "python" "querystring_parser/tests.py"))))))
5294 (native-inputs (list python-setuptools))
5295 (propagated-inputs (list python-six))
5296 (home-page "https://github.com/bernii/querystring-parser")
5297 (synopsis "QueryString parser that correctly handles nested dictionaries")
5298 (description
5299 "This package provides a query string parser for Python and Django
5300projects that correctly creates nested dictionaries from sent form/querystring
5301data.")
5302 (license license:expat)))
5303
5304(define-public python-tornado
5305 (package
5306 ;; TODO: Try to refresh and check all dependents.
5307 (name "python-tornado")
5308 (version "5.1.1")
5309 (source
5310 (origin
5311 (method url-fetch)
5312 (uri (pypi-uri "tornado" version))
5313 (sha256
5314 (base32
5315 "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
5316 (build-system pyproject-build-system)
5317 (arguments
5318 (list
5319 #:phases
5320 '(modify-phases %standard-phases
5321 (add-after 'unpack 'fix-collections
5322 (lambda _
5323 (substitute* "tornado/httputil.py"
5324 (("collections.MutableMapping")
5325 "collections.abc.MutableMapping"))))
5326 (replace 'check
5327 (lambda* (#:key tests? #:allow-other-keys)
5328 (when tests?
5329 (substitute* "tornado/test/runtests.py"
5330 (("\"error\", category=DeprecationWarning")
5331 "\"ignore\", category=DeprecationWarning")
5332 ;; Disable tests that use SSL.
5333 (("'tornado.test.simple_httpclient_test',") "")
5334 (("'tornado.test.iostream_test',") "")
5335 (("'tornado.test.httpserver_test',") "")
5336 ;; Some timeouts are triggered in these two modules
5337 (("'tornado.test.queues_test',") "")
5338 (("'tornado.test.locks_test',") ""))
5339 ;; Skip all network tests
5340 (setenv "NO_NETWORK" "1")
5341 ;; Skip timing-relevant tests
5342 (setenv "TRAVIS" "1")
5343 (invoke "python" "-m" "tornado.test.runtests"
5344 "--verbose=yes")))))))
5345 (native-inputs
5346 (list python-certifi
5347 python-setuptools))
5348 (home-page "https://www.tornadoweb.org/")
5349 (synopsis "Python web framework and asynchronous networking library")
5350 (description
5351 "Tornado is a Python web framework and asynchronous networking library,
5352originally developed at FriendFeed. By using non-blocking network I/O,
5353Tornado can scale to tens of thousands of open connections, making it ideal
5354for long polling, WebSockets, and other applications that require a long-lived
5355connection to each user.")
5356 (license license:asl2.0)))
5357
5358(define-public python-tornado-6
5359 (package
5360 (name "python-tornado")
5361 (version "6.4.2")
5362 (source
5363 (origin
5364 (method url-fetch)
5365 (uri (pypi-uri "tornado" version))
5366 (sha256
5367 (base32 "02v2mlvr58xg0l0gh08nswl53z73wkf23sziggypk63ffjsdbflj"))))
5368 (build-system pyproject-build-system)
5369 (arguments
5370 (list
5371 #:test-flags
5372 ;; AttributeError: 'TestIOStreamWebMixin' object has no attribute 'io_loop'
5373 #~(list "--ignore=tornado/test/iostream_test.py")))
5374 (native-inputs
5375 (list python-certifi
5376 python-pytest
5377 python-setuptools
5378 python-wheel))
5379 (home-page "https://www.tornadoweb.org/")
5380 (synopsis "Python web framework and asynchronous networking library")
5381 (description
5382 "Tornado is a Python web framework and asynchronous networking library,
5383originally developed at FriendFeed. By using non-blocking network I/O,
5384Tornado can scale to tens of thousands of open connections, making it ideal
5385for long polling, WebSockets, and other applications that require a long-lived
5386connection to each user.")
5387 (license license:asl2.0)))
5388
5389(define-public python-tornado-http-auth
5390 (package
5391 (name "python-tornado-http-auth")
5392 (version "1.1.1")
5393 (source
5394 (origin
5395 (method git-fetch)
5396 (uri (git-reference
5397 (url "https://github.com/gvalkov/tornado-http-auth")
5398 (commit (string-append "v" version))))
5399 (file-name (git-file-name name version))
5400 (sha256
5401 (base32 "1v9sin1zlck9wvkwx0ldqb1b271xlkq63562w8g1yb7v6qka9q4f"))))
5402 (build-system pyproject-build-system)
5403 ;; XXX: This version is incompatible with current tornado.testing.
5404 (arguments (list #:tests? #f))
5405 (native-inputs (list python-setuptools))
5406 (propagated-inputs (list python-tornado))
5407 (home-page "https://github.com/gvalkov/tornado-http-auth")
5408 (synopsis "Digest and basic authentication module for Tornado")
5409 (description
5410 "Provides support for adding authentication to services using the Tornado
5411web framework, either via the basic or digest authentication schemes.")
5412 (license license:asl2.0)))
5413
5414(define-public python-wsgi-intercept
5415 (package
5416 (name "python-wsgi-intercept")
5417 (version "1.13.1")
5418 (source (origin
5419 (method url-fetch)
5420 (uri (pypi-uri "wsgi_intercept" version))
5421 (sha256
5422 (base32
5423 "1h94dj7h7n7zdj3ll4imqjhq5vk21yidk2niwnmpw7xik9inrgbr"))))
5424 (build-system pyproject-build-system)
5425 (arguments
5426 (list
5427 ;; XXX: tests required internet access
5428 #:tests? #f))
5429 (propagated-inputs
5430 (list python-six))
5431 (native-inputs
5432 (list python-httplib2
5433 python-pytest
5434 python-requests
5435 python-setuptools
5436 python-urllib3
5437 python-wheel))
5438 (synopsis "Puts a WSGI application in place of a real URI for testing")
5439 (description "Wsgi_intercept installs a WSGI application in place of a real
5440URI for testing. Testing a WSGI application normally involves starting a
5441server at a local host and port, then pointing your test code to that address.
5442Instead, this library lets you intercept calls to any specific host/port
5443combination and redirect them into a WSGI application importable by your test
5444program. Thus, you can avoid spawning multiple processes or threads to test
5445your Web app.")
5446 (home-page "https://github.com/cdent/wsgi-intercept")
5447 (license license:expat)))
5448
5449(define-public python-webob
5450 (package
5451 (name "python-webob")
5452 (version "1.8.9")
5453 (source
5454 (origin
5455 (method url-fetch)
5456 (uri (pypi-uri "webob" version))
5457 (sha256
5458 (base32
5459 "12b5sl10yzzzz3g11kij3rdzk9y6583ywggc6h9nsxmnxpi7hq5d"))))
5460 (build-system pyproject-build-system)
5461 ;; tests: 2380 passed, 9 skipped, 1 xfailed, 12 warnings
5462 (native-inputs
5463 (list python-pytest
5464 python-setuptools))
5465 (home-page "https://webob.org/")
5466 (synopsis "WSGI request and response object")
5467 (description
5468 "WebOb provides wrappers around the WSGI request environment, and an
5469object to help create WSGI responses.")
5470 (license license:expat)))
5471
5472(define-public python-zc-lockfile
5473 (package
5474 (name "python-zc-lockfile")
5475 (version "4.0")
5476 (source
5477 (origin
5478 (method git-fetch)
5479 (uri (git-reference
5480 (url "https://github.com/zopefoundation/zc.lockfile")
5481 (commit version)))
5482 (file-name (git-file-name name version))
5483 (sha256
5484 (base32 "0b1kkwx2d4wf392sd3bfjvzgkdrknwsxg9mby121mq8zl7c490gg"))))
5485 (build-system pyproject-build-system)
5486 (arguments
5487 (list
5488 #:phases
5489 #~(modify-phases %standard-phases
5490 (replace 'check
5491 (lambda* (#:key tests? #:allow-other-keys)
5492 (if tests?
5493 (invoke "zope-testrunner" "--test-path=src")
5494 (format #t "test suite not run~%")))))))
5495 (native-inputs (list python-zope-testing python-zope-testrunner
5496 python-setuptools))
5497 (home-page "https://github.com/zopefoundation/zc.lockfile")
5498 (synopsis "Interprocess locks using lock files")
5499 (description
5500 "This package provides an implementation of interprocess locks using lock
5501files. These locks can also be used to mediate access to other files.")
5502 (license license:zpl2.1)))
5503
5504(define-public python-zconfig
5505 (package
5506 (name "python-zconfig")
5507 (version "4.0")
5508 (source
5509 (origin
5510 (method git-fetch)
5511 (uri (git-reference
5512 (url "https://github.com/zopefoundation/ZConfig/")
5513 (commit version)))
5514 (file-name (git-file-name name version))
5515 (sha256
5516 (base32 "1x502hyfijh6fc8n85cm046c44spwfmwcn2lnxa1axg8n0n5rsbp"))))
5517 (build-system pyproject-build-system)
5518 (arguments
5519 (list
5520 #:phases
5521 #~(modify-phases %standard-phases
5522 (replace 'check
5523 (lambda* (#:key tests? #:allow-other-keys)
5524 (if tests?
5525 (begin
5526 ;; This test assumes we still have setup.py in the
5527 ;; directory from which we import zconfig, which
5528 ;; does not work after installing the package.
5529 (delete-file-recursively
5530 "src/ZConfig/tests/test_readme.py")
5531 (invoke "zope-testrunner" "-vv" "--test-path=src" "--all"))
5532 (format #t "test suite not run~%")))))))
5533 (native-inputs (list python-docutils python-manuel python-zope-exceptions
5534 python-zope-testrunner python-setuptools))
5535 (home-page "https://github.com/zopefoundation/ZConfig/")
5536 (synopsis "Structured configuration library intended for general use")
5537 (description
5538 "@code{zconfig} is a configuration library intended for general use. It
5539supports a hierarchical schema-driven configuration model that allows a schema
5540to specify data conversion routines written in Python. Its model is very
5541different from the model supported by the @code{configparser} module found in
5542Python's standard library, and is more suitable to configuration-intensive
5543applications.")
5544 (license license:zpl2.1)))
5545
5546(define-public python-zodb
5547 (package
5548 (name "python-zodb")
5549 (version "6.0.1")
5550 (source
5551 (origin
5552 (method url-fetch)
5553 (uri (pypi-uri "zodb" version))
5554 (sha256
5555 (base32 "02cmvf8j2nin5z26wvy2vq2k9mj12hqrr4276lj3w4jj32p0zxw9"))))
5556 (build-system pyproject-build-system)
5557 (arguments
5558 (list
5559 #:phases
5560 #~(modify-phases %standard-phases
5561 (replace 'check
5562 (lambda* (#:key tests? #:allow-other-keys)
5563 (if tests?
5564 (begin
5565 ;; This test does not work after installing the
5566 ;; package, since it expects the ZODB source code
5567 ;; to reside in the src/ directory.
5568 (delete-file-recursively
5569 "src/ZODB/tests/testdocumentation.py")
5570 (invoke "zope-testrunner" "-vv" "--test-path=src"
5571 "--all"))
5572 (format #t "test suite not run~%")))))))
5573 (native-inputs
5574 (list python-manuel
5575 python-wheel
5576 python-zope-testing
5577 python-zope-testrunner))
5578 (propagated-inputs
5579 (list python-btrees
5580 python-persistent
5581 python-transaction
5582 python-zc-lockfile
5583 python-zconfig
5584 python-zodbpickle
5585 python-zope-interface))
5586 (home-page "http://zodb-docs.readthedocs.io")
5587 (synopsis "Object-oriented database for Python")
5588 (description
5589 "@code{ZODB} provides an object-oriented and @acronym{ACID,
5590Atomicity Consistency Isolation Durability} compliant database for Python with
5591a high degree of transparency. @code{ZODB} is an object-oriented database,
5592not an object-relational mapping. This comes with several advantaged:
5593
5594@itemize
5595@item no separate language for database operations
5596@item very little impact on your code to make objects persistent
5597@item no database mapper that partially hides the database.
5598@item almost no seam between code and database.
5599@end itemize")
5600 (license license:zpl2.1)))
5601
5602(define-public python-zodbpickle
5603 (package
5604 (name "python-zodbpickle")
5605 (version "3.2")
5606 (source
5607 (origin
5608 (method url-fetch)
5609 (uri (pypi-uri "zodbpickle" version))
5610 (sha256
5611 (base32 "035bjrksl4h92mvjkx6id4gjcpc1k4mbci8ryjl6l9mki7ihx77b"))))
5612 (build-system pyproject-build-system)
5613 (arguments
5614 '(#:phases (modify-phases %standard-phases
5615 (replace 'check
5616 (lambda* (#:key tests? #:allow-other-keys)
5617 (if tests?
5618 (invoke "zope-testrunner" "-vv" "--test-path=src"
5619 "--all")
5620 (format #t "test suite not run~%")))))))
5621 (native-inputs (list python-zope-testrunner python-setuptools python-wheel))
5622 (home-page "https://github.com/zopefoundation/zodbpickle")
5623 (synopsis "Uniform pickling interface for @code{zodb}")
5624 (description
5625 "This package is a fork of the @code{pickle} module (and the
5626supporting C extension) from both Python 3.2 and Python 3.3. The fork adds
5627support for the @code{noload} operations used by @code{zodb}.")
5628 (license (list license:psfl license:zpl2.1))))
5629
5630(define-public python-zope-dottedname
5631 (package
5632 (name "python-zope-dottedname")
5633 (version "7.0")
5634 (source
5635 (origin
5636 (method git-fetch)
5637 (uri (git-reference
5638 (url "https://github.com/zopefoundation/zope.dottedname")
5639 (commit version)))
5640 (file-name (git-file-name name version))
5641 (sha256
5642 (base32 "0h7a637zsl1a3f0rpb2nw41mzxv0pqyj8ahn6h60n2c1px912rbd"))))
5643 (build-system pyproject-build-system)
5644 (arguments
5645 (list #:test-backend #~'custom
5646 #:test-flags #~(list "src/zope/dottedname/tests.py")))
5647 (native-inputs (list python-setuptools))
5648 (home-page "https://zopedottedname.readthedocs.io")
5649 (synopsis "Resolver for Python dotted names")
5650 (description
5651 "This package provides a @code{resolve()} function that resolves strings
5652containing dotted names into the appropriate Python object.")
5653 (license license:zpl2.1)))
5654
5655(define-public python-zope-event
5656 (package
5657 (name "python-zope-event")
5658 (version "6.0")
5659 (source
5660 (origin
5661 (method git-fetch)
5662 (uri (git-reference
5663 (url "https://github.com/zopefoundation/zope.event")
5664 (commit version)))
5665 (file-name (git-file-name name version))
5666 (sha256
5667 (base32 "0la3q47c59aq50s036q468bhnmzgs71f1cygv89w6qkk1hkn35ym"))))
5668 (build-system pyproject-build-system)
5669 (arguments
5670 (list
5671 #:test-flags
5672 #~(list "src/zope/event/tests.py")))
5673 (native-inputs (list python-pytest python-setuptools))
5674 (home-page "https://zopeevent.readthedocs.io/en/latest/")
5675 (synopsis "Event publishing system for Python")
5676 (description
5677 "Zope.event provides an event publishing API, intended for use by
5678applications which are unaware of any subscribers to their events. It is a
5679simple event-dispatching system on which more sophisticated event dispatching
5680systems can be built.")
5681 (license license:zpl2.1)))
5682
5683(define-public python-zope-interface
5684 (package
5685 (name "python-zope-interface")
5686 (version "7.2")
5687 (source
5688 (origin
5689 (method git-fetch)
5690 (uri (git-reference
5691 (url "https://github.com/zopefoundation/zope.interface")
5692 (commit version)))
5693 (file-name (git-file-name name version))
5694 (sha256
5695 (base32 "01snm1lbqhx3ird4m76nciaqasxvf8dd6817zm35v684g5hbzd2s"))))
5696 (build-system pyproject-build-system)
5697 (arguments
5698 ;; XXX: test suite can't find python-zope-testing
5699 (list #:tests? #f))
5700 (native-inputs (list python-setuptools))
5701 (home-page "https://zopeinterface.readthedocs.io")
5702 (synopsis "\"Design by contract\" methodology in Python")
5703 (description
5704 "Zope.interface provides an implementation of \"object interfaces\" for
5705Python. Interfaces are a mechanism for labeling objects as conforming to a
5706given API or contract.")
5707 (license license:zpl2.1)))
5708
5709(define-public python-zope-exceptions
5710 (package
5711 (name "python-zope-exceptions")
5712 (version "6.0")
5713 (source
5714 (origin
5715 (method git-fetch)
5716 (uri (git-reference
5717 (url "https://github.com/zopefoundation/zope.exceptions")
5718 (commit version)))
5719 (file-name (git-file-name name version))
5720 (sha256
5721 (base32 "0fmsw2j8islaiv6zf2mxh2s43y7virqny6s8gk8v2zkcxpy95cic"))))
5722 (build-system pyproject-build-system)
5723 (arguments
5724 (list
5725 #:phases
5726 #~(modify-phases %standard-phases
5727 (replace 'check
5728 (lambda* (#:key tests? #:allow-other-keys)
5729 (if tests?
5730 (invoke "zope-testrunner" "--test-path=src")
5731 (format #t "test suite not run~%")))))))
5732 (native-inputs (list python-setuptools python-zope-testrunner-bootstrap))
5733 (propagated-inputs (list python-zope-interface))
5734 (home-page "https://github.com/zopefoundation/zope.exceptions")
5735 (synopsis "Zope exceptions")
5736 (description
5737 "Zope.exceptions provides general-purpose exception types that have uses
5738outside of the Zope framework.")
5739 (license license:zpl2.1)))
5740
5741(define (python-zope-bootstrap-package orig)
5742 (package
5743 (inherit orig)
5744 (name (string-append (package-name orig) "-bootstrap"))
5745 (arguments
5746 (if (null? (package-arguments orig))
5747 (list
5748 #:tests? #f
5749 #:phases #~(modify-phases %standard-phases
5750 (delete 'sanity-check)))
5751 (substitute-keyword-arguments (package-arguments orig)
5752 ((#:tests? _ #f) #f)
5753 ((#:phases phases '%standard-phases)
5754 #~(modify-phases #$phases
5755 (delete 'sanity-check))))))
5756 (propagated-inputs `())
5757 (native-inputs (list python-setuptools))
5758 (properties `((hidden? . #t)))))
5759
5760(define-public python-zope-exceptions-bootstrap
5761 (python-zope-bootstrap-package python-zope-exceptions))
5762
5763(define-public python-zope-testing
5764 (package
5765 (name "python-zope-testing")
5766 (version "6.0")
5767 (source
5768 (origin
5769 (method git-fetch)
5770 (uri (git-reference
5771 (url "https://github.com/zopefoundation/zope.testing")
5772 (commit version)))
5773 (file-name (git-file-name name version))
5774 (sha256
5775 (base32 "0zqipsgv7qj7f8hrd3x6xpqwszdiac8vpjdm8ak5kljl5napw7d7"))))
5776 (build-system pyproject-build-system)
5777 (arguments
5778 (list
5779 #:phases
5780 #~(modify-phases %standard-phases
5781 (replace 'check
5782 (lambda* (#:key tests? #:allow-other-keys)
5783 (if tests?
5784 (invoke "zope-testrunner" "--test-path=src")
5785 (format #t "test suite not run~%")))))))
5786 (native-inputs (list python-setuptools
5787 python-zope-interface
5788 python-zope-testrunner-bootstrap))
5789 (home-page "https://zopetesting.readthedocs.io/")
5790 (synopsis "Zope testing helpers")
5791 (description
5792 "Zope.testing provides a number of testing utilities for HTML forms, HTTP
5793servers, regular expressions, and more.")
5794 (license license:zpl2.1)))
5795
5796(define-public python-zope-testrunner
5797 (package
5798 (name "python-zope-testrunner")
5799 (version "7.4")
5800 (source
5801 (origin
5802 (method git-fetch)
5803 (uri (git-reference
5804 (url "https://github.com/zopefoundation/zope.testrunner")
5805 (commit version)))
5806 (file-name (git-file-name name version))
5807 (sha256
5808 (base32 "0gd5rnzw6vzbx766jxqr4zc6qx7gk75r2c0nqqvhkb12hzk5ca2g"))))
5809 (build-system pyproject-build-system)
5810 (arguments
5811 (list
5812 #:phases
5813 #~(modify-phases %standard-phases
5814 (add-after 'unpack 'remove-problematic-test
5815 (lambda _
5816 ;; This test contains invalid syntax, which breaks bytecode
5817 ;; compilation. For simplicity just remove it.
5818 (delete-file
5819 "src/zope/testrunner/tests/testrunner-ex/sample2/badsyntax.py")))
5820 (replace 'check
5821 (lambda* (#:key tests? #:allow-other-keys)
5822 (if tests?
5823 (invoke "zope-testrunner" "--test-path=src")
5824 (format #t "test suite not run~%")))))))
5825 (native-inputs (list python-setuptools python-zope-testing))
5826 (propagated-inputs (list python-zope-exceptions python-zope-interface))
5827 (home-page "https://zopetestrunner.readthedocs.io")
5828 (synopsis "Zope testrunner script")
5829 (description "This package provides a script for running Python tests.")
5830 (license license:zpl2.1)))
5831
5832(define-public python-zope-testrunner-bootstrap
5833 (package
5834 (inherit (python-zope-bootstrap-package python-zope-testrunner))
5835 (propagated-inputs
5836 (list python-six python-zope-exceptions-bootstrap))
5837 (properties `((hidden? . #t)))))
5838
5839(define-public python-zope-i18nmessageid
5840 (package
5841 (name "python-zope-i18nmessageid")
5842 (version "7.0")
5843 (source
5844 (origin
5845 (method git-fetch)
5846 (uri (git-reference
5847 (url "https://github.com/zopefoundation/zope.i18nmessageid")
5848 (commit version)))
5849 (file-name (git-file-name name version))
5850 (sha256
5851 (base32 "192ixj8r9n467avbxrmhakmqiaflc1vw37k08z096ajcjgbfrm5d"))))
5852 (build-system pyproject-build-system)
5853 (arguments
5854 (list
5855 #:phases
5856 #~(modify-phases %standard-phases
5857 (replace 'check
5858 (lambda* (#:key tests? #:allow-other-keys)
5859 (if tests?
5860 (invoke "zope-testrunner" "--test-path=src")
5861 (format #t "test suite not run~%")))))))
5862 (native-inputs (list python-setuptools python-zope-testrunner))
5863 (home-page "https://zopei18nmessageid.readthedocs.io")
5864 (synopsis "Message identifiers for internationalization")
5865 (description "Zope.i18nmessageid provides facilities for declaring
5866internationalized messages within program source text.")
5867 (license license:zpl2.1)))
5868
5869(define-public python-zope-schema
5870 (package
5871 (name "python-zope-schema")
5872 (version "7.0.1")
5873 (source
5874 (origin
5875 (method git-fetch)
5876 (uri (git-reference
5877 (url "https://github.com/zopefoundation/zope.schema")
5878 (commit version)))
5879 (file-name (git-file-name name version))
5880 (sha256
5881 (base32 "1hj6j0gqgvv9a5pyaz54wbn8n7wf9lyg4njb2cfs980z0d5faj39"))))
5882 (build-system pyproject-build-system)
5883 (arguments
5884 (list
5885 #:phases
5886 #~(modify-phases %standard-phases
5887 (replace 'check
5888 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5889 (add-installed-pythonpath inputs outputs)
5890 (if tests?
5891 (invoke "zope-testrunner" "--test-path=src")
5892 (format #t "test suite not run.~%")))))))
5893 (propagated-inputs (list python-zope-event python-zope-interface))
5894 (native-inputs (list python-zope-i18nmessageid python-zope-testing
5895 python-zope-testrunner python-setuptools))
5896 (home-page "https://zopeschema.readthedocs.io")
5897 (synopsis "Zope data schemas")
5898 (description "Zope.scheme provides extensions to zope.interface for
5899defining data schemas.")
5900 (license license:zpl2.1)))
5901
5902(define-public python-zope-sqlalchemy
5903 (package
5904 (name "python-zope-sqlalchemy")
5905 (version "1.6")
5906 (source
5907 (origin
5908 (method git-fetch)
5909 (uri (git-reference
5910 (url "https://github.com/zopefoundation/zope.sqlalchemy")
5911 (commit version)))
5912 (file-name (git-file-name name version))
5913 (sha256
5914 (base32 "1z4gw4i95dyqxsvrahk4fav008045n8kyxpn3fa887snmpvcjhng"))))
5915 (build-system pyproject-build-system)
5916 (arguments
5917 (list
5918 #:phases
5919 #~(modify-phases %standard-phases
5920 (replace 'check
5921 (lambda* (#:key tests? #:allow-other-keys)
5922 (if tests?
5923 (invoke "zope-testrunner" "--test-path=src")
5924 (format #t "test suite not run~%")))))))
5925 (propagated-inputs (list python-sqlalchemy python-transaction
5926 python-zope-interface))
5927 (native-inputs (list python-zope-testing python-zope-testrunner
5928 python-setuptools))
5929 (home-page "https://github.com/zopefoundation/zope.sqlalchemy")
5930 (synopsis "Minimal SQLAlchemy transaction integration for Zope")
5931 (description
5932 "The aim of this package is to unify the plethora of existing packages
5933integrating SQLAlchemy with Zope's transaction management. As such,it only
5934provides a data manager and makes no attempt to define a @i{zopeish} way to
5935configure engines.")
5936 (license license:zpl2.1)))
5937
5938(define-public python-zope-configuration
5939 (package
5940 (name "python-zope-configuration")
5941 (version "7.0")
5942 (source
5943 (origin
5944 (method git-fetch)
5945 (uri (git-reference
5946 (url "https://github.com/zopefoundation/zope.configuration")
5947 (commit version)))
5948 (file-name (git-file-name name version))
5949 (sha256
5950 (base32 "11lr6z3jpz9835a1if89g3x7k31sviq2d0xvvic5xi4c980dbkhv"))))
5951 (build-system pyproject-build-system)
5952 (arguments
5953 (list
5954 #:phases
5955 #~(modify-phases %standard-phases
5956 (replace 'check
5957 (lambda* (#:key tests? #:allow-other-keys)
5958 (if tests?
5959 (invoke "zope-testrunner" "--test-path=src")
5960 (format #t "test suite not run~%")))))))
5961 (native-inputs (list python-manuel python-setuptools python-zope-testing
5962 python-zope-testrunner))
5963 (propagated-inputs (list python-zope-i18nmessageid python-zope-interface
5964 python-zope-schema))
5965 (home-page "https://zopeconfiguration.readthedocs.io")
5966 (synopsis "Zope Configuration Markup Language")
5967 (description "Zope.configuration implements ZCML, the Zope Configuration
5968Markup Language.")
5969 (license license:zpl2.1)))
5970
5971(define-public python-zope-configuration-bootstrap
5972 (python-zope-bootstrap-package python-zope-configuration))
5973
5974(define-public python-zope-copy
5975 (package
5976 (name "python-zope-copy")
5977 (version "6.0")
5978 (source
5979 (origin
5980 (method git-fetch)
5981 (uri (git-reference
5982 (url "https://github.com/zopefoundation/zope.copy")
5983 (commit version)))
5984 (file-name (git-file-name name version))
5985 (sha256
5986 (base32 "1ym82p9scpfi3rflxnlv55v0a7hra3rq4rrlw759maq05i8qp1w5"))))
5987 (build-system pyproject-build-system)
5988 (arguments
5989 (list
5990 #:phases
5991 #~(modify-phases %standard-phases
5992 (replace 'check
5993 (lambda* (#:key tests? #:allow-other-keys)
5994 (if tests?
5995 (invoke "zope-testrunner" "--test-path=src")
5996 (format #t "test suite not run~%")))))))
5997 (propagated-inputs (list python-zope-interface))
5998 (native-inputs
5999 (list python-zodbpickle
6000 python-zope-component-bootstrap
6001 python-zope-location-bootstrap
6002 python-zope-proxy
6003 python-zope-schema
6004 python-zope-testing
6005 python-zope-testrunner
6006 python-setuptools))
6007 (home-page "https://zopecopy.readthedocs.io")
6008 (synopsis "Pluggable object copying mechanism")
6009 (description
6010 "This package provides a pluggable mechanism for copying persistent objects.")
6011 (license license:zpl2.1)))
6012
6013(define-public python-zope-proxy
6014 (package
6015 (name "python-zope-proxy")
6016 (version "7.0")
6017 (source
6018 (origin
6019 (method git-fetch)
6020 (uri (git-reference
6021 (url "https://github.com/zopefoundation/zope.proxy")
6022 (commit version)))
6023 (file-name (git-file-name name version))
6024 (sha256
6025 (base32 "00r9f4n0cl3fyc5gyf5l43zh95cmzx1gz6wr04k17d7wm2gmivyn"))))
6026 (build-system pyproject-build-system)
6027 (arguments
6028 (list
6029 #:phases
6030 #~(modify-phases %standard-phases
6031 (replace 'check
6032 (lambda* (#:key tests? #:allow-other-keys)
6033 (if tests?
6034 (invoke "zope-testrunner" "--test-path=src")
6035 (format #t "test suite not run~%")))))))
6036 (native-inputs
6037 (list python-zope-location-bootstrap
6038 python-zope-security-bootstrap
6039 python-zope-testrunner
6040 python-setuptools))
6041 (propagated-inputs (list python-zope-interface))
6042 (home-page "https://zopeproxy.readthedocs.io")
6043 (synopsis "Generic, transparent proxies")
6044 (description
6045 "Zope.proxy provides generic, transparent proxies for Python. Proxies are
6046special objects which serve as mostly-transparent wrappers around another
6047object, intervening in the apparent behavior of the wrapped object only when
6048necessary to apply the policy (e.g., access checking, location brokering,
6049etc.) for which the proxy is responsible.")
6050 (license license:zpl2.1)))
6051
6052(define-public python-zope-proxy-bootstrap
6053 (python-zope-bootstrap-package python-zope-proxy))
6054
6055(define-public python-zope-hookable
6056 (package
6057 (name "python-zope-hookable")
6058 (version "7.0")
6059 (source
6060 (origin
6061 (method git-fetch)
6062 (uri (git-reference
6063 (url "https://github.com/zopefoundation/zope.hookable")
6064 (commit version)))
6065 (file-name (git-file-name name version))
6066 (sha256
6067 (base32 "1l94xzzpyslpgv2ghvl5qzpfcsq02kp04fmvl95d6jcmivmmr4m8"))))
6068 (build-system pyproject-build-system)
6069 (arguments
6070 (list
6071 #:phases
6072 #~(modify-phases %standard-phases
6073 (replace 'check
6074 (lambda* (#:key tests? #:allow-other-keys)
6075 (if tests?
6076 (invoke "zope-testrunner" "--test-path=src")
6077 (format #t "test suite not run~%")))))))
6078 (native-inputs (list python-zope-testing python-zope-testrunner
6079 python-setuptools))
6080 (home-page "https://zopehookable.readthedocs.io")
6081 (synopsis "Zope hookable")
6082 (description
6083 "This package supports the efficient creation of hookable objects, which
6084are callable objects that are meant to be optionally replaced. The idea is
6085that you create a function that does some default thing and make i hookable.
6086Later, someone can modify what it does by calling its sethook method and
6087changing its implementation. All users of the function, including those that
6088imported it, will see the change.")
6089 (license license:zpl2.1)))
6090
6091(define-public python-zope-location
6092 (package
6093 (name "python-zope-location")
6094 (version "6.0")
6095 (source
6096 (origin
6097 (method git-fetch)
6098 (uri (git-reference
6099 (url "https://github.com/zopefoundation/zope.location")
6100 (commit version)))
6101 (file-name (git-file-name name version))
6102 (sha256
6103 (base32 "1jfsmbxj6hz7kmk5b0351b63ssm7qfkgqmz9v7xb7wwlmxsxkcdk"))))
6104 (build-system pyproject-build-system)
6105 (arguments
6106 (list
6107 #:phases
6108 #~(modify-phases %standard-phases
6109 (replace 'check
6110 (lambda* (#:key tests? #:allow-other-keys)
6111 (if tests?
6112 (invoke "zope-testrunner" "--test-path=src")
6113 (format #t "test suite not run~%")))))))
6114 (native-inputs (list python-zope-testrunner python-setuptools))
6115 (propagated-inputs (list python-zope-interface python-zope-proxy
6116 python-zope-schema))
6117 (home-page "https://zopelocation.readthedocs.io")
6118 (synopsis "Zope location library")
6119 (description
6120 "Zope.location implements the concept of \"locations\" in Zope3, which
6121are are special objects that have a structural location.")
6122 (license license:zpl2.1)))
6123
6124(define-public python-zope-location-bootstrap
6125 (python-zope-bootstrap-package python-zope-location))
6126
6127(define-public python-zope-security
6128 (package
6129 (name "python-zope-security")
6130 (version "7.3")
6131 (source
6132 (origin
6133 (method git-fetch)
6134 (uri (git-reference
6135 (url "https://github.com/zopefoundation/zope.security")
6136 (commit version)))
6137 (file-name (git-file-name name version))
6138 (sha256
6139 (base32 "06x6qcls2mdl05xnsyy5h70mbgij8xb6ksxbawzrc23cq04nkvx7"))))
6140 (build-system pyproject-build-system)
6141 (arguments
6142 (list
6143 #:phases
6144 #~(modify-phases %standard-phases
6145 (replace 'check
6146 (lambda* (#:key tests? #:allow-other-keys)
6147 (if tests?
6148 (invoke "zope-testrunner" "--test-path=src")
6149 (format #t "test suite not run~%")))))))
6150 (propagated-inputs
6151 (list python-zope-component
6152 python-zope-i18nmessageid
6153 python-zope-interface
6154 python-zope-location
6155 python-zope-proxy
6156 python-zope-schema))
6157 (native-inputs
6158 (list python-btrees
6159 python-zope-component-bootstrap
6160 python-zope-configuration-bootstrap
6161 python-zope-location-bootstrap
6162 python-zope-testing
6163 python-zope-testrunner
6164 python-setuptools))
6165 (home-page "https://zopesecurity.readthedocs.io")
6166 (synopsis "Zope security framework")
6167 (description "Zope.security provides a generic mechanism to implement
6168security policies on Python objects.")
6169 (license license:zpl2.1)))
6170
6171(define-public python-zope-security-bootstrap
6172 (package
6173 (inherit (python-zope-bootstrap-package python-zope-security))
6174 (propagated-inputs
6175 (list python-zope-i18nmessageid
6176 python-zope-interface
6177 python-zope-proxy-bootstrap
6178 python-zope-schema))))
6179
6180(define-public python-zope-component
6181 (package
6182 (name "python-zope-component")
6183 (version "7.0")
6184 (source
6185 (origin
6186 (method git-fetch)
6187 (uri (git-reference
6188 (url "https://github.com/zopefoundation/zope.component")
6189 (commit version)))
6190 (file-name (git-file-name name version))
6191 (sha256
6192 (base32 "1jygzhcg9rppsrd8cwvm0944naq1ldjf0vcpgsz0glwcdnr7cyfw"))))
6193 (build-system pyproject-build-system)
6194 (arguments
6195 (list
6196 #:phases
6197 #~(modify-phases %standard-phases
6198 (replace 'check
6199 (lambda* (#:key tests? #:allow-other-keys)
6200 (if tests?
6201 (invoke "zope-testrunner" "--test-path=src")
6202 (format #t "test suite not run~%")))))))
6203 (native-inputs
6204 (list python-persistent
6205 python-zope-configuration-bootstrap
6206 python-zope-i18nmessageid
6207 python-zope-location-bootstrap
6208 python-zope-proxy-bootstrap
6209 python-zope-security-bootstrap
6210 python-zope-testing
6211 python-zope-testrunner
6212 python-setuptools))
6213 (propagated-inputs
6214 (list python-zope-deferredimport python-zope-deprecation
6215 python-zope-event python-zope-hookable python-zope-interface))
6216 (home-page "https://zopecomponent.readthedocs.io")
6217 (synopsis "Zope Component Architecture")
6218 (description
6219 "Zope.component represents the core of the Zope Component Architecture.
6220Together with the zope.interface package, it provides facilities for defining,
6221registering and looking up components.")
6222 (license license:zpl2.1)))
6223
6224(define-public python-zope-component-bootstrap
6225 (python-zope-bootstrap-package python-zope-component))
6226
6227(define-public python-zope-deferredimport
6228 (package
6229 (name "python-zope-deferredimport")
6230 (version "6.0")
6231 (source
6232 (origin
6233 (method git-fetch)
6234 (uri (git-reference
6235 (url "https://github.com/zopefoundation/zope.deferredimport")
6236 (commit version)))
6237 (file-name (git-file-name name version))
6238 (sha256
6239 (base32 "08j728nn1la570nny1xz1xvxcm9hf2mcc3im1bzcxxrrxh4kw3zd"))))
6240 (build-system pyproject-build-system)
6241 (arguments
6242 (list
6243 #:phases
6244 #~(modify-phases %standard-phases
6245 (replace 'check
6246 (lambda* (#:key tests? #:allow-other-keys)
6247 (if tests?
6248 (invoke "zope-testrunner" "--test-path=src")
6249 (format #t "test suite not run~%")))))))
6250 (propagated-inputs (list python-zope-proxy))
6251 (native-inputs (list python-zope-testrunner python-setuptools))
6252 (home-page "https://zopedeferredimport.readthedocs.io")
6253 (synopsis "Defer imports until used by code")
6254 (description
6255 "Often, especially for package modules, you want to import names for
6256convenience, but not actually perform the imports until necessary. The
6257@code{zope.deferredimport} package provided facilities for defining names in
6258modules that will be imported from somewhere else when used. You can also cause
6259deprecation warnings to be issued when a variable is used.")
6260 (license license:zpl2.1)))
6261
6262(define-public python-ndg-httpsclient
6263 (package
6264 (name "python-ndg-httpsclient")
6265 (version "0.5.1")
6266 (source
6267 (origin
6268 (method git-fetch)
6269 (uri (git-reference
6270 (url "https://github.com/cedadev/ndg_httpsclient/")
6271 (commit version)))
6272 (file-name (git-file-name name version))
6273 (sha256
6274 (base32 "0lhsgs4am4xyjssng5p0vkfwqncczj1dpa0vss4lrhzq86mnn5rz"))))
6275 (build-system pyproject-build-system)
6276 (arguments
6277 (list
6278 #:tests? #f)) ;Tests appear to require networking.
6279 (native-inputs (list python-setuptools))
6280 (propagated-inputs (list python-pyasn1 python-pyopenssl))
6281 (synopsis "HTTPS support for Python's httplib and urllib2")
6282 (description
6283 "This is a HTTPS client implementation for httplib and urllib2 based on
6284PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation over
6285the default provided with Python and, importantly, enables full verification
6286of the SSL peer.")
6287 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6288 (license license:bsd-3)))
6289
6290(define-public python-netaddr
6291 (package
6292 (name "python-netaddr")
6293 (version "1.3.0")
6294 (source
6295 (origin
6296 (method url-fetch)
6297 (uri (pypi-uri "netaddr" version))
6298 (sha256
6299 (base32 "12p4ysgawhgkka0sz1dkwgwc2za80dxdp9wvfxivfldmjnc3sg2w"))))
6300 (build-system pyproject-build-system)
6301 (native-inputs (list python-poetry-core
6302 python-pytest
6303 python-setuptools
6304 python-wheel))
6305 (home-page "https://netaddr.readthedocs.io")
6306 (synopsis "Pythonic manipulation of network addresses")
6307 (description
6308 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6309and MAC network addresses.")
6310 (license license:bsd-3)))
6311
6312(define-public python-nh3
6313 (package
6314 (name "python-nh3")
6315 (version "0.2.20")
6316 (source
6317 (origin
6318 (method url-fetch)
6319 (uri (pypi-uri "nh3" version))
6320 (sha256
6321 (base32 "1mcf3y5294glji9lhzh57wymw4srbvzdg0kcakm0p2pqgwnw81cp"))))
6322 (build-system pyproject-build-system)
6323 (arguments
6324 (list
6325 #:imported-modules `(,@%cargo-build-system-modules
6326 ,@%pyproject-build-system-modules)
6327 #:modules '(((guix build cargo-build-system) #:prefix cargo:)
6328 (guix build pyproject-build-system)
6329 (guix build utils))
6330 #:phases
6331 #~(modify-phases %standard-phases
6332 (add-after 'unpack 'prepare-cargo-build-system
6333 (lambda args
6334 (for-each
6335 (lambda (phase)
6336 (format #t "Running cargo phase: ~a~%" phase)
6337 (apply (assoc-ref cargo:%standard-phases phase)
6338 #:cargo-target #$(cargo-triplet)
6339 args))
6340 '(unpack-rust-crates
6341 configure
6342 check-for-pregenerated-files
6343 patch-cargo-checksums)))))))
6344 (native-inputs
6345 (append
6346 (list maturin python-pytest rust `(,rust "cargo"))
6347 (or (and=> (%current-target-system)
6348 (compose list make-rust-sysroot))
6349 '())))
6350 (inputs (cargo-inputs 'python-nh3))
6351 (home-page "https://nh3.readthedocs.io")
6352 (synopsis "Python bindings to Ammonia HTML sanitization library")
6353 (description "This package provides Python bindings to Ammonia HTML
6354sanitizer Rust crate.")
6355 (license license:expat)))
6356
6357(define-public python-noiseprotocol
6358 (package
6359 (name "python-noiseprotocol")
6360 (version "0.3.1")
6361 (source
6362 (origin
6363 (method git-fetch)
6364 (uri (git-reference
6365 (url "https://github.com/plizonczyk/noiseprotocol")
6366 (commit (string-append "v" version))))
6367 (file-name (git-file-name name version))
6368 (sha256
6369 (base32 "1mk0rqpjifdv3v1cjwkdnjbrfmzzjm9f3qqs1r8vii4j2wvhm6am"))))
6370 (build-system pyproject-build-system)
6371 (propagated-inputs (list python-cryptography))
6372 (native-inputs (list python-setuptools python-pytest))
6373 (home-page "https://github.com/plizonczyk/noiseprotocol")
6374 (synopsis "Implementation of Noise Protocol Framework")
6375 (description
6376 "This package provides an implementation of Noise Protocol Framework.")
6377 (license license:expat)))
6378
6379(define-public python-webrtcvad-wheels
6380 (package
6381 (name "python-webrtcvad-wheels")
6382 (version "2.0.14")
6383 (source
6384 (origin
6385 (method git-fetch)
6386 (uri (git-reference
6387 (url "https://github.com/daanzu/py-webrtcvad-wheels")
6388 (commit (string-append "v" version))))
6389 (file-name (git-file-name name version))
6390 (sha256
6391 (base32 "0sqgg8jmg2j14f4h96h0rs42kr460v65lhanps6lhdvj5zp81cbh"))))
6392 (build-system pyproject-build-system)
6393 (native-inputs (list python-psutil python-pytest python-setuptools))
6394 (home-page "https://github.com/daanzu/py-webrtcvad-wheels")
6395 (synopsis "Python interface to the WebRTC Voice Activity Detector (VAD)")
6396 (description
6397 "This package provides a Python interface to the Google
6398@url{https://webrtc.org/, WebRTC} @acronym{VAD, Voice Activity Detector}.")
6399 (license license:expat)))
6400
6401(define-public python-websocket-client
6402 (package
6403 (name "python-websocket-client")
6404 (version "1.8.0")
6405 (source
6406 (origin
6407 (method url-fetch)
6408 (uri (pypi-uri "websocket_client" version))
6409 (sha256
6410 (base32 "1nn3qi5g59j55wfy2z02j6lq2cm281fq0wi406b2yqys8jgxyf9j"))))
6411 (build-system pyproject-build-system)
6412 (arguments
6413 (list
6414 #:test-flags
6415 ;; This test requires networking.
6416 '(list "-k" "not testConnect")))
6417 (native-inputs
6418 (list python-pysocks
6419 python-pytest
6420 python-setuptools
6421 python-websockets
6422 python-wheel))
6423 (home-page "https://github.com/websocket-client/websocket-client")
6424 (synopsis "WebSocket client for Python")
6425 (description "The Websocket-client module provides the low level APIs for
6426WebSocket usage in Python programs.")
6427 (license license:lgpl2.1+)))
6428
6429(define-public python-websocket-client-0.59
6430 (package
6431 (inherit python-websocket-client)
6432 (version "0.59.0")
6433 (source
6434 (origin
6435 (method url-fetch)
6436 (uri (pypi-uri "websocket-client" version))
6437 (sha256
6438 (base32 "0p0cz2mdissq7iw1n7jrmsfir0jfmgs1dvnpnrx477ffx9hbsxnk"))))
6439 (native-inputs
6440 (modify-inputs (package-native-inputs python-websocket-client)
6441 (append python-six)))))
6442
6443(define-public python-purl
6444 (package
6445 (name "python-purl")
6446 (version "1.6")
6447 (source
6448 (origin
6449 (method git-fetch)
6450 (uri (git-reference
6451 (url "https://github.com/codeinthehole/purl")
6452 (commit version)))
6453 (file-name (git-file-name name version))
6454 (sha256
6455 (base32 "01zngf0s0qfsrsk0skn57frbzyscwv8467pfjk6hxdfgdx2wkg95"))))
6456 (build-system pyproject-build-system)
6457 (arguments
6458 (list
6459 #:test-flags #~(list "--pyargs" "./tests")))
6460 (native-inputs (list python-pytest python-setuptools))
6461 (propagated-inputs (list python-six))
6462 (home-page "https://github.com/codeinthehole/purl")
6463 (synopsis "Python package for URL manipulation")
6464 (description "Purl is a Python package for handling URLs.")
6465 (license license:expat)))
6466
6467(define-public python-apiron
6468 (package
6469 (name "python-apiron")
6470 (version "5.1.0")
6471 (source
6472 (origin
6473 (method url-fetch)
6474 (uri (pypi-uri "apiron" version))
6475 (sha256
6476 (base32 "1qwbqn47sf0aqznj1snbv37v8ijx476qqkjf5l9pac7xjkxsr8qk"))))
6477 (build-system pyproject-build-system)
6478 (arguments
6479 (list #:test-flags '(list "-k" "not test_call")))
6480 (propagated-inputs
6481 (list python-requests))
6482 (native-inputs
6483 (list python-pytest python-pytest-cov
6484 python-setuptools python-wheel))
6485 (home-page "https://github.com/ithaka/apiron")
6486 (synopsis "Python wrapper for interacting with RESTful APIs")
6487 (description
6488 "@code{apiron} provides a declarative, structured configuration of
6489services and endpoints with a unified interface for interacting with RESTful
6490APIs.")
6491 (license license:expat)))
6492
6493(define-public python-beren
6494 (package
6495 (name "python-beren")
6496 (version "0.7.0")
6497 (source
6498 (origin
6499 (method git-fetch)
6500 (uri (git-reference
6501 (url "https://github.com/teffalump/beren")
6502 (commit (string-append "v" version))))
6503 (file-name (git-file-name name version))
6504 (sha256
6505 (base32 "19nnvbjx2wypslqklqi0j9fiwypk1a5qwfw1jcabjw03awm1yyrx"))))
6506 (build-system pyproject-build-system)
6507 (arguments
6508 ;; The test tries to open a connection to a remote server.
6509 `(#:tests? #f))
6510 (native-inputs (list python-setuptools))
6511 (propagated-inputs (list python-apiron))
6512 (home-page "https://github.com/teffalump/beren")
6513 (synopsis "REST client for Orthanc DICOM servers")
6514 (description
6515 "@code{beren} provides a REST client for Orthanc, a DICOM server.")
6516 (license license:gpl3+)))
6517
6518(define-public python-requests
6519 (package
6520 (name "python-requests")
6521 (version "2.32.5")
6522 (source (origin
6523 (method url-fetch)
6524 (uri (pypi-uri "requests" version))
6525 (sha256
6526 (base32
6527 "1kypqz701x9s7j4shm1pdnzy4pzx9lmvhwgan0yqa071asn0pfnv"))))
6528 (build-system pyproject-build-system)
6529 (arguments
6530 (list #:test-flags
6531 ;; These require internet access
6532 '(list "--ignore=tests/test_requests.py"
6533 "-k" (string-append "not test_use_proxy_from_environment"
6534 " and not requests.sessions.Session"
6535 " and not requests.models.PreparedRequest"
6536 " and not requests.api.request")
6537 "tests/")))
6538 (propagated-inputs
6539 (list python-certifi
6540 python-charset-normalizer
6541 python-idna
6542 python-urllib3))
6543 (native-inputs
6544 (list python-pytest
6545 python-pytest-mock
6546 python-setuptools))
6547 (home-page "https://requests.readthedocs.io/")
6548 (synopsis "Python HTTP library")
6549 (description
6550 "Requests is a Python HTTP client library. It aims to be easier to use
6551than Python’s urllib2 library.")
6552 (license license:asl2.0)))
6553
6554(define-deprecated/public-alias python-requests-next
6555 python-requests) ;may be removed after 2025-12-01
6556
6557(define-public python-requests-kerberos
6558 (package
6559 (name "python-requests-kerberos")
6560 (version "0.14.0")
6561 ;; No tests in the PyPI tarball.
6562 (source
6563 (origin
6564 (method git-fetch)
6565 (uri (git-reference
6566 (url "https://github.com/requests/requests-kerberos")
6567 (commit (string-append "v" version))))
6568 (file-name (git-file-name name version))
6569 (sha256
6570 (base32 "0s30pcnlir3j2jmf7yh065f294cf3x0x5i3ldskn8mm0a3657mv3"))))
6571 (build-system pyproject-build-system)
6572 (propagated-inputs (list python-cryptography
6573 python-pyspnego
6574 python-requests))
6575 (native-inputs (list python-pytest python-pytest-mock python-setuptools
6576 python-wheel))
6577 (home-page "https://github.com/requests/requests-kerberos")
6578 (synopsis "Kerberos authentication handler for python-requests")
6579 (description "This package provides a Kerberos authentication handler for
6580python-requests.")
6581 (license license:isc)))
6582
6583(define-public python-requests-unixsocket2
6584 (package
6585 (name "python-requests-unixsocket2")
6586 (version "1.0.1")
6587 (source
6588 (origin
6589 (method git-fetch)
6590 (uri (git-reference
6591 (url "https://gitlab.com/thelabnyc/requests-unixsocket2")
6592 (commit (string-append "v" version))))
6593 (sha256
6594 (base32 "0wb8ckagal9d6lfyl3pf9m45xn1krq6vg8kzciwv12chq9wwh0ra"))))
6595 (build-system pyproject-build-system)
6596 (native-inputs
6597 (list nss-certs-for-test
6598 python-hatchling
6599 python-pytest
6600 python-waitress))
6601 (propagated-inputs
6602 (list python-requests
6603 python-urllib3))
6604 (home-page "https://gitlab.com/thelabnyc/requests-unixsocket2")
6605 (synopsis "Talk HTTP via a UNIX domain socket")
6606 (description
6607 "This Python package lets you use the @code{requests} library to talk
6608HTTP via a UNIX domain socket.")
6609 (license license:asl2.0)))
6610
6611(define-deprecated-package python-requests-unixsocket
6612 python-requests-unixsocket2)
6613
6614(define-public python-requests-ntlm
6615 (package
6616 (name "python-requests-ntlm")
6617 (version "1.3.0")
6618 (source
6619 (origin
6620 (method git-fetch)
6621 (uri (git-reference
6622 (url "https://github.com/requests/requests-ntlm")
6623 (commit (string-append "v" version))))
6624 (file-name (git-file-name name version))
6625 (sha256
6626 (base32 "0snsk66zdihdlyfjz2zgpyfgdyjg814m3cc4g3my09hdnb5xvagv"))))
6627 (build-system pyproject-build-system)
6628 (arguments
6629 (list
6630 #:test-flags
6631 ;; XXX: Connection refused.
6632 #~(list "-k" (string-join
6633 (list "not test_ntlm_http_with_cbt"
6634 "test_ntlm_http_without_cbt"
6635 "test_ntlm_https_with_cbt"
6636 "test_ntlm_https_without_cbt")
6637 " and not "))
6638 #:phases
6639 #~(modify-phases %standard-phases
6640 (add-before 'check 'spawn-test-server
6641 (lambda _
6642 ;; Taken from .github/workflows/ci.yml.
6643 (spawn "python"
6644 (list "python" "-m" "tests.test_server")))))))
6645 (propagated-inputs
6646 (list python-cryptography python-pyspnego python-requests))
6647 (native-inputs (list python-flask python-pytest python-setuptools))
6648 (home-page "https://github.com/requests/requests-ntlm")
6649 (synopsis "NTLM authentication support for Requests")
6650 (description
6651 "This package allows for HTTP NTLM authentication using the requests
6652library.")
6653 (license license:isc)))
6654
6655(define-public python-requests-mock
6656 (package
6657 (name "python-requests-mock")
6658 (version "1.12.1")
6659 (source
6660 (origin
6661 (method url-fetch)
6662 (uri (pypi-uri "requests-mock" version))
6663 (sha256
6664 (base32 "008l6xysgs6ax56lairg1li5i4bb04i2z19w5bl5claj7crjxqg9"))))
6665 (build-system pyproject-build-system)
6666 (native-inputs
6667 (list python-purl
6668 python-pytest
6669 python-requests-futures
6670 python-setuptools
6671 python-setuptools-scm
6672 python-testtools))
6673 (propagated-inputs
6674 (list python-requests))
6675 (home-page "https://requests-mock.readthedocs.org/")
6676 (synopsis "Mock out responses from the requests package")
6677 (description
6678 "This module provides a building block to stub out the HTTP requests
6679portions of your testing code.")
6680 (license license:asl2.0)))
6681
6682(define-public python-requests-toolbelt
6683 (package
6684 (name "python-requests-toolbelt")
6685 (version "1.0.0")
6686 (source
6687 (origin
6688 (method url-fetch)
6689 (uri (pypi-uri "requests-toolbelt" version))
6690 (sha256
6691 (base32 "1ijvip427ki177ycrblcn1mfgsq7ixzpvqqfvidjn0a7s2is10bn"))))
6692 (build-system pyproject-build-system)
6693 (arguments
6694 (list
6695 #:test-flags
6696 ;; Requiring networking or fail due not valid certs: AttributeError:
6697 ;; 'MockHTTPResponse' object has no attribute 'close'
6698 #~(list "-k" (string-append "not test_dump_all"
6699 " and not test_dump_response"
6700 " and not test_prepared_request_override_base"
6701 " and not test_prepared_request_with_base"
6702 " and not test_request_override_base"
6703 " and not test_request_with_base"))))
6704 (native-inputs
6705 (list python-betamax
6706 python-mock
6707 python-pyopenssl
6708 python-pytest
6709 python-setuptools
6710 python-trustme
6711 python-wheel))
6712 (propagated-inputs
6713 (list python-requests))
6714 (synopsis "Extensions to python-requests")
6715 (description "This is a toolbelt of useful classes and functions to be used
6716with python-requests.")
6717 (home-page "https://github.com/requests/toolbelt/")
6718 (license license:asl2.0)))
6719
6720(define-public python-requests-ftp
6721 (package
6722 (name "python-requests-ftp")
6723 (version "0.3.1")
6724 (source
6725 (origin
6726 (method git-fetch)
6727 (uri (git-reference
6728 (url "https://github.com/Lukasa/requests-ftp")
6729 (commit (string-append "v" version))))
6730 (file-name (git-file-name name version))
6731 (sha256
6732 (base32 "1c7xbz2fxb12ldaw2pkfg5qd29g6slf4a2gavhqvz26cd1r82ny7"))))
6733 (build-system pyproject-build-system)
6734 (arguments
6735 ;; XXX: No connection adapters found.
6736 (list #:test-flags #~(list "--ignore=tests/test_ftp_proxy.py")))
6737 (native-inputs
6738 (list python-pyftpdlib python-pytest python-setuptools python-six))
6739 (propagated-inputs (list python-requests))
6740 (home-page "https://github.com/Lukasa/requests-ftp")
6741 (synopsis "FTP Transport Adapter for Requests")
6742 (description "Requests-FTP is an implementation of a simple FTP transport
6743adapter for use with the Requests library.")
6744 (license license:asl2.0)))
6745
6746(define-public python-aioftp
6747 (package
6748 (name "python-aioftp")
6749 (version "0.22.3")
6750 (source (origin
6751 (method url-fetch)
6752 (uri (pypi-uri "aioftp" version))
6753 (sha256
6754 (base32
6755 "0w621mg956m9rn7v39jpwi4gpnpl90pprwl29cp640dahqqv38ms"))))
6756 (build-system pyproject-build-system)
6757 (native-inputs
6758 (list python-async-timeout
6759 python-pytest
6760 python-pytest-asyncio
6761 python-pytest-cov
6762 python-setuptools
6763 python-trustme
6764 python-wheel))
6765 (propagated-inputs (list python-siosocks))
6766 (home-page "https://aioftp.readthedocs.io/")
6767 (synopsis "FTP client/server for asyncio in Python")
6768 (description
6769 "FTP client and server for asyncio (Python 3) Library implementing FTP
6770protocol, both client and server for Python asyncio module.
6771
6772 Supported commands as client: USER, PASS, ACCT, PWD, CWD, CDUP, MKD, RMD,
6773 MLSD, MLST, RNFR, RNTO, DELE, STOR, APPE, RETR, TYPE, PASV, ABOR, QUIT,
6774 REST, LIST (as fallback).
6775
6776 Supported commands as server: USER, PASS, QUIT, PWD, CWD, CDUP, MKD, RMD,
6777 MLSD, LIST (non-standard), MLST, RNFR, RNTO, DELE, STOR, RETR,
6778 TYPE (\"I\" and \"A\"), PASV, ABOR, APPE, REST.")
6779 (license license:asl2.0)))
6780
6781(define-public python-mohawk
6782 (let ((commit "b7899166880e890f01cf2531b5686094ba08df8f")
6783 (revision "0"))
6784 (package
6785 (name "python-mohawk")
6786 (version (git-version "1.1.0" revision commit))
6787 (source
6788 (origin
6789 (method git-fetch)
6790 (uri (git-reference
6791 (url "https://github.com/kumar303/mohawk")
6792 (commit commit)))
6793 (file-name (git-file-name name version))
6794 (sha256
6795 (base32 "00y9fimcj851rk2770wqk61fac9pnxfnzca4fvsci57zw18i50m6"))
6796 (patches
6797 (search-patches "python-mohawk-pytest.patch"))))
6798 (build-system pyproject-build-system)
6799 (arguments
6800 (list #:test-flags #~(list "mohawk/tests.py")))
6801 (native-inputs (list python-pytest python-setuptools))
6802 (propagated-inputs (list python-six)) ;TODO: remove python-mohawk when
6803 ;python-six is removed?
6804 (home-page "https://github.com/kumar303/mohawk")
6805 (synopsis "Library for Hawk HTTP authorization")
6806 (description
6807 "Mohawk is an alternate Python implementation of the Hawk HTTP
6808authorization scheme.")
6809 (license license:bsd-3))))
6810
6811(define-public python-msal
6812 (package
6813 (name "python-msal")
6814 (version "1.34.0")
6815 (home-page
6816 "https://github.com/AzureAD/microsoft-authentication-library-for-python")
6817 (source
6818 (origin
6819 (method git-fetch)
6820 (uri (git-reference
6821 (url home-page)
6822 (commit version)))
6823 (file-name (git-file-name name version))
6824 (sha256
6825 (base32 "1xcyiv742ihnzypjw7syamnhqffdy6wsvvv0f5jcl3pap0apbk0z"))
6826 (patches (search-patches "python-msal-requests.patch"))))
6827 (build-system pyproject-build-system)
6828 (arguments
6829 (list
6830 #:test-flags
6831 #~(list
6832 "--ignore=tests/test_benchmark.py"
6833 ;; XXX: Ignoring cryptography version scheme tests.
6834 "-k"
6835 "not test_ceiling_should_be_latest_cryptography_version_plus_three"
6836 ;; XXX: These tests try to access the network.
6837 "--ignore=tests/test_application.py"
6838 "--ignore=tests/test_ccs.py"
6839 ;; XXX: These tests assume they are run on Windows.
6840 "--ignore=tests/test_mi.py")
6841 #:phases
6842 #~(modify-phases %standard-phases
6843 (add-after 'unpack 'set-cryptography-version
6844 (lambda _
6845 (substitute* "tests/test_cryptography.py"
6846 (("^latest_cryptography_version = @version@")
6847 (format #f "latest_cryptography_version = ~s"
6848 #$(package-version
6849 (this-package-input "python-cryptography")))))))
6850 (add-before 'check 'configure-tests
6851 (lambda* (#:key tests? #:allow-other-keys)
6852 (when tests?
6853 (setenv "TRAVIS_TAG" "1")))))))
6854 (native-inputs
6855 (list nss-certs-for-test python-mock python-pytest python-setuptools))
6856 (propagated-inputs (list python-cryptography python-pyjwt python-requests))
6857 (synopsis "Microsoft Authentication Library (MSAL) for Python")
6858 (description
6859 "The Microsoft Authentication Library for Python enables applications to
6860integrate with the Microsoft identity platform. It allows you to sign in
6861users or apps with Microsoft identities (Azure AD, Microsoft Accounts and
6862Azure AD B2C accounts) and obtain tokens to call Microsoft APIs such as
6863Microsoft Graph or your own APIs registered with the Microsoft identity
6864platform. It is built using industry standard OAuth2 and OpenID Connect
6865protocols.")
6866 (license license:expat)))
6867
6868(define-public oauth2ms
6869 (let ((commit "a1ef0cabfdea57e9309095954b90134604e21c08")
6870 (revision "0"))
6871 (package
6872 (name "oauth2ms")
6873 (version (git-version "0.0.0" revision commit))
6874 (source (origin
6875 (method git-fetch)
6876 (uri (git-reference
6877 (url "https://github.com/harishkrupo/oauth2ms")
6878 (commit commit)))
6879 (file-name (git-file-name name version))
6880 (sha256
6881 (base32
6882 "0dqi6n4npdrvb42r672n4sl1jl8z5lsk554fwiiihpj0faa9dx64"))))
6883 (build-system copy-build-system)
6884 (arguments
6885 (list #:install-plan #~`(("oauth2ms" "bin/oauth2ms")
6886 ("." #$(string-append "share/doc/" name "-"
6887 version "/")
6888 #:include-regexp ("\\.org$")))
6889 #:phases #~(modify-phases %standard-phases
6890 (add-after 'install 'wrap-pythonpath
6891 (lambda* (#:key inputs outputs #:allow-other-keys)
6892 (let ((path (getenv "GUIX_PYTHONPATH")))
6893 (wrap-program (string-append #$output
6894 "/bin/oauth2ms")
6895 `("GUIX_PYTHONPATH" ":" prefix
6896 (,path)))))))))
6897 (inputs (list bash-minimal python python-gnupg python-msal python-pyxdg))
6898 (home-page "https://github.com/harishkrupo/oauth2ms")
6899 (synopsis "XOAUTH2 compatible Microsoft Office 365 token fetcher")
6900 (description
6901 "Oauth2ms can be used to fetch OAuth 2.0 tokens from the Microsoft Identity
6902endpoint. Additionally, it can encode the token in the XOAUTH2 format to be
6903used as authentication in IMAP mail servers.")
6904 (license license:asl2.0))))
6905
6906(define-public python-oauthlib
6907 (package
6908 (name "python-oauthlib")
6909 (version "3.3.1")
6910 (source
6911 (origin
6912 (method git-fetch)
6913 (uri (git-reference
6914 (url "https://github.com/oauthlib/oauthlib")
6915 (commit (string-append "v" version))))
6916 (file-name (git-file-name name version))
6917 (sha256
6918 (base32 "0aa38lpa6s1k56v7w7kw2w4l159kaz4gn03m698a8hfdjkx92fb5"))))
6919 (build-system pyproject-build-system)
6920 (native-inputs (list python-pytest python-pytest-cov python-mock
6921 python-setuptools))
6922 (propagated-inputs (list python-cryptography python-pyjwt python-blinker))
6923 (home-page "https://github.com/oauthlib/oauthlib")
6924 (synopsis "OAuth implementation for Python")
6925 (description
6926 "Oauthlib is a generic, spec-compliant, thorough implementation of the
6927OAuth request-signing logic.")
6928 (license license:bsd-3)))
6929
6930(define-public python-urllib3
6931 (package
6932 (name "python-urllib3")
6933 (version "2.5.0")
6934 (source
6935 (origin
6936 (method url-fetch)
6937 (uri (pypi-uri "urllib3" version))
6938 (sha256
6939 (base32
6940 "0q17z6zlpyjv9ax5c3d30qwp9fwhz2sc4gbb7yyd86g4qwrpgi1z"))))
6941 (build-system pyproject-build-system)
6942 (arguments `(#:tests? #f))
6943 (native-inputs
6944 (list python-hatch-vcs
6945 python-hatchling
6946 python-setuptools-scm))
6947 (propagated-inputs
6948 (append
6949 ;; These 5 inputs are used to build urrlib3[secure]
6950 (list python-certifi)
6951 (if (member (%current-system)
6952 (package-transitive-supported-systems python-cryptography))
6953 (list python-cryptography)
6954 '())
6955 (list python-idna)
6956 (if (member (%current-system)
6957 (package-transitive-supported-systems python-pyopenssl))
6958 (list python-pyopenssl)
6959 '())
6960 (list python-pysocks)))
6961 (home-page "https://urllib3.readthedocs.io/")
6962 (synopsis "HTTP library with thread-safe connection pooling")
6963 (description
6964 "Urllib3 supports features left out of urllib and urllib2 libraries. It
6965can reuse the same socket connection for multiple requests, it can POST files,
6966supports url redirection and retries, and also gzip and deflate decoding.")
6967 (license license:expat)))
6968
6969(define-public python-urllib3-1.25
6970 (package
6971 (inherit python-urllib3)
6972 (version "1.25.19")
6973 (source
6974 (origin
6975 (method url-fetch)
6976 (uri (pypi-uri "urllib3" version))
6977 (sha256
6978 (base32
6979 "09rmjqm5syhhc8fx3v06h3yv6cqy0b1081jg8wm5grpwpr72j61h"))))
6980 (native-inputs
6981 (list python-setuptools
6982 python-wheel))))
6983
6984(define-public python-urllib3-1.26
6985 (package
6986 (inherit python-urllib3)
6987 (version "1.26.17")
6988 (source
6989 (origin
6990 (method url-fetch)
6991 (uri (pypi-uri "urllib3" version))
6992 (sha256
6993 (base32
6994 "08fzhaf77kbjj5abpl9xag6fpfxkdp1k5s7sqd3ayacdq91a5mi4"))))
6995 (native-inputs
6996 (list python-setuptools
6997 python-wheel))))
6998
6999(define-public python-awscrt
7000 (package
7001 (name "python-awscrt")
7002 (version "0.26.1")
7003 (source
7004 (origin
7005 (method url-fetch)
7006 (uri (pypi-uri "awscrt" version))
7007 (sha256
7008 (base32 "0plkc0i0gc6z8fqnyy8kbg43sv3jnv8shcavcz0wb134riykmmm8"))))
7009 (build-system pyproject-build-system)
7010 (arguments
7011 (list
7012 #:test-backend #~'unittest
7013 #:test-flags #~(list "discover" "--verbose")
7014 #:phases
7015 #~(modify-phases %standard-phases
7016 (add-after 'unpack 'disable-broken-tests
7017 (lambda _
7018 ;; Disable broken tests. These tests fail because the
7019 ;; certificate bundle at the default location does not exist.
7020 (substitute* "test/test_auth.py"
7021 (("def test_default_provider")
7022 "def _test_default_provider"))
7023 (substitute* "test/test_http_client.py"
7024 (("def test_h2_client")
7025 "def _test_h2_client"))
7026 (substitute* "test/test_s3.py"
7027 (("def test_sanity")
7028 "def _test_sanity")
7029 (("def test_sanity_secure")
7030 "def _test_sanity_secure")
7031 (("def test_wait_shutdown")
7032 "def _test_wait_shutdown"))))
7033 (add-after 'unpack 'override-cert-bundle-location
7034 (lambda* (#:key inputs #:allow-other-keys)
7035 (let ((bundle (search-input-file inputs
7036 "/etc/ssl/certs/ca-certificates.crt")))
7037 (setenv "SSL_CERT_FILE" bundle)
7038 (substitute* "awscrt/io.py"
7039 (("( +)opt = TlsContextOptions\\(\\)" m indent)
7040 (string-append m "\n"
7041 indent "import os\n"
7042 indent "\
7043opt.override_default_trust_store_from_path(None, os.getenv('SSL_CERT_FILE')) if os.getenv('SSL_CERT_FILE') else None\n")))
7044 (substitute* "test/appexit_http.py"
7045 (("( +)tls_ctx_opt = awscrt.io.TlsContextOptions.*" m indent)
7046 (string-append m indent
7047 "tls_ctx_opt.override_default_trust_store_from_path(None, '"
7048 bundle "')\n")))
7049 (substitute* "test/test_io.py"
7050 (("( +)opt = TlsContextOptions\\(\\).*" m indent)
7051 (string-append m indent
7052 "opt.override_default_trust_store_from_path(None, '"
7053 bundle "')\n"))))))
7054 (add-after 'unpack 'use-system-libraries
7055 (lambda _
7056 (setenv "AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO" "1"))))))
7057 (inputs (list openssl))
7058 (native-inputs (list cmake-minimal
7059 nss-certs-for-test
7060 python-boto3
7061 python-setuptools
7062 python-websockets))
7063 (home-page "https://github.com/awslabs/aws-crt-python")
7064 (synopsis "Common runtime for AWS Python projects")
7065 (description
7066 "This package provides a common runtime for AWS Python projects.")
7067 (license license:asl2.0)))
7068
7069(define-public awscli
7070 (package
7071 ;; Note: updating awscli typically requires updating botocore as well.
7072 (name "awscli")
7073 (version "1.42.61")
7074 (source
7075 (origin
7076 (method git-fetch)
7077 (uri (git-reference
7078 (url "https://github.com/aws/aws-cli")
7079 (commit version)))
7080 (file-name (git-file-name name version))
7081 (sha256
7082 (base32 "1fbqh4w7jj5abn87nbhyir25hdviirj0lblcdsqqkadcjh67877h"))))
7083 (build-system pyproject-build-system)
7084 (arguments
7085 (list
7086 ;; tests: 2692 passed, 40 warnings
7087 #:test-flags
7088 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
7089 ;; Compete test suite is huge and compute hungry, run just unit
7090 ;; tests.
7091 "--ignore=tests/dependencies"
7092 "--ignore=tests/functional"
7093 "--ignore=tests/integration"
7094 ;; TypeError: 'Mock' object is not subscriptable.
7095 "-k" "not test_no_groff_or_mandoc_exists")
7096 #:phases
7097 #~(modify-phases %standard-phases
7098 (add-after 'unpack 'fix-reference-to-groff
7099 (lambda _
7100 ;; XXX: Consider to use wrap-program instead, it tries to parse
7101 ;; the PATH.
7102 (substitute* "awscli/help.py"
7103 (("if self._exists_on_path\\('groff'\\):") "if 'groff':")
7104 (("raise ExecutableNotFoundError\\('groff'\\)") "")
7105 (("cmdline = \\['groff'")
7106 (format #f "cmdline = ['~a/bin/groff'"
7107 #$(this-package-input "groff-minimal"))))))
7108 (add-before 'check 'set-environment
7109 (lambda _
7110 ;; PermissionError: [Errno 13] Permission denied:
7111 ;; '/homeless-shelter'
7112 (setenv "HOME" "/tmp"))))))
7113 (native-inputs
7114 (list python-pytest
7115 python-pytest-xdist
7116 python-setuptools
7117 python-wheel))
7118 (inputs
7119 (list groff-minimal
7120 python-botocore
7121 python-colorama
7122 python-docutils-0.19
7123 python-pyyaml
7124 python-rsa-for-awscli-1
7125 python-s3transfer))
7126 (home-page "https://aws.amazon.com/cli/")
7127 (synopsis "Command line client for AWS")
7128 (description
7129 "AWS CLI provides a unified command line interface to the Amazon Web
7130Services (AWS) API.")
7131 (license license:asl2.0)))
7132
7133(define-public awscli-2
7134 (package
7135 (inherit awscli)
7136 ;; Note: updating awscli-2 typically requires updating python-awscrt.
7137 (name "awscli")
7138 ;; Upstream practices a very rapid (1h-1d) release cycles try to select
7139 ;; any fresh one compatible with current state of dependencies in Guix.
7140 (version "2.28.0")
7141 (source
7142 (origin
7143 (method git-fetch)
7144 (uri (git-reference
7145 (url "https://github.com/aws/aws-cli")
7146 (commit version)))
7147 (file-name (git-file-name name version))
7148 (sha256
7149 (base32
7150 "1a1jzvdm434x46yh7ir11lw0nzc64ns4qvxhp5wfra3rh5ykf36j"))))
7151 (build-system pyproject-build-system)
7152 (arguments
7153 (list
7154 ;; When updating and checking locally be very patient as build phase may
7155 ;; hang for 6-8 minutes but eventually passes through.
7156 ;;
7157 ;; tests: 4189 passed, 1 skipped, 2 warnings
7158 #:test-flags
7159 '(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
7160 ;; Full test suite contains more than 70k tests; ignore network
7161 ;; dependent, slow and compute intense tests, keep just unit
7162 ;; tests.
7163 "--ignore=tests/backends"
7164 "--ignore=tests/dependencies"
7165 "--ignore=tests/functional"
7166 "--ignore=tests/integration"
7167 "--ignore=tests/unit/botocore"
7168 ;; Flaky, something to do with PATH disappearing from os.environ?
7169 ;; Passes when run on its own, so maybe something else is
7170 ;; modifying this during the test run.
7171 "--ignore=tests/unit/customizations/emr/test_emr_utils.py"
7172 ;; TypeError: 'Mock' object is not subscriptable
7173 "-k" "not test_no_groff_or_mandoc_exists")
7174 #:phases
7175 #~(modify-phases %standard-phases
7176 (add-after 'unpack 'ignore-deprecations
7177 (lambda _
7178 (substitute* "pyproject.toml"
7179 (("\"error::") "\"ignore::"))))
7180 (add-after 'unpack 'fix-reference-to-groff
7181 (lambda* (#:key inputs #:allow-other-keys)
7182 (substitute* "awscli/help.py"
7183 (("if self._exists_on_path\\('groff'\\):") "if True:")
7184 (("cmdline = \\['groff'")
7185 (string-append "cmdline = ['"
7186 (search-input-file inputs "bin/groff")
7187 "'")))))
7188 (add-before 'check 'pre-check
7189 (lambda _ (setenv "HOME" "/tmp"))))))
7190 (inputs
7191 (list groff
7192 ;; less
7193 nss-certs-for-test
7194 python-awscrt
7195 python-colorama
7196 python-dateutil
7197 python-distro
7198 python-docutils
7199 python-jmespath
7200 python-prompt-toolkit
7201 python-ruamel.yaml
7202 python-ruamel.yaml.clib
7203 python-urllib3))
7204 (native-inputs
7205 (list python-flit-core
7206 python-pytest
7207 python-pytest-xdist))))
7208
7209(define-public python-wsgiproxy2
7210 (package
7211 (name "python-wsgiproxy2")
7212 (version "0.5.1")
7213 (source
7214 (origin
7215 (method git-fetch)
7216 (uri (git-reference
7217 (url "https://github.com/gawel/WSGIProxy2/")
7218 (commit version)))
7219 (file-name (git-file-name name version))
7220 (sha256
7221 (base32 "0aw9ibla2cqzlbm3vzyk1yk3d8pccpbpdkqx99q30hq1fz1izsm2"))))
7222 (build-system pyproject-build-system)
7223 (arguments (list #:test-backend #~'unittest))
7224 (native-inputs (list python-webtest python-setuptools))
7225 (propagated-inputs (list python-requests python-six python-urllib3
7226 python-webob))
7227 (home-page "https://github.com/gawel/WSGIProxy2/")
7228 (synopsis "WSGI Proxy with various http client backends")
7229 (description
7230 "WSGI turns HTTP requests into WSGI function calls. WSGIProxy turns WSGI
7231function calls into HTTP requests. It also includes code to sign requests and
7232pass private data, and to spawn subprocesses to handle requests.")
7233 (license license:expat)))
7234
7235(define-public python-pastedeploy
7236 (package
7237 (name "python-pastedeploy")
7238 (version "3.1.0")
7239 (source
7240 (origin
7241 (method url-fetch)
7242 (uri (pypi-uri "PasteDeploy" version))
7243 (sha256
7244 (base32 "15as15mgz9xn33abwrp0x0mbj537ib3q47z8ky5475c05wasznwx"))))
7245 (build-system pyproject-build-system)
7246 (native-inputs (list python-pytest python-pytest-cov python-setuptools))
7247 (home-page "https://pylonsproject.org/")
7248 (synopsis "Load, configure, and compose WSGI applications and servers")
7249 (description
7250 "This tool provides code to load WSGI applications and servers from URIs;
7251these URIs can refer to Python Eggs for INI-style configuration files. Paste
7252Script provides commands to serve applications based on this configuration
7253file.")
7254 (license license:expat)))
7255
7256(define-public python-webtest
7257 (package
7258 (name "python-webtest")
7259 (version "3.0.6")
7260 (source
7261 (origin
7262 (method url-fetch)
7263 (uri (pypi-uri "webtest" version))
7264 (sha256
7265 (base32 "0jwl8i9xvm5xim1h2jrwfbqac1g3fpiazfdwfp2md3s4899gsmj2"))))
7266 (build-system pyproject-build-system)
7267 (arguments
7268 ;; Tests require python-pyquery, which creates a circular dependency.
7269 `(#:tests? #f))
7270 (native-inputs
7271 (list python-setuptools))
7272 (propagated-inputs
7273 (list python-beautifulsoup4
7274 python-waitress
7275 python-webob))
7276 (home-page "https://docs.pylonsproject.org/projects/webtest/")
7277 (synopsis "Helper to test WSGI applications")
7278 (description
7279 "Webtest allows you to test your Python web applications without
7280starting an HTTP server. It supports anything that supports the minimum of
7281WSGI.")
7282 (license license:expat)))
7283
7284(define-public python-flask
7285 (package
7286 (name "python-flask")
7287 (version "3.1.0")
7288 (source
7289 (origin
7290 (method url-fetch)
7291 (uri (pypi-uri "flask" version))
7292 (sha256
7293 (base32 "1b1nb250jxrjplbs21wnwq69250vs3iz2pdhs7cwi5y8hi8kr1sz"))))
7294 (build-system pyproject-build-system)
7295 (native-inputs
7296 (list python-flit-core
7297 python-pytest))
7298 (propagated-inputs
7299 (list python-asgiref ;async extra
7300 python-click
7301 python-blinker
7302 python-importlib-metadata
7303 python-itsdangerous
7304 python-jinja2
7305 python-werkzeug))
7306 (home-page "https://palletsprojects.com/p/flask/")
7307 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
7308 (description "Flask is a micro web framework based on the Werkzeug toolkit
7309and Jinja2 template engine. It is called a micro framework because it does not
7310presume or force a developer to use a particular tool or library.")
7311 (license license:bsd-3)))
7312
7313(define-public python-flask-compress
7314 (package
7315 (name "python-flask-compress")
7316 (version "1.18")
7317 (source (origin
7318 (method url-fetch)
7319 (uri (pypi-uri "flask_compress" version))
7320 (sha256
7321 (base32
7322 "0fj1r0ixsjls7z3a2zzamxppjz4qcf8q4jcmn74gsk9kisyy3fpx"))))
7323 (build-system pyproject-build-system)
7324 (native-inputs
7325 (list python-flask-caching
7326 python-pytest
7327 python-setuptools
7328 python-setuptools-scm))
7329 (propagated-inputs
7330 (list python-brotli
7331 python-flask
7332 python-pyzstd))
7333 (home-page "https://github.com/colour-science/flask-compress")
7334 (synopsis "Compress responses in a Flask app")
7335 (description
7336 "This package lets you compress Flask application responses and static
7337files with gzip, deflate or brotli. Flask-Compress both adds the various
7338headers required for a compressed response and compresses the response data.")
7339 (license license:expat)))
7340
7341(define-public python-flask-seasurf
7342 (package
7343 (name "python-flask-seasurf")
7344 (version "2.0.0")
7345 (source (origin
7346 (method url-fetch)
7347 (uri (pypi-uri "Flask-SeaSurf" version))
7348 (sha256
7349 (base32
7350 "0g5dsm2ikv8q4qcrb2446pbs972l5wkxyfmxsriqdsl02nz06h4f"))))
7351 (build-system pyproject-build-system)
7352 (arguments
7353 (list #:tests? #false)) ;there are none
7354 (propagated-inputs (list python-flask))
7355 (native-inputs (list python-setuptools python-wheel))
7356 (home-page "https://github.com/maxcountryman/flask-seasurf/")
7357 (synopsis "CSRF extension for Flask")
7358 (description "SeaSurf is a Flask extension for preventing cross-site
7359request forgery (CSRF). CSRF attacks are problematic because the mechanism
7360they use is relatively easy to exploit. This extension attempts to aid you in
7361securing your application from such attacks. This extension is based on the
7362Django middleware.")
7363 (license license:bsd-3)))
7364
7365(define-public python-flask-wtf
7366 (package
7367 (name "python-flask-wtf")
7368 (version "1.2.2")
7369 (source
7370 (origin
7371 (method url-fetch)
7372 (uri (pypi-uri "Flask-WTF" version))
7373 (sha256
7374 (base32
7375 "0sv6hjva1fdizb7sr46230pplx8qz8rnb4bxrfy71xbc8cgfxlkr"))))
7376 (build-system pyproject-build-system)
7377 (propagated-inputs
7378 (list python-flask python-flask python-itsdangerous python-wtforms))
7379 (native-inputs
7380 (list python-hatchling python-pytest))
7381 (home-page "https://github.com/lepture/flask-wtf")
7382 (synopsis "Simple integration of Flask and WTForms")
7383 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
7384upload, and reCAPTCHA.")
7385 (license license:bsd-3)))
7386
7387(define-public python-flask-multistatic
7388 (package
7389 (name "python-flask-multistatic")
7390 (version "1.0")
7391 (source
7392 (origin
7393 (method url-fetch)
7394 (uri (pypi-uri "flask-multistatic" version))
7395 (sha256
7396 (base32
7397 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
7398 (build-system pyproject-build-system)
7399 (arguments (list #:tests? #f)) ; No tests upstream.
7400 (native-inputs (list python-setuptools))
7401 (propagated-inputs (list python-flask))
7402 (home-page "https://pagure.io/flask-multistatic")
7403 (synopsis "Flask plugin to allow overriding static files")
7404 (description "@code{flask-multistatic} is a flask plugin that adds support
7405for overriding static files.")
7406 (license license:gpl3+)))
7407
7408(define-public python-responses
7409 (package
7410 (name "python-responses")
7411 (version "0.25.3")
7412 (source (origin
7413 (method url-fetch)
7414 (uri (pypi-uri "responses" version))
7415 (sha256
7416 (base32
7417 "1fld6lsa143md4lxccwxq9iyqm9d8a05i9sp7lqjibnrmd3r4yv1"))))
7418 (build-system pyproject-build-system)
7419 (native-inputs
7420 (list python-pytest
7421 python-pytest-asyncio
7422 python-pytest-httpserver
7423 python-setuptools
7424 python-tomli
7425 python-tomli-w
7426 python-wheel))
7427 (propagated-inputs
7428 (list python-requests
7429 python-pyyaml
7430 python-urllib3))
7431 (home-page "https://github.com/getsentry/responses")
7432 (synopsis "Utility for mocking out the `requests` Python library")
7433 (description "A utility library for mocking out the `requests` Python
7434library.")
7435 (license license:asl2.0)))
7436
7437(define-public python-grequests
7438 (let ((commit "60f70e99e942a2df378b4e4f6202dcf862754c2d")
7439 (revision "0"))
7440 (package
7441 (name "python-grequests")
7442 (version (git-version "0.7.0" revision commit))
7443 (source
7444 (origin
7445 (method git-fetch)
7446 (uri (git-reference
7447 (url "https://github.com/kennethreitz/grequests")
7448 (commit commit)))
7449 (file-name (git-file-name name version))
7450 (sha256
7451 (base32 "0132yv1rr4pmrmwasrnasqbnd80pi6rgy52608731p7lidkmxz9a"))))
7452 (build-system pyproject-build-system)
7453 (arguments
7454 (list
7455 ;; XXX: Most failing tests seem to be caused by network access,
7456 ;; but there is no easy/flag way to disable tests selectively.
7457 #:tests? #f
7458 #:test-backend #~'unittest
7459 #:test-flags #~(list "tests.py")))
7460 (propagated-inputs (list python-gevent python-requests))
7461 (native-inputs (list python-setuptools))
7462 (home-page "https://github.com/kennethreitz/grequests")
7463 (synopsis "Python library for asynchronous HTTP requests")
7464 (description
7465 "GRequests is a Python library that allows you to use @code{Requests}
7466with @code{Gevent} to make asynchronous HTTP Requests easily.")
7467 (license license:bsd-2))))
7468
7469(define-public python-gwebsockets
7470 (package
7471 (name "python-gwebsockets")
7472 (version "0.7")
7473 (source
7474 (origin
7475 (method git-fetch)
7476 (uri (git-reference
7477 (url "https://github.com/sugarlabs/gwebsockets")
7478 (commit (string-append "v" version))))
7479 (file-name (git-file-name name version))
7480 (sha256
7481 (base32 "0w422yz0qdix5xb6aqrrci1s1hy4whncspwb03m9ankqww0s1yv2"))))
7482 (build-system pyproject-build-system)
7483 (arguments (list #:tests? #f)) ; No tests upstream.
7484 (native-inputs (list python-setuptools))
7485 (propagated-inputs (list python-pygobject))
7486 (home-page "https://github.com/sugarlabs/gwebsockets")
7487 (synopsis "GLib based websockets server")
7488 (description
7489 "This package provides a websocket server written in Python. It uses GIO
7490for network communication and hence it easily integrates with the GLib
7491mainloop.")
7492 (license license:asl2.0)))
7493
7494(define-public python-dpkt
7495 (package
7496 (name "python-dpkt")
7497 (version "1.9.8")
7498 (source
7499 (origin
7500 (method git-fetch)
7501 (uri (git-reference
7502 (url "https://github.com/kbandla/dpkt")
7503 (commit (string-append "v" version))))
7504 (file-name (git-file-name name version))
7505 (sha256
7506 (base32 "0dhy8l4sqfxqdda6lishb95g3v6hnw14l20ipqpzb6vaw1vf7mzj"))))
7507 (build-system pyproject-build-system)
7508 (arguments
7509 (list
7510 #:test-flags
7511 #~(list "--pyargs" "dpkt")))
7512 (native-inputs (list python-pytest python-pytest-cov python-setuptools))
7513 (home-page "https://github.com/kbandla/dpkt")
7514 (synopsis "Packet generator and parser for TCP/IP protocols")
7515 (description
7516 "The dpkt module is a fast, simple packet generator and parser for the
7517basic TCP/IP protocols.")
7518 (license license:bsd-3)))
7519
7520(define-public python-geventhttpclient
7521 (package
7522 (name "python-geventhttpclient")
7523 (version "2.3.3")
7524 (source (origin
7525 (method git-fetch)
7526 (uri (git-reference
7527 (url "https://github.com/geventhttpclient/geventhttpclient")
7528 (commit version)
7529 (recursive? #true)))
7530 (file-name (git-file-name name version))
7531 (sha256
7532 (base32
7533 "1ya0i0fbx054mfx5d1k75fcf64xzp7vva8lkwwzan41xbnc56nyj"))))
7534 (build-system pyproject-build-system)
7535 (arguments
7536 (list
7537 #:test-flags
7538 ;; Disable network tests.
7539 '(list "-k"
7540 (string-append "not test_client_simple"
7541 " and not test_client_ssl"
7542 " and not test_client_with_default_headers"
7543 " and not test_client_without_leading_slash"
7544 " and not test_download"
7545 " and not test_fail_invalid_ca_certificate"
7546 " and not test_httpbin_multipart"
7547 " and not test_multi_queries_greenlet_safe"
7548 " and not test_no_form_encode_header"
7549 " and not test_no_form_encoded_header"
7550 " and not test_request_with_headers"
7551 " and not test_response_context_manager"
7552 " and not test_urllib_request"))))
7553 (native-inputs (list nss-certs-for-test
7554 python-dpkt python-pytest python-requests
7555 python-setuptools python-wheel))
7556 (propagated-inputs (list python-brotli python-certifi python-gevent
7557 python-urllib3))
7558 (home-page "https://github.com/geventhttpclient/geventhttpclient")
7559 (synopsis "HTTP client library for gevent")
7560 (description "@code{python-geventhttpclient} is a high performance,
7561concurrent HTTP client library for python using @code{gevent}.")
7562 (license license:expat)))
7563
7564(define-public python-gevent-websocket
7565 (package
7566 (name "python-gevent-websocket")
7567 (version "0.10.1")
7568 (source
7569 (origin
7570 (method url-fetch)
7571 (uri (pypi-uri "gevent-websocket" version))
7572 (sha256
7573 (base32 "1c2zv2rahp1gil3cj66hfsqgy0n35hz9fny3ywhr2319d0lz7bky"))))
7574 (build-system pyproject-build-system)
7575 (arguments
7576 (list #:tests? #f)) ; no tests in PyPI or git
7577 (native-inputs
7578 (list python-setuptools
7579 python-wheel))
7580 (propagated-inputs
7581 (list python-gevent))
7582 (home-page "https://gitlab.com/noppo/gevent-websocket")
7583 (synopsis "Websocket handler for the gevent pywsgi server")
7584 (description
7585 "Websocket handler for the gevent pywsgi server, a Python network
7586library.
7587
7588Features include:
7589@itemize
7590@item integration on both socket level or using an abstract interface
7591@item RPC and PubSub framework using @acronym{WebSocket Application Messaging
7592Protocol, WAMP}
7593@item easily extendible using a simple WebSocket protocol plugin API
7594@end itemize")
7595 (license license:asl2.0)))
7596
7597(define-public python-requests-oauthlib
7598 (package
7599 (name "python-requests-oauthlib")
7600 (version "2.0.0")
7601 (source
7602 (origin
7603 (method git-fetch)
7604 (uri (git-reference (url
7605 "https://github.com/requests/requests-oauthlib")
7606 (commit (string-append "v" version))))
7607 (file-name (git-file-name name version))
7608 (sha256 (base32 "0i0vnanxqilnf2rgng7n96rl8fzq0dbcl3rpl7zkxj50kv66nqwl"))))
7609 (build-system pyproject-build-system)
7610 (arguments
7611 (list
7612 #:test-flags
7613 #~(list
7614 "--ignore=tests/test_core.py" ; requires network access.
7615 "--ignore=tests/examples/test_native_spa_pkce_auth0.py"
7616 "-k" "not test_fetch_access_token"))) ; flaky tests.
7617 (native-inputs
7618 (list python-requests-mock python-pytest python-setuptools))
7619 (propagated-inputs
7620 (list python-oauthlib python-requests))
7621 (home-page "https://github.com/requests/requests-oauthlib")
7622 (synopsis "OAuthlib authentication support for Requests")
7623 (description
7624 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
7625provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
7626 (license license:isc)))
7627
7628(define-public python-cachecontrol
7629 (package
7630 (name "python-cachecontrol")
7631 (version "0.14.1")
7632 (source
7633 (origin
7634 (method git-fetch)
7635 ;; Pypi does not have tests.
7636 (uri (git-reference
7637 (url "https://github.com/ionrock/cachecontrol")
7638 (commit (string-append "v" version))))
7639 (file-name (git-file-name name version))
7640 (sha256
7641 (base32
7642 "07ifs4dhahhsgj4vxgfl5ymnmb4my5l2wb8jiinn6fncszcfmr59"))))
7643 (build-system pyproject-build-system)
7644 (arguments
7645 ;; Versions > 0.11.6 depend on CherryPy for testing.
7646 ;; It's too much work to package CherryPy for now.
7647 `(#:tests? #f))
7648 (propagated-inputs
7649 (list python-filelock python-lockfile python-msgpack python-requests))
7650 (native-inputs
7651 (list python-flit-core))
7652 (home-page "https://github.com/ionrock/cachecontrol")
7653 (synopsis "The httplib2 caching algorithms for use with requests")
7654 (description "CacheControl is a port of the caching algorithms in
7655@code{httplib2} for use with @code{requests} session objects.")
7656 (license license:asl2.0)))
7657
7658(define-public python-betamax
7659 (package
7660 (name "python-betamax")
7661 (version "0.9.0")
7662 (source
7663 (origin
7664 (method url-fetch)
7665 (uri (pypi-uri "betamax" version))
7666 (sha256
7667 (base32
7668 "152zil1j4gl1whnldi08zwjr4z2bnlbd061kr3ipjs5wg4b6wcc2"))))
7669 (build-system pyproject-build-system)
7670 (arguments
7671 (list
7672 #:test-flags
7673 #~(list "-k" (string-join
7674 ;; Tests require network access to http://httpbin.org/get.
7675 (list "not test_creates_new_cassettes"
7676 "test_placeholders_work"
7677 "test_post_start_hook"
7678 "test_pre_stop_hook"
7679 "test_preplayback_hook"
7680 "test_prerecord_hook"
7681 "test_prerecord_ignoring_hook"
7682 "test_records_new_events_with_existing_cassette"
7683 "test_records_new_interaction"
7684 "test_records_new_interactions"
7685 "test_replaces_old_interactions"
7686 "test_replays_response_from_cassette"
7687 "test_requests_with_json_body"
7688 "test_saves_content_as_gzip"
7689 "test_unicode_is_saved_properly")
7690 " and not "))))
7691 (native-inputs
7692 (list nss-certs-for-test
7693 python-pytest
7694 python-setuptools))
7695 (propagated-inputs
7696 (list python-requests))
7697 (home-page "https://github.com/sigmavirus24/betamax")
7698 (synopsis "Record HTTP interactions with python-requests")
7699 (description
7700 "Betamax will record your test suite's HTTP interactions and replay them
7701during future tests. It is designed to work with python-requests.")
7702 (license license:expat)))
7703
7704(define-public python-betamax-matchers
7705 (package
7706 (name "python-betamax-matchers")
7707 (version "0.4.0")
7708 (source
7709 (origin
7710 (method git-fetch)
7711 (uri (git-reference
7712 (url "https://github.com/sigmavirus24/betamax_matchers")
7713 (commit version)))
7714 (file-name (git-file-name name version))
7715 (sha256
7716 (base32 "0lyg3r91hwfvavyi5k6sddcla37igigycfv1mx40c32byqwl6pq5"))))
7717 (build-system pyproject-build-system)
7718 (native-inputs (list python-pytest python-setuptools))
7719 (propagated-inputs (list python-betamax python-requests-toolbelt))
7720 (home-page "https://github.com/sigmavirus24/betamax_matchers")
7721 (synopsis "VCR imitation for python-requests")
7722 (description "@code{betamax-matchers} provides a set of Matchers for
7723Betamax.")
7724 (license license:asl2.0)))
7725
7726(define-public python-betamax-serializers
7727 (package
7728 (name "python-betamax-serializers")
7729 (version "0.2.1")
7730 (source
7731 (origin
7732 (method git-fetch)
7733 (uri (git-reference
7734 (url "https://gitlab.com/betamax/serializers")
7735 (commit version)))
7736 (file-name (git-file-name name version))
7737 (sha256
7738 (base32 "1p2l5w3vwvjacs2ndahgcjq55qb53i37p8mz1zh85pjxyszdyw2l"))))
7739 (build-system pyproject-build-system)
7740 (arguments (list #:tests? #f)) ; No tests.
7741 (native-inputs (list python-setuptools))
7742 (propagated-inputs (list python-betamax python-pyyaml))
7743 (synopsis "Set of third-party serializers for Betamax")
7744 (description
7745 "Betamax-Serializers are an experimental set of Serializers for Betamax
7746that may possibly end up in the main package.")
7747 (home-page "https://gitlab.com/betamax/serializers")
7748 (license license:asl2.0)))
7749
7750(define-public python-s3fs
7751 (package
7752 (name "python-s3fs")
7753 (version "2025.9.0")
7754 (source
7755 (origin
7756 (method url-fetch)
7757 (uri (pypi-uri "s3fs" version))
7758 (sha256
7759 (base32 "0c5w09ryyfwlrqbhxgn1yl2kl1ksmz2481vjs1l4k9lyy5z2ai3d"))))
7760 (build-system pyproject-build-system)
7761 ;; TODO: Many tests fail with "No such file or directory" raised by the
7762 ;; HTTP client.
7763 (arguments (list #:tests? #false))
7764 (native-inputs
7765 (list python-setuptools))
7766 (propagated-inputs
7767 (list python-aiobotocore
7768 python-aiohttp
7769 python-fsspec))
7770 (home-page "https://github.com/fsspec/s3fs/")
7771 (synopsis "Convenient filesystem interface over S3")
7772 (description "This package provides a convenient filesystem interface over
7773S3.")
7774 (license license:bsd-3)))
7775
7776(define-public python-s3transfer
7777 (package
7778 (name "python-s3transfer")
7779 (version "0.14.0")
7780 (source
7781 (origin
7782 (method url-fetch)
7783 (uri (pypi-uri "s3transfer" version))
7784 (sha256
7785 (base32 "09a17scf96zfdw2chb22yyvmnj4anfijgkncfi89id68wxj25wgg"))))
7786 (build-system pyproject-build-system)
7787 (arguments
7788 (list
7789 #:test-flags
7790 #~(list "--numprocesses" (number->string (parallel-job-count))
7791 ;; Tests require networking.
7792 "--ignore" "tests/integration")))
7793 (native-inputs
7794 (list python-pytest
7795 python-pytest-xdist
7796 python-setuptools))
7797 (propagated-inputs
7798 (list python-botocore))
7799 (home-page "https://github.com/boto/s3transfer")
7800 (synopsis "Amazon S3 Transfer Manager")
7801 (description
7802 "S3transfer is a Python library for managing Amazon S3 transfers.")
7803 (license license:asl2.0)))
7804
7805(define-public python-flask-restful
7806 (package
7807 (name "python-flask-restful")
7808 (version "0.3.10")
7809 (source
7810 (origin
7811 (method url-fetch)
7812 (uri (pypi-uri "Flask-RESTful" version))
7813 (sha256
7814 (base32
7815 "0dzckjjz3aw8nmisr5g9mnv02s2nqlhblykr9ydqzpr703pz4jpy"))))
7816 (build-system pyproject-build-system)
7817 (arguments
7818 ;; See <https://github.com/flask-restful/flask-restful/issues/980>.
7819 (list #:tests? #f))
7820 (propagated-inputs
7821 (list python-aniso8601 python-flask python-pytz))
7822 (native-inputs
7823 (list python-blinker
7824 python-mock
7825 python-pytest
7826 python-setuptools
7827 python-wheel))
7828 (home-page "https://github.com/flask-restful/flask-restful/")
7829 (synopsis "Flask module for creating REST APIs")
7830 (description
7831 "This package contains a Flask module for creating REST APIs.")
7832 (license license:bsd-3)))
7833
7834(define-public python-flask-sqlalchemy
7835 (package
7836 (name "python-flask-sqlalchemy")
7837 (version "3.1.1")
7838 (source (origin
7839 (method url-fetch)
7840 (uri (pypi-uri "flask_sqlalchemy" version))
7841 (sha256
7842 (base32
7843 "04l3dfivznlpvk9p9f20zdbyxl869k42z2w7glddlbc0h6w8pdp4"))))
7844 (build-system pyproject-build-system)
7845 (arguments
7846 (list
7847 #:test-flags
7848 #~(list "-k" (string-append "not test_explicit_table[db2]"
7849 " and not test_explicit_table[db4]"))))
7850 (native-inputs
7851 (list python-flit-core
7852 python-pytest))
7853 (propagated-inputs
7854 (list python-flask
7855 python-sqlalchemy-2))
7856 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
7857 (synopsis "Module adding SQLAlchemy support to your Flask application")
7858 (description
7859 "This package adds SQLAlchemy support to your Flask application.")
7860 (license license:bsd-3)))
7861
7862(define-public python-flask-restful-swagger
7863 (package
7864 (name "python-flask-restful-swagger")
7865 (version "0.20.1")
7866 ;; XXX: Unbundle minified javascript.
7867 (source
7868 (origin
7869 (method git-fetch)
7870 (uri (git-reference
7871 (url "https://github.com/rantav/flask-restful-swagger")
7872 (commit version)))
7873 (file-name (git-file-name name version))
7874 (sha256
7875 (base32 "1ppdwn25ijf8b3zchxkvwj4ipc68v3p522i8mm51jm0w6mg5bvsh"))))
7876 (build-system pyproject-build-system)
7877 (arguments (list #:tests? #f)) ; No tests.
7878 (native-inputs (list python-setuptools))
7879 (propagated-inputs (list python-flask-restful python-six))
7880 (home-page "https://github.com/rantav/flask-restful-swagger")
7881 (synopsis "Extract Swagger specs from Flask-Restful projects")
7882 (description "This package lets you extract Swagger API documentation
7883specs from your Flask-Restful projects.")
7884 (license license:expat)))
7885
7886(define-public python-htmlmin
7887 (package
7888 (name "python-htmlmin")
7889 (version "0.1.12")
7890 (source
7891 (origin
7892 (method url-fetch)
7893 (uri (pypi-uri "htmlmin" version))
7894 (sha256
7895 (base32
7896 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
7897 (build-system pyproject-build-system)
7898 (arguments
7899 (list #:tests? #f)) ; no tests
7900 (native-inputs (list python-setuptools))
7901 (home-page "https://htmlmin.readthedocs.org/en/latest/")
7902 (synopsis "HTML minifier")
7903 (description "@code{htmlmin} is an HTML minifier that just works.
7904It comes with safe defaults and easily configurable options.")
7905 (license license:bsd-3)))
7906
7907;; XXX: Forked renamed and updated version.
7908(define-public python-htmlmin2
7909 (package/inherit python-htmlmin
7910 (name "python-htmlmin2")
7911 (version "0.1.13")
7912 (source
7913 (origin
7914 (method git-fetch)
7915 (uri (git-reference
7916 (url "https://github.com/wilhelmer/htmlmin")
7917 (commit (string-append "v" version))))
7918 (file-name (git-file-name name version))
7919 (sha256
7920 (base32 "1y7mcx8d451hwa1wrg2lffg7ccdy3w5m7xwb5xqp8h2852pypfh2"))))
7921 (build-system pyproject-build-system)
7922 (arguments (list #:test-backend #~'unittest))
7923 (native-inputs (list python-setuptools))
7924 (home-page "https://github.com/wilhelmer/htmlmin")
7925 (description
7926 "@code{htmlmin2} is an HTML minifier that just works. It comes with safe
7927defaults and easily configurable options. This variant is an updated fork of
7928the original @code{python-htmlmin}.")
7929 (license license:bsd-3)))
7930
7931(define-public python-flask-htmlmin
7932 (package
7933 (name "python-flask-htmlmin")
7934 (version "3.0.0")
7935 (source
7936 (origin
7937 (method git-fetch)
7938 (uri (git-reference
7939 (url "https://github.com/hamidfzm/Flask-HTMLmin")
7940 (commit (string-append "v" version))))
7941 (file-name (git-file-name name version))
7942 (sha256
7943 (base32 "0ybqssnqwa9zgv61azp5r1grgnq28ypfhr80p9rp61x2z0y0zl32"))))
7944 (build-system pyproject-build-system)
7945 (native-inputs (list python-pytest python-setuptools))
7946 (propagated-inputs (list python-cssmin python-flask python-htmlmin2))
7947 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
7948 (synopsis "HTML response minifier for Flask")
7949 (description
7950 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
7951 (license license:bsd-3)))
7952
7953(define-public python-jsmin
7954 (package
7955 (name "python-jsmin")
7956 (version "3.0.1")
7957 (source
7958 (origin
7959 (method url-fetch)
7960 (uri (pypi-uri "jsmin" version))
7961 (sha256
7962 (base32
7963 "1z1brjsvni0260bypldkl8a05sgp0qk18x560zl44igr3q99m5f0"))))
7964 (build-system pyproject-build-system)
7965 (arguments (list #:test-backend #~'unittest))
7966 (native-inputs
7967 (list python-setuptools))
7968 (home-page "https://github.com/tikitu/jsmin/")
7969 (synopsis "Python JavaScript minifier")
7970 (description
7971 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
7972on the command line.")
7973 (license license:expat)))
7974
7975(define-public python-flask-login
7976 (package
7977 (name "python-flask-login")
7978 (version "0.6.3")
7979 (source
7980 (origin
7981 (method git-fetch)
7982 (uri (git-reference
7983 (url "https://github.com/maxcountryman/flask-login")
7984 (commit version)))
7985 (file-name (git-file-name name version))
7986 (sha256
7987 (base32 "0wk3dni5qssmbn8ii3hsh89qa3kwr97i92k27bzgsgxvvsfwwzja"))))
7988 (build-system pyproject-build-system)
7989 (propagated-inputs
7990 (list python-flask))
7991 (native-inputs
7992 ;; For tests.
7993 (list python-blinker
7994 python-mock
7995 python-pytest
7996 python-semantic-version
7997 python-setuptools
7998 python-werkzeug
7999 python-wheel))
8000 (home-page "https://github.com/maxcountryman/flask-login")
8001 (synopsis "User session management for Flask")
8002 (description
8003 "@code{Flask-Login} provides user session management for Flask. It
8004handles the common tasks of logging in, logging out, and remembering your
8005users' sessions over extended periods of time.")
8006 (license license:expat)))
8007
8008(define-public python-oauth2client
8009 (package
8010 (name "python-oauth2client")
8011 (version "4.1.3")
8012 (source
8013 (origin
8014 (method git-fetch)
8015 (uri (git-reference
8016 (url "https://github.com/google/oauth2client/")
8017 (commit (string-append "v" version))))
8018 (file-name (git-file-name name version))
8019 (sha256
8020 (base32 "0xm19dv5kmi82zzrx3d4mp326irr3x37q818hlspz514dzjq2ad1"))))
8021 (build-system pyproject-build-system)
8022 (arguments
8023 (list #:tests? #f))
8024 (native-inputs
8025 (list python-setuptools))
8026 (propagated-inputs
8027 (list python-httplib2
8028 python-pyasn1
8029 python-pyasn1-modules
8030 python-pyparsing
8031 python-rsa
8032 python-six))
8033 (home-page "https://github.com/google/oauth2client/")
8034 (synopsis "OAuth 2.0 client library")
8035 (description "@code{python-oauth2client} provides an OAuth 2.0 client
8036library for Python")
8037 (license license:asl2.0)))
8038
8039(define-public python-authlib
8040 (package
8041 (name "python-authlib")
8042 (version "1.5.1")
8043 (source
8044 (origin
8045 (method url-fetch)
8046 (uri (pypi-uri "authlib" version))
8047 (sha256
8048 (base32 "0blpvz2v2r8yvsgm1yr3n61mhwxvh1b0kyf2rp0i4wv6n3n8bg2w"))))
8049 (build-system pyproject-build-system)
8050 ;; No tests target.
8051 (arguments (list #:tests? #false))
8052 (propagated-inputs
8053 (list python-cryptography
8054 python-django
8055 python-flask
8056 python-httpx
8057 python-requests
8058 python-sqlalchemy-2
8059 python-starlette
8060 python-werkzeug))
8061 (native-inputs (list python-pytest python-setuptools python-wheel))
8062 (home-page "https://pypi.org/project/Authlib/1")
8063 (synopsis "Build OAuth and OpenID Connect servers and clients")
8064 (description
8065 "This is a Python library for building OAuth and OpenID Connect servers
8066and clients.")
8067 (license license:bsd-3)))
8068
8069(define-public python-flask-oidc
8070 (package
8071 (name "python-flask-oidc")
8072 (version "2.3.1")
8073 (source
8074 (origin
8075 (method url-fetch)
8076 (uri (pypi-uri "flask_oidc" version))
8077 (sha256
8078 (base32
8079 "1200xhqiqlqfmrq54v2p6cf3nny86njjw8r7sk5j59hlk9a683zk"))))
8080 (build-system pyproject-build-system)
8081 (propagated-inputs
8082 (list python-authlib
8083 python-blinker
8084 python-flask
8085 python-requests
8086 python-responses))
8087 (native-inputs
8088 (list python-pytest python-poetry-core))
8089 (home-page "https://github.com/puiterwijk/flask-oidc")
8090 (synopsis "OpenID Connect extension for Flask")
8091 (description "@code{python-flask-oidc} provides an OpenID Connect extension
8092for Flask.")
8093 (license license:bsd-2)))
8094
8095(define-public python-webassets
8096 (package
8097 (name "python-webassets")
8098 (version "3.0.0")
8099 (source
8100 (origin
8101 (method git-fetch)
8102 (uri (git-reference
8103 (url "https://github.com/miracle2k/webassets")
8104 (commit version)))
8105 (file-name (git-file-name name version))
8106 (sha256
8107 (base32 "11hxvdqw86q6r665iryjzwx21ys8jh2c63mw016ldr6j49l0zyyh"))))
8108 (build-system pyproject-build-system)
8109 (propagated-inputs (list python-pyyaml python-zope-dottedname))
8110 (native-inputs (list python-hatchling python-pytest))
8111 (home-page "https://github.com/miracle2k/webassets")
8112 (synopsis "Media asset management")
8113 (description
8114 "This package provides utilities to merge, minify and compress Javascript
8115and CSS files,supporting a variety of different filters, including YUI, jsmin,
8116jspacker or CSS tidy. It also supports URL rewriting in CSS files.")
8117 (license license:bsd-2)))
8118
8119(define-public python-cssmin
8120 (package
8121 (name "python-cssmin")
8122 (version "0.2.0")
8123 (source
8124 (origin
8125 (method git-fetch)
8126 (uri (git-reference
8127 (url "https://github.com/zacharyvoase/cssmin")
8128 (commit (string-append "v" version))))
8129 (file-name (git-file-name name version))
8130 (sha256
8131 (base32 "04bzpal6j26pjjjf3p7iq6g2wcr61j4g0ygqz6h847h4hsyah9qg"))))
8132 (build-system pyproject-build-system)
8133 (arguments (list #:tests? #f)) ; No tests.
8134 (native-inputs (list python-setuptools))
8135 (home-page "https://github.com/zacharyvoase/cssmin")
8136 (synopsis "Python port of the YUI CSS Compressor")
8137 (description "Python port of the YUI CSS Compressor.")
8138 (license (list license:expat license:bsd-3))))
8139
8140(define-public python-elastic-transport
8141 (package
8142 (name "python-elastic-transport")
8143 (version "9.1.0")
8144 (source
8145 (origin
8146 (method url-fetch)
8147 (uri (pypi-uri "elastic_transport" version))
8148 (sha256
8149 (base32 "0g879z8rqrfbwkxsm6xcycjha1swl7gdgs6m0y0j1zmh4m5f940m"))))
8150 (build-system pyproject-build-system)
8151 (arguments
8152 (list
8153 #:test-flags
8154 ;; Deselect failing tests (mostly due to network not reachable)
8155 #~(list "-k"
8156 (string-append
8157 "not .badssl.com"
8158 " and not test_assert_fingerprint_in_cert_chain_failure"))
8159 #:phases
8160 #~(modify-phases %standard-phases
8161 (add-after 'unpack 'fix-pytest-config
8162 (lambda _
8163 ;; Drop test coverage requirements.
8164 (substitute* "setup.cfg"
8165 (("--cov(-[^ ]*)?=[^ ]*") "\n")))))))
8166 (propagated-inputs (list python-certifi python-urllib3))
8167 (native-inputs (list nss-certs-for-test
8168 python-aiohttp
8169 ;; python-furo
8170 python-httpx
8171 python-opentelemetry-api
8172 python-opentelemetry-sdk
8173 python-orjson
8174 python-pytest
8175 python-pytest-asyncio
8176 ;; python-pytest-cov
8177 python-pytest-httpbin
8178 python-pytest-httpserver
8179 python-pytest-mock
8180 python-requests
8181 python-respx ;test
8182 python-setuptools
8183 ;; python-sphinx
8184 ;; python-sphinx-autodoc-typehints
8185 python-trustme
8186 python-wheel))
8187 (home-page "https://github.com/elastic/elastic-transport-python")
8188 (synopsis "Common library for Python Elastic client libraries")
8189 (description
8190 "This library was lifted from @code{elasticsearch-py} and then transformed to
8191be used across all Elastic services rather than only Elasticsearch. It
8192provides transport classes and utilities shared among Python Elastic client
8193libraries.")
8194 ;; Apache-2.0 in setup.py and LICENSE file.
8195 (license license:asl2.0)))
8196
8197(define-public python-elasticsearch
8198 (package
8199 (name "python-elasticsearch")
8200 (version "9.1.1")
8201 (source
8202 (origin
8203 (method git-fetch) ; no tests in PyPI release
8204 (uri (git-reference
8205 (url "https://github.com/elastic/elasticsearch-py")
8206 (commit (string-append "v" version))))
8207 (file-name (git-file-name name version))
8208 (sha256
8209 (base32 "015x73y84nyigcyg00lh32p2pfrqf834fr7clfnzymgzrrxa73jf"))))
8210 (build-system pyproject-build-system)
8211 (native-inputs
8212 (list nss-certs-for-test
8213 python-aiohttp
8214 python-dateutil
8215 python-mock
8216 python-orjson
8217 python-pytest
8218 python-pytest-asyncio
8219 python-pytest-cov
8220 python-pytz
8221 python-pyyaml
8222 python-requests
8223 python-hatchling))
8224 (propagated-inputs
8225 (list python-certifi
8226 python-elastic-transport))
8227 (home-page "https://github.com/elastic/elasticsearch-py")
8228 (synopsis "Low-level client for Elasticsearch")
8229 (description "Official low-level client for Elasticsearch. Its goal is to
8230provide common ground for all Elasticsearch-related code in Python; because of
8231this it tries to be opinion-free and very extendable.")
8232 ;; Apache-2.0 in setup.py and LICENSE file.
8233 (license license:asl2.0)))
8234
8235(define-public python-engineio
8236 (package
8237 (name "python-engineio")
8238 (version "4.12.2")
8239 (source
8240 (origin
8241 (method url-fetch)
8242 (uri (pypi-uri "python_engineio" version))
8243 (sha256
8244 (base32
8245 "1ynyf3n29biwkm6nwzzwzhr4m19lsir1x5azxq2nl7xyw7zi5rz7"))))
8246 (build-system pyproject-build-system)
8247 (arguments
8248 (list
8249 #:test-flags
8250 #~(list "-k"
8251 "not test_static_file_routing and not test_static_files")))
8252 (native-inputs
8253 (list python-pytest
8254 python-pytest-asyncio
8255 python-setuptools
8256 python-tornado))
8257 (propagated-inputs
8258 (list python-aiohttp
8259 python-requests
8260 python-simple-websocket
8261 python-websocket-client))
8262 (home-page "https://github.com/miguelgrinberg/python-engineio/")
8263 (synopsis "Engine.IO server")
8264 (description "This package provides a Python implementation of the
8265@code{Engine.IO} realtime client and server.")
8266 (license license:expat)))
8267
8268(define-public python-ephemeral-port-reserve
8269 (package
8270 (name "python-ephemeral-port-reserve")
8271 (version "1.1.4")
8272 (source
8273 (origin
8274 (method git-fetch) ;no tests in PyPI archvie
8275 (uri (git-reference
8276 (url "https://github.com/Yelp/ephemeral-port-reserve")
8277 (commit (string-append "v" version))))
8278 (file-name (git-file-name name version))
8279 (sha256
8280 (base32 "1ifmf5zcw7mhbm73awmf5jwc4rw8lhk81mn4zp797lwkysjm38s7"))))
8281 (build-system pyproject-build-system)
8282 (native-inputs
8283 (list python-pytest
8284 python-setuptools
8285 python-wheel))
8286 (home-page "https://github.com/Yelp/ephemeral-port-reserve/")
8287 (synopsis "Find an unused port, reliably")
8288 (description
8289 "Bind to an ephemeral port, force it into the TIME_WAIT state, and unbind
8290it.")
8291 (license license:expat)))
8292
8293(define-public python-flask-migrate
8294 (package
8295 (name "python-flask-migrate")
8296 (version "4.1.0")
8297 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
8298 (source (origin
8299 (method git-fetch)
8300 (uri (git-reference (url home-page)
8301 (commit (string-append "v" version))))
8302 (file-name (git-file-name name version))
8303 (sha256
8304 (base32
8305 "09qw1hhyssa5gahm199x67d55c55m3k9m23xp2bdacwsiv8jw57g"))))
8306 (build-system pyproject-build-system)
8307 (propagated-inputs
8308 (list python-flask python-alembic python-flask-sqlalchemy))
8309 (native-inputs
8310 (list python-pytest python-setuptools python-wheel))
8311 (synopsis "SQLAlchemy database migrations for Flask programs using
8312Alembic")
8313 (description "This package contains SQLAlchemy database migration tools
8314for Flask programs that are using @code{python-alembic}.")
8315 (license license:expat)))
8316
8317(define-public python-genshi
8318 (package
8319 (name "python-genshi")
8320 (version "0.7.10")
8321 (source
8322 (origin
8323 (method git-fetch)
8324 (uri (git-reference
8325 (url "https://github.com/edgewall/genshi")
8326 (commit version)))
8327 (file-name (git-file-name name version))
8328 (sha256
8329 (base32 "1dmf0ggp0s3371jv483kjriw9jscawxcik6q70a0wqjdfh5383i6"))))
8330 (build-system pyproject-build-system)
8331 (arguments (list #:test-backend #~'unittest))
8332 (native-inputs (list python-setuptools))
8333 (propagated-inputs (list python-six))
8334 (home-page "https://genshi.edgewall.org/")
8335 (synopsis "Toolkit for generation of output for the web")
8336 (description "Genshi is a Python library that provides an integrated set
8337of components for parsing, generating, and processing HTML, XML or other
8338textual content for output generation on the web.")
8339 (license license:bsd-3)))
8340
8341(define-public python-flask-principal
8342 (package
8343 (name "python-flask-principal")
8344 (version "0.4.0")
8345 (source
8346 (origin
8347 (method git-fetch)
8348 (uri (git-reference
8349 (url "https://github.com/pallets-eco/flask-principal")
8350 (commit version)))
8351 (file-name (git-file-name name version))
8352 (sha256
8353 (base32 "0hcqcj768inmyfsw1y2vk6pa9p22dh138ll809rhpz9vjz6spnqk"))))
8354 (build-system pyproject-build-system)
8355 (propagated-inputs (list python-blinker))
8356 (native-inputs (list python-flask python-pynose python-setuptools))
8357 (home-page "https://github.com/pallets-eco/flask-principal")
8358 (synopsis "Identity management for Flask")
8359 (description
8360 "@code{flask_principal} is a identity management library for Flask. It
8361supports managing both authentication and authorization data in a thread-local
8362variable.")
8363 (license license:expat)))
8364
8365(define-public python-flask-httpauth
8366 (package
8367 (name "python-flask-httpauth")
8368 (version "4.8.0")
8369 (source
8370 (origin
8371 (method url-fetch)
8372 (uri (pypi-uri "Flask-HTTPAuth" version))
8373 (sha256
8374 (base32
8375 "0yh9fn6pak64has89pcy03f1cn198vkil872y5jjr53kph2qlmk6"))))
8376 (build-system pyproject-build-system)
8377 (propagated-inputs (list python-flask))
8378 (native-inputs
8379 (list nss-certs-for-test
8380 python-pytest
8381 python-setuptools
8382 python-wheel))
8383 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
8384 (synopsis "Basic and Digest HTTP authentication for Flask routes")
8385 (description "@code{flask_httpauth} provides Basic and Digest HTTP
8386authentication for Flask routes.")
8387 (license license:expat)))
8388
8389(define-public python-uritemplate
8390 (package
8391 (name "python-uritemplate")
8392 (version "4.2.0")
8393 (source
8394 (origin
8395 (method url-fetch)
8396 (uri (pypi-uri "uritemplate" version))
8397 (sha256
8398 (base32
8399 "03lxxkk0kjn6z7z1f9hqvsaqfrny1qds7vi36f35b2c7h38jw328"))))
8400 (build-system pyproject-build-system)
8401 (native-inputs (list python-pytest python-setuptools))
8402 (home-page "https://uritemplate.readthedocs.io/")
8403 (synopsis "Library to deal with URI Templates")
8404 (description "@code{uritemplate} provides Python library to deal with URI
8405Templates.")
8406 ;; The software is made available under the terms of *either* of the
8407 ;; licenses found in LICENSE.APACHE or LICENSE.BSD. Contributions
8408 ;; are made under *both* licenses (excerpt from the LICENSE file).
8409 (license (list license:bsd-2 license:asl2.0))))
8410
8411(define-public python-uritemplate-3
8412 (package
8413 (inherit python-uritemplate)
8414 (name "python-uritemplate")
8415 (version "3.0.1")
8416 (source (origin
8417 (method url-fetch)
8418 (uri (pypi-uri "uritemplate" version))
8419 (sha256
8420 (base32 "1bkwmgr0ia9gcn4bszs2xlvml79f0bi2s4a87xg22ky9rq8avy2s"))))))
8421
8422(define-public python-publicsuffix
8423 (package
8424 (name "python-publicsuffix")
8425 (version "1.1.0")
8426 (source (origin
8427 (method url-fetch)
8428 (uri (pypi-uri "publicsuffix" version))
8429 (sha256
8430 (base32
8431 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
8432 (build-system python-build-system)
8433 (arguments
8434 `(#:tests? #f)) ; tests use the internet
8435 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
8436 (synopsis "Get suffix for a domain name")
8437 (description "Get a public suffix for a domain name using the Public Suffix
8438List.")
8439 (license license:expat)))
8440
8441(define-public python-publicsuffix2
8442 (package
8443 (name "python-publicsuffix2")
8444 (version "2.2019-12-21")
8445 (source
8446 (origin
8447 (method git-fetch)
8448 (uri (git-reference
8449 (url "https://github.com/pombredanne/python-publicsuffix2")
8450 (commit (string-append "release-" version))))
8451 (file-name (git-file-name name version))
8452 (sha256
8453 (base32 "1dkvfvl0izq9hqzilnw8ipkbgjs9xyad9p21i3864hzinbh0wp9r"))))
8454 (build-system pyproject-build-system)
8455 (arguments
8456 (list
8457 #:tests? #f ;the test suite requires network access
8458 #:phases
8459 #~(modify-phases %standard-phases
8460 (add-after 'unpack 'ignore-maintainer-inputs
8461 (lambda _
8462 ;; Comment out a demand for python-requests, which is used only by
8463 ;; the unused ‘update_psl’ helper command.
8464 (substitute* "setup.py"
8465 (("'requests " match)
8466 (format #f "# ~a" match))))))))
8467 (native-inputs (list python-setuptools))
8468 (home-page "https://github.com/pombredanne/python-publicsuffix2")
8469 (synopsis
8470 "Get a public suffix for a domain name using the Public Suffix List")
8471 (description
8472 "Get a public suffix for a domain name using the Public Suffix List.
8473Forked from and using the same API as the publicsuffix package.")
8474 (license (list license:expat license:mpl2.0))))
8475
8476(define-public python-werkzeug
8477 (package
8478 (name "python-werkzeug")
8479 (version "3.1.3")
8480 (source
8481 (origin
8482 (method url-fetch)
8483 (uri (pypi-uri "werkzeug" version))
8484 (sha256
8485 (base32
8486 "0ij7si3aa3ykac7k7fz481h4majqqwn2iqwhjxkji4y18plkqwk0"))))
8487 (build-system pyproject-build-system)
8488 (arguments
8489 (list
8490 #:test-flags
8491 ;; Test requiring networking setup.
8492 #~(list "--ignore=tests/test_serving.py"
8493 "--deselect=tests/test_debug.py::test_basic"
8494 "--deselect=tests/test_exceptions.py::test_response_body"
8495 "--deselect=tests/middleware/test_http_proxy.py::test_http_proxy")))
8496 (native-inputs
8497 (list python-flit-core
8498 python-pytest
8499 python-watchdog
8500 python-ephemeral-port-reserve
8501 python-pytest-timeout
8502 python-pytest-xprocess))
8503 (propagated-inputs
8504 (list python-markupsafe
8505 python-requests))
8506 (home-page "https://palletsprojects.com/p/werkzeug/")
8507 (synopsis "Utilities for WSGI applications")
8508 (description "One of the most advanced WSGI utility modules. It includes a
8509powerful debugger, full-featured request and response objects, HTTP utilities to
8510handle entity tags, cache control headers, HTTP dates, cookie handling, file
8511uploads, a powerful URL routing system and a bunch of community-contributed
8512addon modules.")
8513 (license license:x11)))
8514
8515(define-public python-werkzeug-1.0
8516 (package
8517 (inherit python-werkzeug)
8518 (version "1.0.1")
8519 (source (origin
8520 (method url-fetch)
8521 (uri (pypi-uri "Werkzeug" version))
8522 (sha256
8523 (base32
8524 "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c"))
8525 (patches (search-patches "python-werkzeug-tests.patch"))))
8526 (arguments
8527 (list
8528 #:phases
8529 '(modify-phases %standard-phases
8530 (add-after 'unpack 'ignore-warnings
8531 (lambda _
8532 (substitute* "setup.cfg"
8533 ((" error.*") "")))))))
8534 (propagated-inputs
8535 (list python-requests))
8536 (native-inputs
8537 (list python-pytest python-pytest-timeout python-setuptools
8538 python-wheel))))
8539
8540(define-public python-bottle
8541 (package
8542 (name "python-bottle")
8543 (version "0.13.4")
8544 (source
8545 (origin
8546 (method url-fetch)
8547 (uri (pypi-uri "bottle" version))
8548 (sha256
8549 (base32 "0irz5i3h73pqz0ssgp3yk12zx33q7lrlh8p0in9jgchjgqr7hzkq"))))
8550 (build-system pyproject-build-system)
8551 (native-inputs (list python-pytest python-setuptools))
8552 (home-page "https://bottlepy.org/")
8553 (synopsis "WSGI framework for small web-applications")
8554 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
8555 (license license:expat)))
8556
8557(define-public python-wtforms
8558 (package
8559 (name "python-wtforms")
8560 (version "3.1.2")
8561 (source
8562 (origin
8563 (method url-fetch)
8564 (uri (pypi-uri "wtforms" version))
8565 (sha256
8566 (base32 "1fblnkzvs6339glwx8bskdjy7nhn2ap90y9g6b399713sy063mzq"))))
8567 (build-system pyproject-build-system)
8568 (native-inputs (list python-hatchling python-pytest))
8569 (propagated-inputs (list python-babel python-email-validator
8570 python-markupsafe))
8571 (home-page "https://wtforms.readthedocs.io/")
8572 (synopsis
8573 "Form validation and rendering library for Python web development")
8574 (description
8575 "WTForms is a flexible forms validation and rendering library
8576for Python web development. It is very similar to the web form API
8577available in Django, but is a standalone package.")
8578 (license license:bsd-3)))
8579
8580(define-public python-wtforms-sqlalchemy
8581 (package
8582 (name "python-wtforms-sqlalchemy")
8583 (version "0.4.1")
8584 (source
8585 (origin
8586 (method url-fetch)
8587 (uri (pypi-uri "WTForms-SQLAlchemy" version))
8588 (sha256
8589 (base32 "1nx4x0ifanlbrzh3f9ns8ihnchlkzf54ilvqmgcgcz2j72vm43rp"))))
8590 (build-system pyproject-build-system)
8591 (native-inputs (list python-pytest python-setuptools python-wheel))
8592 (propagated-inputs (list python-sqlalchemy python-wtforms))
8593 (home-page "https://github.com/wtforms/wtforms-sqlalchemy/")
8594 (synopsis "SQLAlchemy tools for WTForms")
8595 (description
8596 "WTForms-SQLAlchemy is a fork of the @code{wtforms.ext.sqlalchemy}
8597package from WTForms. The package has been renamed to
8598@code{wtforms_sqlalchemy} but otherwise should function the same as
8599@code{wtforms.ext.sqlalchemy} did.")
8600 (license license:bsd-3)))
8601
8602(define-public python-urlgrabber
8603 (package
8604 (name "python-urlgrabber")
8605 (version "4.1.0")
8606 (source
8607 (origin
8608 (method url-fetch)
8609 (uri (pypi-uri "urlgrabber" version))
8610 (sha256
8611 (base32 "0fg16zlw49cw7pjq9dhpc5vd35d5zz1mlki55m464qxfmfpzhnh7"))))
8612 (build-system pyproject-build-system)
8613 (arguments
8614 (list
8615 #:tests? #f ; Most tests require network access.
8616 #:phases
8617 #~(modify-phases %standard-phases
8618 (replace 'check
8619 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8620 (when tests?
8621 (invoke "python" "test/runtests.py")))))))
8622 (native-inputs (list python-setuptools))
8623 (propagated-inputs
8624 (list python-pycurl python-setuptools python-six))
8625 (home-page "http://urlgrabber.baseurl.org/") ; no HTTPS
8626 (synopsis "High-level cross protocol url-grabber")
8627 (description
8628 "@code{urlgrabber} is a library that unifies access to files available on
8629the web, FTP or locally. It supports HTTP, FTP and file:// protocols, it
8630supports features like HTTP keep-alive, reget, throttling and more.")
8631 (license license:lgpl2.1+)))
8632
8633(define-public python-pycares
8634 (package
8635 (name "python-pycares")
8636 (version "4.11.0")
8637 (source
8638 (origin
8639 (method git-fetch)
8640 (uri (git-reference
8641 (url "https://github.com/saghul/pycares")
8642 (commit (string-append "v" version))))
8643 (file-name (git-file-name name version))
8644 (sha256
8645 (base32 "18syxp9bpm70zfiw427p7cpp6wg0ybrw6b32c1zvdp2i8jgd82xl"))
8646 (snippet #~(begin
8647 (rmdir "deps/c-ares")))))
8648 (build-system pyproject-build-system)
8649 (arguments
8650 (list
8651 ;; XXX: Half of the tests require internet access
8652 ;; There is currently no markers to avoid running them.
8653 #:tests? #f
8654 #:phases
8655 #~(modify-phases %standard-phases
8656 (add-after 'unpack 'configure-system-lib
8657 (lambda _
8658 (setenv "PYCARES_USE_SYSTEM_LIB" "1"))))))
8659 (native-inputs (list python-pytest python-setuptools))
8660 (inputs (list c-ares))
8661 (propagated-inputs (list python-cffi))
8662 (home-page "https://github.com/saghul/pycares")
8663 (synopsis "Python interface for @code{c-ares}")
8664 (description
8665 "@code{pycares} is a Python module which provides an interface to
8666@code{c-ares}, a C library that performs DNS requests and name resolutions
8667asynchronously.")
8668 (license license:expat)))
8669
8670(define-public python-yarl
8671 (package
8672 (name "python-yarl")
8673 (version "1.18.3")
8674 (source
8675 (origin
8676 (method url-fetch)
8677 (uri (pypi-uri "yarl" version))
8678 (sha256
8679 (base32
8680 "1qfj6kvdxr8bzka4lp0bh0xfgr5mzx7zzvj2jb4vcxxzbk20265c"))))
8681 (build-system pyproject-build-system)
8682 (arguments
8683 (list
8684 #:test-flags '(list "--ignore-glob=tests/test_*_benchmarks.py")
8685 #:phases
8686 '(modify-phases %standard-phases
8687 (add-after 'unpack 'patch-build-system
8688 (lambda _
8689 ;; XXX: I don't know how to tell it to build the extensions in
8690 ;; place.
8691 (substitute* "packaging/pep517_backend/_backend.py"
8692 (("build_inplace=False") "build_inplace=True")))))))
8693 (native-inputs
8694 (list python-covdefaults
8695 python-cython
8696 python-expandvars
8697 python-pytest
8698 python-pytest-cov
8699 python-pytest-xdist
8700 python-setuptools
8701 python-tomli
8702 python-wheel))
8703 (propagated-inputs
8704 (list python-packaging python-idna python-multidict python-propcache))
8705 (home-page "https://github.com/aio-libs/yarl/")
8706 (synopsis "Yet another URL library")
8707 (description "@code{yarl} module provides handy @code{URL} class
8708for URL parsing and changing.")
8709 (license license:asl2.0)))
8710
8711(define-public python-canvasapi
8712 (package
8713 (name "python-canvasapi")
8714 (version "3.4.0")
8715 (source (origin
8716 (method git-fetch)
8717 (uri (git-reference
8718 (url "https://github.com/ucfopen/canvasapi")
8719 (commit (string-append "v" version))))
8720 (file-name (git-file-name name version))
8721 (sha256
8722 (base32
8723 "017gashyd4avxzlz3imwn18vmfd0cjyhbm063isra3d2wk3ivrkx"))))
8724 (build-system pyproject-build-system)
8725 (propagated-inputs (list python-arrow python-pytz python-requests))
8726 (native-inputs (list python-pytest
8727 python-requests-mock
8728 python-setuptools
8729 python-urllib3))
8730 (home-page "https://github.com/ucfopen/canvasapi")
8731 (synopsis "API wrapper for the Canvas LMS")
8732 (description
8733 "CanvasAPI is a Python library for accessing Instructure’s Canvas LMS API.
8734The library enables developers to programmatically manage Canvas courses,
8735users, gradebooks, and more.")
8736 (license license:expat)))
8737
8738(define-public python-google
8739 (package
8740 (name "python-google")
8741 (version "3.0.0")
8742 (source
8743 (origin
8744 (method url-fetch)
8745 (uri (pypi-uri "google" version))
8746 (sha256
8747 (base32 "1gncv3l11za0mpxvmpaf5n5j3jzp282rz62yml4ha4z55q930d8l"))))
8748 (build-system pyproject-build-system)
8749 (arguments (list #:tests? #f)) ;There are no tests.
8750 (native-inputs (list python-setuptools))
8751 (propagated-inputs (list python-beautifulsoup4))
8752 (home-page "https://breakingcode.wordpress.com/")
8753 (synopsis "Python bindings to the Google search engine")
8754 (description
8755 "This package provides Python bindings for using the Google search
8756engine. Its module is called @code{googlesearch}.")
8757 (license license:bsd-3)))
8758
8759(define-public python-google-api-client
8760 (package
8761 (name "python-google-api-client")
8762 (version "2.187.0")
8763 (source
8764 (origin
8765 (method git-fetch)
8766 (uri (git-reference
8767 (url "https://github.com/google/google-api-python-client")
8768 (commit (string-append "v" version))))
8769 (file-name (git-file-name name version))
8770 (sha256
8771 (base32 "09vq5d32avri0gl8c7nn5dv2xds1jzjms7vqk3gn66nm2m37x8mv"))))
8772 (build-system pyproject-build-system)
8773 (arguments
8774 (list
8775 #:test-flags
8776 #~(list
8777 "-k"
8778 (string-join
8779 (list
8780 ;; XXX: Deprecated behavior.
8781 "not test_client_options_universe_configured_with_mtls"
8782 "test_universe_env_var_configured_with_mtls"
8783 ;; XXX: Requires CA certificates.
8784 "test_credentials_and_credentials_file_mutually_exclusive")
8785 " and not ")
8786 "tests")))
8787 (native-inputs
8788 (list python-parameterized
8789 python-pytest
8790 python-setuptools))
8791 (propagated-inputs
8792 (list python-google-api-core
8793 python-google-auth
8794 python-google-auth-httplib2
8795 python-httplib2
8796 python-pyparsing
8797 python-uritemplate-3))
8798 (home-page "https://github.com/google/google-api-python-client")
8799 (synopsis "Core Python library for accessing Google APIs")
8800 (description "Python client library for Google's discovery based APIs")
8801 (license license:asl2.0)))
8802
8803(define-public python-google-auth-httplib2
8804 (package
8805 (name "python-google-auth-httplib2")
8806 (version "0.2.0")
8807 (source (origin
8808 (method url-fetch)
8809 (uri (pypi-uri "google-auth-httplib2" version))
8810 (sha256
8811 (base32 "018fckshilc6z2qpj1pclh8haanbq3lr85w6p4g4z5wgyjnppaiq"))))
8812 (build-system pyproject-build-system)
8813 (propagated-inputs
8814 (list python-google-auth python-httplib2))
8815 (native-inputs
8816 (list python-pytest
8817 python-pyparsing
8818 python-pytest-localserver
8819 python-flask
8820 python-setuptools))
8821 (home-page
8822 "https://github.com/GoogleCloudPlatform/google-auth-library-python-httplib2")
8823 (synopsis "Google Authentication Library: httplib2 transport")
8824 (description "This package provides a Google Authentication Library plugin
8825for httplib2 transport.")
8826 (license license:asl2.0)))
8827
8828(define-public python-google-auth-oauthlib
8829 (package
8830 (name "python-google-auth-oauthlib")
8831 (version "1.2.3")
8832 (home-page
8833 "https://github.com/GoogleCloudPlatform/\
8834google-auth-library-python-oauthlib")
8835 (source
8836 (origin
8837 (method git-fetch)
8838 (uri (git-reference
8839 (url home-page)
8840 (commit (string-append "v" version))))
8841 (file-name (git-file-name name version))
8842 (sha256
8843 (base32 "1f269aaj02403shbj0iz4w16wwxr6im5fl42dkkk4mf2jw8ns46l"))))
8844 (build-system pyproject-build-system)
8845 (propagated-inputs (list python-google-auth python-requests-oauthlib))
8846 (native-inputs
8847 (list python-click python-mock python-pytest python-setuptools))
8848 (synopsis "Google Authentication Library: oauthlib")
8849 (description "This package provides a Google Authentication Library plugin
8850with oauthlib.")
8851 (license license:asl2.0)))
8852
8853(define-public whoogle-search
8854 (package
8855 (name "whoogle-search")
8856 (version "0.8.4")
8857 (source (origin
8858 (method url-fetch)
8859 (uri (pypi-uri "whoogle-search" version))
8860 (sha256
8861 (base32
8862 "0hsy4l98nzj6i1lf63wvqd0yharkaz44zsxh863ymy47rxnwimz7"))))
8863 (build-system pyproject-build-system)
8864 (arguments
8865 (list
8866 ;; The tests need network access
8867 #:tests? #f))
8868 (propagated-inputs
8869 (list python-beautifulsoup4
8870 python-brotli
8871 python-cryptography
8872 python-cssutils
8873 python-defusedxml
8874 python-flask
8875 python-dotenv
8876 python-requests
8877 python-stem
8878 python-validators
8879 python-waitress))
8880 (native-inputs (list python-setuptools python-wheel))
8881 (home-page "https://github.com/benbusby/whoogle-search")
8882 (synopsis "Self-hosted, ad-free, privacy-respecting metasearch engine")
8883 (description
8884 "Get Google results, but without any ads, javascript, AMP links,
8885cookies, or IP address tracking. Quick and simple to implement as a primary
8886search engine replacement on both desktop and mobile.")
8887 (license license:expat)))
8888
8889(define-public python-hawkauthlib
8890 (package
8891 (name "python-hawkauthlib")
8892 (version "2.0.0")
8893 (source
8894 (origin
8895 (method git-fetch)
8896 (uri (git-reference
8897 (url "https://github.com/mozilla-services/hawkauthlib")
8898 (commit (string-append "v" version))))
8899 (file-name (git-file-name name version))
8900 (sha256
8901 (base32 "0pdpk3fp87ngfsyp4lm2z7z8b203jxsmvbz59q6r6xgg9sp4cl3l"))))
8902 (build-system pyproject-build-system)
8903 (arguments (list #:test-backend #~'unittest))
8904 (native-inputs (list python-setuptools))
8905 (propagated-inputs (list python-requests python-webob))
8906 (home-page "https://github.com/mozilla-services/hawkauthlib")
8907 (synopsis "Hawk Access Authentication protocol")
8908 (description
8909 "This is a low-level Python library for implementing Hawk Access
8910Authentication, a simple HTTP request-signing scheme.")
8911 (license license:mpl2.0)))
8912
8913(define-public python-pybrowserid
8914 (package
8915 (name "python-pybrowserid")
8916 (version "0.14.0")
8917 (source
8918 (origin
8919 (method git-fetch)
8920 (uri (git-reference
8921 (url "https://github.com/mozilla/PyBrowserID")
8922 (commit version)))
8923 (file-name (git-file-name name version))
8924 (sha256
8925 (base32 "0in0sbj56wrz5mlrj6wkd3h7rrp7714c5rkxvkfwp60s2hr6ynj6"))))
8926 (build-system pyproject-build-system)
8927 (arguments (list #:test-backend #~'unittest))
8928 (propagated-inputs (list python-requests))
8929 (native-inputs (list python-mock python-setuptools))
8930 (home-page "https://github.com/mozilla/PyBrowserID")
8931 (synopsis "Python library for the BrowserID protocol")
8932 (description
8933 "This is a Python client library for the BrowserID protocol that
8934underlies Mozilla Persona.")
8935 (license license:mpl2.0)))
8936
8937(define-public python-pyfxa
8938 (package
8939 (name "python-pyfxa")
8940 (version "0.8.1")
8941 (source
8942 (origin
8943 (method git-fetch)
8944 (uri (git-reference
8945 (url "https://github.com/mozilla/PyFxA")
8946 (commit (string-append "v" version))))
8947 (file-name (git-file-name name version))
8948 (sha256
8949 (base32 "11iaw50x5ic9cqp3jwkvhk8mz00dhg8xhl1kkx45zrb8nnrfw2vs"))))
8950 (build-system pyproject-build-system)
8951 (arguments
8952 (list
8953 ;; These tests require network access
8954 #:test-flags #~(list "--ignore=fxa/tests/test_core.py")))
8955 (propagated-inputs
8956 (list python-cryptography
8957 python-pyjwt
8958 python-parameterized
8959 python-hawkauthlib
8960 python-requests))
8961 (native-inputs
8962 (list python-grequests
8963 python-hatchling
8964 python-mock
8965 python-pytest
8966 python-responses))
8967 (home-page "https://github.com/mozilla/PyFxA")
8968 (synopsis "Firefox Accounts client library for Python")
8969 (description
8970 "This is a Python library for interacting with the Firefox Accounts
8971ecosystem.")
8972 (license license:mpl2.0)))
8973
8974(define-public python-hyperlink
8975 (package
8976 (name "python-hyperlink")
8977 (version "21.0.0")
8978 (source
8979 (origin
8980 (method url-fetch)
8981 (uri (pypi-uri "hyperlink" version))
8982 (sha256
8983 (base32
8984 "0sx50lkivsfjxx9zr4yh7l9gll2l9kvl0v0w8w4wk2x5v9bzjyj2"))))
8985 (build-system pyproject-build-system)
8986 (arguments
8987 (list #:phases
8988 #~(modify-phases %standard-phases
8989 (add-before 'check 'pretend-to-be-CI
8990 (lambda _
8991 ;; Pretend to be a CI system to skip flaky tests.
8992 (setenv "CI" "true"))))))
8993 (native-inputs
8994 (list python-pytest python-setuptools python-wheel))
8995 (propagated-inputs
8996 (list python-idna))
8997 (home-page "https://github.com/python-hyper/hyperlink")
8998 (synopsis "Python module to create immutable URLs according to spec")
8999 (description "This package provides a Python module to create immutable, and
9000correct URLs for Python according to RFCs 3986 and 3987.")
9001 (license license:expat)))
9002
9003(define-public python-treq
9004 (package
9005 (name "python-treq")
9006 (version "24.9.1")
9007 (source
9008 (origin
9009 (method url-fetch)
9010 (uri (pypi-uri "treq" version))
9011 (sha256
9012 (base32
9013 "1a7yrq2m7hf77fia4fc0c6zanvwnykpgirdbs1cyvr7k0k27znhm"))))
9014 (build-system pyproject-build-system)
9015 (native-inputs
9016 (list python-httpbin
9017 python-pytest
9018 python-service-identity
9019 python-setuptools
9020 python-wheel))
9021 (propagated-inputs
9022 (list python-attrs
9023 python-hyperlink
9024 python-incremental
9025 python-requests
9026 python-twisted
9027 python-typing-extensions))
9028 (home-page "https://github.com/twisted/treq")
9029 (synopsis "Requests-like API built on top of twisted.web's Agent")
9030 (description "This package provides an HTTP library inspired by
9031@code{requests} but written on top of Twisted's @code{Agents}. It offers a
9032high level API for making HTTP requests when using Twisted.")
9033 (license license:expat)))
9034
9035(define-public python-autobahn
9036 (package
9037 (name "python-autobahn")
9038 (version "25.11.1")
9039 (source
9040 (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "autobahn" version))
9043 (sha256
9044 (base32
9045 "1w9wyyqzg1dil8jsjm08n2pnk6jws87scli932drhghcr2f2prjj"))))
9046 (build-system pyproject-build-system)
9047 (arguments
9048 (list
9049 ;; The tests fail to run:
9050 ;; https://github.com/crossbario/autobahn-python/issues/1117
9051 #:tests? #f
9052 #:phases #~(modify-phases %standard-phases
9053 (add-after 'unpack 'relax-zope-interface
9054 (lambda _
9055 ;; python-zope-interface is a world rebuild package
9056 ;; and our one-digit lower minor version seems to be
9057 ;; fine.
9058 (substitute* "setup.py"
9059 (("zope.interface>=5.2.0")
9060 "zope.interface>=5.1.0"))))
9061 (add-after 'unpack 'strip-xbr
9062 (lambda _
9063 ;; Strip new XBR feature which isn't available in Guix.
9064 (setenv "AUTOBAHN_STRIP_XBR" "1"))))))
9065 (native-inputs (list python-setuptools python-wheel))
9066 (propagated-inputs (list python-cbor2
9067 python-cryptography
9068 python-hyperlink
9069 python-msgpack
9070 python-py-ubjson
9071 python-twisted
9072 python-txaio
9073 python-ujson))
9074 (home-page "https://github.com/crossbario/autobahn-python/")
9075 (synopsis "Web Application Messaging Protocol implementation")
9076 (description "This package provides an implementation of the @dfn{Web Application
9077Messaging Protocol} (WAMP). WAMP connects components in distributed
9078applications using Publish and Subscribe (PubSub) and routed Remote Procedure
9079Calls (rRPC). It is ideal for distributed, multi-client and server applications
9080such as IoT applications or multi-user database-driven business applications.")
9081 (license license:expat)))
9082
9083(define-public python-ws4py
9084 (package
9085 (name "python-ws4py")
9086 (version "0.6.0")
9087 (source
9088 (origin
9089 (method git-fetch)
9090 (uri (git-reference
9091 (url "https://github.com/Lawouach/WebSocket-for-Python")
9092 (commit version)))
9093 (file-name (git-file-name name version))
9094 (sha256
9095 (base32
9096 "00y6s8gk20936njqbxr8vjliviiz7r7pqrlwg7xi8zzs6903xvv6"))))
9097 (build-system pyproject-build-system)
9098 (arguments
9099 (list
9100 #:phases
9101 #~(modify-phases %standard-phases
9102 (add-after 'unpack 'remove-cherrypy-support
9103 (lambda _
9104 (delete-file "ws4py/server/cherrypyserver.py")
9105 (delete-file "test/test_cherrypy.py"))))))
9106 (native-inputs (list python-setuptools python-pytest))
9107 (propagated-inputs
9108 (list python-gevent python-tornado))
9109 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
9110 (synopsis "WebSocket client and server library")
9111 (description
9112 "This package provides a WebSocket client and server library for Python.")
9113 (license license:bsd-3)))
9114
9115(define-public python-slowapi
9116 (package
9117 (name "python-slowapi")
9118 (version "0.1.9")
9119 (source
9120 (origin
9121 (method git-fetch)
9122 (uri (git-reference
9123 (url "https://github.com/laurents/slowapi")
9124 (commit (string-append "v" version))))
9125 (file-name (git-file-name name version))
9126 (sha256
9127 (base32 "1lc1n6lvh01dhhrc507qri9rz1w72l2riii03ixh7n7n1gwjpws7"))))
9128 (build-system pyproject-build-system)
9129 (arguments
9130 (list
9131 #:test-flags
9132 ;; These tests fail because the timestamp contains more decimal points
9133 ;; than expected, so a simple equality comparison fails.
9134 '(list "-k" (string-append "not test_headers_no_breach"
9135 " and not test_headers_breach"))))
9136 (propagated-inputs (list python-limits python-redis))
9137 (native-inputs
9138 (list python-fastapi
9139 python-hiro
9140 python-mock
9141 python-poetry-core
9142 python-pytest))
9143 (home-page "https://github.com/laurents/slowapi")
9144 (synopsis "Rate limiting extension for Starlette and Fastapi")
9145 (description
9146 "This package provides a rate limiting extension for Starlette and
9147Fastapi.")
9148 (license license:expat)))
9149
9150(define-public python-slugify
9151 (package
9152 (name "python-slugify")
9153 (version "8.0.4")
9154 (source
9155 (origin
9156 (method git-fetch)
9157 (uri (git-reference
9158 (url "https://github.com/un33k/python-slugify")
9159 (commit (string-append "v" version))))
9160 (file-name (git-file-name name version))
9161 (sha256
9162 (base32 "0z83nwy7acc72mb2jv3516nfplah1wm61wkmnzl71dh8i4q985yd"))))
9163 (build-system pyproject-build-system)
9164 (arguments (list #:test-backend #~'unittest))
9165 (native-inputs (list python-setuptools))
9166 (propagated-inputs (list python-unidecode python-text-unidecode))
9167 (home-page "https://github.com/un33k/python-slugify")
9168 (synopsis "Python Slugify application that handles Unicode")
9169 (description "This package provides a @command{slufigy} command and
9170library to create slugs from unicode strings while keeping it DRY.")
9171 (license license:expat)))
9172
9173(define-public python-branca
9174 (package
9175 (name "python-branca")
9176 (version "0.7.2")
9177 (source
9178 (origin
9179 (method git-fetch) ; no tests in PyPI
9180 (uri (git-reference
9181 (url "https://github.com/python-visualization/branca")
9182 (commit (string-append "v" version))))
9183 (file-name (git-file-name name version))
9184 (sha256
9185 (base32 "1vs94nqa7r6iwm8mj3m29hg090gmgz4ywnayxh8qiz9ij8jv96wa"))))
9186 (build-system pyproject-build-system)
9187 (arguments
9188 ;; This file requires Selenium.
9189 (list #:test-flags #~(list "--ignore" "tests/test_iframe.py"
9190 ;; This test passes but is very slow.
9191 "-k" "not test_color_brewer_extendability")
9192 #:phases
9193 #~(modify-phases %standard-phases
9194 (add-before 'build 'pretend-version
9195 ;; The version string is usually derived via setuptools-scm,
9196 ;; but without the git metadata available, the version string
9197 ;; is set to '0.0.0'.
9198 (lambda _
9199 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
9200 #$(package-version this-package)))))))
9201 (propagated-inputs (list python-jinja2))
9202 (native-inputs
9203 (list python-numpy
9204 python-pytest
9205 python-setuptools
9206 python-setuptools-scm
9207 python-wheel))
9208 (home-page "https://github.com/python-visualization/branca")
9209 (synopsis "Generate complex HTML+JS pages with Python")
9210 (description "This library is a spinoff from @code{folium} that would host
9211the non-map-specific features. It can be used to generate HTML + JS.")
9212 (license license:expat)))
9213
9214(define-public python-tinycss2
9215 (package
9216 (name "python-tinycss2")
9217 (version "1.4.0")
9218 (source
9219 (origin
9220 (method git-fetch)
9221 (uri (git-reference
9222 (url "https://github.com/Kozea/tinycss2")
9223 (commit (string-append "v" version))
9224 (recursive? #true)))
9225 (file-name (git-file-name name version))
9226 (sha256
9227 (base32 "11m5vhpdz6zlzq2lqqklkhd0h4jxblpvcrdf9cc4s06nhr9acp0r"))))
9228 (build-system pyproject-build-system)
9229 (native-inputs
9230 (list python-flit
9231 python-pytest
9232 python-pytest-cov))
9233 (propagated-inputs
9234 (list python-webencodings))
9235 (home-page "https://tinycss2.readthedocs.io/")
9236 (synopsis "Low-level CSS parser for Python")
9237 (description "@code{tinycss2} can parse strings, return Python objects
9238representing tokens and blocks, and generate CSS strings corresponding to
9239these objects.
9240
9241Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
9242grammar of CSS but doesn’t know specific rules, properties or values supported
9243in various CSS modules.")
9244 (license license:bsd-3)))
9245
9246(define-public python-cssselect2
9247 (package
9248 (name "python-cssselect2")
9249 (version "0.4.1")
9250 (source
9251 (origin
9252 (method url-fetch)
9253 (uri (pypi-uri "cssselect2" version))
9254 (sha256
9255 (base32 "1j2fcr217rsvkipsg6zjq03rl64rxnvb5hqqpx0dv58fhspvkywk"))))
9256 (build-system pyproject-build-system)
9257 (arguments
9258 `(#:phases
9259 (modify-phases %standard-phases
9260 (add-after 'unpack 'disable-linters
9261 ;; Their check fails; none of our business.
9262 (lambda _
9263 (substitute* '("setup.py" "pyproject.toml")
9264 (("'pytest-flake8',") "")
9265 (("'pytest-isort',") "")
9266 (("--flake8") "")
9267 (("--isort") "")))))))
9268 (propagated-inputs
9269 (list python-tinycss2))
9270 (native-inputs
9271 (list python-flit python-pytest-cov python-pytest-runner))
9272 (home-page "https://cssselect2.readthedocs.io/")
9273 (synopsis "CSS selectors for Python ElementTree")
9274 (description "@code{cssselect2} is a straightforward implementation of
9275CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
9276ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
9277
9278Unlike the Python package @code{cssselect}, it does not translate selectors to
9279XPath and therefore does not have all the correctness corner cases that are
9280hard or impossible to fix in cssselect.")
9281 (license license:bsd-3)))
9282
9283(define-public python-uvloop
9284 (package
9285 (name "python-uvloop")
9286 (version "0.21.0")
9287 (source
9288 (origin
9289 (method url-fetch)
9290 (uri (pypi-uri "uvloop" version))
9291 (sha256
9292 (base32 "1qq46ym3ymzfn4j6fnykfmr1f4qnb7x7p15dlw37hi38v87jpw9v"))
9293 (modules '((guix build utils)))
9294 (snippet
9295 '(begin (delete-file-recursively "vendor")
9296 (delete-file "uvloop/loop.c")))))
9297 (build-system pyproject-build-system)
9298 (arguments
9299 (list
9300 #:test-flags
9301 ;; The tests are prone to get stuck. Use pytest-timeout’s --timeout flag
9302 ;; to get a meaningful idea about where.
9303 #~(list "--timeout=300"
9304 "--timeout-method=thread"
9305 "-k" (string-join
9306 (list
9307 ;; Timeout, because SIGINT cannot be sent to child.
9308 "not test_signals_sigint_pycode_continue"
9309 "test_signals_sigint_pycode_stop"
9310 "test_signals_sigint_uvcode"
9311 "test_signals_sigint_uvcode_two_loop_runs"
9312 ;; This test is racy and prone to get stuck on
9313 ;; various platforms, possibly a aiohttp issue:
9314 ;; https://github.com/MagicStack/uvloop/issues/412
9315 "test_remote_shutdown_receives_trailing_data"
9316 ;; It looks like pytest is preventing
9317 ;; custom stdout/stderr redirection,
9318 ;; even with -s.
9319 "test_process_streams_redirect"
9320 ;; FileNotFoundError: [Errno 2] No such file or
9321 ;; directory
9322 "test_process_env_2"
9323 ;; socket.gaierror: [Errno -2] Name or service not known
9324 "test_getaddrinfo_21"
9325 #$@(if (target-riscv64?)
9326 `("test_renegotiation")
9327 `()))
9328 " and not "))
9329 #:phases
9330 #~(modify-phases %standard-phases
9331 (add-after 'unpack 'preparations
9332 (lambda _
9333 ;; Use packaged libuv.
9334 (substitute* "setup.py" (("self.use_system_libuv = False")
9335 "self.use_system_libuv = True"))
9336 ;; Replace hardcoded shell command.
9337 (substitute* "uvloop/loop.pyx"
9338 (("b'/bin/sh'") (string-append "b'" (which "sh") "'")))))
9339 #$@(if (target-riscv64?)
9340 `((add-after 'unpack 'adjust-test-timeouts
9341 (lambda _
9342 (substitute* '("tests/test_tcp.py"
9343 "tests/test_unix.py")
9344 (("SSL_HANDSHAKE_TIMEOUT = 15\\.0")
9345 "SSL_HANDSHAKE_TIMEOUT = 30.0")))))
9346 '())
9347 (add-before 'check 'pre-check
9348 (lambda* (#:key tests? #:allow-other-keys)
9349 (when tests?
9350 ;; Remove Python module, which conflicts with the installed
9351 ;; version, but lacks the built C module.
9352 (delete-file-recursively "uvloop")))))))
9353 (native-inputs
9354 (list python-aiohttp
9355 python-cython
9356 python-psutil
9357 python-pyopenssl
9358 python-pytest
9359 python-pytest-timeout
9360 python-setuptools
9361 python-wheel))
9362 (inputs
9363 (list libuv))
9364 (home-page "https://github.com/MagicStack/uvloop")
9365 (synopsis "Fast implementation of asyncio event loop on top of libuv")
9366 (description
9367 "@code{uvloop} is a fast, drop-in replacement of the built-in asyncio
9368event loop. It is implemented in Cython and uses libuv under the hood.")
9369 (license license:expat)))
9370
9371(define-public gunicorn
9372 (package
9373 (name "gunicorn")
9374 (version "22.0.0")
9375 (source
9376 (origin
9377 (method url-fetch)
9378 (uri (pypi-uri "gunicorn" version))
9379 (sha256
9380 (base32
9381 "0qzc3ghayc137hlwrqqwkkhaf8f5h9ja21qwy4rznxpz75i462sa"))))
9382 ;; CVE-2024-1135 is fixed in version 22.0.0.
9383 (properties `((lint-hidden-cve . ("CVE-2024-1135"))))
9384 (outputs '("out" "doc"))
9385 (build-system pyproject-build-system)
9386 (arguments
9387 `(#:test-flags
9388 ;; Disable the geventlet tests because eventlet uses dnspython, which
9389 ;; does not work in the build container due to lack of /etc/resolv.conf
9390 '("--ignore=tests/workers/test_geventlet.py")
9391 #:phases (modify-phases %standard-phases
9392 (add-after 'build 'build-doc
9393 (lambda _
9394 (invoke "make"
9395 "-C"
9396 "docs"
9397 "PAPER=a4"
9398 "html"
9399 "info")
9400 (delete-file "docs/build/texinfo/Makefile")
9401 (delete-file "docs/build/texinfo/Gunicorn.texi")))
9402 (add-after 'install 'install-doc
9403 (lambda* (#:key outputs #:allow-other-keys)
9404 (let* ((doc (string-append (assoc-ref outputs "doc")
9405 "/share/doc/"
9406 ,name "-"
9407 ,version))
9408 (html (string-append doc "/html"))
9409 (info (string-append doc "/info"))
9410 (examples (string-append doc "/examples")))
9411 (mkdir-p html)
9412 (mkdir-p info)
9413 (mkdir-p examples)
9414 (copy-recursively "docs/build/html" html)
9415 (copy-recursively "docs/build/texinfo" info)
9416 (copy-recursively "examples" examples)
9417 (for-each (lambda (file)
9418 (copy-file file
9419 (string-append doc "/" file)))
9420 '("README.rst" "NOTICE" "LICENSE" "THANKS")))))
9421 ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see
9422 ;; <https://bugs.gnu.org/25235>), leading to an inflated closure
9423 ;; size. Override it to only add the essential entries.
9424 (replace 'wrap
9425 (lambda* (#:key native-inputs inputs outputs
9426 #:allow-other-keys)
9427 (let* ((out (assoc-ref outputs "out"))
9428 (python (assoc-ref (or native-inputs inputs)
9429 "python"))
9430 (sitedir (string-append "/lib/python"
9431 (python-version python)
9432 "/site-packages")))
9433 (wrap-program (string-append out "/bin/gunicorn")
9434 `("PYTHONPATH" ":" prefix
9435 ,(map (lambda (output)
9436 (string-append output sitedir))
9437 (list python out))))))))))
9438 (inputs (list bash-minimal))
9439 (native-inputs (list binutils ;for ctypes.util.find_library()
9440 python-aiohttp
9441 python-gevent
9442 python-pytest
9443 python-pytest-cov
9444 python-sphinx
9445 texinfo))
9446 (propagated-inputs (list python-packaging python-setuptools python-wheel))
9447 (home-page "https://gunicorn.org/")
9448 (synopsis "Python WSGI HTTP Server for UNIX")
9449 (description
9450 "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
9451Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
9452Unicorn project. The Gunicorn server is broadly compatible with
9453various web frameworks, simply implemented, light on server resources,
9454and fairly speedy.")
9455 (license license:expat)))
9456
9457;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
9458;; its tests
9459(define-public gunicorn-bootstrap
9460 (package
9461 (inherit gunicorn)
9462 (name "gunicorn")
9463 (arguments `(#:tests? #f))
9464 (properties '((hidden? . #t)))
9465 (native-inputs `())))
9466
9467(define-public python-httptools
9468 (package
9469 (name "python-httptools")
9470 (version "0.6.4")
9471 (source
9472 (origin
9473 ;; PyPI tarball comes with a vendored http-parser and no tests.
9474 (method git-fetch)
9475 (uri (git-reference
9476 (url "https://github.com/MagicStack/httptools")
9477 (commit (string-append "v" version))))
9478 (file-name (git-file-name name version))
9479 (sha256
9480 (base32 "05zsa77jlm2h9z0vfj6gdqklj3pbzbijhk5s9b3q7iaxl347hwzc"))
9481 (modules '((guix build utils)))
9482 (snippet
9483 #~(begin (delete-file-recursively "vendor")))))
9484 (build-system pyproject-build-system)
9485 (arguments
9486 (list
9487 #:test-flags
9488 ;; XXX: AssertionError: HttpParserError not raised.
9489 #~(list "-k" "not test_parser_response_leninent_headers_1")
9490 #:phases
9491 #~(modify-phases %standard-phases
9492 (add-after 'unpack 'configure-build-ext
9493 (lambda _
9494 (with-output-to-file "setup.cfg"
9495 (lambda ()
9496 (display "\
9497[build_ext]
9498use_system_llhttp = true
9499use_system_http_parser = true
9500cython_always = true"))))))))
9501 (native-inputs
9502 (list python-cython
9503 python-pytest
9504 python-setuptools))
9505 (inputs
9506 (list http-parser
9507 llhttp))
9508 (home-page "https://github.com/MagicStack/httptools")
9509 (synopsis "Collection of framework independent HTTP protocol utils")
9510 (description
9511 "@code{httptools} is a Python binding for the nodejs HTTP parser.")
9512 (license license:expat)))
9513
9514(define-public python-uvicorn
9515 (package
9516 (name "python-uvicorn")
9517 (version "0.34.0")
9518 (source
9519 (origin
9520 ;; PyPI tarball has no tests.
9521 (method git-fetch)
9522 (uri (git-reference
9523 (url "https://github.com/encode/uvicorn")
9524 (commit version)))
9525 (file-name (git-file-name name version))
9526 (sha256
9527 (base32 "05lkxnpzmr0kik81kdcvavjvvc4d1lgmw88mr4vbwsqk147wgqbc"))))
9528 (build-system pyproject-build-system)
9529 (arguments
9530 (list
9531 #:test-flags
9532 #~(list "-o" "asyncio_mode=auto"
9533 ;; For some reason tests stacked in infinity re-invocation loop:
9534 ;; AssertionError where is_alive =
9535 ;; <uvicorn.supervisors.multiprocess.Process object at
9536 ;; 0x7ffff39b6110>.is_alive.
9537 ;; Maybe this <https://github.com/encode/uvicorn/issues/2466>.
9538 "--ignore=tests/supervisors/test_multiprocess.py"
9539
9540 #$@(cond
9541 ((or (target-aarch64?)
9542 (target-riscv64?))
9543 '("-k not test_send_binary_data_to_server_bigger_than_default_on_websockets"))
9544 (#t '())))))
9545 (native-inputs
9546 (list nss-certs-for-test
9547 python-a2wsgi
9548 python-hatchling
9549 python-httpx-bootstrap
9550 python-pytest
9551 python-pytest-asyncio-0.26
9552 python-pytest-mock
9553 python-requests
9554 python-trustme
9555 python-wsproto))
9556 (propagated-inputs
9557 (list python-a2wsgi
9558 python-click
9559 python-dotenv
9560 python-h11
9561 python-httptools
9562 python-pyyaml
9563 python-uvloop
9564 python-watchfiles
9565 python-websockets))
9566 (home-page "https://github.com/encode/uvicorn")
9567 (synopsis "Fast ASGI server implementation")
9568 (description
9569 "@code{uvicorn} is a fast ASGI server implementation, using @code{uvloop}
9570and @code{httptools}. It currently supports HTTP/1.1 and WebSockets. Support
9571for HTTP/2 is planned.")
9572 (license license:bsd-3)))
9573
9574(define-public python-translation-finder
9575 (package
9576 (name "python-translation-finder")
9577 (version "2.22")
9578 (source
9579 (origin
9580 (method url-fetch)
9581 (uri (pypi-uri "translation_finder" version))
9582 (sha256
9583 (base32 "1hav99ccijvk2w8wpvba2pc7ba1z150vja2wvaimd069mc08pjd2"))))
9584 (build-system pyproject-build-system)
9585 (arguments
9586 (list
9587 #:test-flags
9588 ;; AssertionError: 31 != 30 : Mismatched count of results
9589 #~(list "--deselect=translation_finder/test_api.py::APITest::test_discover_file")))
9590 (native-inputs
9591 (list python-pytest
9592 python-setuptools))
9593 (propagated-inputs
9594 (list python-charset-normalizer
9595 python-ruamel.yaml
9596 python-weblate-language-data))
9597 (home-page "https://weblate.org/")
9598 (synopsis "Translation file finder for Weblate")
9599 (description "This package provides a function to find translation file in
9600the source code of a project. It supports many translation file formats and
9601is part of the Weblate translation platform.")
9602 (license license:gpl3+)))
9603
9604(define-public python-gitlab
9605 (package
9606 (name "python-gitlab")
9607 (version "7.0.0")
9608 (source
9609 (origin
9610 (method git-fetch)
9611 (uri (git-reference
9612 (url "https://github.com/python-gitlab/python-gitlab")
9613 (commit (string-append "v" version))))
9614 (file-name (git-file-name name version))
9615 (sha256
9616 (base32 "0rf1hz5n724f8sfc7g3fzfz96jsv9y145pi6gc8qscsjq3z4vi37"))))
9617 (build-system pyproject-build-system)
9618 (arguments
9619 (list
9620 #:test-flags
9621 #~(list "--ignore=tests/unit/test_graphql.py"
9622 ;; XXX: Missing helper script.
9623 "-k" "not test_data_from_helper" "tests/unit")))
9624 (native-inputs
9625 (list python-anyio
9626 python-pytest
9627 python-responses
9628 python-setuptools))
9629 (propagated-inputs (list python-requests python-requests-toolbelt))
9630 (home-page "https://github.com/python-gitlab/python-gitlab")
9631 (synopsis "Interact with GitLab API")
9632 (description "This package provides an extended library for interacting
9633with GitLab instances through their API.")
9634 (license license:lgpl3+)))
9635
9636(define-public python-path-and-address
9637 (package
9638 (name "python-path-and-address")
9639 (version "2.0.1")
9640 (source
9641 (origin
9642 (method git-fetch)
9643 (uri (git-reference
9644 (url "https://github.com/joeyespo/path-and-address")
9645 (commit (string-append "v" version))))
9646 (file-name (git-file-name name version))
9647 (sha256
9648 (base32 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
9649 (build-system pyproject-build-system)
9650 (native-inputs
9651 (list python-pytest python-setuptools))
9652 (home-page "https://github.com/joeyespo/path-and-address")
9653 (synopsis "Functions for command-line server tools used by humans")
9654 (description "Path-and-address resolves ambiguities of command-line
9655interfaces, inferring which argument is the path, and which is the address.")
9656 (license license:expat)))
9657
9658;; XXX: This project missed maintainer upstream, see
9659;; <https://github.com/joeyespo/grip/issues/387>.
9660;; Consider to remove if it keeps failing to build.
9661(define-public grip
9662 (package
9663 (name "grip")
9664 (version "4.6.1")
9665 (source
9666 (origin
9667 (method git-fetch)
9668 (uri (git-reference
9669 (url "https://github.com/joeyespo/grip")
9670 (commit (string-append "v" version))))
9671 (file-name (git-file-name name version))
9672 (sha256
9673 (base32 "0vhimd99zw7s1fihwr6yfij6ywahv9gdrfcf5qljvzh75mvzcwh8"))))
9674 (build-system pyproject-build-system)
9675 (arguments
9676 (list
9677 #:test-flags
9678 ;; All tests fail requiring network access, ignore the whole file.
9679 #~(list "--ignore=tests/test_github.py")
9680 #:phases
9681 #~(modify-phases %standard-phases
9682 ;; This fixes the removal of `charset` attribute of requests from
9683 ;; Werkzeug 2.3.0.
9684 ;; Fixed in grip's commit <2784eb2c1515f1cdb1554d049d48b3bff0f42085>.
9685 (add-after 'unpack 'fix-response-encoding
9686 (lambda _
9687 (substitute* "grip/app.py"
9688 (("response.charset")
9689 "getattr(response, 'charset', 'utf-8')")))))))
9690 (native-inputs
9691 (list nss-certs-for-test
9692 python-pytest
9693 python-responses
9694 python-setuptools
9695 python-wheel))
9696 (propagated-inputs
9697 (list python-docopt
9698 python-flask
9699 python-markdown
9700 python-path-and-address
9701 python-pygments
9702 python-requests))
9703 (home-page "https://github.com/joeyespo/grip")
9704 (synopsis "Preview Markdown files using the GitHub API")
9705 (description
9706 "Grip is a command-line server application written in Python that uses
9707the GitHub Markdown API to render a local Markdown file. The styles and
9708rendering come directly from GitHub, so you'll know exactly how it will
9709appear. Changes you make to the file will be instantly reflected in the
9710browser without requiring a page refresh.")
9711 (license license:expat)))
9712
9713(define-public python-port-for
9714 (package
9715 (name "python-port-for")
9716 (version "0.7.4")
9717 (source
9718 (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "port_for" version))
9721 (sha256
9722 (base32 "13826s2d4hzzmv69wws6a7ryhminclv2bqaw6cpl929gnbki6xzw"))))
9723 (build-system pyproject-build-system)
9724 (propagated-inputs
9725 (list python-urllib3))
9726 (native-inputs
9727 (list python-pytest python-setuptools python-wheel))
9728 (home-page "https://github.com/kmike/port-for/")
9729 (synopsis "TCP localhost port finder and association manager")
9730 (description
9731 "This package provides a utility that helps with local TCP ports
9732management. It can find an unused TCP localhost port and remember the
9733association.")
9734 (license license:expat)))
9735
9736(define-public python-livereload
9737 (package
9738 (name "python-livereload")
9739 (version "2.7.1")
9740 (source
9741 (origin
9742 (method git-fetch)
9743 (uri (git-reference
9744 (url "https://github.com/lepture/python-livereload")
9745 (commit (string-append "v" version))))
9746 (file-name (git-file-name name version))
9747 (sha256
9748 (base32 "19wkdd1grw6mcd4qi8iaw4jdr207h3m24951vgy69j7g904lynjq"))))
9749 (build-system pyproject-build-system)
9750 (arguments (list #:test-backend #~'unittest))
9751 (native-inputs (list python-django python-setuptools))
9752 (propagated-inputs (list python-tornado))
9753 (home-page "https://github.com/lepture/python-livereload")
9754 (synopsis "Python LiveReload")
9755 (description
9756 "Python LiveReload provides a command line utility, @command{livereload},
9757for starting a web server in a directory. It can trigger arbitrary commands
9758and serve updated contents upon changes to the directory.")
9759 (license license:bsd-3)))
9760
9761(define-public python-vf-1
9762 (package
9763 (name "python-vf-1")
9764 (version "1.0.0")
9765 (source
9766 (origin
9767 (method git-fetch)
9768 (uri (git-reference
9769 (url "https://git.sr.ht/~solderpunk/VF-1")
9770 (commit (string-append "v" version))))
9771 (file-name (git-file-name name version))
9772 (sha256
9773 (base32 "1j8l4xivm6rs8jms1ixx0i9fz4yxr84hbz1pdc498jgkgzy1v8ih"))))
9774 (build-system pyproject-build-system)
9775 (arguments (list #:tests? #f)) ; No tests.
9776 (native-inputs (list python-setuptools))
9777 (home-page "https://git.sr.ht/~solderpunk/VF-1")
9778 (synopsis "Command line gopher client")
9779 (description "@code{VF-1} is a command line gopher client with
9780@acronym{TLS, Transport Layer Security} support.")
9781 (license license:bsd-2)))
9782
9783(define-public python-httpcore
9784 (package
9785 (name "python-httpcore")
9786 (version "1.0.9")
9787 (source
9788 (origin
9789 ;; PyPI tarball does not contain tests.
9790 (method git-fetch)
9791 (uri (git-reference
9792 (url "https://github.com/encode/httpcore")
9793 (commit version)))
9794 (file-name (git-file-name name version))
9795 (sha256
9796 (base32 "0yhm2n8qflpwjsjggyj757m0gw3n68al0my0ljybndwp933ipl32"))))
9797 (build-system pyproject-build-system)
9798 (native-inputs
9799 (list nss-certs-for-test
9800 python-hatch-fancy-pypi-readme
9801 python-hatchling
9802 python-pytest
9803 python-pytest-asyncio
9804 python-pytest-httpbin
9805 python-pytest-trio
9806 python-uvicorn
9807 python-trustme))
9808 (propagated-inputs
9809 (list python-anyio
9810 python-certifi
9811 python-h11
9812 python-h2
9813 python-sniffio
9814 python-socksio
9815 python-trio
9816 python-trio-typing))
9817 (home-page "https://github.com/encode/httpcore")
9818 (synopsis "Minimal, low-level HTTP client")
9819 (description
9820 "HTTP Core provides a minimal and low-level HTTP client, which does one
9821thing only: send HTTP requests.
9822
9823Some things HTTP Core does do:
9824
9825@itemize
9826@item Sending HTTP requests.
9827@item Provides both sync and async interfaces.
9828@item Supports HTTP/1.1 and HTTP/2.
9829@item Async backend support for asyncio and trio.
9830@item Automatic connection pooling.
9831@item HTTP(S) proxy support.
9832@end itemize")
9833 (license license:bsd-3)))
9834
9835;;; Variant used to break a cycle between python-httpx and python-uvicorn.
9836(define-public python-httpcore-bootstrap
9837 (hidden-package
9838 (package/inherit python-httpcore
9839 (name "python-httpcore-bootstrap")
9840 (arguments (list #:tests? #f))
9841 (native-inputs (list python-hatchling
9842 python-hatch-fancy-pypi-readme)))))
9843
9844(define-public python-httpx
9845 (package
9846 (name "python-httpx")
9847 (version "0.28.1")
9848 (source
9849 (origin
9850 ;; PyPI tarball does not contain tests.
9851 (method git-fetch)
9852 (uri (git-reference
9853 (url "https://github.com/encode/httpx")
9854 (commit version)))
9855 (file-name (git-file-name name version))
9856 (sha256
9857 (base32 "00d6rb21xwazwb0sj68zhra0qxxcwkd0vv7bg3k1jg94dmk2w7xl"))))
9858 (build-system pyproject-build-system)
9859 (arguments
9860 (list
9861 ;; 1401 passed, 1 skipped, 5 deselected
9862 #:test-flags
9863 #~(list "-o" "asyncio_mode=auto"
9864 ;; CLI tests are broken.
9865 "--ignore=tests/test_main.py"
9866 "-k" (string-join
9867 ;; These tests try to open an outgoing connection.
9868 (list "not test_async_proxy_close"
9869 "test_sync_proxy_clos"
9870 "test_write_timeout")
9871 " and not "))))
9872 (native-inputs
9873 (list nss-certs-for-test
9874 python-chardet
9875 python-cryptography
9876 python-hatch-fancy-pypi-readme
9877 python-hatchling
9878 python-pytest
9879 python-pytest-asyncio
9880 python-pytest-trio
9881 python-setuptools
9882 python-trio
9883 python-trustme
9884 python-uvicorn))
9885 (propagated-inputs
9886 (list python-anyio
9887 python-certifi
9888 python-httpcore
9889 python-idna
9890 ;; [brotli]
9891 python-brotli
9892 ;; [http2]
9893 python-h2
9894 ;; [socks]
9895 python-socksio
9896 ;; [zstd]
9897 python-zstandard
9898 ;; For trio, see:
9899 ;; <https://github.com/python-trio/trio/issues/2802>.
9900 python-sniffio))
9901 (home-page "https://www.python-httpx.org/")
9902 (synopsis "HTTP client for Python")
9903 (description
9904 "HTTPX is a fully featured HTTP client for Python 3, which provides sync
9905and async APIs, and support for both HTTP/1.1 and HTTP/2.
9906
9907HTTPX builds on the well-established usability of requests, and gives you:
9908
9909@itemize
9910@item A broadly requests-compatible API.
9911@item Standard synchronous interface, but with async support if you need it.
9912@item HTTP/1.1 and HTTP/2 support.
9913@item Ability to make requests directly to WSGI applications or ASGI applications.
9914@item Strict timeouts everywhere.
9915@item Fully type annotated.
9916@item 99% test coverage.
9917@end itemize
9918
9919Plus all the standard features of requests:
9920
9921@itemize
9922@item International Domains and URLs
9923@item Keep-Alive & Connection Pooling
9924@item Sessions with Cookie Persistence
9925@item Browser-style SSL Verification
9926@item Basic/Digest Authentication
9927@item Elegant Key/Value Cookies
9928@item Automatic Decompression
9929@item Automatic Content Decoding
9930@item Unicode Response Bodies
9931@item Multipart File Uploads
9932@item HTTP(S) Proxy Support
9933@item Connection Timeouts
9934@item Streaming Downloads
9935@item .netrc Support
9936@item Chunked Requests
9937@end itemize")
9938 (license license:bsd-3)))
9939
9940;;; Variant used to break a cycle with python-uvicorn.
9941(define-public python-httpx-bootstrap
9942 (hidden-package
9943 (package/inherit python-httpx
9944 (name "python-httpx-bootstrap")
9945 (arguments (list #:tests? #f))
9946 (native-inputs
9947 (list python-hatchling
9948 python-hatch-fancy-pypi-readme))
9949 (propagated-inputs
9950 (modify-inputs (package-propagated-inputs python-httpx)
9951 (replace "python-httpcore" python-httpcore-bootstrap))))))
9952
9953(define-public python-wsgiprox
9954 (package
9955 (name "python-wsgiprox")
9956 (version "1.5.2")
9957 (source
9958 (origin
9959 (method url-fetch)
9960 (uri (pypi-uri "wsgiprox" version))
9961 (sha256
9962 (base32 "11fsm199pvwbmqx2lccznvws65aam1rqqv0w79gal8hispwgd5rs"))))
9963 (build-system pyproject-build-system)
9964 (arguments
9965 ;; The test suite hangs (see:
9966 ;; https://github.com/webrecorder/wsgiprox/issues/6).
9967 (list
9968 #:tests? #f
9969 #:phases
9970 #~(modify-phases %standard-phases
9971 (add-after 'unpack 'fix-pytest-argument
9972 (lambda _
9973 ;; See: https://github.com/webrecorder/wsgiprox/issues/7.
9974 (substitute* "setup.py"
9975 (("--doctest-module")
9976 "--doctest-modules")))))))
9977 (propagated-inputs
9978 (list python-certauth python-gevent python-websocket-client))
9979 (native-inputs
9980 (list python-mock python-pytest-cov python-waitress python-setuptools))
9981 (home-page "https://github.com/webrecorder/wsgiprox")
9982 (synopsis "HTTP/S proxy with WebSockets over WSGI")
9983 (description
9984 "@code{wsgiprox} is a Python WSGI (Web Server Gateway Interface)
9985middle-ware for adding HTTP and HTTPS proxy support to a WSGI application.
9986The library accepts HTTP and HTTPS proxy connections, and routes them to a
9987designated prefix.")
9988 (license license:asl2.0)))
9989
9990(define-public python-warcio
9991 ;; The PyPI release is missing some test support files (see:
9992 ;; https://github.com/webrecorder/warcio/issues/132).
9993 (package
9994 (name "python-warcio")
9995 (version "1.7.5")
9996 (source
9997 (origin
9998 (method git-fetch)
9999 (uri (git-reference
10000 (url "https://github.com/webrecorder/warcio")
10001 (commit (string-append "v" version))))
10002 (file-name (git-file-name name version))
10003 (sha256
10004 (base32
10005 "0r3kijsm8wsbipi5pxsrqpg5nn4w8iaw5i8010b0ligmfxnxamlb"))))
10006 (build-system pyproject-build-system)
10007 (arguments
10008 (list
10009 #:test-flags ; These tests fail due to networking requirements.
10010 '(list "-k" (format #f "not ~a"
10011 (string-join
10012 '("test_post_chunked"
10013 "test_remote"
10014 "test_capture_http_proxy"
10015 "test_capture_https_proxy"
10016 "test_capture_https_proxy_same_session")
10017 " and not "))
10018 ; The following test requires the hookdns package.
10019 "--ignore=test/test_capture_http_proxy.py")))
10020 (native-inputs
10021 ;; These inputs are required for the test suite.
10022 (list python-httpbin
10023 python-pytest-cov
10024 python-requests
10025 python-setuptools
10026 python-wheel
10027 python-wsgiprox))
10028 (home-page "https://github.com/webrecorder/warcio")
10029 (synopsis "Streaming web archival archive (WARC) library")
10030 (description "warcio is a Python library to read and write the WARC format
10031commonly used in Web archives. It is designed for fast, low-level access to
10032web archival content, oriented around a stream of WARC records rather than
10033files.")
10034 (license license:asl2.0)))
10035
10036(define-public python-websockets
10037 (package
10038 (name "python-websockets")
10039 (version "13.1")
10040 (source
10041 (origin
10042 (method git-fetch)
10043 (uri (git-reference
10044 (url "https://github.com/aaugustin/websockets")
10045 (commit version)))
10046 (file-name (git-file-name name version))
10047 (sha256
10048 (base32
10049 "1dx3rf6fmg4ir9cfcn1fil446qz879cwrjq2rcz5zvl71xkw6hb3"))))
10050 (build-system pyproject-build-system)
10051 (arguments
10052 (list #:test-backend #~'unittest
10053 #:phases
10054 #~(modify-phases %standard-phases
10055 (add-before 'check 'extend-test-timeout
10056 (lambda _
10057 ;; Some architectures need an even longer timeout. Make it
10058 ;; long enough that it should never fail due to timeout.
10059 #$@(if (target-riscv64?)
10060 #~((setenv "WEBSOCKETS_TESTS_TIMEOUT_FACTOR" "100"))
10061 #~((setenv "WEBSOCKETS_TESTS_TIMEOUT_FACTOR" "10"))))))))
10062 (native-inputs
10063 (list python-setuptools
10064 python-wheel))
10065 (home-page "https://github.com/aaugustin/websockets")
10066 (synopsis
10067 "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
10068 (description
10069 "@code{websockets} is a library for building WebSocket servers and clients
10070in Python with a focus on correctness and simplicity.
10071
10072Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
10073it provides an elegant coroutine-based API.")
10074 (license license:bsd-3)))
10075
10076(define-public selenium-manager
10077 (package
10078 (name "selenium-manager")
10079 (version "4.34.2")
10080 (source
10081 (origin
10082 (method git-fetch)
10083 (uri (git-reference
10084 (url "https://github.com/SeleniumHQ/selenium")
10085 (commit (string-append "selenium-" version "-python"))))
10086 (file-name (git-file-name name version))
10087 (sha256
10088 (base32 "14fg8r4rm9d7169rlm29l5yn08wgllmqk1zc6six3dlrzzf5mxil"))))
10089 (build-system cargo-build-system)
10090 (arguments
10091 (list
10092 ;; XXX: Almost all tests require either browsers or network access.
10093 #:tests? #f
10094 #:install-source? #f ; Most likely intended as a leaf.
10095 #:phases
10096 #~(modify-phases %standard-phases
10097 (add-after 'unpack 'chdir
10098 (lambda _
10099 (chdir "rust"))))))
10100 (native-inputs (list pkg-config))
10101 (inputs (cons* (list zstd "lib") xz
10102 (cargo-inputs 'selenium-manager)))
10103 (home-page "https://www.selenium.dev")
10104 (synopsis "CLI tool to manager the browser test infrastructure")
10105 (description
10106 "Selenium simplifies web browser automation. It specifically provides
10107infrastructure for the W3C WebDriver specification — a platform and
10108language-neutral coding interface compatible with all major web browsers.
10109
10110Selenium Manager is a CLI tool that automatically manages the browser/driver
10111infrastructure required by Selenium.")
10112 (license license:asl2.0)))
10113
10114(define-public python-selenium
10115 (package/inherit selenium-manager
10116 (name "python-selenium")
10117 (build-system pyproject-build-system)
10118 (arguments
10119 (list
10120 ;; XXX: Disable failing tests.
10121 #:test-flags
10122 #~(list "--ignore-glob=test/selenium/webdriver/*"
10123 ;; Probably requires those.
10124 "--ignore-glob=test/unit/selenium/webdriver/chrome/*"
10125 "--ignore-glob=test/unit/selenium/webdriver/firefox/*"
10126 ;; XXX: SSL certificates access.
10127 "--ignore=test/unit/selenium/webdriver/remote/remote_connection_tests.py"
10128 "-k" "not test_missing_cdp_devtools_version_falls_back")
10129 #:phases
10130 #~(modify-phases %standard-phases
10131 (add-after 'unpack 'chdir
10132 (lambda _
10133 (chdir "py")))
10134 (add-after 'chdir 'inject-selenium-manager-binary
10135 (lambda* (#:key inputs #:allow-other-keys)
10136 (substitute* "selenium/webdriver/common/selenium_manager.py"
10137 (("compiled_path = Path.*")
10138 (format #f "return Path(~s)~%"
10139 (search-input-file inputs "bin/selenium-manager"))))
10140 (substitute* "pyproject.toml"
10141 (("\\[\\[tool\\.setuptools-rust\\.bins\\]\\]")
10142 "")
10143 (("target = \"selenium\\.webdriver\\.common.*\"")
10144 ""))))
10145 (add-after 'chdir 'relax-requirements
10146 (lambda _
10147 (substitute* "pyproject.toml"
10148 (("\"(typing_extensions|trio)~=.*\"," _ target)
10149 (format #f "~s," target))))))))
10150 (propagated-inputs (list python-certifi
10151 python-trio
10152 python-trio-websocket
10153 python-typing-extensions
10154 python-urllib3
10155 python-websocket-client))
10156 (inputs (list selenium-manager))
10157 (native-inputs (list python-filetype
10158 python-pytest
10159 python-pytest-mock
10160 python-pytest-trio
10161 python-setuptools
10162 python-setuptools-rust))
10163 (synopsis "Python bindings for Selenium")
10164 (description
10165 "Selenium enables web browser automation. It specifically provides
10166infrastructure for the W3C WebDriver specification — a platform and
10167language-neutral coding interface compatible with all major web browsers.")))
10168
10169(define-public python-rapidjson
10170 (package
10171 (name "python-rapidjson")
10172 (version "1.10")
10173 (source
10174 (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "python-rapidjson" version))
10177 (sha256
10178 (base32
10179 "0h1m9m4a5rlf5hw6ak7z3qbgdhmqarzxw9d140mcf7mrxpswpzmc"))
10180 (modules '((guix build utils)))
10181 (snippet
10182 '(delete-file-recursively "rapidjson"))))
10183 (build-system pyproject-build-system)
10184 (arguments
10185 (list
10186 #:test-flags '(list "tests")
10187 #:phases
10188 #~(modify-phases %standard-phases
10189 ;; We cannot seem to use #:configure-flags with the
10190 ;; pyproject-build-system to override rj_include_dir.
10191 (add-after 'unpack 'override-rapidjson-sources
10192 (lambda _
10193 (substitute* "setup.py"
10194 (("^rj_include_dir =.*")
10195 (string-append "rj_include_dir = '"
10196 #$(this-package-native-input "rapidjson")
10197 "/include/rapidjson" "'"))
10198 (("if not os.path.isdir.*") "if False:")))))))
10199 (native-inputs
10200 (list rapidjson python-pytest python-pytz python-setuptools python-wheel))
10201 (home-page "https://github.com/python-rapidjson/python-rapidjson")
10202 (synopsis "Python wrapper around rapidjson")
10203 (description "This package provides a python wrapper around rapidjson.")
10204 (license license:expat)))
10205
10206(define-public python-venusian
10207 (package
10208 (name "python-venusian")
10209 (version "3.1.1")
10210 (source
10211 (origin
10212 (method url-fetch)
10213 (uri (pypi-uri "venusian" version))
10214 (sha256
10215 (base32 "0h8cdwx5x6i1ydc9s0hxwvy73l6iwlqijn2l77mq74k6anrv6ksk"))))
10216 (build-system pyproject-build-system)
10217 (arguments
10218 (list
10219 #:phases
10220 #~(modify-phases %standard-phases
10221 (add-after 'unpack 'fix-pytest-config
10222 (lambda _
10223 (substitute* "setup.cfg"
10224 (("--cov --cov-report=term-missing ") "")))))))
10225 (native-inputs
10226 (list python-pytest
10227 python-setuptools))
10228 (home-page "https://docs.pylonsproject.org/projects/venusian")
10229 (synopsis "Library for deferring decorator actions")
10230 (description
10231 "Venusian is a library which allows framework authors to defer decorator
10232actions. Instead of taking actions when a function (or class) decorator is
10233executed at import time, you can defer the action usually taken by the
10234decorator until a separate scan phase.")
10235 (license license:repoze)))
10236
10237(define-public python-zope-deprecation
10238 (package
10239 (name "python-zope-deprecation")
10240 (version "6.0")
10241 (source (origin
10242 (method url-fetch)
10243 (uri (pypi-uri "zope_deprecation" version))
10244 (sha256
10245 (base32
10246 "0pzimp7xr8m0836bbsrx8wa9ybl58s5hwacas95nsfp6m2ypwwhq"))))
10247 (build-system pyproject-build-system)
10248 (arguments
10249 (list #:tests? #f)) ;no tests in PyPI
10250 (native-inputs
10251 (list python-setuptools))
10252 (home-page "https://zopedeprecation.readthedocs.io/")
10253 (synopsis "Function for marking deprecations")
10254 (description "The @code{zope.deprecation} module provides a function for
10255marking modules, classes, functions, methods and properties as deprecated,
10256displaying warnings when usaged in application code.")
10257 (license license:zpl2.1)))
10258
10259(define-public python-translationstring
10260 (package
10261 (name "python-translationstring")
10262 (version "1.4")
10263 (source (origin
10264 (method url-fetch)
10265 (uri (pypi-uri "translationstring" version))
10266 (sha256
10267 (base32
10268 "1wvncdzi1wj37x226qcf0yycz7js6l83na0pmc9blsbfsww7b55z"))))
10269 (build-system pyproject-build-system)
10270 (native-inputs
10271 (list python-pytest
10272 python-setuptools))
10273 (home-page "https://docs.pylonsproject.org/projects/translationstring")
10274 (synopsis "Internationalization tooling for the Pylons project")
10275 (description "This package provides a library used by various Pylons
10276project packages for internationalization (i18n) duties related to
10277translation.")
10278 (license license:repoze)))
10279
10280(define-public python-plaster
10281 (package
10282 (name "python-plaster")
10283 (version "1.1.2")
10284 (source (origin
10285 (method url-fetch)
10286 (uri (pypi-uri "plaster" version))
10287 (sha256
10288 (base32
10289 "167gfh0ahdll9m96ypgasji6yry2hkn9f0ml1b0lf4ccpxagrgpq"))))
10290 (build-system pyproject-build-system)
10291 (native-inputs
10292 (list python-pytest
10293 python-setuptools))
10294 (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
10295 (synopsis "Configuration loader for multiple config file formats")
10296 (description
10297 "Plaster is a loader interface around multiple config file formats. It
10298exists to define a common API for applications to use when they wish to load
10299configuration. The library itself does not aim to handle anything except a
10300basic API that applications may use to find and load configuration settings.
10301Any specific constraints should be implemented in a pluggable loader which can
10302be registered via an entrypoint.")
10303 (license license:repoze)))
10304
10305(define-public python-plaster-pastedeploy
10306 (package
10307 (name "python-plaster-pastedeploy")
10308 (version "1.0.1")
10309 (source (origin
10310 (method url-fetch)
10311 (uri (pypi-uri "plaster_pastedeploy" version))
10312 (sha256
10313 (base32
10314 "04hl71p76wnwiy195p5w51bn3c6ba0lgx8nsfm42d9s15rnjw9my"))))
10315 (build-system pyproject-build-system)
10316 (native-inputs
10317 (list python-pytest
10318 python-setuptools))
10319 (propagated-inputs
10320 (list python-plaster python-pastedeploy))
10321 (home-page "https://github.com/Pylons/plaster_pastedeploy")
10322 (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
10323 (description
10324 "This plugin for @code{python-plaster} adds support for PasteDeploy
10325syntax, it provides a plaster @code{Loader} object that can parse ini files
10326according to the standard set by PasteDeploy")
10327 (license license:expat)))
10328
10329(define-public python-hupper
10330 (package
10331 (name "python-hupper")
10332 (version "1.12.1")
10333 (source
10334 (origin
10335 (method url-fetch)
10336 (uri (pypi-uri "hupper" version))
10337 (sha256
10338 (base32 "1srj7sqxdgxr0nnhh9lw8jmp64chwgg8iwfm9b4g9v7l1wbm9gq6"))))
10339 (build-system pyproject-build-system)
10340 (arguments
10341 (list
10342 ;; RuntimeError: timeout waiting for change to
10343 ;; file=/tmp/guix-build-python-hupper-1.12.1.drv-0/tmpm9n4697p
10344 #:test-flags #~(list "--ignore=tests/test_it.py")))
10345 (native-inputs
10346 (list python-pytest
10347 python-pytest-cov
10348 python-setuptools
10349 python-wheel))
10350 (propagated-inputs
10351 (list python-watchdog))
10352 (home-page "https://readthedocs.org/projects/hupper")
10353 (synopsis "Integrated process monitor tracking changes to imported Python files")
10354 (description
10355 "Hupper is an integrated process monitor that will track changes to any
10356imported Python files in sys.modules as well as custom paths. When files are
10357changed the process is restarted.")
10358 (license license:expat)))
10359
10360(define-public python-pyowm
10361 (package
10362 (name "python-pyowm")
10363 (version "3.3.0")
10364 (source
10365 (origin
10366 (method git-fetch)
10367 (uri (git-reference
10368 (url "https://github.com/csparpa/pyowm")
10369 (commit version)))
10370 (file-name (git-file-name name version))
10371 (sha256
10372 (base32
10373 "1ha4pp96y3jk33qnyir5851cnj4dc06q6wqn1b0w54l3fsds28vi"))))
10374 (build-system pyproject-build-system)
10375 (arguments (list #:test-flags #~(list "tests/unit")))
10376 (native-inputs (list python-pytest python-setuptools python-wheel))
10377 (propagated-inputs
10378 (list python-geojson-for-pyowm
10379 python-pysocks
10380 python-requests))
10381 (home-page "https://github.com/csparpa/pyowm")
10382 (synopsis "Python wrapper around OpenWeatherMap web APIs")
10383 (description
10384 "This package provides a Python wrapper around OpenWeatherMap web APIs.")
10385 (license license:expat)))
10386
10387(define-public python-pyramid
10388 (package
10389 (name "python-pyramid")
10390 (version "2.0.2")
10391 (source (origin
10392 (method url-fetch)
10393 (uri (pypi-uri "pyramid" version))
10394 (sha256
10395 (base32
10396 "1phqdz068hl3zda263qkjp5am8fmvmpcxp3nrhsna8g472kkh89p"))))
10397 (build-system pyproject-build-system)
10398 (propagated-inputs
10399 (list python-hupper
10400 python-plaster
10401 python-plaster-pastedeploy
10402 python-setuptools
10403 python-translationstring
10404 python-venusian
10405 python-webob
10406 python-zope-component
10407 python-zope-deprecation
10408 python-zope-interface))
10409 (native-inputs (list python-pytest python-webtest python-wheel))
10410 (home-page "https://trypyramid.com/")
10411 (synopsis "Python web-framework suitable for small and large sites")
10412 (description
10413 "Pyramid makes it easy to write web applications. From minimal
10414request/response web apps to larger, grown applications.")
10415 (license license:repoze)))
10416
10417(define-public python-pyramid-chameleon
10418 ;; PyPI lacks a fresh release, use the latest commit assosiated with
10419 ;; unrleased version, see:
10420 ;; <https://github.com/Pylons/pyramid_chameleon/issues/27>
10421 (let ((commit "956c77ba37120c430e871c834d3cd4ed5ac8dccf")
10422 (revision "0"))
10423 (package
10424 (name "python-pyramid-chameleon")
10425 (version (git-version "0.4.dev0" revision commit))
10426 (source
10427 (origin
10428 (method git-fetch)
10429 (uri (git-reference
10430 (url "https://github.com/Pylons/pyramid_chameleon")
10431 (commit commit)))
10432 (file-name (git-file-name name version))
10433 (sha256
10434 (base32 "0rsb921xi7736h1xikc904bq2zzmrj1g8qgyimjw5wxdcd8927b1"))))
10435 (build-system pyproject-build-system)
10436 (native-inputs
10437 (list python-pytest
10438 python-setuptools))
10439 (propagated-inputs
10440 (list python-chameleon
10441 python-pyramid))
10442 (home-page "https://github.com/Pylons/pyramid_chameleon")
10443 (synopsis "Chameleon template compiler for pyramid")
10444 (description
10445 "These package provides bindings for the Chameleon templating system
10446 for the Pyramid web framework.")
10447 (license license:repoze))))
10448
10449(define-public python-pyramid-debugtoolbar
10450 (package
10451 (name "python-pyramid-debugtoolbar")
10452 (version "4.12.1")
10453 (source
10454 (origin
10455 (method url-fetch)
10456 (uri (pypi-uri "pyramid_debugtoolbar" version))
10457 (sha256
10458 (base32 "0gdlc7vcga4vzma53h5csnhh4gwfmv3w8v9y5fhwqpy8979qis3i"))))
10459 (build-system pyproject-build-system)
10460 (arguments
10461 (list
10462 #:test-flags
10463 ;; Large diff assertion not equal faileurs.
10464 #~(list #$@(map (lambda (test)
10465 (string-append "--deselect=tests"
10466 "/test_panels/test_sqla.py::" test))
10467 (list "TestSimpleSelect::test_panel"
10468 "TestTransactionCommit::test_panel"
10469 "TestTransactionRollback::test_panel")))))
10470 (native-inputs
10471 (list python-pytest
10472 python-setuptools
10473 python-webtest))
10474 (propagated-inputs
10475 (list python-pyramid
10476 python-pyramid-chameleon
10477 python-pyramid-jinja2
10478 python-pyramid-mako
10479 ;; python-selenium ; see: guix/guix#3478
10480 python-sqlalchemy
10481 python-waitress))
10482 (home-page "https://github.com/Pylons/pyramid_debugtoolbar")
10483 (synopsis "Pyramid debug toolbar")
10484 (description
10485 "This package provides an interactive HTML debugger for Pyramid application
10486development.")
10487 (license license:bsd-3)))
10488
10489(define-public python-pyramid-jinja2
10490 (package
10491 (name "python-pyramid-jinja2")
10492 (version "2.10.1")
10493 (source
10494 (origin
10495 (method url-fetch)
10496 (uri (pypi-uri "pyramid_jinja2" version))
10497 (sha256
10498 (base32 "0xqnqbqhx9bkrg2ic3blflsk8xc8kh7i2dm2kha9apqkbjrqql4c"))))
10499 (build-system pyproject-build-system)
10500 (arguments
10501 (list
10502 #:test-flags
10503 ;; Two tests failed with assertion not equal.
10504 #~(list "-k" "not test_it_relative_to_package and not test_options")
10505 #:phases
10506 #~(modify-phases %standard-phases
10507 (add-after 'unpack 'fix-pytest-config
10508 (lambda _
10509 (substitute* "setup.cfg"
10510 ((" --cov") "")))))))
10511 (native-inputs
10512 (list python-pytest
10513 python-setuptools
10514 python-webtest))
10515 (propagated-inputs
10516 (list python-jinja2
10517 python-markupsafe
10518 python-pyramid
10519 python-zope-deprecation))
10520 (home-page "https://github.com/Pylons/pyramid_jinja2")
10521 (synopsis "Jinja2 template bindings for the Pyramid web framework")
10522 (description "This package provides Jinja2 template bindings for the
10523Pyramid web framework.")
10524 (license license:repoze)))
10525
10526(define-public python-pyramid-mako
10527 ;; 1.1.0 was released in 2019, there a lot of compatability changes on
10528 ;; master, us the latest commit for now.
10529 (let ((commit "1a6f4c00c7134530d2975f34d904b64a41b28b21")
10530 (revision "0"))
10531 (package
10532 (name "python-pyramid-mako")
10533 (version (git-version "1.1.0" revision commit))
10534 (source
10535 (origin
10536 (method git-fetch)
10537 (uri (git-reference
10538 (url "https://github.com/Pylons/pyramid_mako")
10539 (commit commit)))
10540 (file-name (git-file-name name version))
10541 (sha256
10542 (base32 "0v0571z2gby4apsalkdk83gs0d5mw79d56518h3bwwxzbq32kkns"))))
10543 (build-system pyproject-build-system)
10544 (arguments
10545 (list
10546 #:phases
10547 #~(modify-phases %standard-phases
10548 (add-after 'unpack 'fix-pytest-config
10549 (lambda _
10550 (substitute* "pyproject.toml"
10551 ((" --cov --cov-report=term-missing") "")))))))
10552 (native-inputs
10553 (list python-pytest
10554 python-setuptools))
10555 (propagated-inputs
10556 (list python-mako
10557 python-pyramid))
10558 (home-page "https://github.com/Pylons/pyramid_mako")
10559 (synopsis "Mako template bindings for the Pyramid web framework")
10560 (description
10561 "This package provides Mako template bindings for the Pyramid web
10562framework.")
10563 (license license:repoze))))
10564
10565(define-public python-pyramid-retry
10566 (package
10567 (name "python-pyramid-retry")
10568 (version "2.1.1")
10569 (source
10570 (origin
10571 (method url-fetch)
10572 (uri (pypi-uri "pyramid_retry" version))
10573 (sha256
10574 (base32 "1jf07v6zhli0abgm2qajzfwg68bl9zy4xygjwl4svawbwrm2ga5s"))))
10575 (build-system pyproject-build-system)
10576 (native-inputs
10577 (list python-pytest
10578 python-setuptools
10579 python-webtest))
10580 (propagated-inputs
10581 (list python-pyramid
10582 python-zope-interface))
10583 (home-page "https://github.com/Pylons/pyramid_retry")
10584 (synopsis "Pyramid execution policy supporting retrying failed requests")
10585 (description
10586 "@code{pyramid_retry} is an execution policy for Pyramid that wraps requests
10587and can retry them a configurable number of times under certain \"retryable\"
10588error conditions before indicating a failure to the client.")
10589 (license license:expat)))
10590
10591(define-public python-pyramid-tm
10592 (package
10593 (name "python-pyramid-tm")
10594 (version "2.6")
10595 (source
10596 (origin
10597 (method url-fetch)
10598 (uri (pypi-uri "pyramid_tm" version))
10599 (sha256
10600 (base32 "173hg16hldfh5n3mn482xx64nldk308dzri31jd0qa4528cx4j41"))))
10601 (build-system pyproject-build-system)
10602 (arguments
10603 (list
10604 #:phases
10605 #~(modify-phases %standard-phases
10606 (add-after 'unpack 'fix-pytest-config
10607 (lambda _
10608 (substitute* "setup.cfg"
10609 ((" --cov") "")))))))
10610 (native-inputs
10611 (list python-pytest
10612 python-setuptools
10613 python-webtest))
10614 (propagated-inputs
10615 (list python-pyramid
10616 python-transaction))
10617 (home-page "https://github.com/Pylons/pyramid_tm")
10618 (synopsis "Centralized transaction management for Pyramid")
10619 (description
10620 "@code{pyramid_tm} is a package which allows Pyramid requests to join the
10621active @url{https://pypi.org/project/transaction/, transaction} as provided by
10622the Python transaction package.")
10623 (license license:repoze)))
10624
10625(define-public python-random-user-agent
10626 (package
10627 (name "python-random-user-agent")
10628 (version "1.0.1")
10629 (source
10630 (origin
10631 (method url-fetch)
10632 (uri (pypi-uri "random_user_agent" version))
10633 (sha256
10634 (base32 "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
10635 (build-system pyproject-build-system)
10636 (arguments (list #:tests? #f)) ; No tests.
10637 (native-inputs (list python-setuptools))
10638 (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
10639 (synopsis "List of user agents")
10640 (description
10641 "This package provides a list of user agents, from a collection of more
10642than 326,000 known user-agents. Users can pick a random one, or select one
10643based on filters.")
10644 (license license:expat)))
10645
10646(define-public python-rangehttpserver
10647 (package
10648 (name "python-rangehttpserver")
10649 (version "1.4.0")
10650 (source
10651 (origin
10652 (method git-fetch)
10653 (uri (git-reference
10654 (url "https://github.com/danvk/RangeHTTPServer")
10655 (commit version)))
10656 (file-name (git-file-name name version))
10657 (sha256
10658 (base32 "1dx533fsbq1mbz3by7qkm5bh2c253nwvm8214pqbwbfq07kqkwf2"))))
10659 (build-system pyproject-build-system)
10660 (native-inputs
10661 (list python-pytest
10662 python-requests
10663 python-setuptools))
10664 (home-page "https://github.com/danvk/RangeHTTPServer")
10665 (synopsis "SimpleHTTPServer with support for range requests")
10666 (description
10667 "This tool provides a simple HTTP server with support for Range
10668requests.")
10669 (license license:asl2.0)))
10670
10671(define-public python-flask-restx
10672 (package
10673 (name "python-flask-restx")
10674 (version "1.3.0")
10675 (source
10676 (origin
10677 (method git-fetch) ;no tests in PyPI archive
10678 (uri (git-reference
10679 (url "https://github.com/python-restx/flask-restx")
10680 (commit version)))
10681 (file-name (git-file-name name version))
10682 (sha256
10683 (base32 "1qmm3i1cdv0bvzsc1gn4ql2dsf1fbx85fk69vcmzpsdxzczmw508"))))
10684 (build-system pyproject-build-system)
10685 (arguments
10686 (list
10687 ;; 1214 passed, 6 skipped, 16 deselected, 3 warnings
10688 #:test-flags
10689 #~(list "--benchmark-skip"
10690 ;; ValueError: http://www.google.com is not a valid URL. Domain
10691 ;; does not exists.
10692 "--deselect=tests/test_inputs.py::URLTest::test_check"
10693 "-k" (string-join
10694 ;; See: <https://github.com/python-restx/flask-restx/issues/620>.
10695 (list "not test_rfc822_value"
10696 "test_iso8601_value"
10697 ;; assert 404 == 2000
10698 "test_specs_endpoint_host_and_subdomain"
10699 ;; ValueError: [email protected] is not a valid email
10700 "test_valid_value_check")
10701 " and not "))))
10702 (native-inputs
10703 (list python-blinker
10704 python-faker
10705 python-pytest
10706 python-pytest-benchmark
10707 python-pytest-flask
10708 python-pytest-mock
10709 python-setuptools))
10710 (propagated-inputs
10711 (list python-aniso8601
10712 python-flask
10713 python-importlib-resources
10714 python-jsonschema
10715 python-pytz
10716 python-werkzeug))
10717 (home-page "https://github.com/python-restx/flask-restx")
10718 (synopsis
10719 "Framework for fast, easy and documented API development with Flask")
10720 (description
10721 "Flask-RESTX is an extension for Flask that adds support for quickly building
10722REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
10723 with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
10724decorators and tools to describe your API and expose its documentation properly using
10725Swagger.")
10726 (license license:bsd-3)))
10727
10728(define-deprecated-package python-flask-restplus
10729 python-flask-restx)
10730
10731(define-public python-flask-socketio
10732 (package
10733 (name "python-flask-socketio")
10734 (version "5.5.1")
10735 (source
10736 (origin
10737 (method url-fetch)
10738 (uri (pypi-uri "flask_socketio" version))
10739 (sha256
10740 (base32
10741 "1i0yqn39b4v4r2whppx47sg7iicvqzssd1clx7cclk07l52cjinr"))))
10742 (build-system pyproject-build-system)
10743 (propagated-inputs
10744 (list python-flask python-socketio))
10745 (native-inputs
10746 (list python-pytest python-redis python-setuptools python-wheel))
10747 (home-page "https://github.com/miguelgrinberg/Flask-SocketIO/")
10748 (synopsis "Socket.IO integration for Flask applications")
10749 (description "Socket.IO integration for Flask applications")
10750 (license license:expat)))
10751
10752(define-public python-manuel
10753 (package
10754 (name "python-manuel")
10755 (version "1.13.0")
10756 (source
10757 (origin
10758 (method url-fetch)
10759 (uri (pypi-uri "manuel" version))
10760 (sha256
10761 (base32 "0nl8psji3fizbxw34gdg22dndlg9lf5f56mnh1vr4vgsx06i4qsx"))))
10762 (build-system pyproject-build-system)
10763 (arguments
10764 (list
10765 ;; FIXME: Tests are broken, see: <https://github.com/benji-york/manuel/pull/32>.
10766 #:tests? #f))
10767 (propagated-inputs
10768 (list python-setuptools)) ;install requires
10769 (home-page "https://pypi.org/project/manuel/")
10770 (synopsis "Build tested documentation")
10771 (description
10772 "Manuel lets you mix and match traditional doctests with custom test syntax.")
10773 (license license:asl2.0)))
10774
10775(define-public python-marshmallow-jsonapi
10776 (package
10777 (name "python-marshmallow-jsonapi")
10778 (version "0.26.0")
10779 (source
10780 (origin
10781 (method git-fetch)
10782 (uri (git-reference
10783 ;; XXX: Deprecated upstream: This repository has been archived
10784 ;; by the owner on Jun 6, 2024. It is now read-only.
10785 ;; Using a maintained fork. The pypi name of this fork
10786 ;; is marshmallow-jsonapi-minfork.
10787 (url "https://github.com/tadams42/marshmallow-jsonapi")
10788 (commit version)))
10789 (file-name (git-file-name name version))
10790 (sha256
10791 (base32 "07sizh4m03rrk1139ci3psh5npk42cdsdfsdp574pz1fd5ncrq91"))))
10792 (build-system pyproject-build-system)
10793 (native-inputs
10794 (list python-faker
10795 python-flask
10796 python-pytest
10797 python-setuptools))
10798 (propagated-inputs (list python-marshmallow))
10799 (home-page "https://github.com/marshmallow-code/marshmallow-jsonapi")
10800 (synopsis "JSON:API 1.0 formatting with Marshmallow")
10801 (description
10802 "The marshmallow-jsonapi package provides a simple way to produce
10803@uref{https://jsonapi.org, JSON:API}-compliant data in any Python Web
10804framework. It includes optional utilities to integrate with Flask. This is a
10805forked version whose pypi name is @code{marshmallow_jsonapi_minfork}.")
10806 (license license:expat)))
10807
10808(define-public python-pecan
10809 (package
10810 (name "python-pecan")
10811 (version "1.6.1")
10812 (source
10813 (origin
10814 (method git-fetch) ;no tests in pypi release
10815 (uri (git-reference
10816 (url "https://github.com/pecan/pecan")
10817 (commit version)))
10818 (file-name (git-file-name name version))
10819 (sha256
10820 (base32
10821 "1ybjvpws741bvxd7aq5hh8gv5sk9836hb9afgalqsm0lxsq0li3a"))))
10822 (build-system pyproject-build-system)
10823 (arguments
10824 (list
10825 #:test-flags '(list "--pyargs" "pecan")))
10826 (native-inputs
10827 (list gunicorn
10828 python-genshi
10829 python-jinja2
10830 python-pytest
10831 python-sqlalchemy))
10832 (propagated-inputs
10833 (list python-logutils
10834 python-mako
10835 python-six
10836 python-webob
10837 python-webtest))
10838 (home-page "http://github.com/pecan/pecan")
10839 (synopsis "WSGI object-dispatching web framework")
10840 (description "This package provides a WSGI object-dispatching web
10841framework, designed to be lean and fast, with few dependencies.")
10842 (license license:bsd-3)))
10843
10844(define-public python-persistent
10845 (package
10846 (name "python-persistent")
10847 (version "6.1.1")
10848 (source
10849 (origin
10850 (method git-fetch)
10851 (uri (git-reference
10852 (url "https://github.com/zopefoundation/persistent/")
10853 (commit version)))
10854 (file-name (git-file-name name version))
10855 (sha256
10856 (base32 "19qwqg49zql2c8l4vjxjb9haw0bzd6lk8p4v3hip2irch6a4578a"))))
10857 (build-system pyproject-build-system)
10858 (arguments
10859 (list
10860 #:phases
10861 #~(modify-phases %standard-phases
10862 (replace 'check
10863 (lambda* (#:key tests? #:allow-other-keys)
10864 (if tests?
10865 (invoke "zope-testrunner" "--test-path=src"
10866 ;; XXX: Ignore doc tests.
10867 "!persistent.tests.test_docs")
10868 (format #t "test suite not run~%")))))))
10869 (propagated-inputs
10870 (list python-cffi
10871 python-zope-deferredimport
10872 python-zope-interface
10873 python-zope-testrunner))
10874 (native-inputs
10875 (list python-manuel python-zope-testrunner python-setuptools))
10876 (home-page "https://github.com/zopefoundation/persistent/")
10877 (synopsis "Translucent persistent objects")
10878 (description
10879 "This package contains a generic persistence implementation for Python.
10880It forms the core protocol for making objects interact \"transparently\" with
10881a database such as the ZODB.")
10882 (license license:zpl2.1)))
10883
10884(define-public python-btrees
10885 (package
10886 (name "python-btrees")
10887 (version "6.1")
10888 (source
10889 (origin
10890 (method git-fetch)
10891 (uri (git-reference
10892 (url "https://github.com/zopefoundation/BTrees")
10893 (commit version)))
10894 (file-name (git-file-name name version))
10895 (sha256
10896 (base32 "0vcibmd725ddgsl5yzmi8d403day3796h82xlq84w91xbdrbd5d5"))))
10897 (build-system pyproject-build-system)
10898 (arguments
10899 (list
10900 #:phases
10901 #~(modify-phases %standard-phases
10902 (replace 'check
10903 (lambda* (#:key tests? #:allow-other-keys)
10904 (if tests?
10905 (invoke "zope-testrunner" "--test-path=src")
10906 (format #t "test suite not run~%")))))))
10907 (propagated-inputs (list python-persistent python-zope-interface))
10908 (native-inputs (list python-persistent python-transaction
10909 python-zope-testrunner python-setuptools))
10910 (home-page "https://github.com/zopefoundation/BTrees")
10911 (synopsis "Scalable persistent object containers")
10912 (description
10913 "This package contains a set of persistent object containers built around a
10914modified BTree data structure. The trees are optimized for use inside ZODB's
10915\"optimistic concurrency\" paradigm, and include explicit resolution of
10916conflicts detected by that mechanism.")
10917 (license license:zpl2.1)))
10918
10919(define-public python-transaction
10920 (package
10921 (name "python-transaction")
10922 (version "5.0")
10923 (source
10924 (origin
10925 (method url-fetch)
10926 (uri (pypi-uri "transaction" version))
10927 (sha256
10928 (base32 "0x0i5graxb93aa8bwf5rmm9zq7d7r6q2b4pw358wph5whbbpnvhh"))))
10929 (build-system pyproject-build-system)
10930 (native-inputs
10931 (list python-pytest
10932 python-setuptools))
10933 (propagated-inputs
10934 (list python-zope-interface))
10935 (home-page "https://github.com/zopefoundation/transaction")
10936 (synopsis "Transaction management for Python")
10937 (description "This package contains a generic transaction implementation
10938for Python. It is mainly used by the ZODB.")
10939 (license license:zpl2.1)))
10940
10941(define-public python-truststore
10942 (package
10943 (name "python-truststore")
10944 (version "0.10.4")
10945 (source
10946 (origin
10947 (method url-fetch)
10948 (uri (pypi-uri "truststore" version))
10949 (sha256
10950 (base32 "00f3xc7720rkddsn291yrw871kfnimi6d9xbwi75xbb3ci1vv4cx"))))
10951 (build-system pyproject-build-system)
10952 (arguments
10953 (list #:tests? #f)) ;all tests require Internet access
10954 (native-inputs
10955 (list python-flit-core))
10956 (home-page "https://github.com/sethmlarson/truststore")
10957 (synopsis "Verify certificates using native system trust stores")
10958 (description
10959 "Truststore is a library which exposes native system certificate stores (ie
10960\"trust stores\") through an @code{ssl.SSLContext-like} API. This means that
10961Python applications no longer need to rely on certifi as a root certificate
10962store.")
10963 (license license:expat)))
10964
10965(define-public python-robot-detection
10966 (package
10967 (name "python-robot-detection")
10968 (version "0.4.0")
10969 (source
10970 (origin
10971 (method git-fetch)
10972 (uri (git-reference
10973 (url "https://github.com/rory/robot-detection")
10974 (commit (string-append "v" version))))
10975 (file-name (git-file-name name version))
10976 (sha256
10977 (base32 "1gxk13rn0gw5pfc4abhfnzg8qi05xa0ygs26pgkp0swygkzq6wsq"))))
10978 (build-system pyproject-build-system)
10979 (arguments (list #:test-backend #~'unittest))
10980 (native-inputs (list python-setuptools))
10981 (propagated-inputs (list python-six))
10982 (home-page "https://github.com/rory/robot-detection")
10983 (synopsis "Detect web crawlers")
10984 (description
10985 "@code{robot_detection} is a python module to detect if a given HTTP User
10986Agent is a web crawler. It uses the list of registered robots from
10987@url{http://www.robotstxt.org}.")
10988 (license license:gpl3+)))
10989
10990(define-public python-robotframework-requests
10991 (package
10992 (name "python-robotframework-requests")
10993 (version "0.9.7")
10994 (source
10995 (origin
10996 (method git-fetch) ; no tests in PyPI release
10997 (uri (git-reference
10998 (url "https://github.com/MarketSquare/robotframework-requests")
10999 (commit (string-append "v" version))))
11000 (file-name (git-file-name name version))
11001 (sha256
11002 (base32 "077j8p5k41v53slyv8h32fcmqfi7m6z3r4gmyqqaawm5szfmy61m"))))
11003 (build-system pyproject-build-system)
11004 (native-inputs
11005 (list python-pytest
11006 python-setuptools
11007 python-wheel))
11008 (propagated-inputs
11009 (list python-requests
11010 python-robotframework))
11011 (home-page "https://github.com/MarketSquare/robotframework-requests")
11012 (synopsis "Robot Framework keyword library wrapper around requests")
11013 (description
11014 "@code{RequestsLibrary} is a @url{https://robotframework.org/, Robot
11015Framework} library aimed to provide HTTP API testing functionalities by
11016wrapping the @code{requests} Python library.")
11017 (license license:expat)))
11018
11019(define-public python-pysolr
11020 (package
11021 (name "python-pysolr")
11022 (version "3.10.0")
11023 (source
11024 (origin
11025 (method url-fetch)
11026 (uri (pypi-uri "pysolr" version))
11027 (sha256
11028 (base32 "02gl1sma5cnpd7srpri1g68lpsg3s5n3lr462p5ll8v9s4nllyqj"))))
11029 (build-system pyproject-build-system)
11030 (arguments
11031 '(#:tests? #f)) ; Tests require network access.
11032 (native-inputs
11033 (list python-setuptools
11034 python-setuptools-scm
11035 python-wheel))
11036 (propagated-inputs
11037 (list python-requests))
11038 (home-page "https://github.com/django-haystack/pysolr/")
11039 (synopsis "Lightweight python wrapper for Apache Solr")
11040 (description
11041 "This module provides an interface that queries the Apache Solr server
11042using a pure Python implementation.")
11043 (license license:bsd-3)))
11044
11045(define-public python-pyjsparser
11046 ;; XXX: This project is potentially abandonware, consider to remove in next
11047 ;; refresh cycle, see:
11048 ;; <https://github.com/PiotrDabkowski/pyjsparser/issues/28>,
11049 ;; <https://github.com/PiotrDabkowski/pyjsparser/issues/39>, and
11050 ;; <https://github.com/PiotrDabkowski/pyjsparser/issues/40>.
11051 (package
11052 (name "python-pyjsparser")
11053 (version "2.7.1")
11054 (source
11055 (origin
11056 (method url-fetch)
11057 (uri (pypi-uri "pyjsparser" version))
11058 (sha256
11059 (base32 "0ycmf9fsvwliqmm1n6sfz7x71y7i2kbfgn39d8lsbiccfxmxlq5y"))))
11060 (build-system pyproject-build-system)
11061 (arguments
11062 '(#:tests? #f)) ;no tests in PyPI
11063 (native-inputs (list python-setuptools))
11064 (home-page "https://github.com/PiotrDabkowski/pyjsparser")
11065 (synopsis "Fast JavaScript parser")
11066 (description
11067 "This package provides a fast JavaScript parser (based on esprima.js)")
11068 (license license:expat)))
11069
11070(define-public python-js2py
11071 (package
11072 (name "python-js2py")
11073 (version "0.74")
11074 (source
11075 (origin
11076 (method url-fetch)
11077 (uri (pypi-uri "Js2Py" version))
11078 (sha256
11079 (base32 "0bwpp23qpx9amzqisiqvzlr17hr7vxqp4ry8lgxhw639hjmadwrr"))))
11080 (build-system pyproject-build-system)
11081 (arguments
11082 (list #:tests? #f)) ; tests require Node
11083 (native-inputs
11084 (list python-setuptools))
11085 (propagated-inputs
11086 (list python-pyjsparser
11087 python-six
11088 python-tzlocal))
11089 (home-page "https://github.com/PiotrDabkowski/Js2Py")
11090 (synopsis "JavaScript to Python translator")
11091 (description
11092 "This package provides a JavaScript to Python translator and a JavaScript
11093interpreter written in pure Python.")
11094 (license license:expat)))
11095
11096(define-public python-http-ece
11097 (package
11098 (name "python-http-ece")
11099 (version "1.2.1")
11100 (source
11101 (origin
11102 (method git-fetch)
11103 (uri (git-reference
11104 (url "https://github.com/web-push-libs/encrypted-content-encoding")
11105 (commit (string-append "v" version))))
11106 (file-name (git-file-name name version))
11107 (sha256
11108 (base32 "16kd9dsfpyfvq4iw6bbrrqrvsnf5lwgwa6p9f3b1y56ab18y0kzx"))))
11109 (build-system pyproject-build-system)
11110 (arguments
11111 `(#:phases
11112 (modify-phases %standard-phases
11113 (add-after 'unpack 'change-directory
11114 (lambda _ (chdir "python") #t)))))
11115 (native-inputs
11116 (list python-pytest
11117 python-pytest-cov
11118 python-setuptools))
11119 (propagated-inputs
11120 (list python-cryptography))
11121 (home-page "https://github.com/web-push-libs/encrypted-content-encoding")
11122 (synopsis "Encrypted Content Encoding for HTTP")
11123 (description
11124 "This package provides a simple implementation of Encrypted Content
11125Encoding for HTTP.")
11126 (license license:expat)))
11127
11128(define-public python-cloud-init
11129 (package
11130 (name "python-cloud-init")
11131 (version "24.2")
11132 (source
11133 (origin
11134 (method git-fetch)
11135 (uri (git-reference
11136 (url "https://github.com/canonical/cloud-init")
11137 (commit version)))
11138 (file-name (git-file-name name version))
11139 (sha256
11140 (base32 "18872z2y9wkh558y1bx5r0rksb4i584jbc8z4g8marwawhwxq506"))))
11141 (build-system pyproject-build-system)
11142 (arguments
11143 (list
11144 #:test-flags
11145 '(list
11146 ;; This requires usermod
11147 "--ignore=tests/unittests/distros/test_create_users.py"
11148 ;; This writes to /var
11149 "--ignore=tests/unittests/net/test_dhcp.py"
11150 "-k"
11151 (string-append
11152 ;; This test messes with PATH, so it cannot find mkdir
11153 "not test_path_env_gets_set_from_main"
11154 " and not test_apt_configure_sources_list_"
11155 ;; These all fail because /bin/sh doesn't exist. We cannot patch
11156 ;; this because the generated scripts must use /bin/sh as they are
11157 ;; supposed to be run on minimal systems.
11158 " and not test_handler_creates_and_runs_bootcmd_script_with_instance_id"
11159 " and not test_handler_runs_bootcmd_script_with_error"
11160 " and not test_subp_combined_stderr_stdout"
11161 " and not test_handle_part"))
11162 #:phases
11163 #~(modify-phases %standard-phases
11164 (add-after 'unpack 'patch-references
11165 (lambda _
11166 (substitute* "tests/unittests/cmd/test_clean.py"
11167 (("#!/bin/sh") (string-append "#!" (which "sh"))))))
11168 (add-after 'install 'move-files
11169 (lambda* (#:key inputs outputs #:allow-other-keys)
11170 (for-each (lambda (dir)
11171 (let ((source (string-append (site-packages inputs outputs) "/" dir))
11172 (target (string-append #$output "/" (basename dir))))
11173 (copy-recursively source target)
11174 (delete-file-recursively source)))
11175 (list "etc" "lib" "usr/lib" "usr/share")))))))
11176 (propagated-inputs
11177 (list python-configobj
11178 python-jinja2
11179 python-jsonpatch
11180 python-jsonschema
11181 python-netifaces
11182 python-oauthlib
11183 python-pyserial
11184 python-pyyaml
11185 python-responses))
11186 (native-inputs
11187 (list procps ;for ps when running tests
11188 python-pytest
11189 python-pytest-cov
11190 python-pytest-mock
11191 python-passlib
11192 python-setuptools
11193 python-wheel))
11194 (home-page "https://github.com/canonical/cloud-init")
11195 (synopsis "Cloud instance initialization tools")
11196 (description
11197 "Cloud-init is the multi-distribution method for cross-platform cloud
11198instance initialization. It is supported across all major public cloud
11199providers, provisioning systems for private cloud infrastructure, and
11200bare-metal installations.")
11201 ;; Either license can be chosen
11202 (license (list license:asl2.0 license:gpl3))))
11203
11204(define-public python-cloudscraper
11205 (package
11206 (name "python-cloudscraper")
11207 (version "3.0.0")
11208 (source
11209 (origin
11210 (method git-fetch)
11211 (uri (git-reference
11212 (url "https://github.com/VeNoMouS/cloudscraper")
11213 (commit version)))
11214 (file-name (git-file-name name version))
11215 (sha256
11216 (base32 "13w0ywz2y8x0zwpwzrnn46wyq307hfpdcz49zy33yyf46rq9n10n"))
11217 (modules '((guix build utils)))
11218 (snippet
11219 '(with-directory-excursion "cloudscraper"
11220 (for-each delete-file
11221 '("captcha/9kw.py" "captcha/anticaptcha.py"))
11222 (substitute* "__init__.py"
11223 ;; Perhaps it's a joke, but don't promote proprietary software.
11224 (("([Th]is feature is not available) in the .*'" _ prefix)
11225 (string-append prefix ".'")))))))
11226 (build-system pyproject-build-system)
11227 (arguments
11228 (list
11229 #:test-flags
11230 #~(list "-k" "not test_403_handling")
11231 #:phases
11232 #~(modify-phases %standard-phases
11233 (add-after 'unpack 'relax-requirements
11234 (lambda _
11235 ;; XXX: Relax brotli dependency.
11236 (substitute* "pyproject.toml"
11237 (("\"brotli>=.*\"")
11238 "\"brotli\""))
11239 ;; XXX: Dependencies, that have not yet been packaged
11240 ;; and cause an import error when included.
11241 (delete-file "cloudscraper/interpreters/v8.py")))
11242 (add-after 'unpack 'fix-references
11243 (lambda _
11244 (substitute* "cloudscraper/interpreters/nodejs.py"
11245 (("'node'")
11246 (string-append "'" (which "node") "'"))))))))
11247 (inputs (list node-lts))
11248 (propagated-inputs
11249 (list python-pycryptodome
11250 python-brotli
11251 python-js2py
11252 python-polling2
11253 python-requests
11254 python-requests-toolbelt
11255 python-responses
11256 python-pyparsing
11257 python-websocket-client))
11258 (native-inputs (list python-pytest python-setuptools))
11259 (home-page "https://github.com/venomous/cloudscraper")
11260 (synopsis "Cloudflare anti-bot bypass")
11261 (description
11262 "This module acts as a webbrowser solving Cloudflare's Javascript
11263challenges.")
11264 (license license:expat)))
11265
11266(define-public python-imap-tools
11267 (package
11268 (name "python-imap-tools")
11269 (version "1.9.0")
11270 (source
11271 (origin
11272 (method git-fetch) ; no tests in PyPI release
11273 (uri (git-reference
11274 (url "https://github.com/ikvk/imap_tools")
11275 (commit (string-append "v" version))))
11276 (file-name (git-file-name name version))
11277 (sha256
11278 (base32 "0iawc6shxn8p0ysiqiahfic5rp1r16f7rfn11c8y2fl8falckynr"))))
11279 (arguments
11280 (list
11281 #:test-flags
11282 ;; Tests require a network connection
11283 #~(list "-k" (string-append "not test_action"
11284 " and not test_attributes"
11285 " and not test_connection"
11286 " and not test_folders"
11287 " and not test_idle"
11288 " and not test_live"))))
11289 (build-system pyproject-build-system)
11290 (native-inputs
11291 (list python-pytest python-setuptools python-wheel))
11292 (home-page "https://github.com/ikvk/imap_tools")
11293 (synopsis "Work with email and mailbox by IMAP")
11294 (description
11295 "This Python library provides tools to deal with email and mailboxes
11296over IMAP:
11297
11298@itemize
11299@item Parsed email message attributes
11300@item Query builder for searching emails
11301@item Work with emails in folders (copy, delete, flag, move, seen)
11302@item Work with mailbox folders (list, set, get, create, exists, rename, delete, status)
11303@end itemize")
11304 (license license:asl2.0)))
11305
11306(define-public python-giturlparse
11307 (package
11308 (name "python-giturlparse")
11309 (version "0.12.0")
11310 (source
11311 (origin
11312 (method git-fetch)
11313 (uri (git-reference
11314 (url "https://github.com/nephila/giturlparse")
11315 (commit version)))
11316 (file-name (git-file-name name version))
11317 (sha256
11318 (base32 "1fdbxp176p17sn5xc1418mz2vk00hlcsd5qmi2fdcfphqal6raan"))))
11319 (build-system pyproject-build-system)
11320 (native-inputs (list python-pytest python-setuptools))
11321 (home-page "https://github.com/nephila/giturlparse")
11322 (synopsis "Git URL parsing module")
11323 (description
11324 "This package provides a git URL parsing module which supports parsing
11325and rewriting of remote git URLs from various hosting providers.")
11326 (license license:asl2.0)))
11327
11328(define-public python-hstspreload
11329 (package
11330 (name "python-hstspreload")
11331 (version "2025.1.1")
11332 (source
11333 (origin
11334 (method git-fetch)
11335 (uri (git-reference
11336 (url "https://github.com/sethmlarson/hstspreload")
11337 (commit version)))
11338 (file-name (git-file-name name version))
11339 (sha256
11340 (base32 "02mdzhgdz3sprgc26qb084zy639h2zw2yc8d2vm1r18ap9k51ayq"))))
11341 (build-system pyproject-build-system)
11342 (arguments (list #:tests? #f)) ; tests require external resources.
11343 (native-inputs (list python-setuptools))
11344 (home-page "https://github.com/sethmlarson/hstspreload")
11345 (synopsis "Chromium HSTS Preload list as a Python package")
11346 (description
11347 "@code{python-hstspreload} contains Chromium HSTS Preload list
11348as a Python package.")
11349 (license license:bsd-3)))
11350
11351(define-public python-sanic-routing
11352 (package
11353 (name "python-sanic-routing")
11354 (version "23.12.0")
11355 (source
11356 (origin
11357 (method url-fetch)
11358 (uri (pypi-uri "sanic-routing" version))
11359 (sha256
11360 (base32 "014bhkharcgyprdvlk7wjxhjp1pr0cva1nwj4f2qrr23qiidrjhx"))))
11361 (build-system pyproject-build-system)
11362 (arguments
11363 ;; PyPi sources does not contain tests, recursive dependency on
11364 ;; python-sanic.
11365 (list #:tests? #f))
11366 (native-inputs (list python-setuptools python-wheel))
11367 (home-page "https://github.com/sanic-org/sanic-routing/")
11368 (synopsis "Routing component for Sanic")
11369 (description "Internal package for @code{python-sanic}, which provides
11370the @code{BasicRouter}.")
11371 (license license:expat)))
11372
11373(define-public python-sanic-testing
11374 (package
11375 (name "python-sanic-testing")
11376 (version "23.12.0")
11377 (source
11378 (origin
11379 (method url-fetch)
11380 (uri (pypi-uri "sanic-testing" version))
11381 (sha256
11382 (base32 "0gqkzv90sbj9rw7yfly9c58lq9dq30g5hhcgjl3ihzjb66vm571b"))))
11383 (build-system pyproject-build-system)
11384 (arguments
11385 ;; PyPi sources does not contain tests, recursive dependency on
11386 ;; python-sanic.
11387 (list #:tests? #f))
11388 (propagated-inputs (list python-httpx python-sanic-bootstrap))
11389 (native-inputs (list python-setuptools python-wheel))
11390 (home-page "https://github.com/sanic-org/sanic-testing/")
11391 (synopsis "Test clients for Sanic")
11392 (description "Internal package for @code{python-sanic}, which is
11393meant to be the core testing utility and clients for testing Sanic
11394applications.")
11395 (license license:expat)))
11396
11397(define-public python-sanic
11398 (package
11399 (name "python-sanic")
11400 (version "25.3.0")
11401 (source
11402 (origin
11403 (method url-fetch)
11404 (uri (pypi-uri "sanic" version))
11405 (sha256
11406 (base32 "1fv9wgsj54scbr7qhmwdgc4zqnqpwacpakcfxhsg10gc04h54pbp"))
11407 ;; Loosen requirements for both python-sanic and python-sanic-bootstrap.
11408 (modules '((guix build utils)))
11409 (snippet #~(substitute* "setup.py"
11410 (("setuptools>=[0-9.]*")
11411 "setuptools")))))
11412 (build-system pyproject-build-system)
11413 (arguments
11414 (list
11415 #:test-flags
11416 #~(list "--asyncio-mode=auto"
11417 "--ignore=tests/benchmark/"
11418 "--ignore=tests/typing/test_typing.py"
11419 ;; Most tests hang or fail
11420 "--ignore=tests/test_cli.py"
11421 "--ignore=tests/worker/test_worker_serve.py"
11422 "-k"
11423 (string-append
11424 ;; PyPi sources lack examples module.
11425 "not test_gunicorn_"
11426 ;; Does not expect brotli and reordered headers.
11427 " and not test_raw_headers"
11428 ;; These look like buggy testcases.
11429 " and not test_zero_downtime"
11430 " and not test_non_default_uvloop_config_raises_warning"
11431 " and not test_listeners_triggered"
11432 " and not test_keep_alive_connection_context"
11433 " and not test_keep_alive_client_timeout"
11434 " and not test_conflicting_body_methods_overload"
11435 " and not test_unix_connection"
11436 ;; Unclear why they fail since core-updates merge.
11437 " and not test_missing_sni"
11438 " and not test_no_matching_cert"
11439 " and not test_wildcards"
11440 ;; These tests fail because subprotocols appear to be
11441 ;; parameterized as None
11442 " and not test_websocket_route_with_subprotocols"
11443 ;; AF_UNIX path too long
11444 " and not test_setup_and_teardown_unix"
11445 " and not test_configure_socket"
11446 ;; Freezes
11447 " and not test_server_run_with_repl"
11448 " and not test_server_run"
11449 " and not test_no_workers"))))
11450 (propagated-inputs
11451 (list python-aiofiles
11452 python-aioquic
11453 python-html5tagger
11454 python-httptools
11455 python-multidict
11456 python-sanic-routing
11457 python-tracerite
11458 python-typing-extensions
11459 python-ujson
11460 python-uvloop
11461 python-websockets))
11462 (native-inputs
11463 (list python-beautifulsoup4
11464 python-chardet
11465 python-cryptography
11466 python-docutils
11467 python-mypy
11468 python-pygments
11469 python-pytest
11470 python-pytest-asyncio
11471 python-pytest-benchmark
11472 python-pytest-sanic
11473 python-sanic-testing
11474 python-setuptools
11475 python-slotscheck
11476 python-towncrier
11477 python-types-ujson
11478 python-uvicorn
11479 python-wheel))
11480 (home-page "https://github.com/sanic-org/sanic/")
11481 (synopsis "Async Python web server/framework")
11482 (description
11483 "Sanic is a Python web server and web framework that's written to go
11484fast. It allows the usage of the @code{async/await} syntax added in Python
114853.5, which makes your code non-blocking and speedy.")
11486 (license license:expat)))
11487
11488(define-public python-sanic-bootstrap
11489 (package
11490 (inherit python-sanic)
11491 (name "python-sanic-bootstrap")
11492 (arguments (list #:tests? #f))
11493 (native-inputs (list python-setuptools python-wheel))))
11494
11495(define-public python-socketio
11496 (package
11497 (name "python-socketio")
11498 (version "5.12.1")
11499 (source
11500 (origin
11501 (method url-fetch)
11502 (uri (pypi-uri "python_socketio" version))
11503 (sha256
11504 (base32
11505 "175sd3fdld3s477i6b3v49yhf1alsbm1vaxzq44nqrqb8wgzz682"))))
11506 (build-system pyproject-build-system)
11507 (arguments
11508 (list #:test-flags
11509 '(list "--timeout=60"
11510 ;; These tests freeze.
11511 "--ignore-glob=tests/async/*")))
11512 (propagated-inputs
11513 (list python-bidict python-engineio python-msgpack))
11514 (native-inputs
11515 (list python-pytest
11516 python-pytest-asyncio
11517 python-pytest-timeout
11518 python-setuptools
11519 python-uvicorn
11520 python-wheel))
11521 (home-page "https://github.com/miguelgrinberg/python-socketio/")
11522 (synopsis "Python Socket.IO server")
11523 (description
11524 "This package provides a Python implementation of the @code{Socket.IO}
11525realtime client and server.")
11526 (license license:expat)))
11527
11528(define-public python-socks
11529 (package
11530 (name "python-socks")
11531 (version "2.7.2")
11532 (source
11533 (origin
11534 (method git-fetch)
11535 (uri (git-reference
11536 (url "https://github.com/romis2012/python-socks")
11537 (commit (string-append "v" version))))
11538 (file-name (git-file-name name version))
11539 (sha256
11540 (base32 "1alrfjkir69006qmr2ax3inrffk2bllpljwmprwczb44r0mya77m"))))
11541 (build-system pyproject-build-system)
11542 (propagated-inputs (list python-trio))
11543 (native-inputs
11544 (list python-anyio
11545 python-async-timeout
11546 python-flask
11547 python-pytest
11548 python-pytest-asyncio
11549 python-pytest-trio
11550 python-setuptools
11551 python-tiny-proxy
11552 python-trustme
11553 python-yarl))
11554 (home-page "https://github.com/romis2012/python-socks")
11555 (synopsis
11556 "Core proxy (SOCKS4, SOCKS5, HTTP tunneling) functionality for Python")
11557 (description
11558 "Socks is a library providing core proxy (SOCKS4, SOCKS5, HTTP tunneling)
11559 functionality.")
11560 (license license:asl2.0)))
11561
11562(define-public python-socksio
11563 (package
11564 (name "python-socksio")
11565 (version "1.0.0")
11566 (source
11567 (origin
11568 (method url-fetch)
11569 (uri (pypi-uri "socksio" version))
11570 (sha256
11571 (base32 "1b64j45w35jzhjhnq44bnyad9ydh1iyyd7a6j2c8phxmllyyp2zq"))))
11572 (build-system pyproject-build-system)
11573 (native-inputs
11574 (list python-flit-core
11575 python-pytest
11576 python-pytest-cov))
11577 (home-page "https://github.com/sethmlarson/socksio")
11578 (synopsis "Sans-I/O implementation of SOCKS4, SOCKS4A, and SOCKS5")
11579 (description "The @code{socksio} Python module is a client-side sans-I/O
11580SOCKS proxy implementation. It supports SOCKS4, SOCKS4A, and SOCKS5.
11581@code{socksio} is a sans-I/O library similar to @code{h11} or @code{h2}; this
11582means the library itself does not handle the actual sending of the bytes
11583through the network, it only deals with the implementation details of the
11584SOCKS protocols. It can be paired with any I/O library.")
11585 (license license:expat)))
11586
11587(define-public python-simple-websocket
11588 (package
11589 (name "python-simple-websocket")
11590 (version "1.1.0")
11591 (source
11592 (origin
11593 (method url-fetch)
11594 (uri (pypi-uri "simple_websocket" version))
11595 (sha256
11596 (base32 "1r1all55d5dimiw3qwdhj53cxj9yjgnskcysmcscarx0g9726fbr"))))
11597 (build-system pyproject-build-system)
11598 (arguments
11599 ;; Requires Internet access to resolve example.com
11600 (list #:test-flags '(list "--ignore=tests/test_client.py")))
11601 (propagated-inputs (list python-wsproto))
11602 (native-inputs (list python-pytest
11603 python-setuptools))
11604 (home-page "https://github.com/miguelgrinberg/simple-websocket")
11605 (synopsis "Simple WebSocket server and client for Python")
11606 (description "This package provides a simple @code{WebSocket} server and
11607client for Python.")
11608 (license license:expat)))
11609
11610(define-public python-siosocks
11611 (package
11612 (name "python-siosocks")
11613 (version "0.3.0")
11614 (source
11615 (origin
11616 (method git-fetch)
11617 (uri (git-reference
11618 (url "https://github.com/pohmelie/siosocks")
11619 (commit (string-append "v" version))))
11620 (file-name (git-file-name name version))
11621 (sha256
11622 (base32 "0zcib4j5bfxlryfa412wmlkk8ivsiwxrfbpij5s7ag839ii2lxa5"))))
11623 (build-system pyproject-build-system)
11624 (native-inputs
11625 (list python-pytest
11626 python-pytest-asyncio
11627 python-pytest-cov
11628 python-pytest-trio
11629 python-setuptools))
11630 (propagated-inputs (list python-trio))
11631 (home-page "https://github.com/pohmelie/siosocks")
11632 (synopsis "SOCKSv4 & SOCKSv5 TCP proxy protocol implementation in Python")
11633 (description
11634 "This package provides a Python module and framework for sans-io socks proxy
11635client/server with couple io backends.
11636
11637Features:
11638@itemize
11639@item Only TCP connect (no BIND, no UDP)
11640@item Both client and server
11641@item SOCKS versions: 4, 4a, 5
11642@item SOCKSv5 auth: no auth, username/password
11643@item Couple io backends: @code{asyncio}, @code{trio}, @code{socketserver}
11644@item One-shot socks server (@code{python -m siosocks})
11645@end itemize")
11646 (license license:expat)))
11647
11648(define-public python-tiny-proxy
11649 (package
11650 (name "python-tiny-proxy")
11651 (version "0.2.1")
11652 (source
11653 (origin
11654 (method url-fetch)
11655 (uri (pypi-uri "tiny_proxy" version))
11656 (sha256
11657 (base32 "05nq62fn3p7s1a6dkdvnrzmk39d9ddrzb3pqbbli025qs3m9j1bq"))))
11658 (build-system pyproject-build-system)
11659 ;; There are only a handful of tests and they require the as yet
11660 ;; unpackaged httpx_socks.
11661 (arguments (list #:tests? #false))
11662 (propagated-inputs (list python-anyio))
11663 (native-inputs
11664 (list python-httpx
11665 python-pytest
11666 python-setuptools
11667 python-wheel))
11668 (home-page "https://github.com/romis2012/tiny-proxy")
11669 (synopsis "Simple proxy server (SOCKS4(a), SOCKS5(h), HTTP tunnel)")
11670 (description "This package provides a simple proxy server (SOCKS4(a),
11671SOCKS5(h), HTTP tunnel).")
11672 (license license:asl2.0)))
11673
11674(define-public python-azure-nspkg
11675 (package
11676 (name "python-azure-nspkg")
11677 (version "3.0.2")
11678 (source
11679 (origin
11680 (method url-fetch)
11681 (uri (pypi-uri "azure-nspkg" version ".zip"))
11682 (sha256
11683 (base32
11684 "1l4xwdh0fcnvrv0mzig4g2kgqkfbsy64zjm1ggc6grk3mykcxlz7"))))
11685 (build-system pyproject-build-system)
11686 (arguments (list #:tests? #f)) ;no tests in package
11687 (native-inputs (list unzip python-setuptools))
11688 (home-page "https://github.com/Azure/azure-sdk-for-python")
11689 (synopsis "Azure namespace internals")
11690 (description
11691 "This package is an internal Azure namespace package.")
11692 (license license:expat)))
11693
11694(define-public python-azure-storage-nspkg
11695 (package
11696 (name "python-azure-storage-nspkg")
11697 (version "3.1.0")
11698 (source
11699 (origin
11700 (method url-fetch)
11701 (uri (pypi-uri "azure-storage-nspkg" version))
11702 (sha256
11703 (base32 "049qcmgshz7dj9yaqma0fwcgbxwddgwyfcw4gmv45xfmaa3bwfvg"))))
11704 (build-system pyproject-build-system)
11705 (arguments
11706 (list #:tests? #f)) ;no tests in PyPI archive
11707 (native-inputs (list python-setuptools))
11708 (propagated-inputs (list python-azure-nspkg))
11709 (home-page "https://github.com/Azure/azure-storage-python")
11710 (synopsis "Microsoft Azure Storage Namespace package")
11711 (description
11712 "This project provides a client library in Python that makes it easy to
11713communicate with Microsoft Azure Storage services.")
11714 (license license:expat)))
11715
11716(define-public python-azure-common
11717 (package
11718 (name "python-azure-common")
11719 (version "1.1.28")
11720 (source
11721 (origin
11722 (method url-fetch)
11723 (uri (pypi-uri "azure-common" version ".zip"))
11724 (sha256
11725 (base32 "18q4cy1xl2zly3rk7a1sc14w932x59r8c9j4d8dnlsz32hrcvh2a"))))
11726 (build-system pyproject-build-system)
11727 (arguments
11728 (list #:tests? #f)) ;no tests in PyPI archive
11729 (propagated-inputs (list python-azure-nspkg))
11730 (native-inputs (list python-setuptools unzip))
11731 (home-page "https://github.com/Azure/azure-sdk-for-python")
11732 (synopsis "Microsoft Azure Client library for Python")
11733 (description "This package provides the Microsoft Azure Client library for
11734Python.")
11735 (license license:expat)))
11736
11737(define-public python-azure-core
11738 (package
11739 (name "python-azure-core")
11740 (version "1.32.0")
11741 (source
11742 (origin
11743 (method url-fetch)
11744 (uri (pypi-uri "azure_core" version))
11745 (sha256
11746 (base32 "1r9hqyqr5fxiiai0irr0n98gwgzj5f8y46vc1yci9bidddfw7cr2"))))
11747 (build-system pyproject-build-system)
11748 (arguments
11749 (list
11750 #:test-flags
11751 `(list ;; This fails because devtools_testutils doesn't exist.
11752 "--ignore=tests/test_connection_string_parsing.py"
11753 ;; These all need network access.
11754 "--ignore=samples"
11755 "--ignore=tests/async_tests/test_streaming_async.py"
11756 "--ignore=tests/test_streaming.py"
11757 "-m" "not asyncio and not live_test_only"
11758 "-k" ,(string-append
11759 "not test_decompress_plain_no_header"
11760 " and not test_compress_plain_no_header"
11761 " and not test_decompress_compressed_no_header"
11762 " and not test_requests_socket_timeout"))
11763 #:phases
11764 #~(modify-phases %standard-phases
11765 (add-before 'check 'add-test-pythonpath
11766 (lambda* (#:key tests? #:allow-other-keys)
11767 (when tests?
11768 (setenv "PYTHONPATH"
11769 (string-append
11770 (getcwd) "/tests/testserver_tests/coretestserver:"
11771 (getenv "GUIX_PYTHONPATH")))))))))
11772 (propagated-inputs
11773 (list python-aiohttp
11774 python-requests
11775 python-six
11776 python-typing-extensions))
11777 (native-inputs
11778 (list python-flask
11779 python-pytest
11780 python-pytest-aiohttp
11781 python-pytest-asyncio
11782 python-pytest-trio
11783 python-setuptools
11784 python-wheel))
11785 (home-page "https://github.com/Azure/azure-sdk-for-python")
11786 (synopsis "Microsoft Azure Core library for Python")
11787 (description "This package provides the Microsoft Azure Core library for
11788Python.")
11789 (license license:expat)))
11790
11791(define-public python-azure-storage-blob
11792 (package
11793 (name "python-azure-storage-blob")
11794 (version "12.27.0")
11795 (source
11796 (origin
11797 (method url-fetch)
11798 (uri (pypi-uri "azure_storage_blob" version))
11799 (sha256
11800 (base32 "16nb17f6bi0k53qlxybwqxdld3nj742hmsk4qcq3jwka5b6y5s4r"))))
11801 (build-system pyproject-build-system)
11802 (arguments
11803 ;; XXX: devtools_testutils is not provided as a proper package on PyPI,
11804 ;; Git does not contains setup.py, setup.cfg or pyproject.toml which makes
11805 ;; it hard to package in Guix.
11806 ;; <https://raw.githubusercontent.com/Azure/azure-sdk-for-python/refs/
11807 ;; heads/main/tools/azure-sdk-tools/devtools_testutils/README.md>.
11808 (list #:tests? #f))
11809 (native-inputs
11810 (list python-setuptools))
11811 (propagated-inputs
11812 (list python-azure-core
11813 python-cryptography
11814 python-isodate
11815 python-typing-extensions))
11816 (home-page "https://github.com/Azure/azure-sdk-for-python/")
11817 (synopsis "Microsoft Azure Blob Storage client library for Python")
11818 (description "This package provides the Microsoft Azure Blob Storage
11819Client Library for Python.")
11820 (license license:expat)))
11821
11822(define-public python-azure-storage-file-datalake
11823 (package
11824 (name "python-azure-storage-file-datalake")
11825 (version "12.22.0")
11826 (source
11827 (origin
11828 (method url-fetch)
11829 (uri (pypi-uri "azure_storage_file_datalake" version))
11830 (sha256
11831 (base32 "0xxg94684b630p8jrz38sg7mdcwp1wa0p5di27mswyrjycshvvcs"))))
11832 (build-system pyproject-build-system)
11833 (arguments
11834 ;; XXX: devtools_testutils is not provided as a proper package on PyPI,
11835 ;; Git does not contains setup.py, setup.cfg or pyproject.toml which makes
11836 ;; it hard to package in Guix.
11837 ;; <https://raw.githubusercontent.com/Azure/azure-sdk-for-python/refs/
11838 ;; heads/main/tools/azure-sdk-tools/devtools_testutils/README.md>.
11839 (list #:tests? #f))
11840 (native-inputs
11841 (list python-setuptools))
11842 (propagated-inputs
11843 (list python-azure-core
11844 python-azure-storage-blob
11845 python-isodate
11846 python-typing-extensions))
11847 (home-page "https://github.com/Azure/azure-sdk-for-python")
11848 (synopsis "Microsoft Azure File DataLake Storage Client Library for Python")
11849 (description
11850 "This package provides the Microsoft Azure File @code{DataLake} Storage
11851Client Library for Python.")
11852 (license license:expat)))
11853
11854(define-public python-google-auth
11855 (package
11856 (name "python-google-auth")
11857 (version "2.41.1")
11858 (source
11859 (origin
11860 (method url-fetch)
11861 (uri (pypi-uri "google_auth" version))
11862 (sha256
11863 (base32 "1lmzkiq3gvpgf0k9kxlyjm4g5vjam7v183c7i1zcpw31kqgpnsxp"))))
11864 (build-system pyproject-build-system)
11865 (arguments
11866 (list
11867 #:test-flags
11868 ;; This one test uses crypto.sign with an outdated calling convention.
11869 '(list "--ignore=tests/transport/test__mtls_helper.py")))
11870 (propagated-inputs
11871 (list python-aiohttp
11872 python-cachetools
11873 python-pyasn1-modules
11874 python-requests
11875 python-rsa
11876 python-urllib3))
11877 (native-inputs
11878 (list nss-certs-for-test
11879 python-aioresponses
11880 python-cryptography
11881 python-flask
11882 python-freezegun
11883 python-grpcio
11884 python-mock
11885 python-oauth2client
11886 python-packaging
11887 python-pyjwt
11888 python-pyopenssl
11889 python-pytest
11890 python-pytest-asyncio
11891 python-pytest-localserver
11892 python-pyu2f
11893 python-responses
11894 python-setuptools))
11895 (home-page "https://github.com/googleapis/google-auth-library-python")
11896 (synopsis "Google Authentication Library")
11897 (description "This library simplifies using Google's various
11898server-to-server authentication mechanisms to access Google APIs.")
11899 (license license:asl2.0)))
11900
11901(define-public python-google-resumable-media
11902 (package
11903 (name "python-google-resumable-media")
11904 (version "2.8.0")
11905 (source
11906 (origin
11907 (method git-fetch)
11908 (uri (git-reference
11909 (url
11910 "https://github.com/googleapis/google-resumable-media-python")
11911 (commit (string-append "v" version))))
11912 (file-name (git-file-name name version))
11913 (sha256
11914 (base32 "0ndida5yr06bal0m09yri80bvf8x7yy690b14ywnxl4ixi8rlh6s"))))
11915 (build-system pyproject-build-system)
11916 (arguments
11917 (list
11918 #:test-flags
11919 #~(list
11920 ;; XXX: Missing test_utils.retry.
11921 "--ignore-glob=tests*/system/"
11922 ;; XXX: md5_hash is not mock.sentinel.md5_hash
11923 "-k" (string-join
11924 (list "not test_brotli"
11925 "test_constructor"
11926 "test_decompress")
11927 " and not "))))
11928 (propagated-inputs (list python-google-crc32c))
11929 (native-inputs
11930 (list python-google-auth
11931 python-mock
11932 python-pytest
11933 python-pytest-asyncio
11934 python-setuptools
11935 python-test-utils))
11936 (home-page "https://github.com/googleapis/google-resumable-media-python")
11937 (synopsis "Utilities for Google Media Downloads and Resumable Uploads")
11938 (description "This package provides utilities for Google Media Downloads
11939and Resumable Uploads.")
11940 (license license:asl2.0)))
11941
11942(define-public python-googleapis-common-protos
11943 (package
11944 (name "python-googleapis-common-protos")
11945 (version "1.66.0")
11946 (source
11947 (origin
11948 (method git-fetch)
11949 (uri (git-reference
11950 (url "https://github.com/googleapis/python-api-common-protos")
11951 (commit (string-append "v" version))))
11952 (file-name (git-file-name name version))
11953 (sha256
11954 (base32 "1fb7bcmjngmwwhqrldslli6r5z3s6r2kj4ywjmdjj92d1i51c29r"))))
11955 (build-system pyproject-build-system)
11956 (propagated-inputs (list python-protobuf))
11957 (native-inputs (list python-pytest python-setuptools))
11958 (home-page "https://github.com/googleapis/python-api-common-protos")
11959 (synopsis "Common protobufs used in Google APIs")
11960 (description
11961 "This package contains Python classes generated from the common protos in
11962the @code{googleapis/api-common-protos} repository.")
11963 (license license:asl2.0)))
11964
11965(define-public python-google-api-core
11966 (package
11967 (name "python-google-api-core")
11968 (version "2.28.1")
11969 (source
11970 (origin
11971 (method git-fetch)
11972 (uri (git-reference
11973 (url "https://github.com/googleapis/python-api-core")
11974 (commit (string-append "v" version))))
11975 (file-name (git-file-name name version))
11976 (sha256
11977 (base32 "1h12187s5jlj3x6gl13byfwkr2mnyiabyc6i74kc6bazz3r4iizx"))))
11978 (build-system pyproject-build-system)
11979 (propagated-inputs
11980 (list python-google-auth
11981 python-googleapis-common-protos
11982 python-protobuf
11983 python-proto-plus
11984 python-requests))
11985 (native-inputs
11986 (list python-mock
11987 python-pytest
11988 python-pytest-asyncio
11989 python-pytest-mock
11990 python-setuptools))
11991 (home-page "https://github.com/googleapis/python-api-core")
11992 (synopsis "Google API client core library")
11993 (description
11994 "This library defines common helpers used by all Google API clients.")
11995 (license license:asl2.0)))
11996
11997(define-public python-google-cloud-core
11998 (package
11999 (name "python-google-cloud-core")
12000 (version "2.5.0")
12001 (source
12002 (origin
12003 (method git-fetch)
12004 (uri (git-reference
12005 (url "https://github.com/googleapis/python-cloud-core")
12006 (commit (string-append "v" version))))
12007 (file-name (git-file-name name version))
12008 (sha256
12009 (base32 "1d7li74cakgl9vghxfir9nxwy36980alvxwgwjg0zyla3hgj07cq"))))
12010 (build-system pyproject-build-system)
12011 (propagated-inputs (list python-google-api-core python-google-auth))
12012 (native-inputs
12013 (list python-grpcio
12014 python-grpcio-status
12015 python-pytest
12016 python-setuptools))
12017 (home-page "https://github.com/googleapis/python-cloud-core")
12018 (synopsis "Google Cloud API client core library")
12019 (description
12020 "This library defines common helpers (e.g. base @code{Client} classes)
12021used by all of the @code{google-cloud-*} packages.")
12022 (license license:asl2.0)))
12023
12024(define-public python-google-cloud-storage
12025 (package
12026 (name "python-google-cloud-storage")
12027 (version "2.19.0")
12028 (source
12029 (origin
12030 (method git-fetch)
12031 (uri (git-reference
12032 (url "https://github.com/googleapis/python-storage")
12033 (commit (string-append "v" version))))
12034 (file-name (git-file-name name version))
12035 (sha256
12036 (base32 "19w10v2j4ciwlf8j2ylm77f8z1b0kqzg8lkh9rvh2swv1zrhydpj"))))
12037 (build-system pyproject-build-system)
12038 (arguments
12039 (list
12040 #:test-flags
12041 #~(list
12042 ;; XXX: Missing test_utils.retry.
12043 "--ignore=tests/system/"
12044 ;; Needs docker.
12045 "--ignore=tests/conformance/"
12046 ;; XXX: Deprecations.
12047 "-k" (string-join
12048 (list "not test_set_api_request_attr"
12049 "test_create_bucket_w_custom_endpoint"
12050 "test_ctor_w_api_endpoint_override"
12051 "test_ctor_w_custom_endpoint_use_auth"
12052 "test_list_buckets_w_custom_endpoint")
12053 " and not ")
12054 "tests")))
12055 (native-inputs
12056 (list python-googleapis-common-protos
12057 python-mock
12058 python-pytest
12059 python-test-utils
12060 python-setuptools))
12061 (propagated-inputs
12062 (list python-google-api-core
12063 python-google-auth
12064 python-google-cloud-core
12065 python-google-resumable-media
12066 python-protobuf
12067 python-requests))
12068 (home-page "https://github.com/googleapis/python-storage")
12069 (synopsis "Google Cloud Storage API client library")
12070 (description
12071 "Google Cloud Storage allows you to store data on Google infrastructure,
12072and it can be used to distribute large data objects to users via direct
12073download. This package provides a Google Cloud Storage API client library for
12074Python.")
12075 (license license:asl2.0)))
12076
12077(define-public python-smart-open
12078 (package
12079 (name "python-smart-open")
12080 (version "7.3.0")
12081 (source
12082 (origin
12083 (method git-fetch) ;no tests in PyPI archive
12084 (uri (git-reference
12085 (url "https://github.com/piskvorky/smart_open")
12086 (commit (string-append "v" version))))
12087 (file-name (git-file-name name version))
12088 (sha256
12089 (base32 "1jk3dj0j7idv94g1ga5wyvybakj4l150g26cbsjkrjfpy017vxab"))))
12090 (build-system pyproject-build-system)
12091 (arguments
12092 (list
12093 #:test-flags
12094 #~(list "--ignore=ci_helpers/"
12095 "--ignore=integration-tests/"
12096 ;; FIXME: Enable when guix/guix#1436 is resolved.
12097 "--deselect=tests/test_smart_open.py::ParseUriTest::test_gs_uri"
12098 "--deselect=tests/test_smart_open.py::ParseUriTest::test_gs_uri_contains_question_mark"
12099 "--deselect=tests/test_smart_open.py::ParseUriTest::test_gs_uri_contains_slash"
12100 "--deselect=tests/test_smart_open.py::ParseUriTest::test_scheme"
12101 "--ignore=tests/test_gcs.py")
12102 #:phases
12103 #~(modify-phases %standard-phases
12104 (add-before 'build 'set-version
12105 (lambda _
12106 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
12107 (propagated-inputs
12108 (list python-azure-common
12109 python-azure-core
12110 python-azure-storage-blob
12111 python-boto3
12112 ;; python-google-cloud-storage ;see guix/guix#1436
12113 python-paramiko
12114 python-requests
12115 python-wrapt
12116 python-zstandard))
12117 (native-inputs
12118 (list python-numpy
12119 python-moto
12120 python-pytest
12121 python-pytest-rerunfailures
12122 python-responses
12123 python-setuptools
12124 python-setuptools-scm
12125 python-wheel))
12126 (home-page "https://github.com/piskvorky/smart_open")
12127 (synopsis "Utilities for streaming large files")
12128 (description
12129 "This package provides utilities for streaming large files (S3, HDFS,
12130GCS, Azure Blob Storage, gzip, bz2, etc.)")
12131 (license license:expat)))
12132
12133(define-public python-smart-open-6
12134 (package
12135 (inherit python-smart-open)
12136 (name "python-smart-open")
12137 (version "6.4.0")
12138 (source
12139 (origin
12140 (method git-fetch)
12141 (uri (git-reference
12142 (url "https://github.com/piskvorky/smart_open")
12143 (commit (string-append "v" version))))
12144 (file-name (git-file-name name version))
12145 (sha256
12146 (base32 "1vpx37b6lsb6iwi59776ywjrqk1czv8arlhaf9073lrsbilqvj3x"))))
12147 (arguments
12148 (list
12149 ;; XXX: Tests need some older native inputs, disable for now.
12150 #:tests? #f))))
12151
12152(define-public python-w3lib
12153 (package
12154 (name "python-w3lib")
12155 (version "2.3.1")
12156 (source
12157 (origin
12158 (method url-fetch)
12159 (uri (pypi-uri "w3lib" version))
12160 (sha256
12161 (base32
12162 "1929layzxwdnf43hhrz7rabv388b2yibj7mnq9s62mr760mc12jw"))))
12163 (build-system pyproject-build-system)
12164 (native-inputs
12165 (list python-pytest python-setuptools python-wheel))
12166 (home-page "https://github.com/scrapy/w3lib")
12167 (synopsis "Python library of web-related functions")
12168 (description
12169 "This is a Python library of web-related functions, such as: remove
12170comments, or tags from HTML snippets, extract base url from HTML snippets,
12171translate entities on HTML strings, among other things.")
12172 (license license:bsd-3)))
12173
12174(define-public python-webcolors
12175 (package
12176 (name "python-webcolors")
12177 (version "24.11.1")
12178 (source
12179 (origin
12180 (method url-fetch)
12181 (uri (pypi-uri "webcolors" version))
12182 (sha256
12183 (base32 "1xl0vn4xa03vjwx6fj19q9kgb94g65gvdf3p0ivsy0i2ydldgczc"))))
12184 (build-system pyproject-build-system)
12185 (arguments
12186 (list
12187 #:phases
12188 '(modify-phases %standard-phases
12189 (add-after 'unpack 'patch-pyproject
12190 (lambda _
12191 ;; XXX Our version of python-pdm-backend does not recognize
12192 ;; "dependency-groups", but is fine with the bogus
12193 ;; "tool.whatever".
12194 (substitute* "pyproject.toml"
12195 (("\\[dependency-groups\\]") "[tool.whatever]")))))))
12196 (native-inputs
12197 (list python-pdm-backend python-pytest))
12198 (home-page "https://github.com/ubernostrum/webcolors")
12199 (synopsis "HTML/CSS color definitions library")
12200 (description "@code{python-webcolors} is a module for working with
12201HTML/CSS color definitions. Normalizing and converting between the following
12202formats is supported.
12203@itemize
12204@item Specification-defined color names
12205@item Six-digit hexadecimal
12206@item Three-digit hexadecimal
12207@item Integer rgb() triplet
12208@item Percentage rgb() triplet
12209@end itemize
12210Only the RGB colorspace is supported. Conversion to/from the HSL colorspace
12211can be handled by the @code{colorsys} module in the Python standard library.")
12212 (license license:bsd-3)))
12213
12214(define-public python-woob
12215 ;; TODO: woob requires backends which are currently installed on the fly in
12216 ;; ~/.local/share/woob/modules/3.7/woob_modules/ , perhaps we should install
12217 ;; them in the store instead. Many modules are included in the modules
12218 ;; directory in the source tree, but it is unclear how to install them.
12219 ;; Many modules require extra dependencies though, so maybe they should be
12220 ;; packaged independently of woob itself.
12221 (package
12222 (name "python-woob")
12223 (version "3.7")
12224 (source
12225 (origin
12226 (method git-fetch)
12227 (uri (git-reference
12228 (url "https://gitlab.com/woob/woob.git")
12229 (commit version)))
12230 (file-name (git-file-name name version))
12231 (sha256
12232 (base32 "1sy0aykff56xs4dnc7ak6m8is2zgz9fprf3i1pk8n861xz1z748i"))))
12233 (build-system pyproject-build-system)
12234 (arguments
12235 (list
12236 #:test-flags
12237 ;; Deselect tests that require DNS lookup.
12238 #~(list
12239 "--deselect=tests/browser/adapters.py::TestAdapter::test_ciphers"
12240 "--deselect=tests/browser/browsers.py::TestBrowser::test_verify")
12241 #:phases
12242 #~(modify-phases %standard-phases
12243 (add-before 'build 'relax-requirements
12244 (lambda _
12245 ;; "packaging ~= 23.0",
12246 (substitute* "pyproject.toml"
12247 (("\"packaging .*\",")
12248 "")))))))
12249 (native-inputs
12250 (list nss-certs-for-test
12251 python-pytest
12252 python-setuptools))
12253 (propagated-inputs
12254 (list python-babel
12255 python-colorama
12256 python-cssselect
12257 python-dateutil
12258 python-feedparser
12259 python-html2text
12260 python-lxml
12261 python-packaging
12262 python-pillow
12263 python-prettytable
12264 python-pycountry
12265 python-pyyaml
12266 python-requests
12267 python-responses
12268 python-rich
12269 python-termcolor
12270 python-unidecode))
12271 (home-page "https://woob.tech/")
12272 (synopsis "Woob, Web Outside Of Browsers")
12273 (description
12274 "Woob is a collection of applications able to interact with
12275websites, without requiring the user to open them in a browser. It also
12276provides well-defined APIs to talk to websites lacking one.")
12277 (license license:lgpl3+)))
12278
12279(define-public python-flask-combo-jsonapi
12280 (let ((commit "3cfff98ecdbadc45d25a3fd443ad67d3743be6f5")
12281 (revision "0"))
12282 (package
12283 (name "python-flask-combo-jsonapi")
12284 (version (git-version "1.1.0" revision commit))
12285 (source
12286 (origin
12287 (method git-fetch)
12288 (uri (git-reference
12289 (url "https://github.com/AdCombo/flask-combo-jsonapi")
12290 (commit commit)))
12291 (file-name (git-file-name name version))
12292 (sha256
12293 (base32 "1lp81v96qh9hdj3c95kvfaq0vy5vd8cm55j03aszc93bs8z5jg7h"))))
12294 (build-system pyproject-build-system)
12295 (arguments
12296 (list
12297 #:test-flags
12298 #~(list
12299 "-k"
12300 (string-join
12301 (list
12302 ;; XXX: This tests a feature that doesn't make sense when dropping
12303 ;; marshmallow < 3 support.
12304 "not test_compute_schema_propagate_context"
12305 ;; The following tests fail for unknown reasons (see:
12306 ;; https://github.com/AdCombo/flask-combo-jsonapi/issues/66).
12307 "test_get_list_with_simple_filter_relationship_custom_qs_api"
12308 "test_get_list_with_simple_filter_relationship_error")
12309 " and not "))
12310 #:phases
12311 #~(modify-phases %standard-phases
12312 (add-after 'unpack 'loosen-requirements
12313 (lambda _
12314 ;; Don't pin specific versions of dependencies.
12315 (substitute* "requirements.txt"
12316 (("^(sqlalchemy|marshmallow|Flask)[=<>].*" _ dep)
12317 (string-append dep "\n"))
12318 (("^marshmallow_jsonapi[=<>].*")
12319 "marshmallow_jsonapi_minfork\n"))
12320 ;; Drop support for marshmallow < 3.
12321 (substitute* (list "flask_combo_jsonapi/data_layers/alchemy.py"
12322 "flask_combo_jsonapi/schema.py")
12323 (("from marshmallow\\.base import SchemaABC")
12324 "from marshmallow import Schema")
12325 (("if isinstance\\(related_schema_cls, SchemaABC\\):")
12326 "if isinstance(related_schema_cls, Schema):"))
12327 (substitute* "tests/test_sqlalchemy_data_layer.py"
12328 (("default=None")
12329 "dump_default=None")
12330 (("missing=")
12331 "load_default=")))))))
12332 (propagated-inputs
12333 (list python-flask
12334 python-marshmallow
12335 python-marshmallow-jsonapi
12336 python-simplejson
12337 python-sqlalchemy
12338 python-apispec
12339 python-simplejson
12340 python-six))
12341 (native-inputs
12342 (list python-pytest python-setuptools))
12343 (home-page "https://github.com/AdCombo/flask-combo-jsonapi")
12344 (synopsis "Flask extension to quickly create JSON:API 1.0 REST Web APIs")
12345 (description
12346 "Flask-COMBO-JSONAPI is a Python Flask extension for building REST Web
12347APIs compliant with the @uref{https://jsonapi.org, JSON:API 1.0}
12348specification.
12349
12350It tries to combine the power of Flask-Restless with the flexibility of
12351Flask-RESTful to quickly build APIs that fit the complexity of existing
12352real-life projects with legacy data and diverse storage providers.")
12353 (license license:expat))))
12354
12355(define-public python-mwparserfromhell
12356 (package
12357 (name "python-mwparserfromhell")
12358 (version "0.7.2")
12359 (source
12360 (origin
12361 (method git-fetch)
12362 (uri (git-reference
12363 (url "https://github.com/earwig/mwparserfromhell")
12364 (commit (string-append "v" version))))
12365 (file-name (git-file-name name version))
12366 (sha256
12367 (base32 "083ir0nccm14431mmn243862gq731ww98fwpd95zm1yccvpzdy68"))))
12368 (build-system pyproject-build-system)
12369 (native-inputs (list python-pytest python-setuptools))
12370 (home-page "https://github.com/earwig/mwparserfromhell")
12371 (synopsis "Python parser for MediaWiki wikicode")
12372 (description
12373 "The MediaWiki Parser From Hell is a python library package that provides
12374a parser for MediaWiki.
12375
12376It exposes parses as normal string objects with additional methods giving
12377access to the special Wikicode features it contains (hyperlinks, tags,
12378templates…). The parser doesn't interpolate strings at all, it remains at a
12379purely formal level.
12380
12381Full documentation may be found at
12382@uref{https://mwparserfromhell.readthedocs.io, ReadTheDocs}")
12383 (license license:expat)))
12384
12385(define-public python-tweepy
12386 (package
12387 (name "python-tweepy")
12388 (version "4.16.0")
12389 (source
12390 (origin
12391 (method git-fetch)
12392 (uri
12393 (git-reference
12394 (url "https://github.com/tweepy/tweepy")
12395 (commit (string-append "v" version))))
12396 (file-name (git-file-name name version))
12397 (sha256
12398 (base32 "1k99qf0h1ykz0c56wdnlsyvd6zrcsrc4rl7rnlaxrpjppxjnpcpn"))))
12399 (build-system pyproject-build-system)
12400 (arguments
12401 ;; tests: 149 passed, 3 skipped, 1 warning
12402 (list #:test-backend #~'unittest
12403 #:test-flags #~(list "discover" "tests")))
12404 (native-inputs
12405 (list nss-certs-for-test
12406 python-flit-core
12407 python-urllib3-1.26
12408 python-vcrpy))
12409 (propagated-inputs
12410 (list python-aiohttp
12411 python-async-lru
12412 python-oauthlib
12413 python-requests
12414 python-requests-oauthlib))
12415 (home-page "https://www.tweepy.org/")
12416 (synopsis "Twitter library for Python")
12417 (description
12418 "This package provides @code{Tweepy}, an easy-to-use Python library for
12419accessing the Twitter API.")
12420 (license license:expat)))
12421
12422(define-public python-quart
12423 (package
12424 (name "python-quart")
12425 (version "0.19.9")
12426 (source
12427 (origin
12428 (method git-fetch) ; no tests in PyPI release
12429 (uri (git-reference
12430 (url "https://github.com/pallets/quart")
12431 (commit version)))
12432 (file-name (git-file-name name version))
12433 (sha256
12434 (base32 "1h5ifv8g9dc9m07vj4v7dfalam83v38545d845vvgys1gan1pscd"))))
12435 (build-system pyproject-build-system)
12436 (arguments
12437 (list
12438 #:phases
12439 #~(modify-phases %standard-phases
12440 (add-after 'unpack 'remove-coverage-pytest-options
12441 (lambda _
12442 (substitute* "pyproject.toml"
12443 (("--no-cov-on-fail") "")))))))
12444 (native-inputs
12445 (list python-poetry-core
12446 python-pytest
12447 python-pytest-asyncio))
12448 (propagated-inputs
12449 (list hypercorn
12450 python-aiofiles
12451 python-blinker
12452 python-click
12453 python-dotenv
12454 python-flask
12455 python-itsdangerous
12456 python-jinja2
12457 python-markupsafe
12458 python-toml
12459 python-werkzeug))
12460 (home-page "https://gitlab.com/pgjones/quart/")
12461 (synopsis "Python ASGI web microframework with the same API as Flask")
12462 (description
12463 "This package provides a Python ASGI web microframework with the same API
12464as Flask.")
12465 (license license:expat)))
12466
12467(define-public python-quart-trio
12468 (package
12469 (name "python-quart-trio")
12470 (version "0.12.0")
12471 (source
12472 (origin
12473 (method url-fetch)
12474 (uri (pypi-uri "quart_trio" version))
12475 (sha256
12476 (base32 "130r8hdk7xxjp380z1r3m28lw86q2a6g9rf0mgp9gs6hk04q9v02"))))
12477 (build-system pyproject-build-system)
12478 (arguments
12479 (list
12480 #:phases
12481 #~(modify-phases %standard-phases
12482 (add-after 'unpack 'remove-coverage-pytest-options
12483 (lambda _
12484 (substitute* "pyproject.toml"
12485 (("--no-cov-on-fail") "")))))))
12486 (native-inputs
12487 (list python-pdm-backend
12488 python-pytest
12489 python-pytest-sugar
12490 python-pytest-trio))
12491 (propagated-inputs
12492 (list hypercorn
12493 python-exceptiongroup
12494 python-quart
12495 python-trio))
12496 (home-page "https://github.com/pgjones/quart-trio")
12497 (synopsis "Extension for Quart to support the Trio event loop")
12498 (description
12499 "This package provides a Quart extension to provide Trio support. This
12500is an alternative to using the asyncio event loop present in the Python
12501standard library and supported by default in Quart.")
12502 (license license:expat)))
12503
12504(define-public python-ajsonrpc
12505 (package
12506 (name "python-ajsonrpc")
12507 (version "1.2.0")
12508 (source
12509 (origin
12510 (method git-fetch)
12511 (uri (git-reference
12512 (url "https://github.com/pavlov99/ajsonrpc")
12513 (commit version)))
12514 (file-name (git-file-name name version))
12515 (sha256
12516 (base32 "0c7jxfkv5q2m95j54dn650gcvdbpag2qcki7phvmrwsgb36w09kd"))))
12517 (build-system pyproject-build-system)
12518 (arguments
12519 (list
12520 #:phases
12521 #~(modify-phases %standard-phases
12522 (add-after 'unpack 'set-version
12523 (lambda _
12524 (substitute* "ajsonrpc/__init__.py"
12525 (("^__version__ = .*")
12526 (string-append "__version__ = \"" #$version "\"\n"))))))))
12527 (native-inputs
12528 (list python-pytest
12529 python-setuptools))
12530 (propagated-inputs
12531 (list python-quart
12532 python-sanic
12533 python-tornado))
12534 (home-page "https://github.com/pavlov99/ajsonrpc")
12535 (synopsis "Async JSON-RPC 2.0 protocol and server")
12536 (description
12537 "This package provides a Python JSON-RPC 2.0 protocol and server powered
12538by asyncio.")
12539 (license license:expat)))
12540
12541(define-public python-protego
12542 (package
12543 (name "python-protego")
12544 (version "0.4.0")
12545 (source
12546 (origin
12547 (method url-fetch)
12548 (uri (pypi-uri "protego" version))
12549 (sha256
12550 (base32 "1xn2aska8v94jqnbyv4ywczb55gaqvr298q8ybhs168knrifd9ck"))))
12551 (build-system pyproject-build-system)
12552 (native-inputs (list python-pytest python-setuptools python-wheel))
12553 (home-page "https://github.com/scrapy/protego")
12554 (synopsis "Python robots.txt parser with support for modern conventions")
12555 (description "Protego is a pure-Python @file{robots.txt} parser with support
12556for modern conventions.")
12557 (license license:bsd-3)))
12558
12559(define-public python-parsel
12560 (package
12561 (name "python-parsel")
12562 (version "1.10.0")
12563 (source
12564 (origin
12565 (method url-fetch)
12566 (uri (pypi-uri "parsel" version))
12567 (sha256
12568 (base32 "1050v20gzijfcaxpm1d4bvxqw2l7xhyf9pxrawrv8lczanwpvw8l"))))
12569 (build-system pyproject-build-system)
12570 (propagated-inputs
12571 (list python-cssselect
12572 python-jmespath
12573 python-lxml
12574 python-typing-extensions
12575 python-w3lib))
12576 (native-inputs
12577 (list python-psutil python-pytest python-setuptools python-wheel))
12578 (home-page "https://github.com/scrapy/parsel")
12579 (synopsis "Extract data from HTML and XML using XPath and CSS selectors")
12580 (description "Parsel is a library to extract and remove data from
12581HTML and XML using XPath and CSS selectors, optionally combined with
12582regular expressions.")
12583 (license license:bsd-3)))
12584
12585(define-public python-scrapy
12586 (package
12587 (name "python-scrapy")
12588 (version "2.13.3")
12589 (source
12590 (origin
12591 (method url-fetch)
12592 (uri (pypi-uri "scrapy" version))
12593 (sha256
12594 (base32 "0k90pni6vkj7axx3cji0b2x7yg4yfh5kh1csqiq9ssp42265h5xz"))))
12595 (build-system pyproject-build-system)
12596 (arguments
12597 (list #:test-flags
12598 #~(list "--numprocesses" (number->string (parallel-job-count))
12599 "-k" (string-join
12600 ;; ConnectionRefusedError: [Errno 111] Connection
12601 ;; refused
12602 (list "not test_append"
12603 "test_append_active_mode"
12604 "test_overwrite"
12605 "test_overwrite_active_mode"
12606 "test_persist"
12607 ;; AssertionError
12608 "test_start_deprecated_super")
12609 " and not ")
12610 ;; Skip documentation testing.
12611 "--ignore=docs")
12612 #:phases
12613 #~(modify-phases %standard-phases
12614 (add-before 'check 'prepare-test-environment
12615 (lambda _
12616 (setenv "HOME" "/tmp"))))))
12617 (propagated-inputs
12618 (list python-cryptography
12619 python-cssselect
12620 python-defusedxml
12621 python-itemadapter
12622 python-itemloaders
12623 python-lxml
12624 python-packaging
12625 python-parsel
12626 python-protego
12627 python-pydispatcher
12628 python-pyopenssl
12629 python-pypydispatcher
12630 python-queuelib
12631 python-service-identity
12632 python-tldextract
12633 python-twisted
12634 python-w3lib
12635 python-zope-interface))
12636 (native-inputs
12637 (list nss-certs-for-test
12638 python-hatchling
12639 python-pexpect
12640 python-pytest
12641 python-pytest-xdist
12642 python-setuptools
12643 python-sybil
12644 python-testfixtures))
12645 (home-page "https://scrapy.org")
12646 (synopsis "High-level Web crawling and Web scraping framework")
12647 (description "Scrapy is a fast high-level web crawling and web
12648scraping framework, used to crawl websites and extract structured data
12649from their pages. It can be used for a wide range of purposes, from data
12650mining to monitoring and automated testing.")
12651 (license license:bsd-3)))
12652
12653(define-public python-jstyleson
12654 (let ((commit "8c47cc9e665b3b1744cccfaa7a650de5f3c575dd")
12655 (revision "0"))
12656 (package
12657 (name "python-jstyleson")
12658 (version (git-version "0.0.2" revision commit))
12659 (source
12660 (origin
12661 (method git-fetch)
12662 (uri (git-reference
12663 (url "https://github.com/linjackson78/jstyleson")
12664 (commit commit)))
12665 (file-name (git-file-name name version))
12666 (sha256
12667 (base32 "0r72mq7h294w5icpdbjd202w25kwr1dz7nh79f6m74xisc9cixia"))))
12668 (build-system pyproject-build-system)
12669 (native-inputs (list python-pytest python-setuptools))
12670 (home-page "https://github.com/linjackson78/jstyleson")
12671 (synopsis "JSON parser supporting js-style comments")
12672 (description
12673 "@code{jstyleson} is a Python library to parse JSON. Contrary to the
12674standard Python @code{json} library, it understands js-style comments.
12675Trailing comma is also supported.")
12676 (license license:expat))))
12677
12678(define-public python-html-text
12679 (package
12680 (name "python-html-text")
12681 (version "0.7.0")
12682 (source
12683 (origin
12684 (method url-fetch)
12685 (uri (pypi-uri "html_text" version))
12686 (sha256
12687 (base32 "10lixghras86av966ha9piqfl1iscf7nffg69dmz13sxjh371jrx"))))
12688 (build-system pyproject-build-system)
12689 (native-inputs
12690 (list python-pytest
12691 python-setuptools
12692 python-wheel))
12693 (propagated-inputs
12694 (list python-lxml
12695 python-lxml-html-clean))
12696 (home-page "https://github.com/TeamHG-Memex/html-text")
12697 (synopsis "Extract text from HTML")
12698 (description "HTML to Text is a Python library for extract text from HTML.
12699Contrary to other solution such as LXML or Beautiful Soup, the text extracted
12700with @code{html_text} does not contain elements such as JavaScript or inline
12701styles not normally visible to users. It also normalizes white space
12702characters in a smarter, more visually pleasing style.")
12703 (license license:expat)))
12704
12705(define-public python-mf2py
12706 (package
12707 (name "python-mf2py")
12708 (version "2.0.1")
12709 (source
12710 (origin
12711 (method git-fetch)
12712 (uri (git-reference
12713 (url "https://github.com/microformats/mf2py")
12714 (commit (string-append "v" version))))
12715 (file-name (git-file-name name version))
12716 (sha256
12717 (base32 "0ajnf0zrh1l48fvix9fbs1qvgbqhiljqnrm51rx44p7dbarpw4ls"))))
12718 (build-system pyproject-build-system)
12719 (native-inputs (list python-mock python-poetry-core python-pytest))
12720 (propagated-inputs
12721 (list python-beautifulsoup4 python-html5lib python-requests))
12722 (home-page "https://github.com/microformats/mf2py")
12723 (synopsis "Python Microformats2 parser")
12724 (description
12725 "This Python library provides a Microformats2 parser implementing the
12726full Microformats2 (mf2) specification, including backward compatibility with
12727Microformats1 (mf1).")
12728 (license license:expat)))
12729
12730(define-public python-extruct
12731 (package
12732 (name "python-extruct")
12733 (version "0.18.0")
12734 (source (origin
12735 (method git-fetch) ;for tests
12736 (uri (git-reference
12737 (url "https://github.com/scrapinghub/extruct")
12738 (commit (string-append "v" version))))
12739 (file-name (git-file-name name version))
12740 (sha256
12741 (base32
12742 "03qdldqrvmbsk6klq4nkxvvp3b2a0qqgqg115i3crbmialiaai45"))))
12743 (build-system pyproject-build-system)
12744 (arguments
12745 (list
12746 #:test-flags
12747 ;; 67 passed, 3 deselected
12748 ;; XXX: 3 tests fail with errors in assertion.
12749 #~(list "-k" (string-append
12750 "not test_microformat"
12751 " and not test_microformat"
12752 " and not test_umicroformat"))))
12753 (native-inputs
12754 (list python-pytest
12755 python-setuptools
12756 python-wheel))
12757 (propagated-inputs
12758 (list python-html-text
12759 python-jstyleson
12760 python-lxml
12761 python-mf2py
12762 python-pyrdfa3
12763 python-rdflib
12764 python-w3lib))
12765 (home-page "https://github.com/scrapinghub/extruct")
12766 (synopsis "Extract embedded metadata from HTML markup")
12767 (description "@code{extruct} is a Python library for extracting embedded
12768metadata from HTML markup. Currently, extruct supports:
12769@itemize
12770@item W3C's HTML Microdata
12771@item embedded JSON-LD
12772@item Microformat via mf2py
12773@item Facebook's Open Graph
12774@item (experimental) RDFa via rdflib
12775@item Dublin Core Metadata (DC-HTML-2003)
12776@end itemize")
12777 (license license:bsd-3)))
12778
12779(define-public python-wadllib
12780 (package
12781 (name "python-wadllib")
12782 (version "2.0.0")
12783 (source
12784 (origin
12785 (method url-fetch)
12786 (uri (pypi-uri "wadllib" version))
12787 (sha256
12788 (base32 "09vlfg4mzdmkqk6br7j8ms3116qk5am0nf4v1jkzwd7swhisznqy"))))
12789 (build-system pyproject-build-system)
12790 (arguments
12791 (list
12792 ;; XXX: Doctests are currently failing.
12793 #:tests? #f
12794 #:phases
12795 #~(modify-phases %standard-phases
12796 (replace 'check
12797 (lambda* (#:key tests? #:allow-other-keys)
12798 (if tests?
12799 (invoke "zope-testrunner" "--test-path=src")
12800 (format #t "test suite not run~%")))))))
12801 (native-inputs
12802 (list python-multipart python-setuptools python-zope-testrunner))
12803 (propagated-inputs (list python-lazr-uri))
12804 (home-page "https://launchpad.net/wadllib")
12805 (synopsis "Web Application Description Language (WADL) navigation library")
12806 (description "The @code{wadllib} Python library allows navigating HTTP
12807resources using Web Application Description Language (WADL) files as guides.")
12808 (license license:lgpl3)))
12809
12810(define-public python-zeep
12811 (package
12812 (name "python-zeep")
12813 (version "4.3.1")
12814 (source
12815 (origin
12816 (method url-fetch)
12817 (uri (pypi-uri "zeep" version))
12818 (sha256
12819 (base32 "0vm0asfak0pxfa9i753imcy72hk8gkxbj6pmw185b7dhw7lqalzl"))))
12820 (build-system pyproject-build-system)
12821 (arguments
12822 (list
12823 #:phases
12824 '(modify-phases %standard-phases
12825 (add-after 'unpack 'compatibility
12826 (lambda _
12827 ;; Relax requests-file requirement.
12828 (substitute* "pyproject.toml"
12829 (("\"requests-file.*\",")
12830 "\"requests-file\","))
12831 ;; httpx removed the "proxies" keyword. It's now either "mounts"
12832 ;; or "proxy". See https://github.com/encode/httpx/pull/2879.
12833 (substitute* "src/zeep/transports.py"
12834 (("proxies=") "proxy="))))
12835 ;; One test requires write access
12836 (add-before 'check 'set-HOME
12837 (lambda _ (setenv "HOME" (getcwd)))))))
12838 (propagated-inputs
12839 (list python-attrs
12840 python-isodate
12841 python-lxml
12842 python-platformdirs
12843 python-pytz
12844 python-requests
12845 python-requests-file
12846 python-requests-toolbelt))
12847 (native-inputs
12848 (list nss-certs-for-test
12849 python-freezegun
12850 python-pretend
12851 python-pytest
12852 python-pytest-asyncio
12853 python-pytest-cov
12854 python-pytest-httpx
12855 python-requests-mock
12856 python-setuptools
12857 python-wheel))
12858 (home-page "https://docs.python-zeep.org/en/stable/")
12859 (synopsis "Python SOAP client based on lxml / requests")
12860 (description "Zeep is a Python SOAP client. Highlights:
12861
12862@itemize
12863@item Build on top of @code{lxml} and @code{requests}.
12864@item Support for Soap 1.1, Soap 1.2 and HTTP bindings.
12865@item Support for WS-Addressing headers.
12866@item Support for WSSE (UserNameToken / x.509 signing).
12867@item Support for @code{asyncio} via @code{httpx}.
12868@item Experimental support for XOP messages.
12869@end itemize")
12870 (license license:expat)))
12871
12872(define-public python-pysimplesoap
12873 (package
12874 (name "python-pysimplesoap")
12875 (version "1.16.2")
12876 (source (origin
12877 (method url-fetch)
12878 (uri (pypi-uri "PySimpleSOAP" version))
12879 (sha256
12880 (base32
12881 "1qb7dn8m1cjwzql7vqj9i1hsscb7nyhimmlp45jrpzxds38g9fxi"))))
12882 (build-system python-build-system)
12883 (arguments
12884 (list #:tests? #f)) ;tests fail due to attempted web access
12885 (home-page "https://github.com/pysimplesoap/pysimplesoap")
12886 (synopsis "Simple and lightweight SOAP library for Python")
12887 (description
12888 "This package provides a simple and lightweight Python SOAP library for
12889client and server webservices interfaces, aimed to be as small and easy as
12890possible, supporting most common functionality.")
12891 (license license:lgpl3+)))
12892
12893(define-public python-http-client
12894 (package
12895 (name "python-http-client")
12896 (version "3.3.7")
12897 (source
12898 (origin
12899 (method git-fetch)
12900 (uri (git-reference
12901 (url "https://github.com/sendgrid/python-http-client")
12902 (commit version)))
12903 (file-name (git-file-name name version))
12904 (sha256
12905 (base32 "0z0ziw3f4zw5fj4spiwhhs2x8qs3i5999ry2p6a5sc8b1lkkj2zi"))))
12906 (build-system pyproject-build-system)
12907 (arguments
12908 (list
12909 #:test-backend #~'unittest
12910 #:phases
12911 #~(modify-phases %standard-phases
12912 (add-after 'unpack 'fix-tests
12913 (lambda _
12914 ;; The test expects the copyright to be updated each year.
12915 (substitute* "tests/test_daterange.py"
12916 (("time\\.strftime\\(\"%Y\"\\)") "2022")))))))
12917 (native-inputs
12918 (list python-setuptools))
12919 (home-page "https://github.com/sendgrid/python-http-client")
12920 (synopsis "HTTP REST client for Python")
12921 (description
12922 "This package provides access to any RESTful or RESTful-like API.")
12923 (license license:expat)))
12924
12925(define-public python-sendgrid
12926 (package
12927 (name "python-sendgrid")
12928 (version "6.9.7")
12929 (source
12930 (origin
12931 (method git-fetch)
12932 (uri (git-reference
12933 (url "https://github.com/sendgrid/sendgrid-python")
12934 (commit version)))
12935 (file-name (git-file-name name version))
12936 (sha256
12937 (base32 "0kvp4gm3bpcsj2mkv05pgvlcv1jlsfhcljcv61wz5kq9d273h7rg"))))
12938 (build-system pyproject-build-system)
12939 (arguments
12940 (list
12941 #:test-flags
12942 #~(list "--ignore=test/integ"
12943 ;; Network access is required.
12944 "--ignore=live_test.py")))
12945 (native-inputs
12946 (list python-pytest
12947 python-setuptools))
12948 (propagated-inputs
12949 (list python-cryptography
12950 python-http-client
12951 python-flask
12952 python-pyyaml
12953 python-six ;hard dependency
12954 python-starkbank-ecdsa
12955 python-werkzeug))
12956 (home-page "https://github.com/sendgrid/sendgrid-python/")
12957 (synopsis "SendGrid API library for Python")
12958 (description
12959 "The @code{sendgrid} Python library allows access to the
12960SendGrid Web API v3. Version 3+ of the library provides full support for all
12961SendGrid Web API v3 endpoints, including the new v3 /mail/send.")
12962 (license license:expat)))
12963
12964(define-public python-starlette
12965 (package
12966 (name "python-starlette")
12967 (version "0.42.0")
12968 (source (origin
12969 (method git-fetch)
12970 (uri (git-reference
12971 (url "https://github.com/encode/starlette")
12972 (commit version)))
12973 (file-name (git-file-name name version))
12974 (sha256
12975 (base32
12976 "0r46v6b687pqr4sjcv0rwd1ln248fnx0xkawbn945r04pg7c999q"))))
12977 (build-system pyproject-build-system)
12978 (propagated-inputs (list python-anyio
12979 python-typing-extensions
12980 ;; [all] extra dependencies:
12981 python-itsdangerous
12982 python-jinja2
12983 python-multipart
12984 python-pyyaml
12985 python-requests))
12986 (native-inputs (list python-hatchling
12987 python-httpx
12988 python-pytest
12989 python-typing-extensions))
12990 (home-page "https://github.com/encode/starlette")
12991 (synopsis "Little ASGI library")
12992 (description
12993 "Starlette is a lightweight ASGI (Asynchronous Server Gateway
12994Interface) framework/toolkit for building async web services in Python.")
12995 (license license:bsd-3)))
12996
12997(define-public python-starsessions
12998 (package
12999 (name "python-starsessions")
13000 (version "1.3.0")
13001 (source (origin
13002 (method git-fetch)
13003 (uri (git-reference
13004 (url "https://github.com/alex-oleshkevich/starsessions")
13005 (commit (string-append "v" version))))
13006 (file-name (git-file-name name version))
13007 (sha256
13008 (base32
13009 "00dkdhp22vfmcn0w4y7f2ii8m1xj5i7409x58g3l8lvk6v5ng2nf"))))
13010 (build-system pyproject-build-system)
13011 (arguments
13012 (list
13013 #:test-flags
13014 ;; These tests require a running redis server
13015 '(list "--ignore=tests/backends/test_redis.py"
13016 ;; XXX: this failure indicates a real compatibility problem, but
13017 ;; it seems restricted to the tests only.
13018 ;; AttributeError: 'Cookies' object has no attribute
13019 ;; 'clear_session_cookies'
13020 "-k"
13021 (string-append "not test_session_clears_on_tab_close"
13022 ;; This fails because an error is not raised.
13023 " and not test_session_wants_secret_key"))
13024 #:phases
13025 '(modify-phases %standard-phases
13026 (add-after 'unpack 'compatibilitiy
13027 (lambda _
13028 ;; aioredis has been renamed
13029 (substitute* "starsessions/backends/redis.py"
13030 (("aioredis") "redis")))))))
13031 (propagated-inputs
13032 (list python-redis
13033 python-itsdangerous
13034 python-starlette))
13035 (native-inputs
13036 (list python-httpx
13037 python-poetry-core
13038 python-pytest
13039 python-pytest-asyncio
13040 python-requests))
13041 (home-page "https://github.com/alex-oleshkevich/starsessions")
13042 (synopsis "Pluggable session support for Starlette and FastAPI")
13043 (description
13044 "This package adds pluggable session backends and ships default
13045@code{InMemoryBackend} and @code{CookieBackend} implementations for Starlette
13046and FastAPI.")
13047 (license license:expat)))
13048
13049(define-public python-whereismyip
13050 (package
13051 (name "python-whereismyip")
13052 (version "0.1.0")
13053 (source
13054 (origin
13055 (method url-fetch)
13056 (uri (pypi-uri "whereismyip" version))
13057 (sha256
13058 (base32 "0psrlvax8249ccs2rvgdygpckzz22vxjcyzr2pql06d48k61gk54"))))
13059 (build-system pyproject-build-system)
13060 (arguments (list #:tests? #false)) ; There are no tests.
13061 (native-inputs (list python-setuptools))
13062 (home-page "https://pypi.org/project/whereismyip/")
13063 (synopsis "Queries multiple geolocation services until one succeeds")
13064 (description
13065 "This package provides a simple Python library that queries multiple geolocation
13066services until one succeeds.")
13067 (license license:gpl3)))
13068
13069(define-public python-whitenoise
13070 (package
13071 (name "python-whitenoise")
13072 (version "6.9.0")
13073 (source (origin
13074 (method git-fetch) ; PyPI missing test failes
13075 (uri (git-reference
13076 (url "https://github.com/evansd/whitenoise")
13077 (commit version)))
13078 (file-name (git-file-name name version))
13079 (sha256
13080 (base32
13081 "0y00a59ww9f631m51d5db5xcnbckzcwfm64wabp5vamn7l1kqqsj"))))
13082 (build-system pyproject-build-system)
13083 (arguments
13084 (list
13085 #:test-flags #~(list "-k" "not test_modified"))) ; HTTP 304 error
13086 (native-inputs (list python-brotli
13087 python-django
13088 python-requests
13089 python-pytest
13090 python-setuptools
13091 python-wheel))
13092 (home-page "https://github.com/evansd/whitenoise")
13093 (synopsis "Static file serving for WSGI applications")
13094 (description
13095 "WhiteNoise allows your web app to serve its own static files, making it
13096a self-contained unit that can be deployed anywhere without relying on nginx,
13097Amazon S3 or any other external service.")
13098 (license license:expat)))
13099
13100(define-public python-suds
13101 (package
13102 (name "python-suds")
13103 (version "1.2.0")
13104 (source
13105 (origin
13106 (method url-fetch)
13107 (uri (pypi-uri "suds" version))
13108 (sha256
13109 (base32 "1byyg7b2ixpr8hc849a6dd0qn5daxqawz6lb3php8lrmsb1n5cc3"))))
13110 (build-system pyproject-build-system)
13111 (arguments
13112 (list #:phases
13113 #~(modify-phases %standard-phases
13114 ;; XXX: chirp expects suds instead of suds_community
13115 (add-after 'install 'add-custom-dist-info
13116 (lambda _
13117 (for-each
13118 (lambda (dir)
13119 (with-directory-excursion (dirname dir)
13120 (symlink
13121 (basename dir)
13122 (string-append "suds-" #$version ".dist-info"))))
13123 (find-files #$output
13124 (lambda (file stat)
13125 (string-suffix? ".dist-info" file))
13126 #:directories? #t)))))))
13127 (native-inputs
13128 (list python-pytest
13129 python-setuptools
13130 python-wheel))
13131 (home-page "https://github.com/suds-community/suds")
13132 (synopsis "Lightweight SOAP python client for consuming Web Services")
13133 (description
13134 "Suds is a lightweight SOAP-based web service client for Python.")
13135 (license license:lgpl3+)))
13136
13137(define-public python-fastapi
13138 (package
13139 (name "python-fastapi")
13140 (version "0.115.6")
13141 (source (origin
13142 (method url-fetch)
13143 (uri (pypi-uri "fastapi" version))
13144 (sha256
13145 (base32
13146 "0m36nyldk0640mbsysm446bz6rfynpjsm5lajmra8kn1vmx6zi4y"))))
13147 (build-system pyproject-build-system)
13148 (arguments
13149 (list
13150 #:test-flags
13151 ;; Argument() missing 1 required positional argument: 'default'
13152 '(list "--ignore=tests/test_fastapi_cli.py"
13153 ;; cannot import name 'StaticPool' from 'sqlalchemy'
13154 "--ignore-glob=tests/test_tutorial/*"
13155 ;; FIXME: Unclear why these 8 tests fail.
13156 "--ignore=tests/test_dependency_contextmanager.py")
13157 #:phases
13158 '(modify-phases %standard-phases
13159 (add-after 'unpack 'relax-requirements
13160 (lambda _
13161 (substitute* "pyproject.toml"
13162 (("<0.42.0") "<=0.42.0")))))))
13163 (propagated-inputs (list python-email-validator
13164 python-fastapi-cli
13165 python-httpx
13166 python-itsdangerous
13167 python-jinja2
13168 python-multipart
13169 python-orjson
13170 python-pydantic-2
13171 python-pydantic-settings
13172 python-pyyaml
13173 python-starlette
13174 python-typing-extensions
13175 python-ujson
13176 python-uvicorn))
13177 (native-inputs
13178 (list python-dirty-equals
13179 python-flask
13180 python-inline-snapshot
13181 python-pdm-backend
13182 python-pyjwt
13183 python-pytest
13184 python-sqlalchemy))
13185 (home-page "https://github.com/tiangolo/fastapi")
13186 (synopsis "Web framework based on type hints")
13187 (description "FastAPI provides a web API framework based on pydantic and
13188starlette.")
13189 (license license:expat)))
13190
13191(define-public python-fastapi-csrf-protect
13192 (package
13193 (name "python-fastapi-csrf-protect")
13194 (version "0.3.3")
13195 (source (origin
13196 (method git-fetch)
13197 (uri (git-reference
13198 (url "https://github.com/aekasitt/fastapi-csrf-protect")
13199 (commit (string-append "v" version))))
13200 (file-name (git-file-name name version))
13201 (sha256
13202 (base32
13203 "181yawlbpd4709mamsradr9zj0jrbp4qvwfvmggs80pd36iiwyy8"))))
13204 (build-system pyproject-build-system)
13205 (propagated-inputs
13206 (list python-fastapi python-itsdangerous
13207 python-pydantic-2))
13208 (native-inputs
13209 (list python-poetry-core
13210 python-pytest))
13211 (home-page "https://github.com/aekasitt/fastapi-csrf-protect")
13212 (synopsis "Cross-Site Request Forgery (XSRF) protection")
13213 (description
13214 "This package provides a stateless implementation of @dfn{Cross-Site
13215Request Forgery} (XSRF) Protection by using the Double Submit Cookie mitigation
13216pattern.")
13217 (license license:expat)))
13218
13219(define-public python-fastapi-pagination-minimal
13220 (package
13221 (name "python-fastapi-pagination-minimal")
13222 (version "0.12.34")
13223 (source (origin
13224 (method git-fetch)
13225 (uri (git-reference
13226 (url "https://github.com/uriyyo/fastapi-pagination")
13227 (commit version)))
13228 (file-name (git-file-name name version))
13229 (sha256
13230 (base32
13231 "004w9h4ana0p766n7f0z0n06v1472yjci1hvbys9gncpclcc49gj"))))
13232 (build-system pyproject-build-system)
13233 ;; We run the tests in python-fastapi-pagination only.
13234 (arguments (list #:tests? #false))
13235 ;; These are the only required dependencies,
13236 ;; please add all optional dependencies to the
13237 ;; full python-fastapi-pagination below.
13238 (propagated-inputs (list python-fastapi python-pydantic-2))
13239 (native-inputs (list python-poetry-core))
13240 (home-page "https://github.com/uriyyo/fastapi-pagination")
13241 (synopsis "FastAPI pagination library")
13242 (description "@code{fastapi-pagination} is a Python library designed to
13243simplify pagination in FastAPI applications. It provides a set of utility
13244functions and data models to help you paginate your database queries and
13245return paginated responses to your clients.")
13246 (license license:expat)))
13247
13248(define-public python-fastapi-pagination
13249 (package
13250 (inherit python-fastapi-pagination-minimal)
13251 (name "python-fastapi-pagination")
13252 (arguments
13253 (list
13254 #:test-flags
13255 #~(list "--asyncio-mode=auto"
13256 "--unit-tests"
13257 "--ignore=tests/ext"
13258 ;; Netwok access is required.
13259 "-k" (string-join
13260 (list "not test_optional_params[postgres-default]"
13261 "test_optional_params[postgres-limit-offset]"
13262 "test_optional_params[sqlite-default]"
13263 "test_optional_params[sqlite-limit-offset]")
13264 " and not "))
13265 #:phases
13266 '(modify-phases %standard-phases
13267 (add-after 'unpack 'patch-tests
13268 (lambda _
13269 ;; We don't have a package for python-cassandra or motor, but we
13270 ;; also don't need them as we only run the unit tests anyway.
13271 (substitute* "tests/conftest.py"
13272 (("from cassandra.cluster.*") "")
13273 (("from motor.*") "")))))))
13274 (propagated-inputs
13275 (modify-inputs (package-propagated-inputs
13276 python-fastapi-pagination-minimal)
13277 (prepend python-asyncpg
13278 python-databases
13279 python-django
13280 python-fastapi
13281 python-pydantic-2
13282 python-sqlalchemy
13283 (package
13284 (inherit python-tortoise-orm)
13285 (arguments
13286 (substitute-keyword-arguments (package-arguments
13287 python-tortoise-orm)
13288 ((#:phases phases '%standard-phases)
13289 `(modify-phases ,phases
13290 (delete 'sanity-check)))))
13291 (propagated-inputs
13292 (modify-inputs (package-propagated-inputs python-tortoise-orm)
13293 (replace "python-aiosqlite" python-aiosqlite)))))))
13294 (native-inputs
13295 (list python-aiosqlite
13296 python-asgi-lifespan
13297 python-asyncpg
13298 python-faker
13299 python-httpx
13300 python-poetry-core
13301 python-pytest
13302 python-pytest-asyncio
13303 python-sqlalchemy
13304 python-typing-extensions))
13305 (description
13306 (string-append (package-description python-fastapi-pagination-minimal)
13307 "
13308
13309This package, as opposed to @code{python-fastapi-pagination-minimal}, depends on
13310all available optional dependencies supported by mainline
13311@code{fastapi-pagination}."))))
13312
13313(define-public python-fastapi-cli
13314 (package
13315 (name "python-fastapi-cli")
13316 (version "0.0.7")
13317 (source
13318 (origin
13319 (method url-fetch)
13320 (uri (pypi-uri "fastapi_cli" version))
13321 (sha256
13322 (base32 "0pk0ldmymc25ys4v6mslzd5vsjh9r69hfylh2ljl29pmarcvdcq2"))))
13323 (build-system pyproject-build-system)
13324 ;; Tests require fastapi, which depends on this package.
13325 (arguments (list #:tests? #false))
13326 (propagated-inputs (list python-rich-toolkit python-typer python-uvicorn))
13327 (native-inputs
13328 (list python-inline-snapshot python-pdm-backend python-pytest))
13329 (home-page "https://pypi.org/project/fastapi-cli/")
13330 (synopsis
13331 "Run and manage FastAPI apps from the command line with FastAPI CLI")
13332 (description
13333 "FastAPI CLI is a command line program fastapi that you can use to serve
13334your FastAPI app, manage your FastAPI project, and more.")
13335 (license license:expat)))
13336
13337(define-public python-pyactiveresource
13338 (package
13339 (name "python-pyactiveresource")
13340 (version "2.2.2")
13341 (source
13342 (origin
13343 (method git-fetch)
13344 (uri (git-reference
13345 (url "https://github.com/Shopify/pyactiveresource")
13346 (commit (string-append "v" version))))
13347 (file-name (git-file-name name version))
13348 (sha256
13349 (base32 "03pw6fwqjn09fbd6xmng0arlz75pp6ykw25c8d1snp4bxlzkrwqf"))))
13350 (build-system pyproject-build-system)
13351 (native-inputs (list python-dateutil python-pytest python-pyyaml
13352 python-setuptools))
13353 (propagated-inputs (list python-six))
13354 (home-page "https://github.com/Shopify/pyactiveresource/")
13355 (synopsis "ActiveResource for Python")
13356 (description
13357 "This package provides a Python port of the ActiveResource project.
13358
13359Active Resource attempts to provide a coherent wrapper object-relational
13360mapping for REST web services. It follows the same philosophy as Active
13361Record, in that one of its prime aims is to reduce the amount of code needed
13362to map to these resources. This is made possible by relying on a number of
13363code- and protocol-based conventions that make it easy for Active Resource to
13364infer complex relations and structures.")
13365 (license license:expat)))
13366
13367(define-public python-shopifyapi
13368 (package
13369 (name "python-shopifyapi")
13370 (version "12.7.0")
13371 (source
13372 (origin
13373 (method git-fetch)
13374 (uri (git-reference
13375 (url "https://github.com/Shopify/shopify_python_api")
13376 (commit (string-append "v" version))))
13377 (file-name (git-file-name name version))
13378 (sha256
13379 (base32 "11zjm3aspb247wwlmfmq6wwk6lv3xyv3lqnd78sczjg9anba3779"))))
13380 (build-system pyproject-build-system)
13381 (arguments
13382 (list
13383 #:test-flags
13384 #~'("-k"
13385 ;; Disable a failing test.
13386 "not test_raises_if_aud_doesnt_match_api_key")))
13387 (native-inputs (list python-mock python-pytest python-setuptools))
13388 (propagated-inputs (list python-pyactiveresource python-pyjwt
13389 python-pyyaml python-six))
13390 (home-page "https://github.com/Shopify/shopify_python_api")
13391 (synopsis "Shopify API for Python")
13392 (description
13393 "This package provides the Shopify API for Python.
13394
13395The ShopifyAPI library allows Python developers to programmatically access the
13396admin section of stores using an ActiveResource-like interface similar the
13397ruby Shopify API gem. The library makes HTTP requests to Shopify in order to
13398list, create, update, or delete resources (e.g. Order, Product, Collection).")
13399 (license license:expat)))
13400
13401(define-public python-pybadges
13402 (package
13403 (name "python-pybadges")
13404 (version "3.0.1")
13405 (source (origin
13406 (method git-fetch)
13407 (uri (git-reference
13408 (url "https://github.com/google/pybadges")
13409 (commit version)))
13410 (file-name (git-file-name name version))
13411 (sha256
13412 "1zgb9idz7m3mzf8wvik0gwmyrxp753axqjv2pab326cr5myj1s4b")))
13413 (build-system pyproject-build-system)
13414 (arguments
13415 (list
13416 #:test-flags
13417 #~'("-k"
13418 ;; Disable network dependent tests.
13419 "not test_changes and not test_not_image_url and not test_http_url")))
13420 (propagated-inputs (list python-jinja2 python-requests))
13421 (native-inputs (list python-flask
13422 python-fonttools
13423 python-pillow
13424 python-pytest
13425 python-setuptools
13426 python-wheel
13427 python-xmldiff))
13428 (home-page "https://github.com/google/pybadges")
13429 (synopsis "Generate Github-style badges on the command-line")
13430 (description
13431 "This package provides @code{python-pybadges}: a library and command-line
13432tool for generating Github-style badges as SVG images.")
13433 (license license:asl2.0)))
13434
13435(define-public python-grid5000
13436 (package
13437 (name "python-grid5000")
13438 (version "1.2.4")
13439 (source (origin
13440 (method git-fetch)
13441 (uri (git-reference
13442 (url "https://gitlab.inria.fr/msimonin/python-grid5000")
13443 (commit (string-append "v" version))))
13444 (file-name (git-file-name name version))
13445 (sha256
13446 "0px5dr6kn7i5dyy4g42vqap1zpkc4hdvg7prrxdkkl57lfhz5w61")))
13447 (build-system pyproject-build-system)
13448 (arguments
13449 (list #:tests? #f)) ; No tests.
13450 (native-inputs (list python-setuptools))
13451 (propagated-inputs (list python-requests python-ipython python-pyyaml))
13452 (home-page "https://pypi.org/project/python-grid5000/")
13453 (synopsis "Grid5000 python client")
13454 (description
13455 "python-grid5000 is a python package wrapping the Grid5000 REST API.
13456You can use it as a library in your python project or you can explore the
13457Grid5000 resources interactively using the embedded shell.")
13458 (license license:gpl3+)))
13459
13460(define-public python-enoslib
13461 (package
13462 (name "python-enoslib")
13463 (version "8.0.1")
13464 (source
13465 (origin
13466 (method git-fetch)
13467 (uri (git-reference
13468 (url "https://gitlab.inria.fr/discovery/enoslib")
13469 (commit (string-append "v" version))))
13470 (file-name (git-file-name name version))
13471 (sha256 "0vs6b0bnlv95mzv0rjbxqwrhzkgjkn91gqipgwdf7y4ffpz8nybg")))
13472 (arguments
13473 (list
13474 #:test-flags
13475 #~(list "enoslib/tests/unit"
13476 "--ignore" "enoslib/tests/unit/infra/test_utils.py"
13477 "--ignore-glob" "enoslib/tests/unit/infra/enos_iotlab/*")
13478 #:phases
13479 #~(modify-phases %standard-phases
13480 (add-before 'check 'pre-check
13481 (lambda* (#:key tests? #:allow-other-keys)
13482 (when tests?
13483 ;; Otherwise Ansible fails to create its config directory.
13484 (setenv "HOME" "/tmp"))))
13485 ;; Disable the sanity check, which fails with the following error:
13486 ;;
13487 ;; ContextualVersionConflict(rich 12.4.1
13488 ;; (/gnu/store/...-python-rich-12.4.1/lib/python3.9/site-packages),
13489 ;; Requirement.parse('rich[jupyter]~=12.0.0'), {'enoslib'})
13490 ;;
13491 ;; The optional jupyter dependency of rich isn't critical for
13492 ;; EnOSlib to work
13493 (delete 'sanity-check))))
13494 (build-system pyproject-build-system)
13495 (native-inputs
13496 (list python-ddt
13497 python-freezegun
13498 python-pytest
13499 python-setuptools
13500 python-wheel))
13501 (propagated-inputs
13502 (list ansible
13503 python-cryptography
13504 python-grid5000
13505 python-jsonschema
13506 python-netaddr
13507 python-packaging
13508 python-requests
13509 python-rich
13510 python-sshtunnel
13511 python-pytz))
13512 (home-page "https://discovery.gitlabpages.inria.fr/enoslib/index.html")
13513 (synopsis "Deploy distributed testbeds on a variety of platforms")
13514 (description
13515 "EnOSlib is a library to build experimental frameworks on various
13516scientific testbeds. It lets you deploy networks of machines on actual
13517hardware on Grid'5000 or via OpenStack, to Vagrant, Chameleon, and more.")
13518 (license license:gpl3+)))
13519
13520(define-public python-pynetbox
13521 (package
13522 (name "python-pynetbox")
13523 (version "7.4.1")
13524 (source (origin
13525 (method url-fetch)
13526 (uri (pypi-uri "pynetbox" version))
13527 (sha256
13528 (base32
13529 "1hq0mqykwdsmcrj61fxxzdkpc7wnld4grhkcxy560ym79jbbb0iz"))))
13530 (build-system pyproject-build-system)
13531 (arguments
13532 (list
13533 #:test-flags
13534 ;; Integration tests depend on docker.
13535 '(list "--ignore=tests/integration")))
13536 (propagated-inputs (list python-packaging python-requests))
13537 (native-inputs
13538 (list python-pytest
13539 python-setuptools
13540 python-setuptools-scm
13541 python-wheel))
13542 (home-page "https://github.com/netbox-community/pynetbox")
13543 (synopsis "NetBox API client library")
13544 (description "Python module to query and edit data stored in a
13545@url{https://netbox.dev,NetBox} instance.")
13546 (license license:asl2.0)))
13547
13548(define-public python-waybackpack
13549 (package
13550 (name "python-waybackpack")
13551 (version "0.6.4")
13552 (source
13553 (origin
13554 (method url-fetch)
13555 (uri (pypi-uri "waybackpack" version))
13556 (sha256
13557 (base32 "16lcr2hv7gmp199fh3psrnv68j20pfxria8v6gchrpl1jqx9f923"))))
13558 (build-system pyproject-build-system)
13559 (arguments
13560 (list #:tests? #f)) ; would require network (and SSL certificates)
13561 (propagated-inputs (list python-requests))
13562 (native-inputs (list python-pytest python-setuptools python-wheel))
13563 (home-page "https://github.com/jsvine/waybackpack")
13564 (synopsis
13565 "Download the entire Wayback Machine archive for a given URL")
13566 (description
13567 "This package provides a library and a command-line tool that lets
13568you download the entire Wayback Machine archive for a given URL.")
13569 (license license:expat)))
13570
13571(define-public python-xyzservices
13572 (package
13573 (name "python-xyzservices")
13574 (version "2025.4.0")
13575 (source
13576 (origin
13577 (method url-fetch)
13578 (uri (pypi-uri "xyzservices" version))
13579 (sha256
13580 (base32 "1n096zg9bd4n6w6axcm16m9sxdkc6qy1mipva0scbyj86rqn9rvg"))))
13581 (build-system pyproject-build-system)
13582 (arguments
13583 (list
13584 #:test-flags #~(list "-m" "not request")))
13585 (native-inputs
13586 (list python-pytest
13587 python-mercantile
13588 python-requests
13589 python-setuptools
13590 python-setuptools-scm))
13591 (home-page "https://github.com/geopandas/xyzservices")
13592 (synopsis "Source of XYZ tiles providers")
13593 (description "@code{xyzservices} is a lightweight library providing a
13594repository of available XYZ services offering raster basemap tiles. The
13595repository is provided via Python API and as a compressed JSON file.")
13596 (license license:bsd-3)))
13597
13598(define-public s3cmd
13599 (package
13600 (name "s3cmd")
13601 (version "2.4.0")
13602 (source
13603 (origin
13604 (method git-fetch)
13605 (uri (git-reference
13606 (url "https://github.com/s3tools/s3cmd")
13607 (commit (string-append "v" version))))
13608 (file-name (git-file-name name version))
13609 (sha256
13610 (base32 "168c49d1v8r7azv66zz0w07jalf434c2jpg2xzads5jnxzmiy73k"))))
13611 (build-system pyproject-build-system)
13612 (arguments
13613 (list
13614 #:tests? #f ; XXX: Tests require network access.
13615 #:phases
13616 #~(modify-phases %standard-phases
13617 (add-after 'unpack 'hide-wrapping
13618 (lambda _
13619 (substitute* "S3/MultiPart.py"
13620 (("sys\\.argv\\[0\\]")
13621 "\"s3cmd\""))
13622 (substitute* "s3cmd"
13623 (("optparser\\.get_prog_name\\(\\)")
13624 "\"s3cmd\"")))))))
13625 (native-inputs (list python-setuptools))
13626 (inputs (list python-dateutil python-magic))
13627 (home-page "https://s3tools.org/s3cmd")
13628 (synopsis "Command line tool for S3-compatible storage services")
13629 (description
13630 "S3cmd is a command line tool for uploading, retrieving and managing data
13631in storage services that are compatible with the Amazon Simple Storage
13632Service (S3) protocol, including S3 itself. It supports rsync-like backup,
13633GnuPG encryption, and more. It also supports management of Amazon's
13634CloudFront content delivery network.")
13635 (license license:gpl2+)))