projects/guix·blob next-master · refs

13684 lines · 495.5 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-2026 Artur Wroblewski <[email protected]>
88;;; Copyright © 2025, 2026 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.6")
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 "120q6hrhfjxdsqav8h5z8yqfi0iiacwxbkryjk7kb20ic2879vqh"))))
352 (build-system pyproject-build-system)
353 (arguments
354 (list
355 ;; tests: 1821 passed
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
382 python-essentials-openapi
383 python-guardpost
384 python-httptools
385 python-rodi
386 python-itsdangerous))
387 (home-page "https://github.com/Neoteroi/BlackSheep")
388 (synopsis "Asynchronous framework to build event based web applications")
389 (description
390 "BlackSheep is a lightweight, asynchronous, event driven Web framework.
391
392The framework offers
393@itemize
394@item A rich code API, based on dependency injection and inspired by Flask and
395ASP.NET Core.
396@item A typing-friendly codebase, which enables a comfortable development
397experience thanks to hints when coding with IDEs.
398@item Built-in generation of OpenAPI Documentation, supporting version 3, YAML,
399and JSON.
400@item A cross-platform framework, using the most modern versions of Python.
401@item Good performance.
402@end itemize")
403 (license license:expat)))
404
405(define-public python-cloudpathlib
406 (package
407 (name "python-cloudpathlib")
408 (version "0.23.0")
409 (source
410 (origin
411 (method git-fetch)
412 (uri (git-reference
413 (url "https://github.com/drivendataorg/cloudpathlib")
414 (commit (string-append "v" version))))
415 (file-name (git-file-name name version))
416 (sha256
417 (base32 "1dqwml269lpz51drgg3s27sqmvwa1vldw2rj34ssnqppcmc5h5lm"))))
418 (build-system pyproject-build-system)
419 (arguments
420 (list
421 ;; tests: 977 passed, 15 skipped, 8642 warnings
422 #:test-flags
423 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
424 ;; TODO: Package azure-identity (required for this file)
425 "--ignore=tests/test_azure_specific.py"
426 ;; TypeError: Retry.__init__() got an unexpected keyword
427 ;; argument 'timeout'
428 "--deselect=tests/test_gs_specific.py::test_timeout_and_retry")
429 #:phases
430 #~(modify-phases %standard-phases
431 (add-after 'unpack 'fix-pytest-config
432 (lambda _
433 (substitute* "pyproject.toml"
434 (("addopts =.*") "")))))))
435 (native-inputs
436 (list ;; python-azure-identity
437 python-dotenv
438 python-flit-core
439 python-psutil
440 python-pydantic
441 python-pytest
442 python-pytest-cases
443 python-pytest-xdist
444 python-shortuuid
445 python-tenacity))
446 (propagated-inputs
447 (list python-azure-storage-blob
448 python-azure-storage-file-datalake
449 python-boto3
450 python-google-cloud-storage
451 python-typing-extensions))
452 (home-page "https://github.com/drivendataorg/cloudpathlib")
453 (synopsis "Pathlib-style classes for cloud storage services")
454 (description
455 "This package provides a Python library with classes that mimic
456@code{pathlib.Path}'s interface for URIs from different cloud storage
457services.")
458 (license license:expat)))
459
460(define-public python-conda-package-handling
461 (package
462 (name "python-conda-package-handling")
463 (version "2.4.0")
464 (source
465 (origin
466 (method git-fetch)
467 (uri (git-reference
468 (url "https://github.com/conda/conda-package-handling/")
469 (commit version)))
470 (file-name (git-file-name name version))
471 (sha256
472 (base32 "1l2zbbwlxp9azpshixvxnb9354xajxkn88934grpwl70blgb3yq2"))))
473 (build-system pyproject-build-system)
474 (native-inputs
475 (list python-bottle
476 python-mock
477 python-pytest
478 python-pytest-cov
479 python-pytest-mock
480 python-setuptools))
481 (propagated-inputs
482 (list python-conda-package-streaming))
483 (home-page "https://conda.io")
484 (synopsis "Create and extract conda packages of various formats")
485 (description
486 "This library is an abstraction of Conda package handling and a tool for
487extracting, creating, and converting between formats.")
488 (license license:bsd-3)))
489
490(define-public python-conda-package-streaming
491 (package
492 (name "python-conda-package-streaming")
493 (version "0.12.0")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (pypi-uri "conda_package_streaming" version))
498 (sha256
499 (base32 "1fcyx83swx1wfndrl0vdk8c2pixshn54gkjy7xchkra13kw2yas2"))))
500 (build-system pyproject-build-system)
501 (arguments
502 ;; TODO: Cycles with python-conda-package-handling, implement bootstrap.
503 (list #:tests? #f))
504 (native-inputs
505 (list python-flit-core))
506 (propagated-inputs
507 (list python-requests
508 python-zstandard))
509 (home-page "https://conda.github.io/conda-package-streaming/")
510 (synopsis "Conda formats (@code{.conda}, @code{.tar.bz2}) reader library")
511 (description
512 "This package provides an efficient library to read from new and old format
513@code{.conda} and @code{.tar.bz2} conda packages.")
514 (license license:bsd-3)))
515
516(define-public python-dependency-groups
517 (package
518 (name "python-dependency-groups")
519 (version "1.3.1")
520 (source
521 (origin
522 (method url-fetch)
523 (uri (pypi-uri "dependency_groups" version))
524 (sha256
525 (base32 "1zgymnk6k984h2wfdpp0vws2ihwqrr9lmxhrij9zs5q5140q61vq"))))
526 (build-system pyproject-build-system)
527 (propagated-inputs (list python-packaging python-tomli))
528 (native-inputs (list python-flit-core))
529 (home-page "https://dependency-groups.readthedocs.io/")
530 (synopsis "Tools and library for resolving PEP 735 Dependency Group data")
531 (description
532 "This package provides a library which is able to parse dependency groups (PEP
533735), following includes, and provide that data as output.")
534 (license license:expat)))
535
536(define-public python-devpi-common
537 (package
538 (name "python-devpi-common")
539 (version "4.0.4")
540 (source
541 (origin
542 (method url-fetch)
543 (uri (pypi-uri "devpi_common" version))
544 (sha256
545 (base32 "1k217b0fvsc7k2afw6wwlvqr1ksnv1vjzfm61g358vn98nd0lni3"))))
546 (build-system pyproject-build-system)
547 (propagated-inputs (list python-lazy python-packaging-legacy
548 python-requests))
549 (native-inputs
550 (list python-pytest
551 python-setuptools
552 python-wheel))
553 (home-page "https://github.com/devpi/devpi")
554 (synopsis
555 "Utilities jointly used by devpi-server, devpi-client and others")
556 (description
557 "This package provides utilities jointly used by devpi-server,
558devpi-client and others.")
559 (license license:expat)))
560
561(define-public python-devpi-client
562 (package
563 (name "python-devpi-client")
564 (version "7.2.0")
565 (source
566 (origin
567 (method url-fetch)
568 (uri (pypi-uri "devpi-client" version))
569 (sha256
570 (base32 "0ywx4ql8lsypb17n2miq39bmkrp232sdk8g6pskqp1y3b223chy1"))))
571 (build-system pyproject-build-system)
572 (arguments
573 (list
574 #:test-flags
575 ;; This wants to use pip install
576 '(list "--ignore=testing/test_upload.py"
577 ;; These complain about finding distutils. It's not my fault,
578 ;; mate, setuptools is right there, but you won't pick it!
579 "--ignore=testing/test_list_remove.py"
580 "--ignore=testing/test_main.py"
581 "--ignore=testing/test_install.py"
582 "--ignore=testing/test_functional.py"
583 "--ignore=testing/test_test.py")
584 #:phases
585 '(modify-phases %standard-phases
586 (add-after 'unpack 'patch-tests
587 (lambda _
588 ;; Do not replace the directory name of the store item.
589 (substitute* "testing/conftest.py"
590 (("\"devpi-server\", \"devpi-init\"")
591 "\"/bin/devpi-server\", \"/bin/devpi-init\""))))
592 (add-before 'check 'set-HOME
593 ;; Some tests need this
594 (lambda _ (setenv "HOME" "/tmp"))))))
595 (propagated-inputs (list python-pypa-build
596 python-check-manifest
597 python-colorama
598 python-devpi-common
599 python-iniconfig
600 python-pkginfo
601 python-platformdirs
602 python-pluggy
603 python-pypitoken
604 python-tomli))
605 (native-inputs
606 (list python-devpi-server
607 python-pytest
608 python-setuptools
609 python-virtualenv))
610 (home-page "https://github.com/devpi/devpi")
611 (synopsis "Devpi upload/install/... commands for Python developers")
612 (description
613 "The devpi command line tool is typically used in conjunction with
614devpi-server. It allows uploading, testing and installing packages from devpi
615indexes.")
616 (license license:expat)))
617
618(define-public python-devpi-process
619 (package
620 (name "python-devpi-process")
621 (version "1.0.2")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (pypi-uri "devpi_process" version))
626 (sha256
627 (base32 "0v26i8bs0n8f2ikizwyvq77fw3l0nsyl4wj8yff0r3y351ydqbs1"))))
628 (build-system pyproject-build-system)
629 (arguments
630 (list
631 #:phases
632 '(modify-phases %standard-phases
633 (add-after 'unpack 'relax-requirements
634 (lambda _
635 ;; Our package is too old, sorry.
636 (substitute* "pyproject.toml"
637 (("typing-extensions>=4.12.2")
638 "typing-extensions>=4.10.0"))))
639 (add-after 'unpack 'patch-tool-locations
640 (lambda* (#:key inputs #:allow-other-keys)
641 (substitute* "src/devpi_process/__init__.py"
642 (("_exe\\(\"devpi-init\"\\)")
643 (string-append "\"" (search-input-file inputs "/bin/devpi-init") "\""))
644 (("_exe\\(\"devpi-server\"\\)")
645 (string-append "\"" (search-input-file inputs "/bin/devpi-server") "\""))
646 (("_exe\\(\"devpi\"\\)")
647 (string-append "\"" (search-input-file inputs "/bin/devpi") "\""))))))))
648 (propagated-inputs (list python-devpi-client python-devpi-server
649 python-typing-extensions))
650 (native-inputs
651 (list nss-certs-for-test
652 python-covdefaults
653 python-hatchling
654 python-hatch-vcs
655 python-httpx
656 python-pytest
657 python-pytest-cov))
658 (home-page "https://github.com/devpi/devpi")
659 (synopsis "API to create and use a devpi server process")
660 (description
661 "This package provides a programmatic API to create and use a devpi
662server process.")
663 (license license:expat)))
664
665(define-public python-devpi-server
666 (package
667 (name "python-devpi-server")
668 (version "6.17.0")
669 (source
670 (origin
671 (method url-fetch)
672 (uri (pypi-uri "devpi_server" version))
673 (sha256
674 (base32 "13lybrw8j6zjxwvx6sk7bw6854hd2m18s1xcvl0q100j4n06p6ml"))))
675 (build-system pyproject-build-system)
676 (arguments
677 (list
678 #:test-flags
679 ;; These all fail with: "module 'py' has no attribute 'io'"
680 #~(list "--ignore=test_devpi_server/test_importexport.py"
681 "--ignore=test_devpi_server/test_main.py"
682 "--ignore=test_devpi_server/test_genconfig.py")
683 #:phases
684 #~(modify-phases %standard-phases
685 (add-after 'unpack 'relax-requirements
686 (lambda _
687 (substitute* "pyproject.toml"
688 ;; It straggles to check argon2 in passlib on any versions
689 ;; starting from 6.14.0: UnknownExtra("passlib 1.7.4 has no
690 ;; such extra feature 'argon2'",).
691 (("passlib\\[argon2\\]") "passlib")))))))
692 (propagated-inputs (list python-argon2-cffi
693 python-attrs
694 python-defusedxml
695 python-devpi-common
696 python-httpx
697 python-itsdangerous
698 python-lazy
699 python-legacy-cgi
700 python-passlib
701 python-platformdirs
702 python-pluggy
703 python-py
704 python-pyramid
705 python-repoze-lru
706 python-ruamel.yaml-0.16 ;FIXME: rename
707 python-strictyaml
708 python-waitress))
709 (native-inputs
710 (list python-execnet
711 python-pytest
712 python-pytest-asyncio
713 python-pytest-timeout
714 python-setuptools
715 python-webtest))
716 (home-page "https://devpi.net")
717 (synopsis "Pypi.org caching server")
718 (description "This package implements a reliable private and pypi.org
719caching server.")
720 (license license:expat)))
721
722(define-public python-dicomweb-client
723 (package
724 (name "python-dicomweb-client")
725 (version "0.60.0")
726 (source
727 (origin
728 (method git-fetch)
729 (uri (git-reference
730 (url "https://github.com/ImagingDataCommons/dicomweb-client")
731 (commit (string-append "v" version))))
732 (file-name (git-file-name name version))
733 (sha256
734 (base32 "1zad0905cc4jy4hnh9yhcw63bg25f7xa33x9rj9fhh5r4fznha8d"))))
735 (build-system pyproject-build-system)
736 (arguments
737 (list
738 #:phases
739 #~(modify-phases %standard-phases
740 (add-after 'unpack 'remove-dynamic-versioning
741 (lambda _
742 (substitute* "pyproject.toml"
743 ;; Dynamic versioning via 'uv-dynamic-versioning' is
744 ;; not suitable for Guix.
745 (("dynamic = \\[\"version\"\\]")
746 (string-append "version = \""
747 #$version "\""))))))))
748 (native-inputs
749 (list python-hatchling
750 python-pytest
751 python-pytest-localserver))
752 (propagated-inputs
753 (list python-numpy
754 python-pillow
755 python-pydicom
756 python-requests
757 python-retrying))
758 (home-page "https://github.com/ImagingDataCommons/dicomweb-client")
759 (synopsis "Python client for DICOMweb RESTful services")
760 (description
761 "@code{dicomweb_client} provides client intefaces for DICOMweb RESTful
762services QIDO-RS, WADO-RS and STOW-RS to search, retrieve and store
763DICOM objects over the web, respectively.")
764 (license license:expat)))
765
766(define-public python-docusign-esign
767 (package
768 (name "python-docusign-esign")
769 (version "5.0.0")
770 (source
771 (origin
772 (method url-fetch)
773 (uri (pypi-uri "docusign-esign" version))
774 (sha256
775 (base32 "18n9szjxbmsccz4vlvsl4xa73jn0y16l0c344m83gil25v2amn69"))))
776 (build-system pyproject-build-system)
777 ;; Testing requires undocumented setup changes with network access to
778 ;; <demo.docusign.net>, and so testing is disabled here.
779 (arguments `(#:tests? #f))
780 (native-inputs
781 (list python-setuptools
782 python-wheel))
783 (propagated-inputs
784 (list python-certifi
785 python-dateutil
786 python-urllib3
787 python-pyjwt
788 python-cryptography))
789 (home-page "https://developers.docusign.com/")
790 (synopsis "DocuSign Python Client")
791 (description
792 "The Official DocuSign Python Client Library used to interact with the
793eSign REST API. Send, sign, and approve documents using this client.")
794 (license license:expat)))
795
796(define-public python-domain-connect
797 (package
798 (name "python-domain-connect")
799 (version "0.0.11")
800 (source
801 (origin
802 (method git-fetch) ;no tests in PyPI archive
803 (uri (git-reference
804 (url "https://github.com/Domain-Connect/domainconnect_python")
805 (commit (string-append "v" version))))
806 (file-name (git-file-name name version))
807 (sha256
808 (base32 "1dhqbx15h074g51mj73j9hlyvb11isjnj4s9ih5kbw1g4vf1q1jk"))))
809 (build-system pyproject-build-system)
810 (arguments
811 (list
812 ;; Check and sanity-check phases require /etc/resolv.conf, which is not
813 ;; present in container.
814 #:tests? #f
815 #:phases #~(modify-phases %standard-phases (delete 'sanity-check))))
816 (native-inputs
817 (list python-setuptools))
818 (propagated-inputs
819 (list python-cryptography
820 python-dnspython
821 python-future
822 python-publicsuffixlist))
823 (home-page "https://github.com/Domain-Connect/domainconnect_python")
824 (synopsis "Client library for Domain Connect protocol")
825 (description
826 "This package provides a Service Provider functionality in both Sync and
827Async mode for @url{https://domainconnect.org/, Domain Connect protocol}.")
828 (license license:expat)))
829
830(define-public python-domain-connect-dyndns
831 (package
832 (name "python-domain-connect-dyndns")
833 (version "0.0.9")
834 (source
835 (origin
836 (method url-fetch)
837 (uri (pypi-uri "domain-connect-dyndns" version))
838 (sha256
839 (base32 "0srrblcb64bp7k5cqqivx4kykqdkmmzmspxwv66vix9k7wxdwqzx"))))
840 (build-system pyproject-build-system)
841 (arguments
842 (list
843 ;; Check and sanity-check phases require /etc/resolv.conf, which is not
844 ;; present in container.
845 #:tests? #f
846 #:phases #~(modify-phases %standard-phases (delete 'sanity-check))))
847 (native-inputs
848 (list python-setuptools
849 python-wheel))
850 (propagated-inputs
851 (list python-dnspython
852 python-domain-connect
853 python-requests
854 python-validators))
855 (home-page "https://github.com/Domain-Connect/DomainConnectDDNS-Python")
856 (synopsis "Domain Connect Dynamic DNS in Python")
857 ;; Project lacks meaningful description in README, see
858 ;; <https://github.com/Domain-Connect/DomainConnectDDNS-Python/issues/43>.
859 (description
860 "Python client library for Dynamic DNS using
861@url{https://www.domainconnect.org/, Domain Connect} protocol.")
862 (license license:expat)))
863
864(define-public python-dropbox
865 (package
866 (name "python-dropbox")
867 (version "12.0.2")
868 (source
869 (origin
870 (method git-fetch) ; no tests in PyPI release
871 (uri (git-reference
872 (url "https://github.com/dropbox/dropbox-sdk-python")
873 (commit (string-append "v" version))))
874 (file-name (git-file-name name version))
875 (sha256
876 (base32 "0pyvi2mbibah42kq8804d98ghypm46wr8swqr34apnvnlp9j2nzl"))))
877 (build-system pyproject-build-system)
878 (arguments
879 (list
880 #:test-flags
881 #~(list "-k" (string-join
882 ;; Network access is required.
883 (list "not test_bad_auth"
884 "test_app_auth"
885 "test_bad_pins"
886 "test_bad_pins_session"
887 "test_downscope"
888 "test_multi_auth"
889 "test_path_root"
890 "test_path_root_err"
891 "test_refresh"
892 "test_rpc"
893 "test_team"
894 "test_upload_download"
895 "test_versioned_route")
896 " and not "))
897 #:phases
898 #~(modify-phases %standard-phases
899 (add-after 'unpack 'relax-requirements
900 (lambda _
901 (substitute* "setup.py"
902 ;; 'stone>=2,<3.3.3',
903 ((">=2,<3.3.3") ">=2,<3.4.0"))))
904 (add-before 'check 'pre-check
905 (lambda _
906 ;; Otherwise tests setup erroring.
907 (setenv "LEGACY_USER_DROPBOX_TOKEN" "guix")
908 (setenv "LEGACY_USER_CLIENT_ID" "guix")
909 (setenv "LEGACY_USER_CLIENT_SECRET" "guix")
910 (setenv "LEGACY_USER_REFRESH_TOKEN" "guix")
911 (setenv "SCOPED_USER_DROPBOX_TOKEN" "guix")
912 (setenv "SCOPED_USER_CLIENT_ID" "guix")
913 (setenv "SCOPED_USER_CLIENT_SECRET" "guix")
914 (setenv "SCOPED_USER_REFRESH_TOKEN" "guix")
915 (setenv "SCOPED_TEAM_DROPBOX_TOKEN" "guix")
916 (setenv "SCOPED_TEAM_CLIENT_ID" "guix")
917 (setenv "SCOPED_TEAM_CLIENT_SECRET" "guix")
918 (setenv "SCOPED_TEAM_REFRESH_TOKEN" "guix")
919 (setenv "DROPBOX_SHARED_LINK" "guix"))))))
920 (native-inputs
921 (list nss-certs-for-test
922 python-mock
923 python-pytest
924 python-pytest-mock
925 python-setuptools
926 python-wheel))
927 (propagated-inputs
928 (list python-requests python-six python-stone))
929 (home-page "https://www.dropbox.com/developers")
930 (synopsis "Official Dropbox API Client")
931 (description "This package provides a Python SDK for integrating with the
932Dropbox API v2.")
933 (license license:expat)))
934
935(define-public python-essentials-openapi
936 (package
937 (name "python-essentials-openapi")
938 (version "1.2.1")
939 (source
940 (origin
941 (method git-fetch)
942 (uri (git-reference
943 (url "https://github.com/Neoteroi/essentials-openapi")
944 (commit (string-append "v" version))))
945 (file-name (git-file-name name version))
946 (sha256
947 (base32 "0f3lhpkqhvv8sr1c34cvzdqkc61306m03w3jp0zdih1v6is05j8x"))))
948 (build-system pyproject-build-system)
949 (native-inputs
950 (list python-flask
951 python-hatchling
952 python-pydantic
953 python-pytest
954 python-rich))
955 (propagated-inputs
956 (list python-essentials
957 python-httpx
958 python-jinja2
959 python-markupsafe
960 python-pyyaml))
961 (home-page "https://github.com/Neoteroi/essentials-openapi/")
962 (synopsis "Generator for OpenAPI Documentation")
963 (description
964 "Generator for OpenAPI Documentation version 2 and 3, in JSON and YAML
965formats. Generator for other kinds of documents from OpenAPI Documentation
966files.")
967 (license license:expat)))
968
969(define-public python-eventlet
970 (package
971 (name "python-eventlet")
972 (version "0.40.2")
973 (source
974 (origin
975 (method url-fetch)
976 (uri (pypi-uri "eventlet" version))
977 (sha256
978 (base32
979 "1c6qr1cnam79wxm1sh5y04061iyy3shs02yd0mlh47bngwknqqs2"))))
980 (build-system pyproject-build-system)
981 (arguments
982 (list
983 #:test-flags
984 '(list "-k"
985 (string-append
986 "not TestGetaddrinfo"
987 " and not TestProxyResolver"
988 " and not test_noraise_dns_tcp"
989 " and not test_raise_dns_tcp"
990 " and not test_hosts_no_network"
991 " and not test_import_rdtypes_then_eventlet"
992 " and not test_patcher_existing_locks"
993 " and not test_dns_methods_are_green"))
994 #:phases
995 #~(modify-phases %standard-phases
996 (add-after 'unpack 'avoid-OSError
997 (lambda _
998 ;; If eventlet tries to load greendns, an OSError is thrown when
999 ;; getprotobyname is called. Thankfully there is an environment
1000 ;; variable to disable the greendns import, so use it. Note that
1001 ;; this error is propagated to child packages too, so enforce the
1002 ;; changed default.
1003 (substitute* "eventlet/green/socket.py"
1004 (("os\\.environ\\.get\\(\"EVENTLET_NO_GREENDNS\", ''\\)")
1005 "os.environ.get(\"EVENTLET_NO_GREENDNS\", \"yes\")")))))))
1006 (native-inputs
1007 (list python-pypa-build
1008 python-hatch-vcs
1009 python-hatchling
1010 python-pytest))
1011 (propagated-inputs
1012 (list python-dnspython python-greenlet))
1013 (home-page "https://eventlet.net")
1014 (synopsis "Concurrent networking library for Python")
1015 (description
1016 "Eventlet is a concurrent networking library for Python that
1017allows you to change how you run your code, not how you write it.
1018It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1019Coroutines ensure that the developer uses a blocking style of programming
1020that is similar to threading, but provide the benefits of non-blocking I/O.
1021The event dispatch is implicit, which means you can easily use @code{Eventlet}
1022from the Python interpreter, or as a small part of a larger application.
1023
1024Note: In Guix, this package assumes the environment variable
1025@code{EVENTLET_NO_GREENDNS} defaults to @code{yes}. To try to use it, set it
1026to anything else.")
1027 (license license:expat)))
1028
1029(define-public python-flask-caching
1030 (package
1031 (name "python-flask-caching")
1032 (version "2.3.1")
1033 (source
1034 (origin
1035 (method url-fetch)
1036 (uri (pypi-uri "flask_caching" version))
1037 (sha256
1038 (base32 "1jcqgfzvqhgpngf9nhpfjs129cslh8jyczfy8kw11y7b9qdzvmv5"))))
1039 (build-system pyproject-build-system)
1040 (arguments
1041 (list
1042 #:test-flags
1043 ;; Tests requiring running Redis or dated python-cache.
1044 #~(list "--deselect=tests/test_init.py::test_init_nullcache[MemcachedCache]"
1045 "--deselect=tests/test_init.py::test_init_nullcache[RedisCache]"
1046 "--deselect=tests/test_init.py::test_init_nullcache[RedisSentinelCache]"
1047 "--deselect=tests/test_init.py::test_init_nullcache[SASLMemcachedCache]"
1048 "--deselect=tests/test_init.py::test_init_nullcache[SpreadSASLMemcachedCache]"
1049 "-k" "not test_client_override_reflected_on_cachelib_methods")))
1050 (native-inputs
1051 (list python-pytest
1052 python-pytest-asyncio
1053 python-pytest-xprocess
1054 python-setuptools))
1055 (propagated-inputs
1056 (list python-cachelib
1057 python-flask))
1058 (home-page "https://github.com/pallets-eco/flask-caching")
1059 (synopsis "Caching extension for Flask")
1060 (description
1061 "This package provides a caching support to Flask applications, it's a
1062fort ok https://github.com/thadeusb/flask-cache.")
1063 (license license:bsd-3)))
1064
1065(define-public python-flask-paginate
1066 (package
1067 (name "python-flask-paginate")
1068 (version "2024.4.12")
1069 (source
1070 (origin
1071 (method git-fetch)
1072 (uri (git-reference
1073 (url "https://github.com/lixxu/flask-paginate")
1074 (commit (string-append "v" version))))
1075 (file-name (git-file-name name version))
1076 (sha256
1077 (base32 "1q4ajwk0pzc6934g07gdryjcwi6rd9iqcwv5g5s718dfx2bj1831"))))
1078 (arguments
1079 (list #:test-backend #~'custom
1080 #:test-flags #~(list "tests/tests.py")))
1081 (build-system pyproject-build-system)
1082 (native-inputs
1083 (list python-pytest
1084 python-setuptools))
1085 (propagated-inputs
1086 (list python-flask))
1087 (home-page "https://github.com/lixxu/flask-paginate")
1088 (synopsis "Simple paginate support for Flask")
1089 (description
1090 "Flask-paginate is a simple pagination extension for Flask which is
1091inspired by Ruby's will_paginate library. It supports several CSS frameworks.")
1092 (license license:bsd-3)))
1093
1094(define-public python-gdown
1095 (package
1096 (name "python-gdown")
1097 (version "5.2.0")
1098 (source
1099 (origin
1100 (method url-fetch)
1101 (uri (pypi-uri "gdown" version))
1102 (sha256
1103 (base32 "11y7xx6zjipx15a5626lhiwmwb2jxp4mdcwqrnij0mfqc981ci91"))))
1104 (build-system pyproject-build-system)
1105 (arguments (list #:tests? #f)) ;network access is required
1106 (native-inputs
1107 (list python-hatch-fancy-pypi-readme
1108 python-hatch-vcs
1109 python-hatchling))
1110 (propagated-inputs
1111 (list python-beautifulsoup4
1112 python-filelock
1113 python-requests
1114 python-tqdm))
1115 (home-page "https://github.com/wkentaro/gdown")
1116 (synopsis "Google Drive Public File/Folder Downloader")
1117 (description
1118 "This package implements a functionality to download large files
1119recursivly from Google Drive with option to filter them by file
1120formats (PDF/XML/CSV).")
1121 (license license:expat)))
1122
1123(define-public python-globus-sdk
1124 (package
1125 (name "python-globus-sdk")
1126 (version "3.56.0")
1127 (source
1128 (origin
1129 (method git-fetch) ;no tests in PyPI archive
1130 (uri (git-reference
1131 (url "https://github.com/globus/globus-sdk-python")
1132 (commit version)))
1133 (file-name (git-file-name name version))
1134 (sha256
1135 (base32 "11nljda2ir4gna4xa5vkj5nzxnjwadkh97qplkk9nrj44szphnzw"))))
1136 (build-system pyproject-build-system)
1137 (arguments
1138 (list
1139 #:test-flags
1140 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count))))
1141 #:phases
1142 #~(modify-phases %standard-phases
1143 (add-before 'check 'pre-check
1144 (lambda _ (setenv "HOME" "/tmp"))))))
1145 (native-inputs
1146 (list python-flaky
1147 python-pytest
1148 python-pytest-randomly
1149 python-pytest-xdist
1150 python-responses
1151 python-setuptools
1152 python-wheel))
1153 (propagated-inputs
1154 (list python-cryptography
1155 python-importlib-resources
1156 python-pyjwt
1157 python-requests))
1158 (home-page "https://github.com/globus/globus-sdk-python")
1159 (synopsis "Globus SDK for Python")
1160 (description
1161 "This package provides a SDK for convenient Pythonic interface to
1162@url{https://www.globus.org/, Globus} APIs.")
1163 (license license:asl2.0)))
1164
1165(define-public python-guardpost
1166 (package
1167 (name "python-guardpost")
1168 (version "1.0.4")
1169 (source
1170 (origin
1171 (method git-fetch)
1172 (uri (git-reference
1173 (url "https://github.com/Neoteroi/guardpost")
1174 (commit (string-append "v" version))))
1175 (file-name (git-file-name name version))
1176 (sha256
1177 (base32 "1xsakqn36g2h1s5rnbaf1lasx1jn4skqhmb8kdl1k4pgxp5sczyy"))))
1178 (build-system pyproject-build-system)
1179 (arguments
1180 (list
1181 ;; Possible timing issue, see:
1182 ;; <https://github.com/Neoteroi/GuardPost/issues/18>.
1183 #:test-flags '(list "--ignore=tests/test_jwts.py")))
1184 (native-inputs
1185 (list python-flask
1186 python-hatchling
1187 python-pytest
1188 python-pytest-asyncio))
1189 (propagated-inputs
1190 (list python-rodi
1191 ;; [optional]
1192 python-cryptography
1193 python-essentials
1194 python-pyjwt))
1195 (home-page "https://github.com/Neoteroi/GuardPost/")
1196 (synopsis
1197 "Authentication and authorization framework for Python applications")
1198 (description
1199 "GuardPost is a framework to handle authentication and
1200authorization in asynchronous Python applications.
1201
1202Its features include
1203
1204@itemize
1205@item Strategy to implement authentication.
1206@item Strategy to implement authorization.
1207@item Support for dependency injection
1208@item Built-in support for JSON Web Tokens (JWTs) authentication.
1209@end itemize")
1210 (license license:expat)))
1211
1212(define-public python-hookdns
1213 (package
1214 (name "python-hookdns")
1215 (version "2.0.0")
1216 (source
1217 (origin
1218 (method url-fetch)
1219 (uri (pypi-uri "hookdns" version))
1220 (sha256
1221 (base32 "087x12dy6slhyqwqblby2fpjdcy61yk3lqp3fplami0rmbn02fb7"))))
1222 (build-system pyproject-build-system)
1223 (arguments
1224 (list
1225 #:test-flags
1226 #~(list "-k" (string-join
1227 ;; Tests requiring networking.
1228 (list
1229 "not test_patch_contextmanager_with_another_hostname"
1230 "test_patch_contextmanager_with_another_hostname_ipv6"
1231 "test_patch_contextmanager_with_ipv4"
1232 "test_patch_contextmanager_with_name"
1233 "test_patch_contextmanager_with_public_fqdn_and_"
1234 "test_patch_contextmanager_with_unknown_hostname"
1235 "test_patch_decorator_with_another_hostname"
1236 "test_patch_decorator_with_another_hostname_ipv6"
1237 "test_patch_decorator_with_ipv4"
1238 "test_patch_decorator_with_name"
1239 "test_patch_decorator_with_public_fqdn_and_a_name_for_"
1240 "test_patch_decorator_with_unknown_hostname"
1241 "test_real_getaddrinfo_with_name_ipv6"
1242 "test_real_getaddrinfo_with_public_fqdn_ipv4"
1243 "test_real_getaddrinfo_with_public_fqdn_ipv6"
1244 "test_real_gethostbyname_ex_with_public_fqdn"
1245 "test_real_gethostbyname_with_public_fqdn"
1246 "test_real_requests_ip"
1247 "test_real_requests_name"
1248 "test_real_requests_with_public_fqdn"
1249 "test_reentrant")
1250 " and not "))))
1251 (native-inputs
1252 (list python-pytest
1253 python-requests
1254 python-setuptools
1255 python-wheel))
1256 (home-page "https://github.com/cle-b/hookdns")
1257 (synopsis "DNS resolution customization library")
1258 (description
1259 "HookDNS implements functionality that allows for modifying name
1260resolution in a Python script without any changes to the hosts file or the use
1261of a fake DNS resolver.")
1262 (license license:asl2.0)))
1263
1264(define-public python-httpretty
1265 (package
1266 (name "python-httpretty")
1267 (version "1.1.4")
1268 (source
1269 (origin
1270 (method url-fetch)
1271 (uri (pypi-uri "httpretty" version))
1272 (sha256
1273 (base32 "0s1vjdaf3pk2xd0hvi5f7p3jm2rgwpbc734jdp9r50m1smfhxpi0"))))
1274 (build-system pyproject-build-system)
1275 (arguments
1276 (list
1277 #:test-flags
1278 ;; Only run Unit tests.
1279 #~(list "--ignore=tests/bugfixes"
1280 "--ignore=tests/functional"
1281 "--ignore=tests/pyopenssl"
1282 "-k" (string-join
1283 ;; Tests pattern failing with one of these errors:
1284 ;; AttributeError: '(str|bool|bytes|list|tuple)' object
1285 ;; has no attribute 'should'
1286 ;; AttributeError: 'function' object has no attribute
1287 ;; 'when'
1288 ;; AttributeError: 'AssertionBuilder' object has no
1289 ;; attribute 'should_not'
1290 (list "not fake_socket_passes_through"
1291 "fakesock_socket"
1292 "request_parse_body_when"
1293 "test_Entry_class_normalizes_headers"
1294 "test_has_request"
1295 "test_httpretty_should_raise_proper"
1296 "test_parse_request_line_connect"
1297 "test_request_parse_querystring"
1298 "test_request_string_representation"
1299 "test_request_stubs_internals")
1300 " and not "))))
1301 (native-inputs
1302 (list nss-certs-for-test
1303 python-freezegun
1304 python-mock
1305 python-pytest
1306 python-setuptools
1307 python-sure
1308 python-wheel))
1309 (home-page "https://httpretty.readthedocs.io")
1310 (synopsis "HTTP client mock for Python")
1311 (description
1312 "@code{httpretty} is a helper for faking web requests,inspired by Ruby's
1313@code{fakeweb}.")
1314 (license license:expat)))
1315
1316(define-public python-huggingface-hub
1317 (package
1318 (name "python-huggingface-hub")
1319 (version "0.31.4")
1320 (source
1321 (origin
1322 (method git-fetch)
1323 (uri (git-reference
1324 (url "https://github.com/huggingface/huggingface_hub")
1325 (commit (string-append "v" version))))
1326 (file-name (git-file-name name version))
1327 (sha256
1328 (base32 "1rjkrmvvyzxlbnbndrg4v9qq39grn46c26zrdjgpf114gci5pwap"))))
1329 (build-system pyproject-build-system)
1330 (arguments
1331 (list
1332 #:test-flags
1333 ;; We don't have sentence_transformers...
1334 '(list "--ignore=contrib/sentence_transformers/test_sentence_transformers.py"
1335 ;; ...nor do we have InquirerPy...
1336 "--ignore=tests/test_command_delete_cache.py"
1337 ;; ...or timm...
1338 "--ignore=contrib/timm/test_timm.py"
1339 ;; ...or spacy_huggingface_hub
1340 "--ignore=contrib/spacy/test_spacy.py"
1341 ;; These all require internet access
1342 "--ignore=tests/test_cache_no_symlinks.py"
1343 "--ignore=tests/test_cache_layout.py"
1344 "--ignore=tests/test_commit_scheduler.py"
1345 "--ignore=tests/test_file_download.py"
1346 "--ignore=tests/test_hf_api.py"
1347 "--ignore=tests/test_hf_file_system.py"
1348 "--ignore=tests/test_inference_api.py"
1349 "--ignore=tests/test_inference_async_client.py"
1350 "--ignore=tests/test_inference_client.py"
1351 "--ignore=tests/test_inference_text_generation.py"
1352 "--ignore=tests/test_login_utils.py"
1353 "--ignore=tests/test_offline_utils.py"
1354 "--ignore=tests/test_repocard.py"
1355 "--ignore=tests/test_repository.py"
1356 "--ignore=tests/test_snapshot_download.py"
1357 "--ignore=tests/test_utils_cache.py"
1358 "--ignore=tests/test_utils_git_credentials.py"
1359 "--ignore=tests/test_utils_http.py"
1360 "--ignore=tests/test_utils_pagination.py"
1361 "--ignore=tests/test_webhooks_server.py"
1362 "-k" (string-append
1363 "not test_push_to_hub"
1364 " and not test_from_pretrained_model_id_only"
1365 " and not test_from_pretrained_model_id_and_revision"
1366 ;; These all require internet access
1367 " and not test_auth"
1368 " and not test_oauth"
1369 " and not test_utils_sha"
1370 " and not test_inference_providers"
1371 " and not test_xet"))
1372 #:phases
1373 '(modify-phases %standard-phases
1374 (add-before 'check 'pre-check
1375 ;; Some tests need to write to HOME.
1376 (lambda _ (setenv "HOME" "/tmp"))))))
1377 (propagated-inputs
1378 (list python-filelock
1379 python-fsspec
1380 python-packaging
1381 python-pyyaml
1382 python-requests
1383 python-tqdm
1384 python-typing-extensions))
1385 (native-inputs
1386 (list python-aiohttp
1387 python-fastapi
1388 python-jedi
1389 python-jinja2
1390 python-mypy
1391 python-numpy
1392 python-pillow
1393 python-pydantic
1394 python-pytest
1395 python-pytest-asyncio
1396 python-pytest-cov
1397 python-pytest-env
1398 python-pytest-mock
1399 python-pytest-rerunfailures
1400 python-pytest-vcr
1401 python-pytest-xdist
1402 python-setuptools
1403 python-types-requests
1404 python-types-toml
1405 python-types-urllib3
1406 python-typing-extensions
1407 python-urllib3
1408 python-wheel))
1409 (home-page "https://huggingface.co/docs/huggingface_hub/")
1410 (synopsis "Client library for accessing the huggingface.co hub")
1411 (description
1412 "This package provides a client library to download and publish models,
1413datasets and other repos on the @url{huggingface.co} hub.")
1414 (license license:asl2.0)))
1415
1416(define-public python-kubernetes
1417 (package
1418 (name "python-kubernetes")
1419 (version "35.0.0")
1420 (source
1421 (origin
1422 (method url-fetch)
1423 (uri (pypi-uri "kubernetes" version))
1424 (sha256
1425 (base32 "1vh9bzq175fzv9av3v37lcfh37yzss2d9vxrb0a84fa2ji2d601x"))))
1426 (build-system pyproject-build-system)
1427 (arguments
1428 (list
1429 #:test-flags
1430 #~(list
1431 ;; The following tests expect a local running Kubernetes cluster.
1432 "--ignore=kubernetes/e2e_test"
1433 "--ignore=kubernetes/dynamic")))
1434 (native-inputs
1435 (list python-pytest
1436 python-setuptools))
1437 (propagated-inputs
1438 (list python-certifi
1439 python-dateutil
1440 python-durationpy
1441 python-google-auth
1442 python-pyyaml
1443 python-requests
1444 python-requests-oauthlib
1445 python-six ;XXX: hard dependency
1446 python-urllib3
1447 python-websocket-client))
1448 (home-page "https://github.com/kubernetes-client/python")
1449 (synopsis "Python client for Kubernetes")
1450 (description
1451 "This package provides an official Python client library for
1452@url{http://kubernetes.io, Kubernetes}.")
1453 (license license:asl2.0)))
1454
1455(define-public python-lazr-restfulclient
1456 (package
1457 (name "python-lazr-restfulclient")
1458 (version "0.14.6")
1459 (source
1460 (origin
1461 (method url-fetch)
1462 (uri (pypi-uri "lazr.restfulclient" version))
1463 (sha256
1464 (base32 "1nzzmp9aaaxh25jy3wm71cpf9dfw56s4g303c8a3nij874fjmwa3"))))
1465 (build-system pyproject-build-system)
1466 (arguments
1467 (list
1468 #:phases
1469 #~(modify-phases %standard-phases
1470 ;; Disable part of the test suite to avoid the lazr.authentication
1471 ;; requirement, which requires 'oauth', a Python 2 only library.
1472 (add-after 'unpack 'remove-some-checks
1473 (lambda _
1474 (with-directory-excursion "src/lazr/restfulclient/tests"
1475 (for-each delete-file '("test_oauth.py" "test_docs.py")))
1476 (substitute* "setup.py"
1477 (("\"(oauth|lazr\\.(authentication|restful>=0\\.11\\.0))\",")
1478 ""))))
1479 (replace 'check
1480 (lambda* (#:key tests? #:allow-other-keys)
1481 (if tests?
1482 (invoke "zope-testrunner" "--test-path=src")
1483 (format #t "test suite not run~%")))))))
1484 (native-inputs
1485 (list python-setuptools
1486 python-testtools
1487 python-wheel
1488 python-wsgi-intercept
1489 python-zope-testrunner))
1490 (propagated-inputs
1491 (list python-distro
1492 python-httplib2
1493 python-oauthlib
1494 python-pyparsing
1495 python-setuptools
1496 python-six
1497 python-wadllib))
1498 (home-page "https://launchpad.net/lazr.restfulclient")
1499 (synopsis "Web client Python library extending wadlib")
1500 (description "This package provides a programmable client library that
1501adds functionality on top of @code{wadlib}.")
1502 (license license:lgpl3+)))
1503
1504(define-public python-launchpadlib
1505 (package
1506 (name "python-launchpadlib")
1507 (version "2.1.0")
1508 (source
1509 (origin
1510 (method url-fetch)
1511 (uri (pypi-uri "launchpadlib" version))
1512 (sha256
1513 (base32 "0br4j76l83lvyrhm8psml9cqmdsn65rx48w1q1a0s1bmpf85ihml"))))
1514 (build-system pyproject-build-system)
1515 (arguments
1516 (list #:phases #~(modify-phases %standard-phases
1517 (add-before 'check 'set-home
1518 (lambda _
1519 ;; Tests require a writable home.
1520 (setenv "HOME" "/tmp"))))))
1521 (propagated-inputs
1522 (list python-httplib2 python-lazr-restfulclient python-lazr-uri))
1523 (native-inputs (list python-pytest python-testresources python-wadllib
1524 python-setuptools python-wheel))
1525 (home-page "https://documentation.ubuntu.com/launchpad")
1526 (synopsis "Python client library for Launchpad's web service")
1527 (description "@code{launchpadlib} is a Python library that allows
1528scripting Launchpad via its the web service API.")
1529 (license license:lgpl3+)))
1530
1531(define-public python-lazr-uri
1532 (package
1533 (name "python-lazr-uri")
1534 (version "1.0.7")
1535 (source
1536 (origin
1537 (method url-fetch)
1538 (uri (pypi-uri "lazr_uri" version))
1539 (sha256
1540 (base32 "1vm34pw8fksc6m8fnqwh215sqdlw546cxcdga93i2l746grzc37d"))))
1541 (build-system pyproject-build-system)
1542 (arguments
1543 (list
1544 #:phases
1545 #~(modify-phases %standard-phases
1546 (replace 'check
1547 (lambda* (#:key tests? #:allow-other-keys)
1548 (if tests?
1549 (invoke "zope-testrunner" "--test-path=src")
1550 (format #t "test suite not run~%")))))))
1551 (native-inputs (list python-setuptools python-zope-testrunner))
1552 (home-page "https://launchpad.net/lazr.uri")
1553 (synopsis "Python URI manipulation library")
1554 (description "This Python package provides a self-contained, easily
1555reusable library for parsing, manipulating, and generating URIs.")
1556 (license license:lgpl3)))
1557
1558(define-public python-ldaptor
1559 (package
1560 (name "python-ldaptor")
1561 (version "21.2.0")
1562 (source
1563 (origin
1564 (method url-fetch)
1565 (uri (pypi-uri "ldaptor" version))
1566 (sha256
1567 (base32 "0n53czn5pyh8923y282spdb7xc8c9rhn0n43bczanjjx6wcynjcc"))))
1568 (build-system pyproject-build-system)
1569 (arguments
1570 (list
1571 #:test-flags
1572 #~(list "-m" "twisted.trial"
1573 (string-append "-j" (number->string (parallel-job-count)))
1574 "ldaptor")
1575 #:phases
1576 #~(modify-phases %standard-phases
1577 (add-before 'check 'disable-failing-tests
1578 (lambda _
1579 ;; Testing with Twisted 22.4 results in infinite loop creating
1580 ;; temporary config files, see
1581 ;; <https://github.com/twisted/ldaptor/issues/238>.
1582 (delete-file "ldaptor/test/test_config.py")))
1583 (replace 'check
1584 (lambda* (#:key tests? test-flags #:allow-other-keys)
1585 (when tests?
1586 (apply invoke "python" test-flags)))))))
1587 (native-inputs
1588 (list python-setuptools
1589 python-wheel))
1590 (propagated-inputs
1591 (list python-passlib
1592 python-pyopenssl
1593 python-service-identity ; to pass sanity check, for Twisted[tls]
1594 python-pyparsing
1595 python-twisted
1596 python-zope-interface))
1597 (home-page "https://github.com/twisted/ldaptor")
1598 (synopsis "Pure-Python Twisted library for LDAP")
1599 (description
1600 "This package provides a Python Twisted library for LDAP, which key
1601feaatures are:
1602@itemize
1603@item LDAP client logic
1604@item separately-accessible LDAP and BER protocol message generation/parsing
1605@item ASCII-format LDAP filter generation and parsing
1606@item LDIF format data generation
1607@item Samba password changing logic
1608@end itemize")
1609 (license license:expat)))
1610
1611(define-public python-legacy-cgi
1612 (package
1613 (name "python-legacy-cgi")
1614 (version "2.6.1")
1615 (source
1616 (origin
1617 (method url-fetch)
1618 (uri (pypi-uri "legacy_cgi" version))
1619 (sha256
1620 (base32 "0hksizyq7awmwh3337zy0rmj47x6b5igzam6ffj74gbwfjfakbgj"))))
1621 (build-system pyproject-build-system)
1622 (native-inputs (list python-poetry-core python-pytest))
1623 (home-page "https://github.com/jackrosenthal/legacy-cgi")
1624 (synopsis "Fork of the legacy standard library cgi and cgitb modules")
1625 (description
1626 "This is a fork of the standard library modules @code{cgi} and
1627@code{cgitb}. They are slated to be removed from the Python standard library
1628in Python 3.13 by PEP-594.")
1629 (license license:psfl)))
1630
1631(define-public python-opentelemetry-api
1632 (package
1633 (name "python-opentelemetry-api")
1634 (version "1.37.0")
1635 (source
1636 (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "opentelemetry_api" version))
1639 (sha256
1640 (base32 "19yr3hfwdc9sv8df4vydxcsxnpld3xi57siq4w8xanrm42qka1sl"))))
1641 (build-system pyproject-build-system)
1642 (propagated-inputs (list python-importlib-metadata
1643 python-typing-extensions))
1644 (native-inputs (list python-hatchling
1645 python-opentelemetry-test-utils-bootstrap))
1646 (home-page "https://opentelemetry.io/docs/languages/python/")
1647 (synopsis "OpenTelemetry Python API")
1648 (description "@code{OpenTelemetry} Python API.")
1649 (license license:asl2.0)))
1650
1651(define-public python-opentelemetry-api-bootstrap
1652 (hidden-package
1653 (package/inherit python-opentelemetry-api
1654 (name "python-opentelemetry-api-bootstrap")
1655 (arguments
1656 (list
1657 #:tests? #f))
1658 (native-inputs (list python-hatchling)))))
1659
1660(define-public python-opentelemetry-sdk
1661 (package
1662 (name "python-opentelemetry-sdk")
1663 (version "1.37.0")
1664 (source
1665 (origin
1666 (method url-fetch)
1667 (uri (pypi-uri "opentelemetry_sdk" version))
1668 (sha256
1669 (base32 "19fx8vf35kcss43i17zqngqhmglb36dnddasbdvfsgcm22f0i3nc"))))
1670 (build-system pyproject-build-system)
1671 (propagated-inputs (list python-opentelemetry-api
1672 python-opentelemetry-semantic-conventions
1673 python-typing-extensions))
1674 (native-inputs (list python-hatchling
1675 python-opentelemetry-test-utils-bootstrap
1676 python-pytest))
1677 (home-page "https://opentelemetry.io/docs/languages/python/")
1678 (synopsis "OpenTelemetry Python SDK")
1679 (description "@code{OpenTelemetry} Python SDK.")
1680 (license license:asl2.0)))
1681
1682(define-public python-opentelemetry-sdk-bootstrap
1683 (hidden-package
1684 (package/inherit python-opentelemetry-sdk
1685 (name "python-opentelemetry-sdk-bootstrap")
1686 (arguments (list #:tests? #f))
1687 (propagated-inputs (list python-opentelemetry-api-bootstrap
1688 python-opentelemetry-semantic-conventions-bootstrap))
1689 (native-inputs (list python-hatchling)))))
1690
1691(define-public python-opentelemetry-semantic-conventions
1692 (package
1693 (name "python-opentelemetry-semantic-conventions")
1694 (version "0.58b0")
1695 (source
1696 (origin
1697 (method url-fetch)
1698 (uri (pypi-uri "opentelemetry_semantic_conventions" version))
1699 (sha256
1700 (base32 "098czakcawikaspl46vy6vickw80mm2bnrspflrw8ya24r8nzm3b"))))
1701 (build-system pyproject-build-system)
1702 (propagated-inputs (list python-opentelemetry-api python-typing-extensions))
1703 (native-inputs (list python-hatchling))
1704 (home-page "https://opentelemetry.io/docs/languages/python/")
1705 (synopsis "OpenTelemetry Semantic Conventions")
1706 (description "@code{OpenTelemetry} Semantic Conventions.")
1707 (license license:asl2.0)))
1708
1709(define-public python-opentelemetry-semantic-conventions-bootstrap
1710 (hidden-package
1711 (package/inherit python-opentelemetry-semantic-conventions
1712 (name "python-opentelemetry-semantic-conventions-bootstrap")
1713 (arguments
1714 (list
1715 #:tests? #f))
1716 (propagated-inputs (list python-opentelemetry-api-bootstrap
1717 python-typing-extensions)))))
1718
1719(define-public python-opentelemetry-test-utils
1720 (package
1721 (name "python-opentelemetry-test-utils")
1722 (version "0.58b0")
1723 (source
1724 (origin
1725 (method url-fetch)
1726 (uri (pypi-uri "opentelemetry_test_utils" version))
1727 (sha256
1728 (base32 "0xjp04zjn7m79xsda9wp79rqyzy2c10347s967vp7xvmndwwa0ds"))))
1729 (build-system pyproject-build-system)
1730 (propagated-inputs (list python-asgiref python-opentelemetry-api
1731 python-opentelemetry-sdk))
1732 (native-inputs (list python-hatchling))
1733 (home-page "https://opentelemetry.io/docs/languages/python/")
1734 (synopsis "Test utilities for OpenTelemetry unit tests")
1735 (description "Test utilities for @code{OpenTelemetry} unit tests.")
1736 (license license:asl2.0)))
1737
1738(define-public python-opentelemetry-test-utils-bootstrap
1739 (hidden-package
1740 (package/inherit python-opentelemetry-test-utils
1741 (name "python-opentelemetry-test-utils-bootstrap")
1742 (arguments
1743 (list
1744 #:tests? #f))
1745 (propagated-inputs (list python-asgiref
1746 python-opentelemetry-api-bootstrap
1747 python-opentelemetry-sdk-bootstrap))
1748 (native-inputs (list python-hatchling)))))
1749
1750(define-public python-pathy
1751 (package
1752 (name "python-pathy")
1753 (version "0.11.0")
1754 (source
1755 (origin
1756 (method url-fetch)
1757 (uri (pypi-uri "pathy" version))
1758 (sha256
1759 (base32 "0vbhcfg8g74g90bzmdgxr1jyvwhadvlr2w9wyvs6xxwb1dmhwgdv"))))
1760 (build-system pyproject-build-system)
1761 (native-inputs
1762 (list python-mock
1763 python-pytest
1764 python-setuptools))
1765 (propagated-inputs
1766 (list python-pathlib-abc-for-python-pathy
1767 python-smart-open-6
1768 python-typer))
1769 (home-page "https://github.com/justindujardin/pathy")
1770 (synopsis "Path interface for local and cloud bucket storage")
1771 (description "Pathy is a python package (with type annotations) for
1772working with Cloud Bucket storage providers using a @code{pathlib} interface.
1773It provides @code{pathlib.Path} subclasses for local and cloud bucket
1774storage.")
1775 (license license:asl2.0)))
1776
1777(define-public python-portend
1778 (package
1779 (name "python-portend")
1780 (version "3.2.1")
1781 (source
1782 (origin
1783 (method url-fetch)
1784 (uri (pypi-uri "portend" version))
1785 (sha256
1786 (base32 "12b4ikxyv32n33mvm4brp74igl1mvw825x01sjvvs54y3yml17da"))))
1787 (build-system pyproject-build-system)
1788 ;; Do not test pyproject.toml with python-pytest-checkdocs as it tries to
1789 ;; download dependencies.
1790 (arguments
1791 '(#:test-flags '("-k" "not project")))
1792 (native-inputs
1793 (list python-pytest
1794 python-setuptools
1795 python-setuptools-scm))
1796 (propagated-inputs
1797 (list python-tempora))
1798 (home-page "https://github.com/jaraco/portend")
1799 (synopsis "Monitor TCP ports for bound or unbound states")
1800 (description
1801 "@code{python-portend} can be used to monitor TCP ports for bound or
1802unbound states. For example, waiting for a port to be occupied or freed
1803within a set timeout. @code{python-portend} can also be used directly from
1804the command line.")
1805 (license license:expat)))
1806
1807(define-public python-prawcore
1808 (package
1809 (name "python-prawcore")
1810 (version "2.4.0")
1811 (source
1812 (origin
1813 (method git-fetch)
1814 (uri (git-reference
1815 (url "https://github.com/praw-dev/prawcore")
1816 (commit (string-append "v" version))))
1817 (file-name (git-file-name name version))
1818 (sha256
1819 (base32 "1y7gh7kk002b2h1ppkr1llb2gjfnby28zvx11j4ji0wm3r3rjh5l"))))
1820 (build-system pyproject-build-system)
1821 (arguments
1822 ;; XXX: These tests fail with an incomplete request response.
1823 (list #:test-flags
1824 #~'("-k" #$(string-append
1825 "not test_revoke__access_token_with_refresh_set"
1826 " and not test_revoke__access_token_without_refresh_set"
1827 " and not test_revoke__refresh_token_with_access_set"
1828 " and not test_refresh__with_scopes"
1829 " and not test_request__patch"))))
1830 (native-inputs
1831 (list python-betamax
1832 python-betamax-matchers
1833 python-betamax-serializers
1834 python-flit-core
1835 python-mock
1836 python-pytest
1837 python-testfixtures))
1838 (propagated-inputs
1839 (list python-requests))
1840 (synopsis "Core component of PRAW")
1841 (description "PRAWcore is a low-level communication layer used by PRAW.")
1842 (home-page "https://praw.readthedocs.io/en/latest/")
1843 (license license:bsd-2)))
1844
1845(define-public python-praw
1846 (package
1847 (name "python-praw")
1848 (version "7.8.1")
1849 (source
1850 (origin
1851 (method git-fetch)
1852 (uri (git-reference
1853 (url "https://github.com/praw-dev/praw")
1854 (commit (string-append "v" version))))
1855 (file-name (git-file-name name version))
1856 (sha256
1857 (base32 "05qq43l4334cq8r8k731qnb45nq12vvfdxwbr6q84a1hafp7n4cg"))))
1858 (build-system pyproject-build-system)
1859 (arguments
1860 (list #:test-flags
1861 #~(list "--ignore=tests/units/models"
1862 "--ignore=tests/integration/models"
1863 "--ignore=tests/unit/test_config.py"
1864 "--ignore=tests/integration/test_reddit.py")))
1865 (native-inputs
1866 (list python-betamax
1867 python-betamax-matchers
1868 python-flit-core
1869 python-pytest))
1870 (propagated-inputs
1871 (list python-prawcore python-update-checker python-websocket-client))
1872 (synopsis "Python Reddit API Wrapper")
1873 (description "PRAW is a Python package that allows for simple access to
1874Reddit’s API. It aims to be easy to use and internally follows all of Reddit’s
1875API rules.")
1876 (home-page "https://praw.readthedocs.io/en/latest/")
1877 (license license:bsd-2)))
1878
1879(define-public python-frozenlist
1880 (package
1881 (name "python-frozenlist")
1882 ;; XXX: Any newer versions fail to build, check why.
1883 (version "1.3.3")
1884 (source
1885 (origin
1886 (method url-fetch)
1887 (uri (pypi-uri "frozenlist" version))
1888 (sha256
1889 (base32 "0sispcpras096fxrd0i35qs25fqy4r0x8v1d6f40pag845bwbg2q"))))
1890 (build-system pyproject-build-system)
1891 (native-inputs
1892 (list python-pytest
1893 python-setuptools
1894 python-wheel))
1895 (home-page "https://github.com/aio-libs/frozenlist")
1896 (synopsis "List-like data structure for Python")
1897 (description "@code{frozenlist.FrozenList} is a list-like structure which
1898implements @code{collections.abc.MutableSequence}. It can be made immutable
1899by calling @code{FrozenList.freeze}.")
1900 (license license:asl2.0)))
1901
1902(define-public python-aiobotocore
1903 (package
1904 (name "python-aiobotocore")
1905 (version "2.25.1")
1906 (source
1907 (origin
1908 (method url-fetch)
1909 (uri (pypi-uri "aiobotocore" version))
1910 (sha256
1911 (base32 "1g7dv81bw7vq55gv3c5jxdw7wp7dp6dwjbh79y3fiv6ppwwyg6za"))))
1912 (build-system pyproject-build-system)
1913 (arguments
1914 (list
1915 ;; TODO: Too many tests fail seemingly because they need Internet access.
1916 #:tests? #false))
1917 (propagated-inputs (list python-aiohttp
1918 python-aioitertools
1919 python-botocore
1920 python-jmespath
1921 python-multidict
1922 python-dateutil
1923 python-urllib3
1924 python-wrapt))
1925 (native-inputs
1926 (list python-setuptools))
1927 (home-page "https://pypi.org/project/aiobotocore/")
1928 (synopsis "Async client for AWS services using botocore and aiohttp")
1929 (description "This package provides an async client for Amazon services
1930using botocore and aiohttp/asyncio. This library is a mostly full featured
1931asynchronous version of botocore.")
1932 (license license:asl2.0)))
1933
1934(define-public python-aiohappyeyeballs
1935 (package
1936 (name "python-aiohappyeyeballs")
1937 (version "2.6.1")
1938 (source
1939 (origin
1940 (method url-fetch)
1941 (uri (pypi-uri "aiohappyeyeballs" version))
1942 (sha256
1943 (base32 "0n1mjip846fprc34ik6if9m8xisva2m0ygyzvz53r013648x1yf3"))))
1944 (build-system pyproject-build-system)
1945 (native-inputs
1946 (list python-poetry-core
1947 python-pytest
1948 python-pytest-asyncio-0.26
1949 python-pytest-cov))
1950 (home-page "https://github.com/aio-libs/aiohappyeyeballs")
1951 (synopsis "Happy Eyeballs for asyncio")
1952 (description "This library exists to allow connecting with Happy
1953Eyeballs (RFC 8305) when you already have a list of @code{addrinfo} and not a
1954DNS name.")
1955 (license license:psfl)))
1956
1957(define-public python-aioitertools
1958 (package
1959 (name "python-aioitertools")
1960 (version "0.12.0")
1961 (source
1962 (origin
1963 (method url-fetch)
1964 (uri (pypi-uri "aioitertools" version))
1965 (sha256
1966 (base32 "0syxv2r90d6410hc68jxhk610pdgx19n1n5rc7shaxxv9xdhbaf2"))))
1967 (build-system pyproject-build-system)
1968 (arguments
1969 (list #:test-backend #~'custom
1970 #:test-flags #~(list "-m" "aioitertools.tests")))
1971 (native-inputs
1972 (list python-flit-core))
1973 (home-page "https://pypi.org/project/aioitertools/")
1974 (synopsis "Itertools and builtins for AsyncIO and mixed iterables")
1975 (description
1976 "This package provides an implementation of itertools, builtins, and more
1977for AsyncIO and mixed-type iterables.")
1978 (license license:expat)))
1979
1980(define-public python-aiosignal
1981 (package
1982 (name "python-aiosignal")
1983 (version "1.4.0")
1984 (source
1985 (origin
1986 (method url-fetch)
1987 (uri (pypi-uri "aiosignal" version))
1988 (sha256
1989 (base32 "1isin9bp256scp59lbr35h48nw5p5i84b6f9kh1c50w08vcyqzpl"))))
1990 (build-system pyproject-build-system)
1991 (native-inputs
1992 (list python-pytest
1993 python-pytest-asyncio
1994 python-pytest-cov
1995 python-setuptools
1996 python-wheel))
1997 (propagated-inputs
1998 (list python-frozenlist))
1999 (home-page "https://github.com/aio-libs/aiosignal")
2000 (synopsis "Callback manager for Python @code{asyncio} projects")
2001 (description "This Python module provides @code{Signal}, an abstraction to
2002register asynchronous callbacks. The @code{Signal} abstraction can be used
2003for adding, removing and dropping callbacks.")
2004 (license license:asl2.0)))
2005
2006(define-public python-aiohttp
2007 (package
2008 (name "python-aiohttp")
2009 (version "3.11.11")
2010 (source
2011 (origin
2012 (method url-fetch)
2013 (uri (pypi-uri "aiohttp" version))
2014 (sha256
2015 (base32 "0gihj076nm3863sqfnbh786621w1ad7lj7fq88d85wzbwvqwfjdv"))
2016 (snippet
2017 #~(begin
2018 (use-modules ((guix build utils)))
2019 ;; TODO: Unbundle the llhttp sources.
2020 ;; (delete-file-recursively "vendor")
2021 (delete-file "aiohttp/_http_parser.c")
2022 (delete-file "aiohttp/_http_writer.c")))))
2023 (build-system pyproject-build-system)
2024 (arguments
2025 (list
2026 #:test-flags
2027 '(list
2028 ;; This tests requires the 'proxy.py' module, not yet packaged.
2029 "--ignore=tests/test_proxy_functional.py"
2030 ;; These tests need brotli.
2031 "--ignore=tests/test_web_sendfile_functional.py"
2032 "--ignore=tests/test_web_functional.py"
2033 ;; These tests need pytest_codspeed
2034 "--ignore-glob=tests/test_benchmarks*"
2035 ;; These tests need python_on_whales
2036 "--ignore=tests/autobahn/test_autobahn.py"
2037 "-k"
2038 ;; These tests fail for unknown reasons (see:
2039 ;; https://github.com/aio-libs/aiohttp/issues/7130)
2040 (string-append
2041 "not test_no_warnings "
2042 "and not test_default_loop "
2043 "and not test_ctor_global_loop "
2044 "and not test_set_loop_default_loop "
2045
2046 ;; Disable brotli tests, because we’re not providing that optional
2047 ;; library.
2048 "and not test_feed_eof_no_err_brotli "
2049
2050 ;; Disable the following tests as they require
2051 ;; networking.
2052 "and not TestDeflateBuffer "
2053 "and not test_client_session_timeout_zero "
2054 "and not test_empty_body "
2055 "and not test_mark_formdata_as_processed[pyloop] "
2056 "and not test_receive_runtime_err[pyloop] "
2057
2058 ;; assert 'gzip, deflate' == 'gzip, deflate, br'
2059 "and not test_headers[pyloop] "
2060 ;; ~/.. does not resolve
2061 "and not test_add_static_path_resolution"))
2062 #:phases
2063 '(modify-phases %standard-phases
2064 (add-after 'unpack 'fix-tests
2065 (lambda _
2066 ;; Make sure the timestamp of this file is > 1990, because a few
2067 ;; tests like test_static_file_if_modified_since_past_date depend
2068 ;; on it.
2069 (let ((late-90s (* 60 60 24 365 30)))
2070 (utime "tests/data.unknown_mime_type" late-90s late-90s))))
2071 (add-before 'build 'cythonize
2072 (lambda _
2073 ;; Adapted from the Makefile.
2074 (with-directory-excursion "aiohttp"
2075 (for-each
2076 (lambda (file)
2077 (invoke "cython" "-3"
2078 file "-I" "."))
2079 (find-files "." "_.*\\.pyx$"))))))))
2080 (propagated-inputs
2081 (list python-aiohappyeyeballs
2082 python-aiosignal
2083 python-async-timeout
2084 python-attrs
2085 python-frozenlist
2086 python-multidict
2087 python-propcache
2088 python-yarl))
2089 (native-inputs
2090 (list gunicorn-bootstrap
2091 python-cython
2092 python-freezegun
2093 python-pytest
2094 python-pytest-cov
2095 python-pytest-mock
2096 python-pytest-xdist
2097 python-re-assert
2098 python-setuptools
2099 python-wheel))
2100 (home-page "https://github.com/aio-libs/aiohttp/")
2101 (synopsis "Async HTTP client/server framework (asyncio)")
2102 (description "@code{aiohttp} is an asynchronous HTTP client/server
2103framework.
2104
2105Its main features are:
2106@itemize
2107@item Supports both client and server side of HTTP protocol.
2108@item Supports both client and server Web-Sockets out-of-the-box without the
2109Callback Hell.
2110@item Web-server has middlewares and pluggable routing.
2111@end itemize")
2112 (license license:asl2.0)))
2113
2114(define-public python-aiohttp-oauthlib
2115 (package
2116 (name "python-aiohttp-oauthlib")
2117 (version "0.1.0")
2118 (source
2119 (origin
2120 (method url-fetch)
2121 (uri (pypi-uri "aiohttp-oauthlib" version))
2122 (sha256
2123 (base32 "1dwk0gby27xm7384qyz2p7zw9dqhjx7m8fhfk172w36xknjx2g49"))))
2124 (build-system pyproject-build-system)
2125 (arguments (list #:tests? #f)) ; none included
2126 (propagated-inputs (list python-aiohttp python-oauthlib))
2127 (native-inputs (list python-setuptools python-setuptools-scm))
2128 (home-page "https://git.sr.ht/~whynothugo/aiohttp-oauthlib")
2129 (synopsis "OAuthlib authentication support for aiohttp")
2130 (description "Aiohttp-oauthlib uses the Python aiohttp and OAuthlib libraries to
2131provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
2132 (license license:isc)))
2133
2134(define-public python-aiohttp-client-cache
2135 (package
2136 (name "python-aiohttp-client-cache")
2137 (version "0.14.2")
2138 (source
2139 (origin
2140 (method git-fetch)
2141 (uri (git-reference
2142 (url "https://github.com/requests-cache/aiohttp-client-cache")
2143 (commit (string-append "v" version))))
2144 (file-name (git-file-name name version))
2145 (sha256
2146 (base32
2147 "17qa2sh63wa7b9ma40y2b6k9sjscc5vfwlmf46sv36l1mz9rmd4y"))))
2148 (build-system pyproject-build-system)
2149 (arguments
2150 (list
2151 #:test-flags
2152 ;; Run unit tests only which not require networking or additional setup.
2153 #~(list "--ignore=test/integration")))
2154 (native-inputs
2155 (list python-hatchling
2156 ;; TODO: Missing packages: pytest-clarity,
2157 ;; nox-poetry, types-aiofiles.
2158 python-async-timeout
2159 python-brotli
2160 python-faker
2161 python-pytest
2162 python-pytest-aiohttp
2163 python-pytest-asyncio
2164 python-pytest-xdist))
2165 (propagated-inputs
2166 (list python-aiofiles
2167 python-aiohttp
2168 python-aiosqlite
2169 python-attrs
2170 python-itsdangerous
2171 python-redis
2172 python-url-normalize))
2173 (home-page "https://github.com/requests-cache/aiohttp-client-cache")
2174 (synopsis "Persistent cache for aiohttp requests")
2175 (description
2176 "This package is an asynchronous persistent caching library specifically
2177designed for @samp{aiohttp} requests in Python. With support for various
2178storage backends, it offers flexibility in how and where the cache is stored.
2179Please note that MongoDB and DynamoDB backends are not currently supported due
2180to the absence of the @samp{motor} and @samp{aioboto3} package dependencies.")
2181 (license license:expat)))
2182
2183(define-public python-aiohttp-cors
2184 (package
2185 (name "python-aiohttp-cors")
2186 (version "0.8.1")
2187 (source
2188 (origin
2189 (method url-fetch)
2190 (uri (pypi-uri "aiohttp_cors" version))
2191 (sha256
2192 (base32 "00qlzc2y65bkl1a5f5v83mmjlrhzmx3a2ngq2pm3jjdnhk5zkb6c"))))
2193 (build-system pyproject-build-system)
2194 (arguments
2195 (list
2196 #:tests? #f)) ; network access is required to run tests
2197 (native-inputs
2198 (list python-setuptools
2199 python-wheel))
2200 (propagated-inputs
2201 (list python-aiohttp))
2202 (home-page "https://github.com/aio-libs/aiohttp-cors")
2203 (synopsis "CORS support for aiohttp")
2204 (description
2205 "This library implements @acronym{CORS, Cross Origin Resource Sharing}
2206support for aiohttp asyncio-powered asynchronous HTTP server.")
2207 (license license:asl2.0)))
2208
2209(define-public python-aiohttp-retry
2210 (package
2211 (name "python-aiohttp-retry")
2212 (version "2.9.1")
2213 (source
2214 (origin
2215 (method git-fetch)
2216 (uri (git-reference
2217 (url "https://github.com/inyutin/aiohttp_retry")
2218 (commit (string-append "v" version))))
2219 (file-name (git-file-name name version))
2220 (sha256
2221 (base32 "0r5lxnxc4s8js7l86pfmdxl455v9lg3m41nz6m1xg4kwwf6j0bpi"))))
2222 (build-system pyproject-build-system)
2223 (native-inputs
2224 (list python-pytest
2225 python-pytest-aiohttp
2226 python-setuptools))
2227 (propagated-inputs
2228 (list python-aiohttp))
2229 (home-page "https://github.com/inyutin/aiohttp_retry")
2230 (synopsis "Simple retry client for aiohttp")
2231 (description
2232 "This package implements @code{RetryClient} for @code{aiohttp} to retry
2233connection to provided endpoint with timeouts logic or use:
2234
2235@itemize
2236@item @code{ExponentialRetry} with exponential backoff
2237@item @code{RandomRetry} for random backoff
2238@item @code{ListRetry} with backoff you predefine by list
2239@item @code{FibonacciRetry} with backoff that looks like fibonacci sequence
2240@item @code{JitterRetry} exponential retry with a bit of randomness
2241@end itemize")
2242 (license license:expat)))
2243
2244(define-public python-aiohttp-socks
2245 (package
2246 (name "python-aiohttp-socks")
2247 (version "0.10.1")
2248 (source
2249 (origin
2250 (method url-fetch)
2251 (uri (pypi-uri "aiohttp_socks" version))
2252 (sha256
2253 (base32
2254 "0s70jpcr9wc8ld2v1w309cz7r8mm2bipf6zbkdqqaa0z0pwf3wj9"))))
2255 (build-system pyproject-build-system)
2256 (arguments (list #:tests? #false)) ;none included
2257 (propagated-inputs
2258 (list python-aiohttp python-socks))
2259 (native-inputs (list python-setuptools python-wheel))
2260 (home-page "https://github.com/romis2012/aiohttp-socks")
2261 (synopsis "SOCKS proxy connector for aiohttp")
2262 (description "This package provides a SOCKS proxy connector for
2263aiohttp. It supports SOCKS4(a) and SOCKS5.")
2264 (license license:asl2.0)))
2265
2266(define-public python-aiodns
2267 (package
2268 (name "python-aiodns")
2269 (version "3.5.0")
2270 (source
2271 (origin
2272 (method git-fetch)
2273 (uri (git-reference
2274 (url "https://github.com/saghul/aiodns")
2275 (commit (string-append "v" version))))
2276 (file-name (git-file-name name version))
2277 (sha256
2278 (base32 "1as7l48962dpk3r4zdsifj761dks5nyr35hxs7m8crvkyb1dg9m9"))))
2279 (build-system pyproject-build-system)
2280 (arguments
2281 (list
2282 #:tests? #f)) ;tests require internet access
2283 (native-inputs
2284 (list python-pytest
2285 python-pytest-cov
2286 python-pytest-asyncio
2287 python-setuptools))
2288 (propagated-inputs (list python-pycares))
2289 (home-page "https://github.com/saghul/aiodns")
2290 (synopsis "Simple DNS resolver for asyncio")
2291 (description
2292 "@code{aiodns} provides a simple way for doing asynchronous DNS
2293resolutions with a synchronous looking interface by using
2294@url{https://github.com/saghul/pycares,pycares}.")
2295 (license license:expat)))
2296
2297(define-public python-aioquic
2298 (package
2299 (name "python-aioquic")
2300 (version "1.2.0")
2301 (source
2302 (origin
2303 (method url-fetch)
2304 (uri (pypi-uri "aioquic" version))
2305 (sha256
2306 (base32 "16bigrn5b46c7nmpzxhnlhh4y03hwc7dbd0mi5f8r53i7yxn64pr"))))
2307 (build-system pyproject-build-system)
2308 (arguments
2309 (list
2310 #:test-flags
2311 #~(list "-k" (string-join
2312 ;; AssertionError: AlertBadCertificate not raised
2313 (list "not test_verify_subject_no_subjaltname"
2314 ;; AttributeError: module
2315 ;; 'service_identity.cryptography' has no attribute
2316 ;; 'extract_patterns'
2317 "test_verify_subject_with_subjaltname"
2318 ;; AttributeError: module
2319 ;; 'service_identity.cryptography' has no attribute
2320 ;; 'extract_patterns'
2321 "test_verify_subject_with_subjaltname_ipaddress")
2322 " and not "))))
2323 (native-inputs
2324 (list nss-certs-for-test
2325 python-pytest
2326 python-setuptools
2327 python-wheel))
2328 (inputs
2329 (list openssl))
2330 (propagated-inputs
2331 (list python-certifi
2332 python-pylsqpack
2333 python-pyopenssl
2334 python-service-identity))
2335 (home-page "https://github.com/aiortc/aioquic")
2336 (synopsis "QUIC and HTTP3 implementation in Python")
2337 (description
2338 "@code{aioquic} is a library for the QUIC network protocol in Python.
2339It features a minimal TLS 1.3 implementation, a QUIC stack and an HTTP/3 stack.")
2340 (license license:bsd-3)))
2341
2342(define-public python-aiorpcx
2343 (package
2344 (name "python-aiorpcx")
2345 (version "0.25.0")
2346 (source
2347 (origin
2348 (method git-fetch)
2349 ;; PyPI misses the util.py file used for tests.
2350 (uri (git-reference
2351 (url "https://github.com/kyuupichan/aiorpcX")
2352 (commit version)))
2353 (file-name (git-file-name name version))
2354 (sha256
2355 (base32
2356 "0sn4xxlpy0kb5b25bqrjzh2m6bskdyydc6cq8bigb7g5dacksn4q"))))
2357 (build-system pyproject-build-system)
2358 (arguments
2359 (list
2360 #:test-flags
2361 ;; This test opens a remote connection.
2362 #~(list "-k" "not test_create_connection_resolve_good")))
2363 (native-inputs (list python-pytest
2364 python-pytest-asyncio-0.26
2365 python-setuptools))
2366 (propagated-inputs
2367 (list python-attrs python-websockets))
2368 (home-page "https://github.com/kyuupichan/aiorpcX")
2369 (synopsis "Generic asyncio RPC implementation")
2370 (description
2371 "The aiorpcX library is a generic asyncio implementation of RPC suitable
2372for an application that is a client, server or both.
2373
2374The package includes a module with full coverage of JSON RPC versions 1.0 and
23752.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
2376comes with a SOCKS proxy client.")
2377 (license (list license:expat license:bsd-2))))
2378
2379(define-public python-aiostream
2380 (package
2381 (name "python-aiostream")
2382 (version "0.7.0")
2383 (source
2384 (origin
2385 (method git-fetch) ;no tests in PyPI archvie
2386 (uri (git-reference
2387 (url "https://github.com/vxgmichel/aiostream")
2388 (commit (string-append "v" version))))
2389 (file-name (git-file-name name version))
2390 (sha256
2391 (base32 "1wf89l9f0ivlv796pklpgykx6j6ksfqrmvzikd8w5j6ldln7bv50"))))
2392 (build-system pyproject-build-system)
2393 (native-inputs
2394 (list python-pytest
2395 python-pytest-cov
2396 python-pytest-asyncio
2397 python-setuptools))
2398 (propagated-inputs
2399 (list python-typing-extensions))
2400 (home-page "https://github.com/vxgmichel/aiostream")
2401 (synopsis "Generator-based operators for asynchronous iteration")
2402 (description "@code{aiostream} provides a collection of stream operators that can
2403be combined to create asynchronous pipelines of operations. It can be seen as an
2404asynchronous version of @code{itertools}, although some aspects are slightly
2405different. All the provided operators return a unified interface called a stream. A
2406stream is an enhanced asynchronous iterable.")
2407 (license license:gpl3)))
2408
2409(define-public python-asgiref
2410 (package
2411 (name "python-asgiref")
2412 (version "3.8.1")
2413 (source (origin
2414 (method url-fetch)
2415 (uri (pypi-uri "asgiref" version))
2416 (sha256
2417 (base32 "146mhkn3zp2bqf7j6r3chdlvfzgs5x1lrnqahsllgjdyl20bshy3"))))
2418 (build-system pyproject-build-system)
2419 (native-inputs
2420 (list python-mypy python-pytest python-pytest-asyncio python-setuptools
2421 python-wheel))
2422 (home-page "https://github.com/django/asgiref/")
2423 (synopsis "ASGI specs, helper code, and adapters")
2424 (description
2425 "ASGI is a standard for Python asynchronous web apps and servers to
2426communicate with each other, and positioned as an asynchronous successor to
2427WSGI. This package includes libraries for implementing ASGI servers.")
2428 (license license:bsd-3)))
2429
2430(define-public python-asgi-csrf
2431 (package
2432 (name "python-asgi-csrf")
2433 (version "0.11")
2434 (source (origin
2435 (method git-fetch) ;for tests
2436 (uri (git-reference
2437 (url "https://github.com/simonw/asgi-csrf")
2438 (commit version)))
2439 (file-name (git-file-name name version))
2440 (sha256
2441 (base32
2442 "1dn9v47z2b599cnwahxvzsll2w28940ycgh5skxgq04vcqqssf29"))))
2443 (build-system pyproject-build-system)
2444 (propagated-inputs (list python-itsdangerous python-multipart))
2445 (native-inputs (list python-asgi-lifespan
2446 python-httpx
2447 python-pytest
2448 python-pytest-asyncio
2449 python-starlette
2450 python-setuptools
2451 python-wheel))
2452 (home-page "https://github.com/simonw/asgi-csrf")
2453 (synopsis "ASGI middleware for protecting against CSRF attacks")
2454 (description "This Asynchronous Server Gateway Interface (ASGI)
2455middleware protects against Cross-site request forgery (CSRF) attacks.
2456It implements the Double Submit Cookie pattern, where a cookie is set
2457that is then compared to a @code{csrftoken} hidden form field or a
2458@code{x-csrftoken} HTTP header.")
2459 (license license:asl2.0)))
2460
2461(define-public python-asgi-lifespan
2462 (package
2463 (name "python-asgi-lifespan")
2464 (version "2.1.0")
2465 (source (origin
2466 (method git-fetch) ;for tests
2467 (uri (git-reference
2468 (url "https://github.com/florimondmanca/asgi-lifespan")
2469 (commit version)))
2470 (file-name (git-file-name name version))
2471 (sha256
2472 (base32
2473 "0iqa3h61gsq1qd6j9v68k989596m9n9k1dx8zv6135rmhzzrs296"))))
2474 (build-system pyproject-build-system)
2475 (arguments
2476 (list
2477 #:test-flags
2478 '(list "-c" "/dev/null" ;ignore coverage-related options
2479 "-k"
2480 (string-append
2481 ;; XXX: Some tests fail because of "Exceptions from Trio nursery"
2482 "not (test_lifespan_manager[trio-None-None-StartupFailed]"
2483 " or test_lifespan_manager[trio-None-BodyFailed-None]"
2484 " or test_lifespan_manager[trio-None-BodyFailed-StartupFailed]"
2485 " or test_lifespan_manager[trio-ShutdownFailed-None-None]"
2486 " or test_lifespan_manager[trio-ShutdownFailed-None-StartupFailed]"
2487 " or test_lifespan_manager[trio-ShutdownFailed-BodyFailed-StartupFailed]"
2488 " or test_lifespan_timeout[trio-slow_shutdown]"
2489 " or test_lifespan_not_supported[trio-http_only]"
2490 " or test_lifespan_not_supported[trio-http_no_assert]"
2491 " or test_lifespan_not_supported[trio-http_no_assert_before_receive_request]"
2492 ")"))
2493 #:phases
2494 '(modify-phases %standard-phases
2495 (add-after 'unpack 'compatibility
2496 (lambda _
2497 ;; httpx version 0.28.0 removed the "app" shortcut.
2498 (substitute* "tests/test_manager.py"
2499 (("app=manager.app")
2500 "transport=httpx.ASGITransport(manager.app)")))))))
2501 (native-inputs (list python-httpx
2502 python-pytest
2503 python-pytest-asyncio
2504 python-pytest-trio
2505 python-starlette
2506 python-setuptools
2507 python-wheel))
2508 (propagated-inputs (list python-sniffio))
2509 (home-page "https://github.com/florimondmanca/asgi-lifespan")
2510 (synopsis "Programmatic startup/shutdown of ASGI apps")
2511 (description "Programmatically send startup/shutdown lifespan events
2512into Asynchronous Server Gateway Interface (ASGI) applications. When
2513used in combination with an ASGI-capable HTTP client such as HTTPX, this
2514allows mocking or testing ASGI applications without having to spin up an
2515ASGI server.")
2516 (license license:expat)))
2517
2518(define-public python-a2wsgi
2519 (package
2520 (name "python-a2wsgi")
2521 (version "1.10.7")
2522 (source (origin
2523 (method url-fetch)
2524 (uri (pypi-uri "a2wsgi" version))
2525 (sha256
2526 (base32
2527 "13ikyfmkx7hlrbg5rpcdm6kw4wcsy00giil3f72hpb6sw7vjyinf"))))
2528 (build-system pyproject-build-system)
2529 (arguments
2530 (list
2531 #:test-flags
2532 #~(list "-k" (string-join
2533 (list "not test_starlette_stream_response"
2534 "test_starlette_base_http_middleware"
2535 "test_baize_stream_response"
2536 ;; Fails because of harmless whitespace differences.
2537 "test_wsgi_post")
2538 " and not "))
2539 #:build-backend "pdm.backend"))
2540 (native-inputs
2541 (list python-pdm-backend
2542 python-pytest
2543 ;; python-baize ; not packed yet
2544 python-httpx-bootstrap
2545 ;; Cycle: python-a2wsgi->python-uvicorn->
2546 ;; python-httpx->python-starlette->python-a2wsgi
2547 ;; python-starlette
2548 python-pytest-asyncio))
2549 (home-page "https://github.com/abersheeran/a2wsgi")
2550 (synopsis "Convert WSGI to ASGI or vice versa")
2551 (description
2552 "This program converts a WSGI program to an ASGI program or the other
2553way around. It depends only on the Python standard library.")
2554 (license license:asl2.0)))
2555
2556(define-public python-httpauth
2557 (package
2558 (name "python-httpauth")
2559 (version "0.4.1")
2560 (source (origin
2561 (method url-fetch)
2562 (uri (pypi-uri "httpauth" version))
2563 (sha256
2564 (base32
2565 "1m6rwvivg61l3h34hf6p6gkqmr69sb1c4k5ha379nxq0p8bfgahb"))))
2566 (build-system pyproject-build-system)
2567 (native-inputs (list python-pytest python-setuptools python-wheel))
2568 (home-page "https://github.com/jonashaag/httpauth")
2569 (synopsis "WSGI HTTP Digest Authentication middleware")
2570 (description "@code{python-httpauth} is WSGI middleware that secures some/all
2571routes using HTTP Digest Authentication.")
2572 (license license:bsd-2)))
2573
2574(define-public python-css-html-js-minify
2575 (let ((commit "8f72452960e41bc5476e50d96481f633eff72750")
2576 (revision "0"))
2577 (package
2578 (name "python-css-html-js-minify")
2579 (version (git-version "2.5.5" revision commit))
2580 (source
2581 (origin
2582 (method git-fetch)
2583 (uri (git-reference
2584 (url "https://github.com/juancarlospaco/css-html-js-minify")
2585 (commit commit)))
2586 (file-name (git-file-name name version))
2587 (sha256
2588 (base32 "1lkx03720zk6q16w3d9r3l5kryikd1cmzwrcjzsjxwrq4zfh6vdf"))))
2589 (build-system pyproject-build-system)
2590 (arguments
2591 (list
2592 #:phases
2593 #~(modify-phases %standard-phases
2594 (add-after 'unpack 'relax-requirements
2595 (lambda _
2596 (substitute* "setup.cfg"
2597 (("^tests_require.*") "")))))))
2598 (native-inputs (list python-pytest python-setuptools))
2599 (home-page "https://github.com/juancarlospaco/css-html-js-minify")
2600 (synopsis "CSS/HTML/JS minifier")
2601 (description
2602 "This package provides a single-file minifier for CSS, HTML, and JavaScript.")
2603 ;; XXX: The README just says "GNU GPL and GNU LGPL and MIT". From
2604 ;; <https://github.com/juancarlospaco/css-html-js-minify/issues/9> it
2605 ;; looks like the user can choose a license.
2606 (license (list license:gpl3+ license:lgpl3+ license:expat)))))
2607
2608(define-public python-aws-sam-translator
2609 (package
2610 (name "python-aws-sam-translator")
2611 (version "1.99.0")
2612 (source
2613 (origin
2614 (method git-fetch) ; no tests in PyPI release
2615 (uri (git-reference
2616 (url "https://github.com/aws/serverless-application-model")
2617 (commit (string-append "v" version))))
2618 (file-name (git-file-name name version))
2619 (sha256
2620 (base32 "1k9a8r0kfjsrxk5z4yhipcynr2sqcl7lpc1xmdblxk76cqvsmkb3"))))
2621 (build-system pyproject-build-system)
2622 (arguments
2623 (list
2624 #:test-flags
2625 #~(list "--numprocesses" (number->string (parallel-job-count))
2626 "--ignore=tests/bin/test_public_interface.py"
2627 "tests")
2628 #:phases
2629 #~(modify-phases %standard-phases
2630 (add-after 'unpack 'fix-pytest-config
2631 (lambda _
2632 ;; Drop test coverage requirements.
2633 (substitute* "pytest.ini"
2634 ((".*addopts.*") ""))))
2635 (add-before 'check 'pre-check
2636 (lambda _
2637 (setenv "AWS_DEFAULT_REGION" "eu-west-3"))))))
2638 (native-inputs
2639 (list python-pytest
2640 python-setuptools
2641 python-pytest-xdist
2642 python-parameterized
2643 python-pyyaml))
2644 (propagated-inputs
2645 (list python-boto3
2646 python-jsonschema
2647 python-pydantic
2648 python-typing-extensions))
2649 (home-page "https://github.com/aws/serverless-application-model")
2650 (synopsis "Transform AWS SAM templates into AWS CloudFormation templates")
2651 (description
2652 "AWS SAM Translator is a library that transform @dfn{Serverless Application
2653Model} (SAM) templates into AWS CloudFormation templates.")
2654 (license license:asl2.0)))
2655
2656(define-public python-aws-xray-sdk
2657 (package
2658 (name "python-aws-xray-sdk")
2659 (version "2.14.0")
2660 (home-page "https://github.com/aws/aws-xray-sdk-python")
2661 (source (origin
2662 (method git-fetch)
2663 (uri (git-reference (url home-page) (commit version)))
2664 (file-name (git-file-name name version))
2665 (sha256
2666 (base32
2667 "0khm86218rfjmgfw0azk7gnq6y9gkj95i0i30wa5v2li1z4z8qxd"))))
2668 (build-system pyproject-build-system)
2669 (arguments
2670 (list
2671 #:test-flags
2672 '(list ;; Tries to connect to external network resources
2673 "--ignore=tests/ext/aiohttp/test_client.py"
2674 "--ignore=tests/ext/httplib/test_httplib.py"
2675 "--ignore=tests/ext/httpx"
2676 "--ignore=tests/ext/requests/test_requests.py"
2677 ;; TODO: How to configure Django for these tests?
2678 "--ignore=tests/ext/django"
2679 ;; These tests require packages not yet in Guix.
2680 "--ignore=tests/ext/aiobotocore/test_aiobotocore.py"
2681 "--ignore=tests/ext/aiohttp/test_middleware.py"
2682 "--ignore=tests/ext/pg8000/test_pg8000.py"
2683 "--ignore=tests/ext/psycopg2/test_psycopg2.py"
2684 "--ignore=tests/ext/pymysql/test_pymysql.py"
2685 "--ignore=tests/ext/pynamodb/test_pynamodb.py"
2686 "--ignore=tests/ext/sqlalchemy_core/test_postgres.py"
2687 "--ignore=tests/ext/sqlalchemy_core/test_dburl.py"
2688 "--ignore=tests/test_async_recorder.py"
2689 ;; FIXME: module 'sqlalchemy.orm' has no attribute 'DeclarativeBase'.
2690 "--ignore-glob=tests/ext/sqlalchemy*"
2691 "--ignore=tests/ext/flask_sqlalchemy/test_query.py"
2692 ;; FIXME: Why is this failing?
2693 "--ignore=tests/test_patcher.py"
2694 "--ignore=tests/test_lambda_context.py")
2695 #:phases
2696 '(modify-phases %standard-phases
2697 (add-before 'check 'pre-check
2698 (lambda _
2699 ;; Allow "import tests.utils" to work as expected.
2700 (setenv "PYTHONPATH" (getcwd)))))))
2701 (native-inputs
2702 (list ;; These are required for the test suite.
2703 python-aiohttp
2704 python-bottle
2705 python-flask
2706 python-flask-sqlalchemy
2707 python-httpx
2708 python-mock
2709 python-pymysql
2710 python-pytest
2711 python-pytest-asyncio-0.26
2712 python-pytest-benchmark
2713 python-setuptools
2714 python-sqlalchemy
2715 python-webtest))
2716 (propagated-inputs
2717 (list python-botocore
2718 python-jsonpickle
2719 python-requests
2720 python-wrapt))
2721 (synopsis "Profile applications on AWS X-Ray")
2722 (description
2723 "The AWS X-Ray SDK for Python enables Python developers to record and
2724emit information from within their applications to the AWS X-Ray service.")
2725 (license license:asl2.0)))
2726
2727(define-public python-publicsuffixlist
2728 (package
2729 (name "python-publicsuffixlist")
2730 (version "1.0.2.20250202")
2731 (source
2732 (origin
2733 (method url-fetch)
2734 (uri (pypi-uri "publicsuffixlist" version))
2735 (sha256
2736 (base32 "0llam7g7sv08lcfgy18iph8br8ldjmy2qbjaykc9pd3z4iisb0yd"))))
2737 (build-system pyproject-build-system)
2738 (arguments (list #:test-backend #~'unittest))
2739 (native-inputs (list python-setuptools))
2740 (home-page "https://github.com/ko-zu/psl")
2741 (synopsis "Public suffix list for Python")
2742 (description
2743 "This package provides an implementation of
2744@url{https://publicsuffix.org/, Public Suffix List } as Python library.
2745
2746Features:
2747@itemize
2748@item supports IDN (unicode and punycoded)
2749@item shipped with built-in PSL and an updater script
2750@item written in Pure Python with no library dependencies
2751@end itemize")
2752 (license license:mpl2.0)))
2753
2754(define-public python-pycognito
2755 (package
2756 (name "python-pycognito")
2757 (version "2024.5.1")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (pypi-uri "pycognito" version))
2762 (sha256
2763 (base32 "1r1sq87spqcfgg17khgpqc2ga8m9nk10flg9h23drhy2k1kcc4g2"))))
2764 (build-system pyproject-build-system)
2765 (arguments
2766 ;; XXX: cycles with python-moto, bootstrap/minimal variant is required.
2767 (list #:tests? #f))
2768 (native-inputs
2769 (list python-setuptools))
2770 (propagated-inputs
2771 (list python-boto3
2772 python-envs
2773 python-pyjwt
2774 python-requests))
2775 (home-page "https://github.com/pvizeli/pycognito")
2776 (synopsis "Python library for using AWS Cognito")
2777 (description
2778 "This package provides a Python class to integrate Boto3's Cognito
2779client so it is easy to login users, with @acronym{Secure Remote Password,
2780SRP} support.")
2781 (license license:asl2.0)))
2782
2783(define-public python-python3-saml
2784 (package
2785 (name "python-python3-saml")
2786 (version "1.16.0")
2787 (source
2788 (origin
2789 (method git-fetch)
2790 (uri (git-reference
2791 (url "https://github.com/SAML-Toolkits/python3-saml")
2792 (commit (string-append "v" version))))
2793 (file-name (git-file-name name version))
2794 (sha256
2795 (base32 "1isisymhk8zblj5942jfl0zq392q5fpjikx52nywvzb0m2dcc81b"))))
2796 (build-system pyproject-build-system)
2797 (arguments
2798 (list
2799 ;; 214 tests pass, 50 fail; many fail because of required Internet
2800 ;; access or because of assumptions about the location of test files.
2801 #:tests? #false
2802 #:phases
2803 #~(modify-phases %standard-phases
2804 ;; FIXME: This should be fixed in python-xmlsec
2805 (add-before 'check 'pre-check
2806 (lambda* (#:key inputs #:allow-other-keys)
2807 (let ((lib (search-input-file inputs
2808 "lib/libxmlsec1-openssl.so")))
2809 (setenv "LD_LIBRARY_PATH" (dirname lib))))))))
2810 (native-inputs
2811 (list python-freezegun
2812 python-poetry-core))
2813 (inputs
2814 (list xmlsec-openssl))
2815 (propagated-inputs
2816 (list python-isodate
2817 python-lxml
2818 python-xmlsec))
2819 (home-page "https://github.com/SAML-Toolkits/python3-saml")
2820 (synopsis "Saml Python toolkit")
2821 (description
2822 "The SAML Python Toolkit lets you add SAML support to your Python
2823software.")
2824 (license license:expat)))
2825
2826(define-public python-ovh
2827 (package
2828 (name "python-ovh")
2829 (version "1.1.0")
2830 (source (origin
2831 (method url-fetch)
2832 (uri (pypi-uri "ovh" version))
2833 (sha256
2834 (base32
2835 "0ygniv12lixh9rvnjcd01gzbzk2b5xwcg2a59b7964a77dd9p3qh"))))
2836 (build-system pyproject-build-system)
2837 (arguments (list #:tests? #f)) ; XXX: tests require networking
2838 (propagated-inputs (list python-requests))
2839 (native-inputs (list python-setuptools))
2840 (home-page "https://api.ovh.com")
2841 (synopsis "Interact with OVHcloud APIs")
2842 (description "This package provides the official module to perform HTTP requests
2843to the OVHcloud APIs.")
2844 (license license:bsd-3)))
2845
2846(define-public python-cbor2
2847 (package
2848 (name "python-cbor2")
2849 (version "5.4.2.post1")
2850 (source
2851 (origin
2852 (method url-fetch)
2853 (uri (pypi-uri "cbor2" version))
2854 (sha256
2855 (base32 "15y78xcc3zkmvj1mdzz8gyhf3apbl91073kwhzbjk5abc1civwlw"))))
2856 (build-system pyproject-build-system)
2857 (native-inputs
2858 (list python-pytest
2859 python-pytest-cov
2860 python-setuptools
2861 python-setuptools-scm
2862 python-wheel))
2863 (home-page "https://github.com/agronholm/cbor2")
2864 (synopsis "Concise Binary Object Representation (CBOR) (de)serializer")
2865 (description "This Python library provides encoding and decoding for the
2866Concise Binary Object
2867Representation (CBOR) (@url{https://www.rfc-editor.org/rfc/rfc8949.html, RFC
28688949}) serialization format. The specification is fully compatible with the
2869original RFC 7049. Among its features are:
2870@itemize
2871@item Simple API like the @code{json} or @code{pickle} modules.
2872@item Support many CBOR tags with stdlib objects.
2873@item Generic tag decoding.
2874@item Shared value references including cyclic references.
2875@item String references compact encoding with repeated strings replaced with
2876indices.
2877@item Optional C module backend tested on big- and little-endian architectures.
2878@item Extensible tagged value handling using tag_hook and object_hook on
2879decode and default on encode.
2880@end itemize")
2881 (license license:expat)))
2882
2883(define-public python-cfn-lint
2884 (package
2885 (name "python-cfn-lint")
2886 (version "1.38.1")
2887 (source
2888 (origin
2889 (method git-fetch)
2890 (uri (git-reference
2891 (url "https://github.com/aws-cloudformation/cfn-lint")
2892 (commit (string-append "v" version))))
2893 (file-name (git-file-name name version))
2894 (sha256
2895 (base32 "1crwx0cp50h83xz8lc4ny504mx4dadpk80ln539syd4jd78qplgy"))))
2896 (build-system pyproject-build-system)
2897 (arguments
2898 (list
2899 ;; tests: 2136 passed, 11 deselected, 1 warning
2900 #:test-flags
2901 #~(list "--ignore=test/integration/"
2902 "-k" (string-join
2903 ;; Tests failing on doctest or comparing diff.
2904 (list "not test_build_graph"
2905 "test_good_template"
2906 "test_success_run"
2907 "test_update_docs"
2908 ;; ImportError: Missing optional dependencies sarif
2909 "test_sarif_formatter")
2910 " and not "))
2911 #:phases
2912 #~(modify-phases %standard-phases
2913 (add-after 'unpack 'remove-deprecated
2914 (lambda _
2915 (substitute* "src/cfnlint/data/AdditionalSpecs/LmbdRuntimeLifecycle.json"
2916 (("deprecated\": \"2025")
2917 "deprecated\": \"2125")))))))
2918 (native-inputs
2919 (list python-defusedxml
2920 python-pydot
2921 python-pytest
2922 python-setuptools))
2923 (propagated-inputs
2924 (list python-aws-sam-translator
2925 python-jsonpatch
2926 python-networkx
2927 python-pyyaml
2928 python-regex
2929 python-sympy
2930 python-typing-extensions
2931 ;; [optional]
2932 python-junit-xml))
2933 (home-page "https://github.com/aws-cloudformation/cfn-lint")
2934 (synopsis "Validate CloudFormation templates")
2935 (description
2936 "This package lets you validate CloudFormation YAML/JSON templates against
2937the CloudFormation spec and additional checks. Includes checking valid values
2938for resource properties and best practices.")
2939 (license license:expat)))
2940
2941(define-public python-pyzabbix
2942 (package
2943 (name "python-pyzabbix")
2944 (version "1.3.1")
2945 (source
2946 (origin
2947 (method git-fetch)
2948 (uri (git-reference
2949 (url "https://github.com/lukecyca/pyzabbix")
2950 (commit version)))
2951 (file-name (git-file-name name version))
2952 (sha256
2953 (base32 "1dbs3bz1mjlvlg46ikhg5j7agwni61ljlpiziknklv95yp29n86v"))))
2954 (build-system pyproject-build-system)
2955 (arguments
2956 (list #:test-flags #~(list "tests")))
2957 (native-inputs
2958 (list python-pytest
2959 python-requests-mock
2960 python-setuptools))
2961 (propagated-inputs
2962 (list python-packaging
2963 python-requests))
2964 (home-page "https://github.com/lukecyca/pyzabbix")
2965 (synopsis "Python interface to the Zabbix API")
2966 (description
2967 "@code{pyzabbix} is a Python module for working with the Zabbix API.")
2968 (license license:lgpl2.1+)))
2969
2970(define-public python-requests-cache
2971 (package
2972 (name "python-requests-cache")
2973 (version "1.2.1")
2974 (source
2975 (origin
2976 (method url-fetch)
2977 (uri (pypi-uri "requests_cache" version))
2978 (sha256
2979 (base32 "1l8i4l2pd26gbrlcdb5z056wvsqfr3vvbyqq2f8x1f65zn3ckav8"))))
2980 (build-system pyproject-build-system)
2981 (arguments
2982 (list
2983 #:test-flags
2984 #~(list "--numprocesses" (number->string (parallel-job-count))
2985 ;; These tests require access to external services, e.g. MongoDB
2986 ;; and Redis.
2987 "--ignore=tests/integration"
2988 ;; AttributeError: <class 'requests.adapters.HTTPAdapter'> does
2989 ;; not have the attribute 'get_connection_with_tls_context'
2990 "-k" "not test_mock_session")
2991 #:phases
2992 #~(modify-phases %standard-phases
2993 (add-before 'check 'pre-check
2994 (lambda _
2995 ;; PermissionError: [Errno 13] Permission denied:
2996 ;; '/homeless-shelter'
2997 (setenv "HOME" "/tmp"))))))
2998 (native-inputs
2999 (list python-poetry-core
3000 python-pytest
3001 python-pytest-rerunfailures
3002 python-pytest-xdist
3003 python-requests-mock
3004 python-responses
3005 python-rich
3006 python-tenacity
3007 python-time-machine
3008 python-timeout-decorator))
3009 (propagated-inputs
3010 (list python-attrs
3011 python-boto3
3012 python-bson
3013 python-cattrs
3014 python-itsdangerous
3015 python-orjson
3016 python-platformdirs
3017 python-pymongo
3018 python-pyyaml
3019 python-redis
3020 python-requests
3021 python-ujson
3022 python-url-normalize
3023 python-urllib3))
3024 (home-page "https://github.com/requests-cache/requests-cache")
3025 (synopsis "Persistent HTTP cache for Python requests")
3026 (description
3027 "This package provides a drop-in replacement for @code{requests.Session}
3028with caching offload to SQLite, Redis, MongoDB and AWS DynamoDB or save
3029responses as planin JSON/YAML file or save responses as plain JSON/YAML
3030files.")
3031 (license license:bsd-2)))
3032
3033(define-public python-requests-futures
3034 (package
3035 (name "python-requests-futures")
3036 (version "1.0.2")
3037 (source
3038 (origin
3039 (method url-fetch)
3040 (uri (pypi-uri "requests_futures" version))
3041 (sha256
3042 (base32 "1njqfjmd72l5f32jvcppg2afrvb0cd8angdwmq7q0vik81wvazkb"))))
3043 (build-system pyproject-build-system)
3044 (native-inputs
3045 (list python-greenlet
3046 python-pytest
3047 python-pytest-httpbin
3048 python-setuptools
3049 python-werkzeug))
3050 (propagated-inputs (list python-requests))
3051 (home-page "https://github.com/ross/requests-futures")
3052 (synopsis "Asynchronous Python HTTP for Humans")
3053 (description
3054 "This package provides and add-on the Python Requests HTTP library to run
3055code asynchronously.")
3056 (license license:asl2.0)))
3057
3058(define-public python-s3path
3059 (package
3060 (name "python-s3path")
3061 (version "0.6.4")
3062 (source
3063 (origin
3064 (method url-fetch)
3065 (uri (pypi-uri "s3path" version))
3066 (sha256
3067 (base32 "1lp5243jjf9ngqmajgnfr1px1kmpkfmgh248xlqz0nkww4wcy1hh"))))
3068 (build-system pyproject-build-system)
3069 (arguments
3070 (list
3071 ;; XXX: All tests fail with error: fixture 's3_mock' not found.
3072 #:tests? #f))
3073 (native-inputs
3074 (list python-setuptools
3075 python-wheel))
3076 (propagated-inputs
3077 (list python-boto3
3078 python-smart-open))
3079 (home-page "https://github.com/liormizr/s3path")
3080 (synopsis "Pathlib extension for AWS S3 Service")
3081 (description
3082 "S3Path provide a Python convenient File-System/Path like interface for
3083AWS S3 Service using boto3 S3 resource as a driver.")
3084 (license license:asl2.0)))
3085
3086(define-public python-falcon
3087 (package
3088 (name "python-falcon")
3089 (version "4.0.2")
3090 (source
3091 (origin
3092 ;; Use git, as there are some test files missing from the PyPI release,
3093 ;; such as 'examples' directory.
3094 (method git-fetch)
3095 (uri (git-reference
3096 (url "https://github.com/falconry/falcon")
3097 (commit version)))
3098 (file-name (git-file-name name version))
3099 (sha256
3100 (base32
3101 "1zhyvfbz4c1bxd4vbsgk19dzih6kkzgin10lmsr32x3b4qgnwqxs"))))
3102 (build-system pyproject-build-system)
3103 (arguments
3104 (list
3105 #:test-flags
3106 '(list "-k" "not slow"
3107 "--ignore-glob=examples/*" "--ignore-glob=bench/*" "tests")
3108 #:phases
3109 '(modify-phases %standard-phases
3110 (add-before 'check 'pre-check
3111 (lambda _
3112 (setenv "FALCON_ASGI_WRAP_NON_COROUTINES" "Y")
3113 (setenv "FALCON_TESTING_SESSION" "Y")
3114 (setenv "PYTHONASYNCIODEBUG" "1")
3115 (setenv "HOME" "/tmp"))))))
3116 (propagated-inputs
3117 (list python-mimeparse))
3118 (native-inputs
3119 (list python-aiofiles
3120 python-cbor2
3121 python-cython ;for faster binaries
3122 python-fakeredis
3123 python-httpx
3124 python-mujson
3125 python-msgpack
3126 python-orjson
3127 python-pecan
3128 python-pillow
3129 python-pytest
3130 python-pytest-asyncio
3131 python-pytest-runner
3132 python-pyyaml
3133 python-rapidjson
3134 python-requests
3135 python-setuptools
3136 python-testtools
3137 python-ujson
3138 python-websockets
3139 python-wheel))
3140 (home-page "https://falconframework.org")
3141 (synopsis "Web framework for building APIs and application backends")
3142 (description "Falcon is a web API framework for building microservices,
3143application backends and higher-level frameworks. Among its features are:
3144@itemize
3145@item Optimized and extensible code base
3146@item Routing via URI templates and REST-inspired resource
3147classes
3148@item Access to headers and bodies through request and response
3149classes
3150@item Request processing via middleware components and hooks
3151@item Idiomatic HTTP error responses
3152@item Straightforward exception handling
3153@item Unit testing support through WSGI helpers and mocks
3154@item Compatible with both CPython and PyPy
3155@item Cython support for better performance when used with CPython
3156@end itemize")
3157 (license license:asl2.0)))
3158
3159(define-public python-falcon-cors
3160 (package
3161 (name "python-falcon-cors")
3162 (properties '((commit . "41e9f075e193c1f76b26c0a8c67ad6e87462dfa6")
3163 (revision . "0")))
3164 (version (git-version "1.1.7"
3165 (assoc-ref properties 'revision)
3166 (assoc-ref properties 'commit)))
3167 (source
3168 (origin
3169 (method git-fetch)
3170 (uri (git-reference
3171 (url "https://github.com/lwcolton/falcon-cors")
3172 (commit (assoc-ref properties 'commit))))
3173 (file-name (git-file-name name version))
3174 (sha256
3175 (base32 "0iqz1i1p5xr32n34j77p2a86jmrkg1w90d2wcmmy1mhi5mgdm5gx"))))
3176 (build-system pyproject-build-system)
3177 (arguments
3178 (list
3179 ;; XXX: The last commit's tests are uncompatible with the more recent
3180 ;; version of python-falcon.
3181 #:tests? #f))
3182 (native-inputs
3183 (list python-falcon python-mock python-pynose python-setuptools))
3184 (home-page "https://github.com/lwcolton/falcon-cors")
3185 (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
3186 (description
3187 "This middleware provides @dfn{cross-origin resource sharing} (CORS)
3188support for Falcon. It allows applying a specially crafted CORS object to the
3189incoming requests, enabling the ability to serve resources over a different
3190origin than that of the web application.")
3191 (license license:asl2.0)))
3192
3193(define-public python-furl
3194 (package
3195 (name "python-furl")
3196 (version "2.1.4")
3197 (source
3198 (origin
3199 (method url-fetch)
3200 (uri (pypi-uri "furl" version))
3201 (sha256
3202 (base32 "05b058xisv8kghvcpaxvssml2jjkh1cmzyrrjwk2kjb62985fxl7"))))
3203 (build-system pyproject-build-system)
3204 (arguments
3205 (list #:test-flags
3206 #~(list "-k" (string-append "not test_hosts"
3207 " and not test_netloc"
3208 " and not test_odd_urls"))))
3209 (propagated-inputs
3210 (list python-orderedmultidict python-six))
3211 (native-inputs
3212 (list python-flake8 python-pytest python-setuptools python-wheel))
3213 (home-page "https://github.com/gruns/furl")
3214 (synopsis "URL manipulation in Python")
3215 (description "Furl provides an easy-to-use alternative to the
3216@code{urllib} and @code{urlparse} modules for manipulating URLs.")
3217 (license license:unlicense)))
3218
3219(define-public python-httplib2
3220 (package
3221 (name "python-httplib2")
3222 (version "0.22.0")
3223 (source
3224 (origin
3225 ;; Tests not included in the release tarball.
3226 (method git-fetch)
3227 (uri (git-reference
3228 (url "https://github.com/httplib2/httplib2")
3229 (commit (string-append "v" version))))
3230 (file-name (git-file-name name version))
3231 (sha256
3232 (base32
3233 "1zkp3glv0iha7p68p5m0sb8mrrammkdc0mx32517xry52s4iva7g"))))
3234 (build-system pyproject-build-system)
3235 (arguments
3236 (list
3237 #:phases
3238 #~(modify-phases %standard-phases
3239 (add-after 'unpack 'adjust-test-requirements
3240 (lambda _
3241 (substitute* "requirements-test.txt"
3242 (("==") ">=")))))))
3243 (native-inputs
3244 (list python-cryptography
3245 python-future
3246 python-mock
3247 python-pyparsing
3248 python-pytest
3249 python-pytest-cov
3250 python-pytest-randomly
3251 python-pytest-timeout
3252 python-setuptools))
3253 (home-page "https://github.com/httplib2/httplib2")
3254 (synopsis "Comprehensive HTTP client library")
3255 (description
3256 "A comprehensive HTTP client library supporting many features left out of
3257other HTTP libraries.")
3258 (license license:expat)))
3259
3260(define-public python-cheroot
3261 (package
3262 (name "python-cheroot")
3263 (version "10.0.1")
3264 (source
3265 (origin
3266 (method url-fetch)
3267 (uri (pypi-uri "cheroot" version))
3268 (sha256
3269 (base32
3270 "0h0p3fnpa4dxi589s7ljlzb6p3mhqdivb3pc2f36pljqfrwjzf70"))))
3271 (build-system pyproject-build-system)
3272 (arguments
3273 (list
3274 #:test-flags
3275 #~(list "--cov=cheroot"
3276 ;; Tests are flaky in parallel invocation.
3277 ;; "--numprocesses=auto"
3278 "--doctest-modules"
3279 "--showlocals"
3280 "-k" (string-append
3281 ;; Disable test requiring networking.
3282 "not test_tls_client_auth"
3283 ;; TypeError: HTTPConnection.request() got an unexpected keyword
3284 ;; argument 'chunked'
3285 " and not test_peercreds_unix_sock"
3286 " and not test_peercreds_unix_sock_with_lookup"))
3287 #:phases
3288 #~(modify-phases %standard-phases
3289 (replace 'check
3290 (lambda* (#:key tests? test-flags #:allow-other-keys)
3291 (when tests?
3292 (with-directory-excursion "/tmp"
3293 (apply invoke "pytest" "-v"
3294 (append test-flags (list #$output))))))))))
3295 (propagated-inputs
3296 (list python-jaraco-functools python-more-itertools))
3297 (native-inputs
3298 (list python-jaraco-text
3299 python-portend
3300 python-pyopenssl
3301 python-pypytools
3302 python-pytest-cov
3303 python-pytest-mock
3304 python-requests
3305 python-requests-toolbelt
3306 python-requests-unixsocket2
3307 python-setuptools
3308 python-setuptools-scm
3309 python-trustme
3310 python-wheel))
3311 (home-page "https://cheroot.cherrypy.dev")
3312 (synopsis "Highly-optimized, pure-python HTTP server")
3313 (description
3314 "Cheroot is a high-performance, pure-Python HTTP server.")
3315 (license license:bsd-3)))
3316
3317(define-public python-cherrypy
3318 (package
3319 (name "python-cherrypy")
3320 (version "18.10.0")
3321 (source
3322 (origin
3323 (method git-fetch)
3324 (uri (git-reference
3325 (url "https://github.com/cherrypy/cherrypy")
3326 (commit (string-append "v" version))))
3327 (file-name (git-file-name name version))
3328 (sha256
3329 (base32 "1mhs64z75mj3rk4rgxc3xm1yksaj253rj9czhk4632blz5yi0kbn"))))
3330 (build-system pyproject-build-system)
3331 (arguments
3332 (list
3333 #:test-flags
3334 #~(map
3335 (lambda (test)
3336 (string-append "--deselect=cherrypy/test/" test))
3337 (list
3338 ;; XXX: Unraisable exceptions.
3339 "test_config_server.py::ServerConfigTests::testMaxRequestSize"
3340 "test_core.py::CoreRequestHandlingTest::testRanges"
3341 "test_core.py::CoreRequestHandlingTest::testRedirect"
3342 "test_encoding.py::EncodingTests::\
3343test_multipart_decoding_bigger_maxrambytes"
3344 "test_encoding.py::EncodingTests::\
3345test_test_http.py::HTTPTests::test_post_filename_with_special_characters"
3346 "test_http.py::HTTPTests::test_post_multipart"
3347 "test_http.py::HTTPTests::test_post_filename_with_special_characters"
3348 "test_mime.py::SafeMultipartHandlingTest::test_Flash_Upload"
3349 "test_tutorials.py::TutorialTest::test09Files"))))
3350 (propagated-inputs
3351 (list python-cheroot
3352 python-jaraco-collections
3353 python-more-itertools
3354 python-portend
3355 python-zc-lockfile))
3356 (native-inputs
3357 (list python-objgraph
3358 python-path
3359 python-pytest
3360 python-pytest-cov
3361 python-pytest-forked
3362 python-pytest-services
3363 python-pytest-sugar
3364 python-requests-toolbelt
3365 python-setuptools))
3366 (home-page "https://www.cherrypy.dev")
3367 (synopsis "Object-Oriented HTTP framework")
3368 (description
3369 "CherryPy is a pythonic, object-oriented web framework. It helps in
3370building web applications in the same way any other object-oriented Python
3371program would be built.")
3372 (license license:bsd-3)))
3373
3374(define-public httpie
3375 (package
3376 (name "httpie")
3377 (version "3.2.4")
3378 (source
3379 (origin
3380 (method git-fetch)
3381 (uri (git-reference
3382 (url "https://github.com/httpie/cli")
3383 (commit version)))
3384 (file-name (git-file-name name version))
3385 (sha256
3386 (base32 "0ii11xfqkbawg1v8dlli4fqq5k3yc2v65z3j7k3p4gng998s94mr"))))
3387 (build-system pyproject-build-system)
3388 (arguments
3389 (list
3390 #:phases
3391 #~(modify-phases %standard-phases
3392 (add-before 'build 'remove-unnecessary-dependencies
3393 ;; Remove pip and setuptools dependencies so sanity-check.py passes.
3394 (lambda _
3395 (substitute* "setup.cfg"
3396 (("(pip|setuptools)") "")))))
3397 #:test-flags
3398 ;; test_plugins_cli.py communicates through subprocesses
3399 ;; mocking stdin, which does not work in the build container.
3400 ;; test_ssl.py cannot find the SSL certificates.
3401 ;; test_binary.py fails for an unknown reason.
3402 #~(list "--ignore=tests/test_plugins_cli.py"
3403 "--ignore=tests/test_ssl.py"
3404 "--ignore=tests/test_binary.py")))
3405 (native-inputs (list python-pytest
3406 python-pytest-httpbin
3407 python-pytest-mock
3408 python-responses
3409 python-setuptools
3410 python-werkzeug
3411 python-wheel))
3412 (propagated-inputs
3413 (list python-charset-normalizer
3414 python-defusedxml
3415 python-multidict
3416 python-pygments
3417 python-requests
3418 python-requests-toolbelt
3419 python-rich))
3420 (home-page "https://httpie.io")
3421 (synopsis "Modern, user-friendly command-line HTTP client for the API era")
3422 (description
3423 "A command line HTTP client with an intuitive UI, JSON support,
3424syntax highlighting, wget-like downloads, plugins, and more. It consists of
3425a single http command designed for painless debugging and interaction with
3426HTTP servers, RESTful APIs, and web services.")
3427 ;; CVE-2019-10751 was fixed in 1.0.3.
3428 (properties `((lint-hidden-cve "CVE-2019-10751")))
3429 (license license:bsd-3)))
3430
3431(define-public python-parfive
3432 (package
3433 (name "python-parfive")
3434 (version "2.2.0")
3435 (source
3436 (origin
3437 (method url-fetch)
3438 (uri (pypi-uri "parfive" version))
3439 (sha256
3440 (base32 "16rf02jhjr9lij8s2gqmvs01vx8kiv9f2535dnnziqwqv14d21yy"))))
3441 (build-system pyproject-build-system)
3442 (arguments
3443 (list
3444 #:test-flags
3445 ;; Disable tests requiring network access.
3446 #~(list "-k" (string-join
3447 (list "not test_ftp"
3448 "test_ftp_pasv_command"
3449 "test_ftp_http")
3450 " and not "))))
3451 (native-inputs
3452 (list python-pytest
3453 python-pytest-asyncio
3454 python-pytest-cov
3455 python-pytest-localserver
3456 python-pytest-socket
3457 python-setuptools
3458 python-setuptools-scm
3459 python-wheel))
3460 (propagated-inputs
3461 (list python-aiofiles
3462 python-aioftp
3463 python-aiohttp
3464 python-tqdm))
3465 (home-page "https://parfive.readthedocs.io/")
3466 (synopsis "HTTP and FTP parallel file downloader")
3467 (description
3468 "This package provides CLI tool and Python library @code{parallel} file
3469downloader using asyncio. parfive can handle downloading multiple files in
3470parallel as well as downloading each file in a number of chunks.
3471
3472asciicast demo of parfive parfive works by creating a downloader object,
3473appending files to it and then running the download. parfive has a synchronous
3474API, but uses asyncio to parallelise downloading the files.")
3475 (license license:expat)))
3476
3477(define-public python-html2text
3478 (package
3479 (name "python-html2text")
3480 (version "2020.1.16")
3481 (source
3482 (origin
3483 (method url-fetch)
3484 (uri (pypi-uri "html2text" version))
3485 (sha256
3486 (base32 "1fvv4z6dblii2wk1x82981ag8yhxbim1v2ksgywxsndh2s7335p2"))))
3487 (build-system pyproject-build-system)
3488 (native-inputs (list python-pytest python-setuptools python-wheel))
3489 (home-page "https://github.com/Alir3z4/html2text")
3490 (synopsis "Convert HTML into plain text")
3491 (description
3492 "html2text takes HTML and converts it into plain ASCII text
3493which is also valid markdown. html2text was originally written by Aaron
3494Swartz.")
3495 (license license:gpl3+)))
3496
3497(define-public python-jose
3498 (package
3499 (name "python-jose")
3500 (version "3.5.0")
3501 (home-page "https://github.com/mpdavis/python-jose")
3502 (source (origin
3503 (method git-fetch)
3504 (uri (git-reference (url home-page) (commit version)))
3505 (file-name (git-file-name name version))
3506 (sha256
3507 (base32
3508 "0frv7r6q43mjl7s82hh8qvqpdgyfvmyq2b6aq4402riq2i238d7h"))))
3509 (build-system pyproject-build-system)
3510 (native-inputs
3511 (list python-pyasn1 python-pytest python-setuptools))
3512 (propagated-inputs
3513 (list python-cryptography python-ecdsa python-rsa))
3514 (synopsis "JOSE implementation in Python")
3515 (description
3516 "The @dfn{JavaScript Object Signing and Encryption} (JOSE) technologies
3517- JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and
3518JSON Web Algorithms (JWA) - collectively can be used to encrypt and/or sign
3519content using a variety of algorithms.")
3520 (license license:expat)))
3521
3522(define-public python-joserfc
3523 (package
3524 (name "python-joserfc")
3525 (version "1.0.1")
3526 (source
3527 (origin
3528 (method url-fetch)
3529 (uri (pypi-uri "joserfc" version))
3530 (sha256
3531 (base32 "11m600bmj70bp96wxhwvyj4d57w0zahzq3vic7s4a4k85pl7nl64"))))
3532 (build-system pyproject-build-system)
3533 (arguments
3534 (list
3535 #:test-flags
3536 ;; No module named 'Crypto'
3537 '(list "--ignore=tests/jwe/test_chacha20.py"
3538 ;; Deprecation warnings are not raised.
3539 "-k" (string-append "not test_guess_bytes_key"
3540 " and not test_guess_callable_key"
3541 " and not test_guess_str_key"))))
3542 (propagated-inputs (list python-cryptography))
3543 (native-inputs (list python-pytest python-setuptools python-wheel))
3544 (home-page "https://github.com/authlib/joserfc")
3545 (synopsis "Python library for JOSE RFCs")
3546 (description
3547 "This package provides a Python library for JOSE RFCs, including JWS,
3548JWE, JWK, JWA, and JWT.")
3549 (license license:bsd-3)))
3550
3551(define-public python-jwcrypto
3552 (package
3553 (name "python-jwcrypto")
3554 (version "1.5.6")
3555 (source
3556 (origin
3557 (method url-fetch)
3558 (uri (pypi-uri "jwcrypto" version))
3559 (sha256
3560 (base32 "0fdhn5jrsdxqr1yr6rmh585q4j08z1aajn392vk1l20c59v8f6kp"))))
3561 (build-system pyproject-build-system)
3562 (native-inputs
3563 (list python-pytest
3564 python-setuptools))
3565 (propagated-inputs
3566 (list python-cryptography
3567 python-typing-extensions))
3568 (home-page "https://github.com/latchset/jwcrypto")
3569 (synopsis "Implementation of JOSE Web standards")
3570 (description
3571 "WCrypto is an implementation of the @dfn{Javascript Object Signing and
3572Encryption} (JOSE) Web Standards.")
3573 (license license:lgpl3+)))
3574
3575(define-public python-pypitoken
3576 (package
3577 (name "python-pypitoken")
3578 (version "7.0.1")
3579 (source
3580 (origin
3581 (method url-fetch)
3582 (uri (pypi-uri "pypitoken" version))
3583 (sha256
3584 (base32 "18hhwmdfs9y5ypl1n8z2h2ys2f52mv5xr043gzgb34mpmg0wi46x"))))
3585 (build-system pyproject-build-system)
3586 ;; There are no tests.
3587 (arguments (list #:tests? #false))
3588 (propagated-inputs (list python-jsonschema python-pymacaroons
3589 python-typing-extensions))
3590 (native-inputs (list python-poetry-core))
3591 (home-page "https://pypitoken.readthedocs.io/en/latest/")
3592 (synopsis "Manipulate PyPI API tokens")
3593 (description "This package lets you manipulate PyPI API tokens.")
3594 (license license:expat)))
3595
3596(define-public python-pyscss
3597 ;; XXX: no fresh release supporting Python 3.11, use the latest commit, see
3598 ;; <https://github.com/Kronuz/pyScss/issues/428>,
3599 ;; <https://github.com/Kronuz/pyScss/issues/431>.
3600 (let ((commit "73559d047706ccd4593cf6aa092de71f35164723")
3601 (revision "0"))
3602 (package
3603 (name "python-pyscss")
3604 (version (git-version "1.4.0" revision commit))
3605 (source
3606 (origin
3607 (method git-fetch) ; no tests in PyPI release
3608 (uri (git-reference
3609 (url "https://github.com/Kronuz/pyScss")
3610 (commit commit)))
3611 (file-name (git-file-name name version))
3612 (sha256
3613 (base32 "00msypxf5dm57gyfp3jxvjinigi4km84v33w83635pms9li2k3y7"))))
3614 (build-system pyproject-build-system)
3615 (native-inputs
3616 (list python-pytest
3617 python-setuptools))
3618 (inputs
3619 (list pcre))
3620 (propagated-inputs
3621 (list python-six)) ;hard dependency in scss/compiler.py
3622 (home-page "https://github.com/Kronuz/pyScss")
3623 (synopsis "Scss compiler for Python")
3624 (description
3625 "@code{pyScss} is a compiler for Sass, a superset language of
3626CSS3 that adds programming capabilities and some other syntactic sugar.")
3627 (license license:expat))))
3628
3629(define-public python-jsonpickle
3630 (package
3631 (name "python-jsonpickle")
3632 (version "4.0.0")
3633 (source (origin
3634 (method url-fetch)
3635 (uri (pypi-uri "jsonpickle" version))
3636 (sha256
3637 (base32
3638 "0dipys8p4hkqnp9nwkpysfv7mhws2hrr73wgn00pdmq4n990hrzw"))))
3639 (build-system pyproject-build-system)
3640 (arguments
3641 (list
3642 #:test-flags
3643 ;; Prevent running the flake8 and black pytest plugins, which only tests
3644 ;; style and frequently causes harmless failures.
3645 '(list "-o" "addopts=''" "tests")
3646 #:phases
3647 '(modify-phases %standard-phases
3648 (add-before 'check 'pre-check
3649 (lambda* (#:key inputs #:allow-other-keys)
3650 (setenv "TZ" "UTC")
3651 (setenv "TZDIR"
3652 (search-input-directory inputs "share/zoneinfo")))))))
3653 (propagated-inputs
3654 (list python-importlib-metadata))
3655 (native-inputs
3656 (list python-bson
3657 python-ecdsa
3658 python-feedparser
3659 python-pymongo
3660 python-pytest
3661 python-pytest-benchmark
3662 python-pytest-cov
3663 python-pytest-enabler
3664 python-setuptools
3665 python-setuptools-scm
3666 python-simplejson
3667 python-sqlalchemy
3668 python-ujson
3669 python-wheel
3670 tzdata-for-tests))
3671 (home-page "https://jsonpickle.github.io/")
3672 (synopsis "Serialize object graphs into JSON")
3673 (description
3674 "This package provides a Python library for serializing any arbitrary
3675object graph to and from JSON.")
3676 (license license:bsd-3)))
3677
3678(define-public python-mechanicalsoup
3679 (package
3680 (name "python-mechanicalsoup")
3681 (version "1.4.0")
3682 (source
3683 (origin
3684 (method url-fetch)
3685 (uri (pypi-uri "mechanicalsoup" version))
3686 (sha256
3687 (base32 "0k1ac77ld6jyjm5fsr44399l5gmiwnz5w6s74i3qqx2scfbsgs6w"))))
3688 (build-system pyproject-build-system)
3689 (arguments
3690 (list
3691 #:test-flags
3692 ;; Unclear why test fails.
3693 #~(list "-k" "not test_select_form_associated_elements")
3694 ;; The following dependencies are not directly required, the developer
3695 ;; only pinned versions because of vulnerabilities. They also break
3696 ;; sanity-check because it checks for a python-certifi version which is
3697 ;; more recent than the one available in Guix.
3698 #:phases #~(modify-phases %standard-phases
3699 (add-after 'unpack 'relax-dependencies
3700 (lambda _
3701 (substitute* "requirements.txt"
3702 (("certifi.*") "")
3703 (("urllib3.*") "")))))))
3704 (propagated-inputs
3705 (list python-beautifulsoup4 python-lxml python-requests))
3706 (native-inputs
3707 (list python-pytest
3708 python-pytest-cov
3709 python-pytest-flake8
3710 python-pytest-httpbin
3711 python-pytest-mock
3712 python-requests-mock
3713 python-setuptools
3714 python-wheel))
3715 (home-page "https://mechanicalsoup.readthedocs.io/")
3716 (synopsis "Python library for automating website interaction")
3717 (description
3718 "MechanicalSoup is a Python library for automating interaction with
3719websites. It automatically stores and sends cookies, follows redirects, and can
3720follow links and submit forms. It doesn’t do JavaScript.")
3721 (license license:expat)))
3722
3723(define-public python-hyperframe
3724 (package
3725 (name "python-hyperframe")
3726 (version "6.1.0")
3727 (source
3728 (origin
3729 (method url-fetch)
3730 (uri (pypi-uri "hyperframe" version))
3731 (sha256
3732 (base32 "021v58w1b7mbwqkvbz11p3a4qk1sj91jnf6nmgg7ljl502590c7n"))))
3733 (build-system pyproject-build-system)
3734 (native-inputs
3735 (list python-pytest python-setuptools))
3736 (home-page "https://github.com/python-hyper/hyperframe")
3737 (synopsis "HTTP/2 framing layer for Python")
3738 (description
3739 "This library contains the HTTP/2 framing code used in the hyper project.
3740It provides a pure-Python codebase that is capable of decoding a binary stream
3741into HTTP/2 frames.")
3742 (license license:expat)))
3743
3744(define-public python-hpack
3745 (package
3746 (name "python-hpack")
3747 (version "4.1.0")
3748 (source
3749 (origin
3750 ;; PyPI tarball is missing some files necessary for the tests.
3751 (method git-fetch)
3752 (uri (git-reference
3753 (url "https://github.com/python-hyper/hpack")
3754 (commit (string-append "v" version))))
3755 (file-name (git-file-name name version))
3756 (sha256
3757 (base32 "1kgbx38p3a48iz914dqbx7av750a3s3x5kj3rvpcbh23ah75zg5x"))))
3758 (build-system pyproject-build-system)
3759 (native-inputs
3760 (list python-pytest python-setuptools))
3761 (home-page "https://hyper.rtfd.org")
3762 (synopsis "Pure-Python HPACK header compression")
3763 (description
3764 "This module contains a pure-Python HTTP/2 header encoding (HPACK) logic
3765for use in Python programs that implement HTTP/2.")
3766 (license license:expat)))
3767
3768(define-public python-h11
3769 (package
3770 (name "python-h11")
3771 (version "0.16.0")
3772 (source
3773 (origin
3774 (method url-fetch)
3775 (uri (pypi-uri "h11" version))
3776 (sha256
3777 (base32 "1wazxq4b4jg5001h5ypvz9pvrg80pagyd1aqm962wya5rxbbjdaf"))))
3778 (build-system pyproject-build-system)
3779 (native-inputs
3780 (list python-pytest python-setuptools))
3781 (home-page "https://github.com/python-hyper/h11")
3782 (synopsis "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1")
3783 (description
3784 "This is a little HTTP/1.1 library written from scratch in Python, heavily
3785inspired by hyper-h2. It's a bring-your-own-I/O library; h11 contains no IO
3786code whatsoever. This means you can hook h11 up to your favorite network API,
3787and that could be anything you want.")
3788 (license license:expat)))
3789
3790(define-public python-h2
3791 (package
3792 (name "python-h2")
3793 (version "4.1.0")
3794 (source
3795 (origin
3796 (method url-fetch)
3797 (uri (pypi-uri "h2" version))
3798 (sha256
3799 (base32 "1fraip114fm1ha5w37pdc0sk8dn9pb0ck267zrwwpap7zc4clfm8"))))
3800 (build-system pyproject-build-system)
3801 (arguments
3802 (list
3803 ;; AssertionError: assert '<RemoteSettingsChanged
3804 ;; changed_settings:{ChangedSetting(setting=4, original_value=65536,
3805 ;; new_value=32768)}>' == '<RemoteSettingsChanged
3806 ;; changed_settings:{ChangedSetting(setting=SettingCodes.INITIAL_WINDOW_SIZE,
3807 ;; original_value=65536, new_value=32768)}>'
3808 #:test-flags
3809 #~(list "-k"
3810 (string-join
3811 (list "not test_remotesettingschanged_repr"
3812 ;; This test exceededs the Hypothesis deadline.
3813 #$@(if (target-riscv64?)
3814 #~("test_changing_max_frame_size")
3815 #~())
3816 "test_streamreset_repr"
3817 "test_settingsacknowledged_repr"
3818 "test_connectionterminated_repr[None-None]"
3819 "test_connectionterminated_repr[some"
3820 "test_remotesettingschanged_repr"
3821 "test_streamreset_repr"
3822 "test_settingsacknowledged_repr"
3823 "test_connectionterminated_repr[None-None]"
3824 "test_connectionterminated_repr[some")
3825 " and not "))))
3826 (native-inputs
3827 (list python-pytest
3828 python-setuptools
3829 python-wheel))
3830 (propagated-inputs
3831 (list python-hpack
3832 python-hyperframe))
3833 (home-page "https://github.com/python-hyper/h2")
3834 (synopsis "HTTP/2 State-Machine based protocol implementation")
3835 (description
3836 "This module contains a pure-Python implementation of a HTTP/2 protocol
3837stack. It does not provide a parsing layer, a network layer, or any rules
3838about concurrency. Instead, it's a purely in-memory solution, defined in
3839terms of data actions and HTTP/2 frames. This is one building block of a full
3840Python HTTP implementation.")
3841 (license license:expat)))
3842
3843(define-public python-slixmpp
3844 (package
3845 (name "python-slixmpp")
3846 (version "1.8.6") ; XXX: The latest version which does not requrie Rust
3847 (source
3848 (origin
3849 (method git-fetch)
3850 (uri (git-reference
3851 (url "https://codeberg.org/poezio/slixmpp")
3852 (commit (string-append "slix-" version))))
3853 (file-name (git-file-name name version))
3854 (sha256
3855 (base32 "0gpy6arwyk4lsx1hbcwbllxs6qbwn58adkp1rm1cfvfrjdv5kxx7"))))
3856 (build-system pyproject-build-system)
3857 (arguments
3858 (list
3859 #:phases
3860 #~(modify-phases %standard-phases
3861 (add-after 'unpack 'patch-setup.py
3862 (lambda _
3863 (substitute* "setup.py"
3864 (("'CC', 'cc'")
3865 "'CC', 'gcc'")))))))
3866 (native-inputs
3867 (list gnupg
3868 pkg-config
3869 python-cython
3870 python-setuptools
3871 python-wheel))
3872 (inputs
3873 (list libidn
3874 python)) ; We are building a Python extension.
3875 (propagated-inputs
3876 (list python-aiodns
3877 python-aiohttp
3878 python-cryptography
3879 python-defusedxml
3880 python-emoji
3881 python-pyasn1
3882 python-pyasn1-modules))
3883 (home-page "https://lab.louiz.org/poezio/slixmpp")
3884 (synopsis "XMPP library without threads")
3885 (description
3886 "Slixmpp is a XMPP library for Python 3.7+. It is a fork of SleekXMPP.
3887Its goal is to only rewrite the core of the library (the low level socket
3888handling, the timers, the events dispatching) in order to remove all
3889threads.")
3890 (license license:expat)))
3891
3892(define-public python-sockjs-tornado
3893 (package
3894 (name "python-sockjs-tornado")
3895 (version "1.0.6")
3896 (source
3897 (origin
3898 (method git-fetch)
3899 (uri (git-reference
3900 (url "https://github.com/mrjoes/sockjs-tornado/")
3901 (commit (string-append "v" version))))
3902 (file-name (git-file-name name version))
3903 (sha256
3904 (base32 "1y4wjca1776nvd0b79pz4d52i312xsyb2vahb883qmrw6s56mynk"))))
3905 (build-system pyproject-build-system)
3906 (arguments
3907 (list
3908 #:tests? #f)) ;The only test in examples/test/test.py runs a server.
3909 (native-inputs (list python-setuptools))
3910 (propagated-inputs (list python-tornado))
3911 (home-page "https://github.com/mrjoes/sockjs-tornado/")
3912 (synopsis
3913 "SockJS Python server implementation on top of the Tornado framework")
3914 (description
3915 "SockJS-tornado provides the server-side counterpart to a SockJS client
3916library, through the Tornado framework.
3917
3918SockJS provides a low-latency, full-duplex, cross-domain communication channel
3919between a web browser and web server.")
3920 (license license:expat)))
3921
3922(define-public python-flask-assets
3923 ;; The latest release still depends on the abandoned flask-script, whereas
3924 ;; at this later commit (already 2 years old at the time of this writing)
3925 ;; the dependency has been lifted.
3926 (let ((commit "62efd23fe95ee6a86fc1cfaa98fc1e2152093557")
3927 (revision "1"))
3928 (package
3929 (name "python-flask-assets")
3930 (version (git-version "2.1.0" revision commit))
3931 (source
3932 (origin
3933 (method git-fetch)
3934 (uri (git-reference
3935 (url "https://github.com/miracle2k/flask-assets/")
3936 (commit commit)))
3937 (file-name (git-file-name name version))
3938 (sha256
3939 (base32 "11q8vm2ipj4xrvawy9vl1l4k8kb4r72ghy1n8xrzci52v6lx8960"))))
3940 (build-system pyproject-build-system)
3941 (propagated-inputs
3942 (list python-flask python-webassets))
3943 (native-inputs
3944 (list nss-certs-for-test python-pytest python-setuptools python-wheel))
3945 (home-page "https://github.com/miracle2k/flask-assets")
3946 (synopsis "Asset management for Flask")
3947 (description "This package integrates @code{webassets} with Flask, adding
3948support for merging, minifying and compiling CSS and Javascript files.")
3949 (license license:bsd-2))))
3950
3951(define-public python-flask-babel
3952 (package
3953 (name "python-flask-babel")
3954 (version "4.0.0")
3955 (source
3956 (origin
3957 (method git-fetch) ;no tests in pypi release
3958 (uri (git-reference
3959 (url "https://github.com/python-babel/flask-babel")
3960 (commit (string-append "v" version))))
3961 (sha256
3962 (base32
3963 "19yq3f5rixbwhv7wxdarvi9hdj98a9dq8y76in9c1q3jxaigw104"))))
3964 (build-system pyproject-build-system)
3965 (native-inputs
3966 (list python-poetry-core
3967 python-pytest
3968 python-pytest-cov
3969 python-pytest-mock))
3970 (propagated-inputs
3971 (list python-babel
3972 python-flask
3973 python-jinja2
3974 python-pytz))
3975 (home-page "https://github.com/python-babel/flask-babel")
3976 (synopsis "Add i18n/l10n support to Flask applications")
3977 (description "This package implements internationalization and localization
3978support for Flask. This is based on the Python babel module as well as pytz -
3979both of which are installed automatically if you install this library.")
3980 (license license:bsd-3)))
3981
3982(define-public python-flask-cors
3983 (package
3984 (name "python-flask-cors")
3985 (version "6.0.2")
3986 (source
3987 (origin
3988 (method git-fetch) ;no tests in PyPI archive
3989 (uri (git-reference
3990 (url "https://github.com/CoryDolphin/flask-cors")
3991 (commit version)))
3992 (file-name (git-file-name name version))
3993 (sha256
3994 (base32 "02y740h951dscgkm7ghsss1bc0m8ymsfdpsimm1j0nkl0zjl6sgm"))))
3995 (build-system pyproject-build-system)
3996 (arguments
3997 (list
3998 #:phases
3999 #~(modify-phases %standard-phases
4000 (add-after 'unpack 'fix-version
4001 (lambda _
4002 ;; Otherwise sanity-check of dependents will fail.
4003 (substitute* "pyproject.toml"
4004 (("version = \"0\\.0\\.1\"" all)
4005 (string-append "version = \"" #$version "\""))))))))
4006 (native-inputs
4007 (list python-pytest
4008 python-setuptools))
4009 (propagated-inputs
4010 (list python-flask
4011 python-werkzeug))
4012 (home-page "https://flask-cors.readthedocs.io/en/latest/")
4013 (synopsis "Handle Cross-Origin Resource Sharing with Flask")
4014 (description
4015 "This package provides a Flask extension for handling @acronym{CORS,Cross
4016Origin Resource Sharing}, making cross-origin AJAX possible.")
4017 (license license:expat)))
4018
4019(define-public python-flask-markdown
4020 (package
4021 (name "python-flask-markdown")
4022 (version "0.3")
4023 (source
4024 (origin
4025 (method git-fetch)
4026 (uri (git-reference
4027 (url "https://github.com/dcolish/flask-markdown")
4028 (commit version)))
4029 (file-name (git-file-name name version))
4030 (sha256
4031 (base32 "1rqqmvjc4rjal6l4y3caxw9b3157pl923h4i1ihbm0gziqv3g2hl"))))
4032 (build-system pyproject-build-system)
4033 (arguments
4034 (list
4035 #:tests? #f ;Tests seem to be incompatible with latest python
4036 #:phases
4037 #~(modify-phases %standard-phases
4038 (add-after 'unpack 'set-version
4039 (lambda _
4040 (substitute* "setup.py"
4041 (("dev")
4042 #$version)))))))
4043 (propagated-inputs (list python-markdown python-flask))
4044 (native-inputs (list python-pynose python-setuptools))
4045 (home-page "https://github.com/dcolish/flask-markdown")
4046 (synopsis "Small extension to help with using Markdown in Flask")
4047 (description
4048 "Flask-Markdown supports several extensions for Markdown and integrates
4049into Jinja2 by default.")
4050 (license license:bsd-3)))
4051
4052(define-public python-flask-session
4053 (package
4054 (name "python-flask-session")
4055 (version "0.8.0")
4056 (source
4057 (origin
4058 (method url-fetch)
4059 (uri (pypi-uri "flask_session" version))
4060 (sha256
4061 (base32
4062 "1zs20zpq6gxz9gsccbd2jrrbbcfvh0x9z9741gkr8dhh07mlbq10"))))
4063 (build-system pyproject-build-system)
4064 (arguments
4065 '(#:tests? #f)) ; Tests require the various storage backends to be present
4066 (native-inputs (list python-flit-core))
4067 (propagated-inputs
4068 (list python-cachelib python-flask python-msgspec))
4069 (home-page "https://github.com/pallets-eco/flask-session")
4070 (synopsis "Adds server-side session support to your Flask application")
4071 (description
4072 "Flask-Session is an extension for Flask that adds support for
4073Server-side sessions, with a variety of different backends for session
4074storage.")
4075 (license license:bsd-3)))
4076
4077(define-public python-html5lib
4078 (package
4079 (name "python-html5lib")
4080 (version "1.1")
4081 (source
4082 (origin
4083 (method url-fetch)
4084 (uri (pypi-uri "html5lib" version))
4085 (sha256
4086 (base32 "0vqlhk0hgbsfkh7ybmby93xhlx8dq6pr5blf356ka3z2c41b9rdj"))))
4087 (build-system pyproject-build-system)
4088 (arguments
4089 '(#:tests? #f)) ;tests depent on dated pytest-expect
4090 (native-inputs
4091 (list python-setuptools))
4092 (propagated-inputs
4093 (list python-six
4094 python-webencodings
4095 ;; Required by Calibre 5.
4096 python-chardet))
4097 (home-page "https://github.com/html5lib/html5lib-python")
4098 (synopsis "Python HTML parser based on the WHATWG HTML specification")
4099 (description
4100 "Html5lib is an HTML parser based on the WHATWG HTML specification
4101and written in Python.")
4102 (license license:expat)))
4103
4104(define-public python-html5-parser
4105 (package
4106 (name "python-html5-parser")
4107 (version "0.4.12")
4108 (source
4109 (origin
4110 (method git-fetch)
4111 (uri (git-reference
4112 (url "https://github.com/kovidgoyal/html5-parser")
4113 (commit (string-append "v" version))))
4114 (file-name (git-file-name name version))
4115 (sha256
4116 (base32 "0axrz2x67nhsh3kijy68wwy5hx8h8418d8g2qz6f3pyxix7gw2fi"))))
4117 (build-system pyproject-build-system)
4118 (arguments
4119 (list
4120 #:phases
4121 #~(modify-phases %standard-phases
4122 (add-before 'build 'set-configure-flags
4123 (lambda _
4124 (setenv "CFLAGS" "-Wno-error=implicit-function-declaration"))))))
4125 (native-inputs (list pkg-config python-setuptools))
4126 (inputs (list libxml2))
4127 (propagated-inputs (list python-lxml python-beautifulsoup4 python-chardet))
4128 (home-page "https://html5-parser.readthedocs.io")
4129 (synopsis "Fast C-based HTML5 parsing for Python")
4130 (description
4131 "This package provides a fast implementation of the HTML5 parsing spec
4132for Python. Parsing is done in C using a variant of the gumbo parser. The
4133gumbo parse tree is then transformed into an lxml tree, also in C, yielding
4134parse times that can be a thirtieth of the html5lib parse times.")
4135 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
4136 ;; indicate ASL2.0, including the LICENSE file for the whole project.
4137 (license (list license:asl2.0 license:gpl3))))
4138
4139(define-public python-html5tagger
4140 (package
4141 (name "python-html5tagger")
4142 (version "1.3.0")
4143 (source (origin
4144 (method url-fetch)
4145 (uri (pypi-uri "html5tagger" version))
4146 (sha256
4147 (base32
4148 "1acd1a4f66gi4plqnsml7cf33qp83mxsnmnqpdwkpj7597xkvyl4"))))
4149 (build-system pyproject-build-system)
4150 (arguments
4151 (list #:tests? #f)) ;no tests in PyPI or Git
4152 (native-inputs
4153 (list python-setuptools python-setuptools-scm python-wheel))
4154 (home-page "https://github.com/sanic-org/html5tagger")
4155 (synopsis "Create HTML documents from Python")
4156 (description
4157 "@code{html5tagger} provides a simplified HTML5 syntax that can
4158be written directly in Python without templates.")
4159 (license license:unlicense)))
4160
4161(define-public python-minio
4162 (package
4163 (name "python-minio")
4164 (version "7.1.9")
4165 (source
4166 (origin
4167 (method git-fetch)
4168 (uri (git-reference
4169 (url "https://github.com/minio/minio-py")
4170 (commit version)))
4171 (file-name (git-file-name name version))
4172 (sha256
4173 (base32 "01734ki3p7844dya366hy1kvmmgy3xr0l0zbkchnnv4p611510vc"))))
4174 (build-system pyproject-build-system)
4175 (arguments
4176 (list
4177 #:test-flags
4178 ;; XXX: requires network access.
4179 #~(list "--ignore=tests/unit/credentials_test.py")))
4180 (native-inputs (list python-pytest python-setuptools))
4181 (propagated-inputs
4182 (list python-certifi python-dateutil python-pytz python-urllib3))
4183 (home-page "https://github.com/minio/minio-py")
4184 (synopsis "Programmatically access Amazon S3 from Python")
4185 (description
4186 "This package provides a Python library for interacting with any
4187Amazon S3 compatible object storage server.")
4188 (license license:asl2.0)))
4189
4190(define-public python-pycurl
4191 (package
4192 (name "python-pycurl")
4193 (version "7.45.4")
4194 (source
4195 (origin
4196 (method git-fetch)
4197 (uri (git-reference
4198 (url "https://github.com/pycurl/pycurl")
4199 (commit (string-append
4200 "REL_" (string-replace-substring version "." "_")))))
4201 (file-name (git-file-name name version))
4202 (sha256
4203 (base32 "00cd1l0lsml0708hpv5k4qyhqfv0qphb0p317j9aci2wdspn1mpl"))))
4204 (build-system pyproject-build-system)
4205 (arguments
4206 '(#:test-flags
4207 ;; The test suite is not thread safe:
4208 ;; - some tests want to use the same port: address already in use
4209 ;; - some tests use signal.Signal, i.e. main-thread only
4210 (list "-k" (string-append
4211 ;; Disable hanginging tests
4212 "not test_multi_socket_select"
4213 ;; E assert None is not None
4214 ;; E+ where None =
4215 ;; <tests.multi_callback_test.MultiCallbackTest
4216 ;; testMethod=test_multi_socket_action>.timer_result
4217 " and not test_multi_socket_action"
4218 ;; OSError: tests/fake-curl/libcurl/with_gnutls.so: cannot
4219 ;; open shared object file: No such file or directory
4220 " and not test_libcurl_ssl_gnutls"
4221 ;; OSError: tests/fake-curl/libcurl/with_nss.so: cannot
4222 ;; open shared object file: No such file or directory
4223 " and not test_libcurl_ssl_nss"
4224 ;; OSError: tests/fake-curl/libcurl/with_openssl.so: cannot
4225 ;; open shared object file: No such file or directory
4226 " and not test_libcurl_ssl_openssl"
4227 ;; Probably due to an expired CA
4228 " and not test_request_without_certinfo"
4229 ;; "A libcurl function was given a bad argument"
4230 " and not test_proxy_tlsauth"))
4231 #:phases (modify-phases %standard-phases
4232 (add-before 'build 'configure-tls-backend
4233 (lambda _
4234 ;; XXX: PycURL fails to automatically determine which
4235 ;; TLS backend to use when cURL is built with
4236 ;; --disable-static. See setup.py and
4237 ;; <https://github.com/pycurl/pycurl/pull/147>.
4238 (setenv "PYCURL_SSL_LIBRARY" "gnutls"))))))
4239 (native-inputs
4240 (list python-bottle
4241 python-flaky
4242 python-flask
4243 python-pytest
4244 python-setuptools
4245 python-wheel))
4246 (inputs
4247 (list curl gnutls))
4248 (home-page "http://pycurl.io/")
4249 (synopsis "Lightweight Python wrapper around libcurl")
4250 (description "Pycurl is a lightweight wrapper around libcurl. It provides
4251high-speed transfers via libcurl and frequently outperforms alternatives.")
4252
4253 ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
4254 ;; under the terms of LGPLv2.1+ or Expat.
4255 (license (list license:lgpl2.1+ license:expat))))
4256
4257(define-public python-stripe
4258 (package
4259 (name "python-stripe")
4260 (version "13.2.0")
4261 (source
4262 (origin
4263 (method git-fetch)
4264 (uri (git-reference
4265 (url "https://github.com/stripe/stripe-python")
4266 (commit (string-append "v" version))))
4267 (file-name (git-file-name name version))
4268 (sha256
4269 (base32 "0f0d1hqias3qylrhk56w055lqrlzjs9s7wxva30v54ykmn9nj6dx"))))
4270 (build-system pyproject-build-system)
4271 (arguments
4272 '(#:tests? #f)) ;; tests require network
4273 (native-inputs
4274 (list python-flit-core))
4275 (propagated-inputs
4276 (list python-httpx
4277 python-requests))
4278 (home-page "https://github.com/stripe/stripe-python")
4279 (synopsis "Python bindings for the Stripe financial services' API")
4280 (description "This package provides access to the Stripe financial
4281services' API. It includes a pre-defined set of classes for API resources
4282that initialize themselves dynamically from API responses which makes it
4283compatible with a wide range of versions of the Stripe API.")
4284 (license license:expat)))
4285
4286(define-public python-stripe-12
4287 (hidden-package
4288 (package/inherit python-stripe
4289 (name "python-stripe")
4290 (version "12.5.1")
4291 (source
4292 (origin
4293 (inherit (package-source python-stripe))
4294 (uri (git-reference
4295 (url "https://github.com/stripe/stripe-python")
4296 (commit (string-append "v" version))))
4297 (file-name (git-file-name name version))
4298 (sha256 (base32
4299 "0jgixfb8ydlx387vm7rdaqrzsiqbvi99nszrpb1ghjqyn755xigd"))))
4300 (native-inputs
4301 (list python-setuptools)))))
4302
4303(define-public python-tldextract
4304 (package
4305 (name "python-tldextract")
4306 (version "5.3.0")
4307 (source
4308 (origin
4309 (method url-fetch)
4310 (uri (pypi-uri "tldextract" version))
4311 (sha256
4312 (base32 "02c6cyh8f3dagcw786m9nl5y0n3xa98p5mb7d7xfr84l2l5bglmk"))))
4313 (build-system pyproject-build-system)
4314 (arguments
4315 (list
4316 #:phases
4317 #~(modify-phases %standard-phases
4318 (add-after 'unpack 'relax-requirements
4319 (lambda _
4320 (substitute* "pyproject.toml"
4321 (("\"requests-file.*\",")
4322 "\"requests-file\",")))))))
4323 (native-inputs
4324 (list nss-certs-for-test
4325 python-pytest
4326 python-pytest-mock
4327 python-responses
4328 python-setuptools
4329 python-setuptools-scm
4330 python-syrupy))
4331 (propagated-inputs
4332 (list python-filelock
4333 python-idna
4334 python-requests
4335 python-requests-file))
4336 (home-page "https://github.com/john-kurkowski/tldextract")
4337 (synopsis
4338 "Separate the TLD from the registered domain and subdomains of a URL")
4339 (description
4340 "TLDExtract accurately separates the TLD from the registered domain and
4341subdomains of a URL, using the Public Suffix List. By default, this includes
4342the public ICANN TLDs and their exceptions. It can optionally support the
4343Public Suffix List's private domains as well.")
4344 (license license:bsd-3)))
4345
4346(define-public python-tracerite
4347 (package
4348 (name "python-tracerite")
4349 (version "1.1.3")
4350 (source
4351 (origin
4352 (method url-fetch)
4353 (uri (pypi-uri "tracerite" version))
4354 (sha256
4355 (base32 "07mkg0sl0h335kj6yjvxki2c19gxhb7rkks1zgzh7aj0y83c17qi"))))
4356 (build-system pyproject-build-system)
4357 (arguments
4358 (list #:tests? #f)) ;no tests in PyPI or Git
4359 (native-inputs
4360 (list python-setuptools
4361 python-setuptools-scm))
4362 (propagated-inputs
4363 (list python-html5tagger))
4364 (home-page "https://github.com/sanic-org/tracerite")
4365 (synopsis "Human-readable HTML tracebacks")
4366 (description
4367 "@code{tracerite} converts Python tracebacks into useful error messages
4368in human-readable HTML format.")
4369 (license license:unlicense)))
4370
4371(define-public python-trio-websocket
4372 (package
4373 (name "python-trio-websocket")
4374 (version "0.12.2")
4375 (source
4376 (origin
4377 (method git-fetch)
4378 (uri (git-reference
4379 (url "https://github.com/HyperionGray/trio-websocket")
4380 (commit version)))
4381 (file-name (git-file-name name version))
4382 (sha256
4383 (base32 "1lm712gakpskcn3adna22kj8m1hspz9l68pmlziklr0ycphmyqac"))))
4384 (build-system pyproject-build-system)
4385 (native-inputs
4386 (list python-pytest
4387 python-pytest-trio
4388 python-setuptools
4389 python-trustme))
4390 (propagated-inputs
4391 (list python-outcome
4392 python-trio
4393 python-wsproto))
4394 (home-page "https://github.com/HyperionGray/trio-websocket")
4395 (synopsis "WebSocket library for Trio")
4396 (description "This library implements both server and client aspects of
4397the @url{https://tools.ietf.org/html/rfc6455, the WebSocket protocol},
4398striving for safety, correctness, and ergonomics. It is based on the
4399@url{https://wsproto.readthedocs.io/en/latest/, wsproto project}, which is a
4400@url{https://sans-io.readthedocs.io/, Sans-IO} state machine that implements
4401the majority of the WebSocket protocol, including framing, codecs, and events.
4402This library handles I/O using @url{https://trio.readthedocs.io/en/latest/,
4403the Trio framework}.")
4404 (license license:expat)))
4405
4406(define-public python-txacme
4407 ;; 0.9.3 tag was placed in 2020 and there a lot of changes providing
4408 ;; compatibility wit twisted, use the latest commit from trunk branch.
4409 ;;
4410 ;;See: <https://github.com/twisted/txacme/issues/165>.
4411 (let ((commit "ac18f92f6dde971a6b38f2ecfae44665815db583")
4412 (revision "0"))
4413 (package
4414 (name "python-txacme")
4415 (version (git-version "0.9.3" revision commit))
4416 (source
4417 (origin
4418 (method git-fetch) ;no fresh release in PyPI
4419 (uri (git-reference
4420 (url "https://github.com/twisted/txacme")
4421 (commit commit)))
4422 (file-name (git-file-name name version))
4423 (sha256
4424 (base32 "0mgdfxldv8qflbn75ywslbarnd4i3l7c4krs4aibl2dpryclsjzs"))))
4425 (build-system pyproject-build-system)
4426 (arguments
4427 (list #:test-backend #~'custom
4428 #:test-flags #~(list "-m" "twisted.trial" "txacme")))
4429 (native-inputs
4430 (list python-setuptools))
4431 (propagated-inputs
4432 (list python-acme
4433 python-attrs
4434 python-eliot
4435 python-josepy
4436 python-pem
4437 python-treq
4438 python-twisted
4439 python-txsni))
4440 (home-page "https://github.com/twisted/txacme")
4441 (synopsis "Twisted implexmentation of the ACME protocol")
4442 (description
4443 "ACME is Automatic Certificate Management Environment, a protocol that
4444allows clients and certificate authorities to automate verification and
4445certificate issuance. The ACME protocol is used by the free Let's Encrypt
4446Certificate Authority.
4447
4448txacme is an implementation of the protocol for Twisted, the event-driven
4449networking engine for Python.")
4450 (license license:expat))))
4451
4452(define-public python-txaio
4453 (package
4454 (name "python-txaio")
4455 (version "25.9.2")
4456 (source
4457 (origin
4458 (method url-fetch)
4459 (uri (pypi-uri "txaio" version))
4460 (sha256
4461 (base32 "16ch62yk2gdikkak113h6qw13ns9ksca817hky0vabn0fyh08874"))))
4462 (build-system pyproject-build-system)
4463 (native-inputs
4464 (list python-pytest
4465 python-setuptools))
4466 (home-page "https://github.com/crossbario/txaio")
4467 (synopsis "Compatibility layer between Python asyncio and Twisted")
4468 (description
4469 "Txaio provides a compatibility layer between the Python @code{asyncio}
4470 bsmodule and @code{Twisted}.")
4471 (license license:expat)))
4472
4473;; XXX: Potentially abandonware since 2017, consider to remove when nothing
4474;; depends on it or fails to build.
4475(define-public python-txamqp
4476 (package
4477 (name "python-txamqp")
4478 (version "0.8.2")
4479 (source
4480 (origin
4481 (method url-fetch)
4482 (uri (pypi-uri "txAMQP" version))
4483 (sha256
4484 (base32 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
4485 (build-system pyproject-build-system)
4486 (arguments
4487 (list #:tests? #f)) ;all tests failed
4488 (native-inputs
4489 (list python-setuptools))
4490 (propagated-inputs
4491 (list python-six python-twisted))
4492 (home-page "https://github.com/txamqp/txamqp")
4493 (synopsis "Communicate with AMQP peers and brokers using Twisted")
4494 (description
4495 "This package provides a Python library for communicating with AMQP peers
4496and brokers using the asynchronous networking framework Twisted. It contains
4497all the necessary code to connect, send and receive messages to/from an
4498AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
4499also includes support for using Thrift RPC over AMQP in Twisted
4500applications.")
4501 (license license:asl2.0)))
4502
4503(define-public python-txsni
4504 (package
4505 (name "python-txsni")
4506 (version "0.2.0")
4507 (source
4508 (origin
4509 (method git-fetch)
4510 (uri (git-reference
4511 (url "https://github.com/glyph/txsni")
4512 (commit (string-append "v" version))))
4513 (file-name (git-file-name name version))
4514 (sha256
4515 (base32 "1fl8xi7vl24hwbva5v41l6nsrbkj2l2mlsgcvdjxgph61aznwywq"))))
4516 (build-system pyproject-build-system)
4517 (arguments
4518 (list #:test-backend #~'custom
4519 #:test-flags #~(list "-m" "twisted.trial"
4520 "--temp-directory=/tmp/_trial_temp"
4521 "txsni")))
4522 (native-inputs
4523 (list python-setuptools))
4524 (propagated-inputs
4525 (list python-pyopenssl
4526 python-service-identity
4527 python-twisted))
4528 (home-page "https://github.com/glyph/txsni")
4529 (synopsis "Run TLS servers with Twisted")
4530 (description
4531 "This package provides an easy-to-use SNI endpoint for use with the
4532Twisted web framework.")
4533 (license license:expat)))
4534
4535(define-public python-txtorcon
4536 (package
4537 (name "python-txtorcon")
4538 (version "24.8.0")
4539 (source
4540 (origin
4541 (method url-fetch)
4542 (uri (pypi-uri "txtorcon" version))
4543 (sha256
4544 (base32 "1l4ajw4h7nay4vmllh6cs7zh3hnh8vj4yvgfnq3m734wil9ikzmy"))))
4545 (build-system pyproject-build-system)
4546 (native-inputs
4547 (list python-pytest
4548 python-setuptools
4549 python-wheel))
4550 (inputs
4551 (list lsof))
4552 (propagated-inputs
4553 (list python-automat
4554 python-idna
4555 python-incremental
4556 python-pyopenssl
4557 python-service-identity
4558 python-twisted
4559 python-zope-interface))
4560 (home-page "https://github.com/meejah/txtorcon")
4561 (synopsis "Twisted-based Tor controller client")
4562 (description
4563 "This package provides a Twisted-based Tor controller client,with
4564state-tracking and configuration abstractions.")
4565 (license license:expat)))
4566
4567(define-public python-url-normalize
4568 (package
4569 (name "python-url-normalize")
4570 (version "2.2.1")
4571 (source
4572 (origin
4573 (method git-fetch) ; no tests in PyPI release
4574 (uri (git-reference
4575 (url "https://github.com/niksite/url-normalize")
4576 (commit (string-append "v" version))))
4577 (file-name (git-file-name name version))
4578 (sha256
4579 (base32 "1yhsf4sk6l6nznpnqigisbfz690a4g342dsk2n6dggh7q4l3amk4"))))
4580 (build-system pyproject-build-system)
4581 (arguments
4582 (list
4583 #:test-flags #~(list "--ignore=tests/test_cli.py")))
4584 (native-inputs
4585 (list python-pytest
4586 python-pytest-cov
4587 python-pytest-socket
4588 python-setuptools))
4589 (propagated-inputs
4590 (list python-idna))
4591 (home-page "https://github.com/niksite/url-normalize")
4592 (synopsis "URL normalization for Python")
4593 (description
4594 "This package provides a URI Normalization function with following
4595features:
4596@itemize
4597@item take care of IDN domains
4598@item always provide the URI scheme in lowercase characters
4599@item always provide the host, if any, in lowercase characters
4600@item only perform percent-encoding where it is essential
4601@item always use uppercase A-through-F characters when percent-encoding
4602@item prevent dot-segments appearing in non-relative URI paths
4603@item for schemes that define a default authority, use an empty authority if
4604the default is desired
4605@item for schemes that define an empty path to be equivalent to a path of
4606@code{/}, use @code{/}
4607@item for schemes that define a port, use an empty port if the default is
4608desired
4609@item all portions of the URI must be utf-8 encoded NFC from Unicode strings
4610@end itemize")
4611 (license license:expat)))
4612
4613(define-public python-waitress
4614 (package
4615 (name "python-waitress")
4616 (version "3.0.2")
4617 (source
4618 (origin
4619 (method url-fetch)
4620 (uri (pypi-uri "waitress" version))
4621 (sha256
4622 (base32
4623 "07y3xyx2006f2ni5d55byh3y7w4kcg9xww7vmfjasi0cmzralak8"))))
4624 (build-system pyproject-build-system)
4625 (arguments
4626 ;; https://github.com/Pylons/waitress/issues/443
4627 (list #:test-flags #~(list "-k" "not test_service_port")))
4628 (native-inputs
4629 (list python-pytest
4630 python-pytest-cov
4631 python-setuptools))
4632 (home-page "https://github.com/Pylons/waitress")
4633 (synopsis "Waitress WSGI server")
4634 (description
4635 "Waitress is meant to be a production-quality pure-Python WSGI server
4636with very acceptable performance.")
4637 (license license:zpl2.1)))
4638
4639(define-public python-weasel
4640 (package
4641 (name "python-weasel")
4642 (version "0.4.1")
4643 (source
4644 (origin
4645 (method url-fetch)
4646 (uri (pypi-uri "weasel" version))
4647 (sha256
4648 (base32 "1aas113r29y6yxrmdlsw80rj8w4kgw1jhfjw9rsgc4rf0w7j3g5a"))))
4649 (build-system pyproject-build-system)
4650 (arguments
4651 (list
4652 #:test-flags
4653 ;; Network access is required.
4654 #~(list #$@(map (lambda (test) (string-append "--deselect="
4655 "weasel/tests/cli/"
4656 test))
4657 (list "test_cli.py::test_project_git_dir_asset"
4658 "test_cli.py::test_project_git_file_asset"
4659 "test_cli_app.py::test_project_assets")))))
4660 (native-inputs
4661 (list python-pytest
4662 python-setuptools))
4663 (propagated-inputs
4664 (list python-cloudpathlib
4665 python-confection
4666 python-packaging
4667 python-pydantic
4668 python-requests
4669 python-smart-open
4670 python-srsly
4671 python-typer
4672 python-wasabi))
4673 (home-page "https://github.com/explosion/weasel/")
4674 (synopsis "Small and easy workflow system")
4675 (description
4676 "This package provides a minimalistic workflow system to manage and
4677share end-to-end workflows for different use cases and domains.")
4678 (license license:expat)))
4679
4680(define-public python-webencodings
4681 (package
4682 (name "python-webencodings")
4683 (version "0.5.1")
4684 (source
4685 (origin
4686 (method url-fetch)
4687 (uri (pypi-uri "webencodings" version))
4688 (sha256
4689 (base32 "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
4690 (build-system pyproject-build-system)
4691 (arguments
4692 (list #:test-flags #~(list "webencodings/tests.py")))
4693 (native-inputs
4694 (list python-pytest python-setuptools))
4695 (home-page "https://github.com/SimonSapin/python-webencodings")
4696 (synopsis "Character encoding aliases for legacy web content")
4697 (description
4698 "In order to be compatible with legacy web content when interpreting
4699something like @code{Content-Type: text/html; charset=latin1}, tools need to
4700use a particular set of aliases for encoding labels as well as some overriding
4701rules. For example, @code{US-ASCII} and @code{iso-8859-1} on the web are
4702actually aliases for @code{windows-1252}, and a @code{UTF-8} or @code{UTF-16}
4703BOM takes precedence over any other encoding declaration. The WHATWG
4704@url{https://encoding.spec.whatwg.org/,Encoding} standard defines all such
4705details so that implementations do not have to reverse-engineer each other.
4706
4707This module implements the Encoding standard and has encoding labels and BOM
4708detection, but the actual implementation for encoders and decoders is
4709Python’s.")
4710 (license license:bsd-3)))
4711
4712(define-public python-omnipath
4713 (package
4714 (name "python-omnipath")
4715 (version "1.0.10")
4716 (source
4717 (origin
4718 (method git-fetch)
4719 (uri (git-reference
4720 (url "https://github.com/saezlab/omnipath/")
4721 (commit (string-append "v" version))))
4722 (file-name (git-file-name name version))
4723 (sha256
4724 (base32 "0jnc7nsn6n5hqx5wlk928b7xmg0mpfqy8al9w2p707ihcwh4s1rf"))))
4725 (build-system pyproject-build-system)
4726 (arguments
4727 (list
4728 #:test-flags '(list "-k"
4729 (string-append
4730 ;; These require internet access
4731 "not test_download_homologene"
4732 " and not test_complex_genes"))
4733 #:phases
4734 #~(modify-phases %standard-phases
4735 (add-after 'unpack 'set-home
4736 (lambda _
4737 (setenv "HOME" "/tmp"))))))
4738 (propagated-inputs (list python-attrs
4739 python-docrep
4740 python-inflect
4741 python-networkx
4742 python-packaging
4743 python-pandas
4744 python-requests
4745 python-tqdm
4746 python-typing-extensions
4747 python-urllib3
4748 python-wrapt))
4749 (native-inputs (list nss-certs-for-test
4750 python-bump2version
4751 python-hatchling
4752 python-pytest
4753 python-pytest-mock
4754 python-pytest-socket
4755 python-requests-mock))
4756 (home-page "https://omnipathdb.org/")
4757 (synopsis "Python client for the OmniPath web service")
4758 (description "This package provides a Python client for the OmniPath web
4759service.")
4760 (license license:expat)))
4761
4762(define-public python-openai
4763 (package
4764 (name "python-openai")
4765 (version "1.3.5")
4766 (source (origin
4767 (method git-fetch)
4768 (uri (git-reference
4769 (url "https://github.com/openai/openai-python")
4770 (commit (string-append "v" version))))
4771 (file-name (git-file-name name version))
4772 (sha256
4773 (base32
4774 "0k1rwhj7v22x5bnv9xbk9nj9grxqmmclh9538qqjadgqxfn5x74q"))))
4775 (build-system pyproject-build-system)
4776 (arguments
4777 (list
4778 #:test-flags
4779 ;; These require internet access and an openai API key.
4780 '(list "--ignore=openai/tests/asyncio/test_endpoints.py"
4781 "--ignore=openai/tests/test_endpoints.py"
4782 "--ignore-glob=tests/api_resources/*"
4783 ;; Needs respx
4784 "--ignore=tests/api_resources/audio/test_speech.py"
4785 "--ignore=tests/api_resources/test_files.py"
4786 "--ignore=tests/test_client.py"
4787 "-k" "not test_requestor_cycle_sessions\
4788 and not test_requestor_sets_request_id\
4789 and not test_file_cli\
4790 and not test_basic_async\
4791 and not test_async\
4792 and not test_datetime_with_alias\
4793 and not test_pydantic")
4794 #:phases
4795 '(modify-phases %standard-phases
4796 (add-after 'unpack 'relax-requirements
4797 (lambda _
4798 (substitute* "pyproject.toml"
4799 (("distro>=1.7.0") "distro>=1.6.0")
4800 (("anyio>=3.5.0, <4") "anyio"))))
4801 (add-after 'unpack 'httpx-compatibility
4802 (lambda _
4803 (substitute* "src/openai/_base_client.py"
4804 (("proxies=proxies,") "")
4805 (("self._proxies = proxies") "")
4806 (("proxies: ProxiesTypes . None,") "")))))))
4807 (propagated-inputs
4808 (list python-aiohttp
4809 python-distro
4810 python-httpx
4811 python-pydantic
4812 python-requests
4813 python-tqdm
4814 python-typing-extensions))
4815 (native-inputs (list nss-certs-for-test
4816 python-dirty-equals
4817 python-hatchling
4818 python-pytest python-pytest-asyncio
4819 python-pytest-mock python-setuptools python-wheel))
4820 (home-page "https://github.com/openai/openai-python")
4821 (synopsis "Python client library for the OpenAI API")
4822 (description "This package provides a Python client library for the
4823OpenAI API.")
4824 (license license:expat)))
4825
4826(define-public python-openapi-schema-validator
4827 (package
4828 (name "python-openapi-schema-validator")
4829 (version "0.6.2")
4830 (source
4831 (origin
4832 (method git-fetch) ;no tests in pypi release
4833 (uri (git-reference
4834 (url "https://github.com/p1c2u/openapi-schema-validator")
4835 (commit version)))
4836 (file-name (git-file-name name version))
4837 (sha256
4838 (base32
4839 "0pgsm1x7lhc5ryj4l45ik8m5x9gqyi50dkflaiqqr4fnl0bsbx09"))))
4840 (build-system pyproject-build-system)
4841 (arguments
4842 (list
4843 #:test-flags
4844 ;; This one returns 5 instead of 4 elements
4845 '(list "-k" "not test_array_prefixitems_invalid")
4846 #:phases
4847 #~(modify-phases %standard-phases
4848 (add-after 'unpack 'remove-coverage-pytest-options
4849 (lambda _
4850 (substitute* "pyproject.toml"
4851 (("^--cov.*") ""))))
4852 ;; See https://github.com/python-openapi/openapi-schema-validator/issues/204
4853 (add-after 'unpack 'relax-requirements
4854 (lambda _
4855 (substitute* "pyproject.toml"
4856 (("jsonschema-specifications.*")
4857 "jsonschema-specifications = \">=2023.5.2\"\n")))))))
4858 (native-inputs (list python-poetry-core python-pytest))
4859 (propagated-inputs
4860 (list python-isodate
4861 python-jsonschema
4862 python-rfc3339-validator
4863 python-strict-rfc3339))
4864 (home-page "https://github.com/p1c2u/openapi-schema-validator")
4865 (synopsis "OpenAPI schema validation library for Python")
4866 (description "Openapi-schema-validator is a Python library that validates
4867a schema against:
4868@itemize
4869@item OpenAPI Schema Specification v3.0 which is an extended subset of the
4870JSON Schema Specification Wright Draft 00.
4871@item OpenAPI Schema Specification v3.1 which is an extended superset of the
4872JSON Schema Specification Draft 2020-12.
4873@end itemize")
4874 (license license:bsd-3)))
4875
4876(define-public python-openapi-spec-validator
4877 (package
4878 (name "python-openapi-spec-validator")
4879 (version "0.7.1")
4880 (source
4881 (origin
4882 (method git-fetch) ;no tests in pypi release
4883 (uri (git-reference
4884 (url "https://github.com/p1c2u/openapi-spec-validator")
4885 (commit version)))
4886 (file-name (git-file-name name version))
4887 (sha256
4888 (base32
4889 "0s5yd4dbr6knwd2g1g4v2931k14n1lm80l11n2ija18yfis8yisz"))))
4890 (build-system pyproject-build-system)
4891 (arguments
4892 (list
4893 ;; These tests attempt to fetch resources from the Internet
4894 #:test-flags '(list "--ignore-glob=tests/integration/validation/**"
4895 "-k" "not example")
4896 #:phases
4897 #~(modify-phases %standard-phases
4898 (add-after 'unpack 'remove-coverage-pytest-options
4899 (lambda _
4900 (substitute* "pyproject.toml"
4901 (("^--cov.*") "")))))))
4902 (native-inputs
4903 (list python-poetry-core
4904 python-pytest))
4905 (propagated-inputs
4906 (list python-jsonschema
4907 python-jsonschema-path
4908 python-lazy-object-proxy
4909 python-openapi-schema-validator
4910 python-pyyaml
4911 python-requests
4912 python-setuptools))
4913 (home-page "https://github.com/p1c2u/openapi-spec-validator")
4914 (synopsis "OpenAPI spec validator")
4915 (description "OpenAPI Spec Validator is a Python library that validates an
4916OpenAPI specification against the OpenAPI 2.0 (also known as Swagger), OpenAPI
49173.0 and OpenAPI 3.1 specifications. The validator aims to check for full
4918compliance with the specification.")
4919 (license license:asl2.0)))
4920
4921(define-public python-openapi-core
4922 (package
4923 (name "python-openapi-core")
4924 (version "0.19.4")
4925 (source
4926 (origin
4927 (method git-fetch)
4928 (uri (git-reference
4929 (url "https://github.com/p1c2u/openapi-core")
4930 (commit version)))
4931 (file-name (git-file-name name version))
4932 (sha256
4933 (base32
4934 "092sj2933jmvq5r76khr0vphih490vls1ga3s43gz8i47aqaxx96"))))
4935 (build-system pyproject-build-system)
4936 (arguments
4937 (list
4938 #:test-flags
4939 '(list "tests/unit"
4940 ;; Ignore Pytest configuration in setup.cfg that adds
4941 ;; unwanted flake8 and coverage options.
4942 "-c" "/dev/null"
4943 "-k" "not test_chars_valid")))
4944 (native-inputs (list python-django
4945 python-falcon
4946 python-flask
4947 python-mock
4948 python-poetry-core
4949 python-pytest
4950 python-responses))
4951 (propagated-inputs
4952 (list python-attrs
4953 python-aiohttp
4954 python-isodate
4955 python-jsonschema
4956 python-lazy-object-proxy
4957 python-more-itertools
4958 python-openapi-schema-validator
4959 python-openapi-spec-validator
4960 python-parse
4961 python-six
4962 python-werkzeug))
4963 (home-page "https://github.com/p1c2u/openapi-core")
4964 (synopsis "OpenAPI core library")
4965 (description "Openapi-core is a Python library that adds client-side and
4966server-side support for the OpenAPI Specification v3. It has features such
4967as:
4968@itemize
4969@item Validation of requests and responses
4970@item Schema casting and unmarshalling
4971@item Media type and parameters deserialization
4972@item Security providers (API keys, Cookie, Basic and Bearer HTTP
4973authentications)
4974@item Custom deserializers and formats
4975@item Integration with libraries and frameworks.
4976@end itemize")
4977 (license license:bsd-3)))
4978
4979(define-public python-openid
4980 (package
4981 (name "python-openid")
4982 (version "3.2.0")
4983 (source
4984 (origin
4985 (method url-fetch)
4986 (uri (pypi-uri "python3-openid" version))
4987 (sha256
4988 (base32
4989 "1bxf9a3ny1js422j962zfzl4a9dhj192pvai05whn7j0iy9gdyrk"))))
4990 (build-system pyproject-build-system)
4991 (arguments
4992 `(#:phases
4993 (modify-phases %standard-phases
4994 (replace 'check
4995 (lambda* (#:key tests? #:allow-other-keys)
4996 (when tests?
4997 (invoke "python" "-m" "unittest" "openid.test.test_suite")))))))
4998 (propagated-inputs
4999 (list python-defusedxml))
5000 (native-inputs
5001 (list python-psycopg2 python-django python-setuptools python-wheel))
5002 (home-page "https://github.com/necaris/python3-openid")
5003 (synopsis "OpenID support for servers and consumers")
5004 (description "This library provides OpenID authentication for Python, both
5005for clients and servers.")
5006 (license license:asl2.0)))
5007
5008(define-public python-cssutils
5009 (package
5010 (name "python-cssutils")
5011 (version "2.11.1")
5012 (source
5013 (origin
5014 (method url-fetch)
5015 (uri (pypi-uri "cssutils" version))
5016 (sha256
5017 (base32
5018 "1qpq7xvzqp4cfcb8837rnd30x4hws3rkp33qpvmnxbxn2djsfqq5"))))
5019 (build-system pyproject-build-system)
5020 (arguments
5021 (list
5022 #:phases
5023 #~(modify-phases %standard-phases
5024 (replace 'check
5025 (lambda _
5026 (invoke "pytest" "-vv" "-k"
5027 (string-append "not encutils "
5028 "and not website.logging")))))))
5029 (native-inputs
5030 (list python-cssselect
5031 python-jaraco-test
5032 python-lxml
5033 python-pytest
5034 python-setuptools
5035 python-wheel))
5036 (propagated-inputs
5037 (list python-more-itertools))
5038 (home-page "https://github.com/jaraco/cssutils")
5039 (synopsis
5040 "CSS Cascading Style Sheets library for Python")
5041 (description
5042 "Cssutils is a Python package for parsing and building CSS
5043Cascading Style Sheets. Currently it provides a DOM only and no rendering
5044options.")
5045 (license license:lgpl3+)))
5046
5047(define-public python-css-parser
5048 (package
5049 (inherit python-cssutils)
5050 (name "python-css-parser")
5051 (version "1.0.10")
5052 (source
5053 (origin
5054 (method url-fetch)
5055 (uri (pypi-uri "css-parser" version))
5056 (sha256
5057 (base32 "0qs375slcwqd7slizh6hzkwxx7cdj36v8kwn0qrfji1kscm9f7mz"))))
5058 (home-page "https://github.com/ebook-utils/css-parser")
5059 (synopsis "Fork of cssutils modified for parsing ebooks")
5060 (description
5061 "Css-parser is a Python package for parsing and building CSS
5062Cascading Style Sheets. Currently it provides a DOM only and no rendering
5063options.
5064
5065It's a fork of cssutils 1.0.2, updated and modified for parsing ebooks, due to
5066cssutils not receiving updates as of 1.0.2.")
5067 (license license:lgpl3+)))
5068
5069(define-public python-cssselect
5070 (package
5071 (name "python-cssselect")
5072 (version "1.2.0")
5073 (source (origin
5074 ;; The PyPI release does not contain tests.
5075 (method git-fetch)
5076 (uri (git-reference
5077 (url "https://github.com/scrapy/cssselect")
5078 (commit (string-append "v" version))))
5079 (file-name (git-file-name name version))
5080 (sha256
5081 (base32
5082 "1x4nrvb1p1byi1whmspik7lbh303akdlh762dayfxam3hycsh5kk"))))
5083 (build-system pyproject-build-system)
5084 (native-inputs
5085 (list python-lxml python-pytest python-setuptools python-wheel))
5086 (home-page "https://github.com/scrapy/cssselect")
5087 (synopsis "CSS3 selector parser and translator to XPath 1.0")
5088 (description
5089 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5090them to XPath 1.0 expressions. Such expressions can be used in lxml or
5091another XPath engine to find the matching elements in an XML or HTML document.")
5092 (license license:bsd-3)))
5093
5094(define-public python-databricks-cli
5095 (package
5096 (name "python-databricks-cli")
5097 (version "0.18.0")
5098 (home-page "https://github.com/databricks/databricks-cli")
5099 (source (origin
5100 (method git-fetch)
5101 (uri (git-reference (url home-page) (commit version)))
5102 (file-name (git-file-name name version))
5103 (sha256
5104 (base32
5105 "1avag4kwqk2f24r5i0vcmhm6s1gsw6maykhlyj2ixz0qc05pjzvl"))))
5106 (build-system pyproject-build-system)
5107 (arguments
5108 (list #:phases #~(modify-phases %standard-phases
5109 (replace 'check
5110 (lambda _
5111 (invoke "pytest" "tests" "-vv"))))))
5112 (native-inputs
5113 ;; For tests.
5114 (list python-decorator
5115 python-mock
5116 python-pytest
5117 python-requests-mock
5118 python-setuptools
5119 python-wheel))
5120 (propagated-inputs
5121 (list python-click
5122 python-oauthlib
5123 python-pyjwt
5124 python-requests
5125 python-six
5126 python-tabulate))
5127 (synopsis "Command line interface for Databricks")
5128 (description
5129 "The Databricks Command Line Interface is a tool which provides an easy
5130to use interface to the Databricks platform. The CLI is built on top of the
5131Databricks REST APIs.")
5132 (license license:asl2.0)))
5133
5134(define-public python-openid-cla
5135 ;; XXX: Last updated in 2015.
5136 (package
5137 (name "python-openid-cla")
5138 (version "1.2")
5139 (source
5140 (origin
5141 (method url-fetch)
5142 (uri (pypi-uri "python-openid-cla" version))
5143 (sha256
5144 (base32
5145 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5146 (build-system pyproject-build-system)
5147 (arguments '(#:tests? #f)) ; No tests.
5148 (native-inputs (list python-setuptools python-wheel))
5149 (propagated-inputs (list python-openid python-six))
5150 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5151 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5152 (description "@code{openid-cla} is an implementation of the OpenID
5153contributor license agreement extension for python-openid.")
5154 (license license:bsd-3)))
5155
5156(define-public python-openid-teams
5157 ;; XXX: Last updated in 2018.
5158 (package
5159 (name "python-openid-teams")
5160 (version "1.1")
5161 (source
5162 (origin
5163 (method url-fetch)
5164 (uri (pypi-uri "python-openid-teams" version))
5165 (sha256
5166 (base32
5167 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5168 (build-system pyproject-build-system)
5169 (arguments '(#:tests? #f)) ; No tests.
5170 (native-inputs (list python-setuptools python-wheel))
5171 (propagated-inputs (list python-openid python-six))
5172 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5173 (synopsis "Implementation of the OpenID teams extension for python-openid")
5174 (description
5175 "@code{openid-teams} is an implementation of the OpenID
5176teams extension for python-openid.")
5177 (license license:bsd-3)))
5178
5179(define-public python-priority
5180 (package
5181 (name "python-priority")
5182 (version "2.0.0")
5183 (source
5184 (origin
5185 (method url-fetch)
5186 (uri (pypi-uri "priority" version))
5187 (sha256
5188 (base32 "1h0qpa949bxx7za95v1apwnngkrngi695cwx8wchn3cd3d7xarf9"))))
5189 (build-system pyproject-build-system)
5190 (native-inputs
5191 (list python-pytest python-setuptools python-wheel))
5192 (home-page "https://python-hyper.org/projects/priority/en/latest/")
5193 (synopsis "Pure-Python implementation of the HTTP/2 priority tree")
5194 (description
5195 "Priority is a pure-Python implementation of the priority logic for HTTP/2,
5196set out in RFC 7540 Section 5.3 (Stream Priority).")
5197 (license license:expat)))
5198
5199(define-public python-weblate-language-data
5200 (package
5201 (name "python-weblate-language-data")
5202 (version "2025.8")
5203 (source
5204 (origin
5205 (method url-fetch)
5206 (uri (pypi-uri "weblate_language_data" version))
5207 (sha256
5208 (base32 "0byj1xl6xldam790b6wg62dk1b4i6qdlsp4lqzlv65wnp2klvrkf"))))
5209 (build-system pyproject-build-system)
5210 (arguments (list #:tests? #f)) ;not tests, just data files
5211 (native-inputs
5212 (list python-setuptools))
5213 (propagated-inputs
5214 (list python-translate-toolkit))
5215 (home-page "https://github.com/WeblateOrg/language-data")
5216 (synopsis "Language definitions for Weblate")
5217 (description
5218 "This package provides language definitions used by
5219@url{https://weblate.org/, Weblate}i.")
5220 (license license:expat)))
5221
5222(define-public python-wikidata
5223 (package
5224 (name "python-wikidata")
5225 (version "0.8.1")
5226 (source
5227 (origin
5228 (method git-fetch)
5229 (uri (git-reference
5230 (url "https://github.com/dahlia/wikidata")
5231 (commit version)))
5232 (file-name (git-file-name name version))
5233 (sha256
5234 (base32 "06zg74h249phszn1znfcjdz6c3lz350fiabdzn7iqb2xg4xh69a5"))))
5235 (build-system pyproject-build-system)
5236 (native-inputs
5237 (list python-pytest python-setuptools))
5238 (home-page "https://github.com/dahlia/wikidata")
5239 (synopsis "Wikidata client library")
5240 (description
5241 "This package provides a Python interface to @url{https://www.wikidata.org/,
5242Wikidata}.")
5243 (license license:gpl3+)))
5244
5245(define-public python-wsproto
5246 (package
5247 (name "python-wsproto")
5248 (version "1.2.0")
5249 (source
5250 (origin
5251 (method url-fetch)
5252 (uri (pypi-uri "wsproto" version))
5253 (sha256
5254 (base32 "0rahm1j9danv1l6i6as80acwv16ycihxkhrvwjiqh9drxhk5ymmd"))))
5255 (build-system pyproject-build-system)
5256 (native-inputs
5257 (list python-pytest python-setuptools python-wheel))
5258 (propagated-inputs
5259 (list python-h11))
5260 (home-page "https://github.com/python-hyper/wsproto/")
5261 (synopsis "WebSockets state-machine based protocol implementation")
5262 (description
5263 "@code{wsproto} is a pure-Python implementation of a WebSocket protocol
5264stack. It's written from the ground up to be embeddable in whatever program you
5265choose to use, ensuring that you can communicate via WebSockets, as defined in
5266RFC6455, regardless of your programming paradigm.")
5267 (license license:expat)))
5268
5269(define-public hypercorn
5270 (package
5271 (name "hypercorn")
5272 (version "0.17.3")
5273 (source
5274 (origin
5275 (method git-fetch) ;PyPI does not have tests
5276 (uri (git-reference
5277 (url "https://github.com/pgjones/hypercorn")
5278 (commit version)))
5279 (file-name (git-file-name name version))
5280 (sha256
5281 (base32 "13v6cy4frvnddv9zak06a4lmwxp121hjyfrlapxfmb7m3i8qrm02"))))
5282 (build-system pyproject-build-system)
5283 ;; Propagate because Hypercorn also exposes functionality over a module.
5284 (propagated-inputs (list python-exceptiongroup
5285 python-h11
5286 python-taskgroup
5287 python-h2
5288 python-priority
5289 python-tomli
5290 python-wsproto))
5291 (native-inputs (list nss-certs-for-test
5292 python-httpx
5293 python-poetry-core
5294 python-pytest
5295 python-pytest-asyncio
5296 python-pytest-cov
5297 python-pytest-trio
5298 python-trio))
5299 (home-page "https://gitlab.com/pgjones/hypercorn/")
5300 (synopsis "ASGI Server based on Hyper libraries")
5301 (description
5302 "Hypercorn is an ASGI web server based on the sans-io hyper, h11, h2, and
5303wsproto libraries and inspired by Gunicorn. It supports HTTP/1, HTTP/2,
5304WebSockets (over HTTP/1 and HTTP/2), ASGI/2, and ASGI/3 specifications. It
5305can utilise asyncio, uvloop, or trio worker types.")
5306 (license license:expat)))
5307
5308(define-deprecated-package python-hypercorn
5309 hypercorn)
5310
5311(define-public python-querystring-parser
5312 (package
5313 (name "python-querystring-parser")
5314 (version "1.2.4")
5315 (source
5316 (origin
5317 (method git-fetch)
5318 (uri (git-reference
5319 (url "https://github.com/bernii/querystring-parser")
5320 (commit version)))
5321 (file-name (git-file-name name version))
5322 (sha256
5323 (base32 "15n89bf1x9dgp1vi697pa238nvn0vbqp3ghf0xrcyqqa9gn1l6fb"))))
5324 (build-system pyproject-build-system)
5325 (arguments
5326 (list
5327 #:phases
5328 #~(modify-phases %standard-phases
5329 (replace 'check
5330 (lambda _
5331 ;; XXX FIXME: This test is broken with Python 3.7:
5332 ;; https://github.com/bernii/querystring-parser/issues/35
5333 (substitute* "querystring_parser/tests.py"
5334 (("self\\.assertEqual\\(self\\.knownValuesNormalized, result\\)")
5335 "True"))
5336 (invoke "python" "querystring_parser/tests.py"))))))
5337 (native-inputs (list python-setuptools))
5338 (propagated-inputs (list python-six))
5339 (home-page "https://github.com/bernii/querystring-parser")
5340 (synopsis "QueryString parser that correctly handles nested dictionaries")
5341 (description
5342 "This package provides a query string parser for Python and Django
5343projects that correctly creates nested dictionaries from sent form/querystring
5344data.")
5345 (license license:expat)))
5346
5347(define-public python-tornado
5348 (package
5349 ;; TODO: Try to refresh and check all dependents.
5350 (name "python-tornado")
5351 (version "5.1.1")
5352 (source
5353 (origin
5354 (method url-fetch)
5355 (uri (pypi-uri "tornado" version))
5356 (sha256
5357 (base32
5358 "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
5359 (build-system pyproject-build-system)
5360 (arguments
5361 (list
5362 #:phases
5363 '(modify-phases %standard-phases
5364 (add-after 'unpack 'fix-collections
5365 (lambda _
5366 (substitute* "tornado/httputil.py"
5367 (("collections.MutableMapping")
5368 "collections.abc.MutableMapping"))))
5369 (replace 'check
5370 (lambda* (#:key tests? #:allow-other-keys)
5371 (when tests?
5372 (substitute* "tornado/test/runtests.py"
5373 (("\"error\", category=DeprecationWarning")
5374 "\"ignore\", category=DeprecationWarning")
5375 ;; Disable tests that use SSL.
5376 (("'tornado.test.simple_httpclient_test',") "")
5377 (("'tornado.test.iostream_test',") "")
5378 (("'tornado.test.httpserver_test',") "")
5379 ;; Some timeouts are triggered in these two modules
5380 (("'tornado.test.queues_test',") "")
5381 (("'tornado.test.locks_test',") ""))
5382 ;; Skip all network tests
5383 (setenv "NO_NETWORK" "1")
5384 ;; Skip timing-relevant tests
5385 (setenv "TRAVIS" "1")
5386 (invoke "python" "-m" "tornado.test.runtests"
5387 "--verbose=yes")))))))
5388 (native-inputs
5389 (list python-certifi
5390 python-setuptools))
5391 (home-page "https://www.tornadoweb.org/")
5392 (synopsis "Python web framework and asynchronous networking library")
5393 (description
5394 "Tornado is a Python web framework and asynchronous networking library,
5395originally developed at FriendFeed. By using non-blocking network I/O,
5396Tornado can scale to tens of thousands of open connections, making it ideal
5397for long polling, WebSockets, and other applications that require a long-lived
5398connection to each user.")
5399 (license license:asl2.0)))
5400
5401(define-public python-tornado-6
5402 (package
5403 (name "python-tornado")
5404 (version "6.4.2")
5405 (source
5406 (origin
5407 (method url-fetch)
5408 (uri (pypi-uri "tornado" version))
5409 (sha256
5410 (base32 "02v2mlvr58xg0l0gh08nswl53z73wkf23sziggypk63ffjsdbflj"))))
5411 (build-system pyproject-build-system)
5412 (arguments
5413 (list
5414 #:test-flags
5415 ;; AttributeError: 'TestIOStreamWebMixin' object has no attribute 'io_loop'
5416 #~(list "--ignore=tornado/test/iostream_test.py")))
5417 (native-inputs
5418 (list python-certifi
5419 python-pytest
5420 python-setuptools
5421 python-wheel))
5422 (home-page "https://www.tornadoweb.org/")
5423 (synopsis "Python web framework and asynchronous networking library")
5424 (description
5425 "Tornado is a Python web framework and asynchronous networking library,
5426originally developed at FriendFeed. By using non-blocking network I/O,
5427Tornado can scale to tens of thousands of open connections, making it ideal
5428for long polling, WebSockets, and other applications that require a long-lived
5429connection to each user.")
5430 (license license:asl2.0)))
5431
5432(define-public python-tornado-http-auth
5433 (package
5434 (name "python-tornado-http-auth")
5435 (version "1.1.1")
5436 (source
5437 (origin
5438 (method git-fetch)
5439 (uri (git-reference
5440 (url "https://github.com/gvalkov/tornado-http-auth")
5441 (commit (string-append "v" version))))
5442 (file-name (git-file-name name version))
5443 (sha256
5444 (base32 "1v9sin1zlck9wvkwx0ldqb1b271xlkq63562w8g1yb7v6qka9q4f"))))
5445 (build-system pyproject-build-system)
5446 ;; XXX: This version is incompatible with current tornado.testing.
5447 (arguments (list #:tests? #f))
5448 (native-inputs (list python-setuptools))
5449 (propagated-inputs (list python-tornado))
5450 (home-page "https://github.com/gvalkov/tornado-http-auth")
5451 (synopsis "Digest and basic authentication module for Tornado")
5452 (description
5453 "Provides support for adding authentication to services using the Tornado
5454web framework, either via the basic or digest authentication schemes.")
5455 (license license:asl2.0)))
5456
5457(define-public python-wsgi-intercept
5458 (package
5459 (name "python-wsgi-intercept")
5460 (version "1.13.1")
5461 (source (origin
5462 (method url-fetch)
5463 (uri (pypi-uri "wsgi_intercept" version))
5464 (sha256
5465 (base32
5466 "1h94dj7h7n7zdj3ll4imqjhq5vk21yidk2niwnmpw7xik9inrgbr"))))
5467 (build-system pyproject-build-system)
5468 (arguments
5469 (list
5470 ;; XXX: tests required internet access
5471 #:tests? #f))
5472 (propagated-inputs
5473 (list python-six))
5474 (native-inputs
5475 (list python-httplib2
5476 python-pytest
5477 python-requests
5478 python-setuptools
5479 python-urllib3
5480 python-wheel))
5481 (synopsis "Puts a WSGI application in place of a real URI for testing")
5482 (description "Wsgi_intercept installs a WSGI application in place of a real
5483URI for testing. Testing a WSGI application normally involves starting a
5484server at a local host and port, then pointing your test code to that address.
5485Instead, this library lets you intercept calls to any specific host/port
5486combination and redirect them into a WSGI application importable by your test
5487program. Thus, you can avoid spawning multiple processes or threads to test
5488your Web app.")
5489 (home-page "https://github.com/cdent/wsgi-intercept")
5490 (license license:expat)))
5491
5492(define-public python-webob
5493 (package
5494 (name "python-webob")
5495 (version "1.8.9")
5496 (source
5497 (origin
5498 (method url-fetch)
5499 (uri (pypi-uri "webob" version))
5500 (sha256
5501 (base32
5502 "12b5sl10yzzzz3g11kij3rdzk9y6583ywggc6h9nsxmnxpi7hq5d"))))
5503 (build-system pyproject-build-system)
5504 ;; tests: 2380 passed, 9 skipped, 1 xfailed, 12 warnings
5505 (native-inputs
5506 (list python-pytest
5507 python-setuptools))
5508 (home-page "https://webob.org/")
5509 (synopsis "WSGI request and response object")
5510 (description
5511 "WebOb provides wrappers around the WSGI request environment, and an
5512object to help create WSGI responses.")
5513 (license license:expat)))
5514
5515(define-public python-zc-lockfile
5516 (package
5517 (name "python-zc-lockfile")
5518 (version "4.0")
5519 (source
5520 (origin
5521 (method git-fetch)
5522 (uri (git-reference
5523 (url "https://github.com/zopefoundation/zc.lockfile")
5524 (commit version)))
5525 (file-name (git-file-name name version))
5526 (sha256
5527 (base32 "0b1kkwx2d4wf392sd3bfjvzgkdrknwsxg9mby121mq8zl7c490gg"))))
5528 (build-system pyproject-build-system)
5529 (arguments
5530 (list
5531 #:phases
5532 #~(modify-phases %standard-phases
5533 (replace 'check
5534 (lambda* (#:key tests? #:allow-other-keys)
5535 (if tests?
5536 (invoke "zope-testrunner" "--test-path=src")
5537 (format #t "test suite not run~%")))))))
5538 (native-inputs (list python-zope-testing python-zope-testrunner
5539 python-setuptools))
5540 (home-page "https://github.com/zopefoundation/zc.lockfile")
5541 (synopsis "Interprocess locks using lock files")
5542 (description
5543 "This package provides an implementation of interprocess locks using lock
5544files. These locks can also be used to mediate access to other files.")
5545 (license license:zpl2.1)))
5546
5547(define-public python-zconfig
5548 (package
5549 (name "python-zconfig")
5550 (version "4.0")
5551 (source
5552 (origin
5553 (method git-fetch)
5554 (uri (git-reference
5555 (url "https://github.com/zopefoundation/ZConfig/")
5556 (commit version)))
5557 (file-name (git-file-name name version))
5558 (sha256
5559 (base32 "1x502hyfijh6fc8n85cm046c44spwfmwcn2lnxa1axg8n0n5rsbp"))))
5560 (build-system pyproject-build-system)
5561 (arguments
5562 (list
5563 #:phases
5564 #~(modify-phases %standard-phases
5565 (replace 'check
5566 (lambda* (#:key tests? #:allow-other-keys)
5567 (if tests?
5568 (begin
5569 ;; This test assumes we still have setup.py in the
5570 ;; directory from which we import zconfig, which
5571 ;; does not work after installing the package.
5572 (delete-file-recursively
5573 "src/ZConfig/tests/test_readme.py")
5574 (invoke "zope-testrunner" "-vv" "--test-path=src" "--all"))
5575 (format #t "test suite not run~%")))))))
5576 (native-inputs (list python-docutils python-manuel python-zope-exceptions
5577 python-zope-testrunner python-setuptools))
5578 (home-page "https://github.com/zopefoundation/ZConfig/")
5579 (synopsis "Structured configuration library intended for general use")
5580 (description
5581 "@code{zconfig} is a configuration library intended for general use. It
5582supports a hierarchical schema-driven configuration model that allows a schema
5583to specify data conversion routines written in Python. Its model is very
5584different from the model supported by the @code{configparser} module found in
5585Python's standard library, and is more suitable to configuration-intensive
5586applications.")
5587 (license license:zpl2.1)))
5588
5589(define-public python-zodb
5590 (package
5591 (name "python-zodb")
5592 (version "6.0.1")
5593 (source
5594 (origin
5595 (method url-fetch)
5596 (uri (pypi-uri "zodb" version))
5597 (sha256
5598 (base32 "02cmvf8j2nin5z26wvy2vq2k9mj12hqrr4276lj3w4jj32p0zxw9"))))
5599 (build-system pyproject-build-system)
5600 (arguments
5601 (list
5602 #:phases
5603 #~(modify-phases %standard-phases
5604 (replace 'check
5605 (lambda* (#:key tests? #:allow-other-keys)
5606 (if tests?
5607 (begin
5608 ;; This test does not work after installing the
5609 ;; package, since it expects the ZODB source code
5610 ;; to reside in the src/ directory.
5611 (delete-file-recursively
5612 "src/ZODB/tests/testdocumentation.py")
5613 (invoke "zope-testrunner" "-vv" "--test-path=src"
5614 "--all"))
5615 (format #t "test suite not run~%")))))))
5616 (native-inputs
5617 (list python-manuel
5618 python-wheel
5619 python-zope-testing
5620 python-zope-testrunner))
5621 (propagated-inputs
5622 (list python-btrees
5623 python-persistent
5624 python-transaction
5625 python-zc-lockfile
5626 python-zconfig
5627 python-zodbpickle
5628 python-zope-interface))
5629 (home-page "http://zodb-docs.readthedocs.io")
5630 (synopsis "Object-oriented database for Python")
5631 (description
5632 "@code{ZODB} provides an object-oriented and @acronym{ACID,
5633Atomicity Consistency Isolation Durability} compliant database for Python with
5634a high degree of transparency. @code{ZODB} is an object-oriented database,
5635not an object-relational mapping. This comes with several advantaged:
5636
5637@itemize
5638@item no separate language for database operations
5639@item very little impact on your code to make objects persistent
5640@item no database mapper that partially hides the database.
5641@item almost no seam between code and database.
5642@end itemize")
5643 (license license:zpl2.1)))
5644
5645(define-public python-zodbpickle
5646 (package
5647 (name "python-zodbpickle")
5648 (version "3.2")
5649 (source
5650 (origin
5651 (method url-fetch)
5652 (uri (pypi-uri "zodbpickle" version))
5653 (sha256
5654 (base32 "035bjrksl4h92mvjkx6id4gjcpc1k4mbci8ryjl6l9mki7ihx77b"))))
5655 (build-system pyproject-build-system)
5656 (arguments
5657 '(#:phases (modify-phases %standard-phases
5658 (replace 'check
5659 (lambda* (#:key tests? #:allow-other-keys)
5660 (if tests?
5661 (invoke "zope-testrunner" "-vv" "--test-path=src"
5662 "--all")
5663 (format #t "test suite not run~%")))))))
5664 (native-inputs (list python-zope-testrunner python-setuptools python-wheel))
5665 (home-page "https://github.com/zopefoundation/zodbpickle")
5666 (synopsis "Uniform pickling interface for @code{zodb}")
5667 (description
5668 "This package is a fork of the @code{pickle} module (and the
5669supporting C extension) from both Python 3.2 and Python 3.3. The fork adds
5670support for the @code{noload} operations used by @code{zodb}.")
5671 (license (list license:psfl license:zpl2.1))))
5672
5673(define-public python-zope-dottedname
5674 (package
5675 (name "python-zope-dottedname")
5676 (version "7.0")
5677 (source
5678 (origin
5679 (method git-fetch)
5680 (uri (git-reference
5681 (url "https://github.com/zopefoundation/zope.dottedname")
5682 (commit version)))
5683 (file-name (git-file-name name version))
5684 (sha256
5685 (base32 "0h7a637zsl1a3f0rpb2nw41mzxv0pqyj8ahn6h60n2c1px912rbd"))))
5686 (build-system pyproject-build-system)
5687 (arguments
5688 (list #:test-backend #~'custom
5689 #:test-flags #~(list "src/zope/dottedname/tests.py")))
5690 (native-inputs (list python-setuptools))
5691 (home-page "https://zopedottedname.readthedocs.io")
5692 (synopsis "Resolver for Python dotted names")
5693 (description
5694 "This package provides a @code{resolve()} function that resolves strings
5695containing dotted names into the appropriate Python object.")
5696 (license license:zpl2.1)))
5697
5698(define-public python-zope-event
5699 (package
5700 (name "python-zope-event")
5701 (version "6.0")
5702 (source
5703 (origin
5704 (method git-fetch)
5705 (uri (git-reference
5706 (url "https://github.com/zopefoundation/zope.event")
5707 (commit version)))
5708 (file-name (git-file-name name version))
5709 (sha256
5710 (base32 "0la3q47c59aq50s036q468bhnmzgs71f1cygv89w6qkk1hkn35ym"))))
5711 (build-system pyproject-build-system)
5712 (arguments
5713 (list
5714 #:test-flags
5715 #~(list "src/zope/event/tests.py")))
5716 (native-inputs (list python-pytest python-setuptools))
5717 (home-page "https://zopeevent.readthedocs.io/en/latest/")
5718 (synopsis "Event publishing system for Python")
5719 (description
5720 "Zope.event provides an event publishing API, intended for use by
5721applications which are unaware of any subscribers to their events. It is a
5722simple event-dispatching system on which more sophisticated event dispatching
5723systems can be built.")
5724 (license license:zpl2.1)))
5725
5726(define-public python-zope-interface
5727 (package
5728 (name "python-zope-interface")
5729 (version "7.2")
5730 (source
5731 (origin
5732 (method git-fetch)
5733 (uri (git-reference
5734 (url "https://github.com/zopefoundation/zope.interface")
5735 (commit version)))
5736 (file-name (git-file-name name version))
5737 (sha256
5738 (base32 "01snm1lbqhx3ird4m76nciaqasxvf8dd6817zm35v684g5hbzd2s"))))
5739 (build-system pyproject-build-system)
5740 (arguments
5741 ;; XXX: test suite can't find python-zope-testing
5742 (list #:tests? #f))
5743 (native-inputs (list python-setuptools))
5744 (home-page "https://zopeinterface.readthedocs.io")
5745 (synopsis "\"Design by contract\" methodology in Python")
5746 (description
5747 "Zope.interface provides an implementation of \"object interfaces\" for
5748Python. Interfaces are a mechanism for labeling objects as conforming to a
5749given API or contract.")
5750 (license license:zpl2.1)))
5751
5752(define-public python-zope-exceptions
5753 (package
5754 (name "python-zope-exceptions")
5755 (version "6.0")
5756 (source
5757 (origin
5758 (method git-fetch)
5759 (uri (git-reference
5760 (url "https://github.com/zopefoundation/zope.exceptions")
5761 (commit version)))
5762 (file-name (git-file-name name version))
5763 (sha256
5764 (base32 "0fmsw2j8islaiv6zf2mxh2s43y7virqny6s8gk8v2zkcxpy95cic"))))
5765 (build-system pyproject-build-system)
5766 (arguments
5767 (list
5768 #:phases
5769 #~(modify-phases %standard-phases
5770 (replace 'check
5771 (lambda* (#:key tests? #:allow-other-keys)
5772 (if tests?
5773 (invoke "zope-testrunner" "--test-path=src")
5774 (format #t "test suite not run~%")))))))
5775 (native-inputs (list python-setuptools python-zope-testrunner-bootstrap))
5776 (propagated-inputs (list python-zope-interface))
5777 (home-page "https://github.com/zopefoundation/zope.exceptions")
5778 (synopsis "Zope exceptions")
5779 (description
5780 "Zope.exceptions provides general-purpose exception types that have uses
5781outside of the Zope framework.")
5782 (license license:zpl2.1)))
5783
5784(define (python-zope-bootstrap-package orig)
5785 (package
5786 (inherit orig)
5787 (name (string-append (package-name orig) "-bootstrap"))
5788 (arguments
5789 (if (null? (package-arguments orig))
5790 (list
5791 #:tests? #f
5792 #:phases #~(modify-phases %standard-phases
5793 (delete 'sanity-check)))
5794 (substitute-keyword-arguments (package-arguments orig)
5795 ((#:tests? _ #f) #f)
5796 ((#:phases phases '%standard-phases)
5797 #~(modify-phases #$phases
5798 (delete 'sanity-check))))))
5799 (propagated-inputs `())
5800 (native-inputs (list python-setuptools))
5801 (properties `((hidden? . #t)))))
5802
5803(define-public python-zope-exceptions-bootstrap
5804 (python-zope-bootstrap-package python-zope-exceptions))
5805
5806(define-public python-zope-testing
5807 (package
5808 (name "python-zope-testing")
5809 (version "6.0")
5810 (source
5811 (origin
5812 (method git-fetch)
5813 (uri (git-reference
5814 (url "https://github.com/zopefoundation/zope.testing")
5815 (commit version)))
5816 (file-name (git-file-name name version))
5817 (sha256
5818 (base32 "0zqipsgv7qj7f8hrd3x6xpqwszdiac8vpjdm8ak5kljl5napw7d7"))))
5819 (build-system pyproject-build-system)
5820 (arguments
5821 (list
5822 #:phases
5823 #~(modify-phases %standard-phases
5824 (replace 'check
5825 (lambda* (#:key tests? #:allow-other-keys)
5826 (if tests?
5827 (invoke "zope-testrunner" "--test-path=src")
5828 (format #t "test suite not run~%")))))))
5829 (native-inputs (list python-setuptools
5830 python-zope-interface
5831 python-zope-testrunner-bootstrap))
5832 (home-page "https://zopetesting.readthedocs.io/")
5833 (synopsis "Zope testing helpers")
5834 (description
5835 "Zope.testing provides a number of testing utilities for HTML forms, HTTP
5836servers, regular expressions, and more.")
5837 (license license:zpl2.1)))
5838
5839(define-public python-zope-testrunner
5840 (package
5841 (name "python-zope-testrunner")
5842 (version "7.4")
5843 (source
5844 (origin
5845 (method git-fetch)
5846 (uri (git-reference
5847 (url "https://github.com/zopefoundation/zope.testrunner")
5848 (commit version)))
5849 (file-name (git-file-name name version))
5850 (sha256
5851 (base32 "0gd5rnzw6vzbx766jxqr4zc6qx7gk75r2c0nqqvhkb12hzk5ca2g"))))
5852 (build-system pyproject-build-system)
5853 (arguments
5854 (list
5855 #:phases
5856 #~(modify-phases %standard-phases
5857 (add-after 'unpack 'remove-problematic-test
5858 (lambda _
5859 ;; This test contains invalid syntax, which breaks bytecode
5860 ;; compilation. For simplicity just remove it.
5861 (delete-file
5862 "src/zope/testrunner/tests/testrunner-ex/sample2/badsyntax.py")))
5863 (replace 'check
5864 (lambda* (#:key tests? #:allow-other-keys)
5865 (if tests?
5866 (invoke "zope-testrunner" "--test-path=src")
5867 (format #t "test suite not run~%")))))))
5868 (native-inputs (list python-setuptools python-zope-testing))
5869 (propagated-inputs (list python-zope-exceptions python-zope-interface))
5870 (home-page "https://zopetestrunner.readthedocs.io")
5871 (synopsis "Zope testrunner script")
5872 (description "This package provides a script for running Python tests.")
5873 (license license:zpl2.1)))
5874
5875(define-public python-zope-testrunner-bootstrap
5876 (package
5877 (inherit (python-zope-bootstrap-package python-zope-testrunner))
5878 (propagated-inputs
5879 (list python-six python-zope-exceptions-bootstrap))
5880 (properties `((hidden? . #t)))))
5881
5882(define-public python-zope-i18nmessageid
5883 (package
5884 (name "python-zope-i18nmessageid")
5885 (version "7.0")
5886 (source
5887 (origin
5888 (method git-fetch)
5889 (uri (git-reference
5890 (url "https://github.com/zopefoundation/zope.i18nmessageid")
5891 (commit version)))
5892 (file-name (git-file-name name version))
5893 (sha256
5894 (base32 "192ixj8r9n467avbxrmhakmqiaflc1vw37k08z096ajcjgbfrm5d"))))
5895 (build-system pyproject-build-system)
5896 (arguments
5897 (list
5898 #:phases
5899 #~(modify-phases %standard-phases
5900 (replace 'check
5901 (lambda* (#:key tests? #:allow-other-keys)
5902 (if tests?
5903 (invoke "zope-testrunner" "--test-path=src")
5904 (format #t "test suite not run~%")))))))
5905 (native-inputs (list python-setuptools python-zope-testrunner))
5906 (home-page "https://zopei18nmessageid.readthedocs.io")
5907 (synopsis "Message identifiers for internationalization")
5908 (description "Zope.i18nmessageid provides facilities for declaring
5909internationalized messages within program source text.")
5910 (license license:zpl2.1)))
5911
5912(define-public python-zope-schema
5913 (package
5914 (name "python-zope-schema")
5915 (version "7.0.1")
5916 (source
5917 (origin
5918 (method git-fetch)
5919 (uri (git-reference
5920 (url "https://github.com/zopefoundation/zope.schema")
5921 (commit version)))
5922 (file-name (git-file-name name version))
5923 (sha256
5924 (base32 "1hj6j0gqgvv9a5pyaz54wbn8n7wf9lyg4njb2cfs980z0d5faj39"))))
5925 (build-system pyproject-build-system)
5926 (arguments
5927 (list
5928 #:phases
5929 #~(modify-phases %standard-phases
5930 (replace 'check
5931 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5932 (add-installed-pythonpath inputs outputs)
5933 (if tests?
5934 (invoke "zope-testrunner" "--test-path=src")
5935 (format #t "test suite not run.~%")))))))
5936 (propagated-inputs (list python-zope-event python-zope-interface))
5937 (native-inputs (list python-zope-i18nmessageid python-zope-testing
5938 python-zope-testrunner python-setuptools))
5939 (home-page "https://zopeschema.readthedocs.io")
5940 (synopsis "Zope data schemas")
5941 (description "Zope.scheme provides extensions to zope.interface for
5942defining data schemas.")
5943 (license license:zpl2.1)))
5944
5945(define-public python-zope-sqlalchemy
5946 (package
5947 (name "python-zope-sqlalchemy")
5948 (version "1.6")
5949 (source
5950 (origin
5951 (method git-fetch)
5952 (uri (git-reference
5953 (url "https://github.com/zopefoundation/zope.sqlalchemy")
5954 (commit version)))
5955 (file-name (git-file-name name version))
5956 (sha256
5957 (base32 "1z4gw4i95dyqxsvrahk4fav008045n8kyxpn3fa887snmpvcjhng"))))
5958 (build-system pyproject-build-system)
5959 (arguments
5960 (list
5961 #:phases
5962 #~(modify-phases %standard-phases
5963 (replace 'check
5964 (lambda* (#:key tests? #:allow-other-keys)
5965 (if tests?
5966 (invoke "zope-testrunner" "--test-path=src")
5967 (format #t "test suite not run~%")))))))
5968 (propagated-inputs (list python-sqlalchemy python-transaction
5969 python-zope-interface))
5970 (native-inputs (list python-zope-testing python-zope-testrunner
5971 python-setuptools))
5972 (home-page "https://github.com/zopefoundation/zope.sqlalchemy")
5973 (synopsis "Minimal SQLAlchemy transaction integration for Zope")
5974 (description
5975 "The aim of this package is to unify the plethora of existing packages
5976integrating SQLAlchemy with Zope's transaction management. As such,it only
5977provides a data manager and makes no attempt to define a @i{zopeish} way to
5978configure engines.")
5979 (license license:zpl2.1)))
5980
5981(define-public python-zope-configuration
5982 (package
5983 (name "python-zope-configuration")
5984 (version "7.0")
5985 (source
5986 (origin
5987 (method git-fetch)
5988 (uri (git-reference
5989 (url "https://github.com/zopefoundation/zope.configuration")
5990 (commit version)))
5991 (file-name (git-file-name name version))
5992 (sha256
5993 (base32 "11lr6z3jpz9835a1if89g3x7k31sviq2d0xvvic5xi4c980dbkhv"))))
5994 (build-system pyproject-build-system)
5995 (arguments
5996 (list
5997 #:phases
5998 #~(modify-phases %standard-phases
5999 (replace 'check
6000 (lambda* (#:key tests? #:allow-other-keys)
6001 (if tests?
6002 (invoke "zope-testrunner" "--test-path=src")
6003 (format #t "test suite not run~%")))))))
6004 (native-inputs (list python-manuel python-setuptools python-zope-testing
6005 python-zope-testrunner))
6006 (propagated-inputs (list python-zope-i18nmessageid python-zope-interface
6007 python-zope-schema))
6008 (home-page "https://zopeconfiguration.readthedocs.io")
6009 (synopsis "Zope Configuration Markup Language")
6010 (description "Zope.configuration implements ZCML, the Zope Configuration
6011Markup Language.")
6012 (license license:zpl2.1)))
6013
6014(define-public python-zope-configuration-bootstrap
6015 (python-zope-bootstrap-package python-zope-configuration))
6016
6017(define-public python-zope-copy
6018 (package
6019 (name "python-zope-copy")
6020 (version "6.0")
6021 (source
6022 (origin
6023 (method git-fetch)
6024 (uri (git-reference
6025 (url "https://github.com/zopefoundation/zope.copy")
6026 (commit version)))
6027 (file-name (git-file-name name version))
6028 (sha256
6029 (base32 "1ym82p9scpfi3rflxnlv55v0a7hra3rq4rrlw759maq05i8qp1w5"))))
6030 (build-system pyproject-build-system)
6031 (arguments
6032 (list
6033 #:phases
6034 #~(modify-phases %standard-phases
6035 (replace 'check
6036 (lambda* (#:key tests? #:allow-other-keys)
6037 (if tests?
6038 (invoke "zope-testrunner" "--test-path=src")
6039 (format #t "test suite not run~%")))))))
6040 (propagated-inputs (list python-zope-interface))
6041 (native-inputs
6042 (list python-zodbpickle
6043 python-zope-component-bootstrap
6044 python-zope-location-bootstrap
6045 python-zope-proxy
6046 python-zope-schema
6047 python-zope-testing
6048 python-zope-testrunner
6049 python-setuptools))
6050 (home-page "https://zopecopy.readthedocs.io")
6051 (synopsis "Pluggable object copying mechanism")
6052 (description
6053 "This package provides a pluggable mechanism for copying persistent objects.")
6054 (license license:zpl2.1)))
6055
6056(define-public python-zope-proxy
6057 (package
6058 (name "python-zope-proxy")
6059 (version "7.0")
6060 (source
6061 (origin
6062 (method git-fetch)
6063 (uri (git-reference
6064 (url "https://github.com/zopefoundation/zope.proxy")
6065 (commit version)))
6066 (file-name (git-file-name name version))
6067 (sha256
6068 (base32 "00r9f4n0cl3fyc5gyf5l43zh95cmzx1gz6wr04k17d7wm2gmivyn"))))
6069 (build-system pyproject-build-system)
6070 (arguments
6071 (list
6072 #:phases
6073 #~(modify-phases %standard-phases
6074 (replace 'check
6075 (lambda* (#:key tests? #:allow-other-keys)
6076 (if tests?
6077 (invoke "zope-testrunner" "--test-path=src")
6078 (format #t "test suite not run~%")))))))
6079 (native-inputs
6080 (list python-zope-location-bootstrap
6081 python-zope-security-bootstrap
6082 python-zope-testrunner
6083 python-setuptools))
6084 (propagated-inputs (list python-zope-interface))
6085 (home-page "https://zopeproxy.readthedocs.io")
6086 (synopsis "Generic, transparent proxies")
6087 (description
6088 "Zope.proxy provides generic, transparent proxies for Python. Proxies are
6089special objects which serve as mostly-transparent wrappers around another
6090object, intervening in the apparent behavior of the wrapped object only when
6091necessary to apply the policy (e.g., access checking, location brokering,
6092etc.) for which the proxy is responsible.")
6093 (license license:zpl2.1)))
6094
6095(define-public python-zope-proxy-bootstrap
6096 (python-zope-bootstrap-package python-zope-proxy))
6097
6098(define-public python-zope-hookable
6099 (package
6100 (name "python-zope-hookable")
6101 (version "7.0")
6102 (source
6103 (origin
6104 (method git-fetch)
6105 (uri (git-reference
6106 (url "https://github.com/zopefoundation/zope.hookable")
6107 (commit version)))
6108 (file-name (git-file-name name version))
6109 (sha256
6110 (base32 "1l94xzzpyslpgv2ghvl5qzpfcsq02kp04fmvl95d6jcmivmmr4m8"))))
6111 (build-system pyproject-build-system)
6112 (arguments
6113 (list
6114 #:phases
6115 #~(modify-phases %standard-phases
6116 (replace 'check
6117 (lambda* (#:key tests? #:allow-other-keys)
6118 (if tests?
6119 (invoke "zope-testrunner" "--test-path=src")
6120 (format #t "test suite not run~%")))))))
6121 (native-inputs (list python-zope-testing python-zope-testrunner
6122 python-setuptools))
6123 (home-page "https://zopehookable.readthedocs.io")
6124 (synopsis "Zope hookable")
6125 (description
6126 "This package supports the efficient creation of hookable objects, which
6127are callable objects that are meant to be optionally replaced. The idea is
6128that you create a function that does some default thing and make i hookable.
6129Later, someone can modify what it does by calling its sethook method and
6130changing its implementation. All users of the function, including those that
6131imported it, will see the change.")
6132 (license license:zpl2.1)))
6133
6134(define-public python-zope-location
6135 (package
6136 (name "python-zope-location")
6137 (version "6.0")
6138 (source
6139 (origin
6140 (method git-fetch)
6141 (uri (git-reference
6142 (url "https://github.com/zopefoundation/zope.location")
6143 (commit version)))
6144 (file-name (git-file-name name version))
6145 (sha256
6146 (base32 "1jfsmbxj6hz7kmk5b0351b63ssm7qfkgqmz9v7xb7wwlmxsxkcdk"))))
6147 (build-system pyproject-build-system)
6148 (arguments
6149 (list
6150 #:phases
6151 #~(modify-phases %standard-phases
6152 (replace 'check
6153 (lambda* (#:key tests? #:allow-other-keys)
6154 (if tests?
6155 (invoke "zope-testrunner" "--test-path=src")
6156 (format #t "test suite not run~%")))))))
6157 (native-inputs (list python-zope-testrunner python-setuptools))
6158 (propagated-inputs (list python-zope-interface python-zope-proxy
6159 python-zope-schema))
6160 (home-page "https://zopelocation.readthedocs.io")
6161 (synopsis "Zope location library")
6162 (description
6163 "Zope.location implements the concept of \"locations\" in Zope3, which
6164are are special objects that have a structural location.")
6165 (license license:zpl2.1)))
6166
6167(define-public python-zope-location-bootstrap
6168 (python-zope-bootstrap-package python-zope-location))
6169
6170(define-public python-zope-security
6171 (package
6172 (name "python-zope-security")
6173 (version "7.3")
6174 (source
6175 (origin
6176 (method git-fetch)
6177 (uri (git-reference
6178 (url "https://github.com/zopefoundation/zope.security")
6179 (commit version)))
6180 (file-name (git-file-name name version))
6181 (sha256
6182 (base32 "06x6qcls2mdl05xnsyy5h70mbgij8xb6ksxbawzrc23cq04nkvx7"))))
6183 (build-system pyproject-build-system)
6184 (arguments
6185 (list
6186 #:phases
6187 #~(modify-phases %standard-phases
6188 (replace 'check
6189 (lambda* (#:key tests? #:allow-other-keys)
6190 (if tests?
6191 (invoke "zope-testrunner" "--test-path=src")
6192 (format #t "test suite not run~%")))))))
6193 (propagated-inputs
6194 (list python-zope-component
6195 python-zope-i18nmessageid
6196 python-zope-interface
6197 python-zope-location
6198 python-zope-proxy
6199 python-zope-schema))
6200 (native-inputs
6201 (list python-btrees
6202 python-zope-component-bootstrap
6203 python-zope-configuration-bootstrap
6204 python-zope-location-bootstrap
6205 python-zope-testing
6206 python-zope-testrunner
6207 python-setuptools))
6208 (home-page "https://zopesecurity.readthedocs.io")
6209 (synopsis "Zope security framework")
6210 (description "Zope.security provides a generic mechanism to implement
6211security policies on Python objects.")
6212 (license license:zpl2.1)))
6213
6214(define-public python-zope-security-bootstrap
6215 (package
6216 (inherit (python-zope-bootstrap-package python-zope-security))
6217 (propagated-inputs
6218 (list python-zope-i18nmessageid
6219 python-zope-interface
6220 python-zope-proxy-bootstrap
6221 python-zope-schema))))
6222
6223(define-public python-zope-component
6224 (package
6225 (name "python-zope-component")
6226 (version "7.0")
6227 (source
6228 (origin
6229 (method git-fetch)
6230 (uri (git-reference
6231 (url "https://github.com/zopefoundation/zope.component")
6232 (commit version)))
6233 (file-name (git-file-name name version))
6234 (sha256
6235 (base32 "1jygzhcg9rppsrd8cwvm0944naq1ldjf0vcpgsz0glwcdnr7cyfw"))))
6236 (build-system pyproject-build-system)
6237 (arguments
6238 (list
6239 #:phases
6240 #~(modify-phases %standard-phases
6241 (replace 'check
6242 (lambda* (#:key tests? #:allow-other-keys)
6243 (if tests?
6244 (invoke "zope-testrunner" "--test-path=src")
6245 (format #t "test suite not run~%")))))))
6246 (native-inputs
6247 (list python-persistent
6248 python-zope-configuration-bootstrap
6249 python-zope-i18nmessageid
6250 python-zope-location-bootstrap
6251 python-zope-proxy-bootstrap
6252 python-zope-security-bootstrap
6253 python-zope-testing
6254 python-zope-testrunner
6255 python-setuptools))
6256 (propagated-inputs
6257 (list python-zope-deferredimport python-zope-deprecation
6258 python-zope-event python-zope-hookable python-zope-interface))
6259 (home-page "https://zopecomponent.readthedocs.io")
6260 (synopsis "Zope Component Architecture")
6261 (description
6262 "Zope.component represents the core of the Zope Component Architecture.
6263Together with the zope.interface package, it provides facilities for defining,
6264registering and looking up components.")
6265 (license license:zpl2.1)))
6266
6267(define-public python-zope-component-bootstrap
6268 (python-zope-bootstrap-package python-zope-component))
6269
6270(define-public python-zope-deferredimport
6271 (package
6272 (name "python-zope-deferredimport")
6273 (version "6.0")
6274 (source
6275 (origin
6276 (method git-fetch)
6277 (uri (git-reference
6278 (url "https://github.com/zopefoundation/zope.deferredimport")
6279 (commit version)))
6280 (file-name (git-file-name name version))
6281 (sha256
6282 (base32 "08j728nn1la570nny1xz1xvxcm9hf2mcc3im1bzcxxrrxh4kw3zd"))))
6283 (build-system pyproject-build-system)
6284 (arguments
6285 (list
6286 #:phases
6287 #~(modify-phases %standard-phases
6288 (replace 'check
6289 (lambda* (#:key tests? #:allow-other-keys)
6290 (if tests?
6291 (invoke "zope-testrunner" "--test-path=src")
6292 (format #t "test suite not run~%")))))))
6293 (propagated-inputs (list python-zope-proxy))
6294 (native-inputs (list python-zope-testrunner python-setuptools))
6295 (home-page "https://zopedeferredimport.readthedocs.io")
6296 (synopsis "Defer imports until used by code")
6297 (description
6298 "Often, especially for package modules, you want to import names for
6299convenience, but not actually perform the imports until necessary. The
6300@code{zope.deferredimport} package provided facilities for defining names in
6301modules that will be imported from somewhere else when used. You can also cause
6302deprecation warnings to be issued when a variable is used.")
6303 (license license:zpl2.1)))
6304
6305(define-public python-ndg-httpsclient
6306 (package
6307 (name "python-ndg-httpsclient")
6308 (version "0.5.1")
6309 (source
6310 (origin
6311 (method git-fetch)
6312 (uri (git-reference
6313 (url "https://github.com/cedadev/ndg_httpsclient/")
6314 (commit version)))
6315 (file-name (git-file-name name version))
6316 (sha256
6317 (base32 "0lhsgs4am4xyjssng5p0vkfwqncczj1dpa0vss4lrhzq86mnn5rz"))))
6318 (build-system pyproject-build-system)
6319 (arguments
6320 (list
6321 #:tests? #f)) ;Tests appear to require networking.
6322 (native-inputs (list python-setuptools))
6323 (propagated-inputs (list python-pyasn1 python-pyopenssl))
6324 (synopsis "HTTPS support for Python's httplib and urllib2")
6325 (description
6326 "This is a HTTPS client implementation for httplib and urllib2 based on
6327PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation over
6328the default provided with Python and, importantly, enables full verification
6329of the SSL peer.")
6330 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6331 (license license:bsd-3)))
6332
6333(define-public python-netaddr
6334 (package
6335 (name "python-netaddr")
6336 (version "1.3.0")
6337 (source
6338 (origin
6339 (method url-fetch)
6340 (uri (pypi-uri "netaddr" version))
6341 (sha256
6342 (base32 "12p4ysgawhgkka0sz1dkwgwc2za80dxdp9wvfxivfldmjnc3sg2w"))))
6343 (build-system pyproject-build-system)
6344 (native-inputs (list python-poetry-core
6345 python-pytest
6346 python-setuptools
6347 python-wheel))
6348 (home-page "https://netaddr.readthedocs.io")
6349 (synopsis "Pythonic manipulation of network addresses")
6350 (description
6351 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6352and MAC network addresses.")
6353 (license license:bsd-3)))
6354
6355(define-public python-nh3
6356 (package
6357 (name "python-nh3")
6358 (version "0.2.20")
6359 (source
6360 (origin
6361 (method url-fetch)
6362 (uri (pypi-uri "nh3" version))
6363 (sha256
6364 (base32 "1mcf3y5294glji9lhzh57wymw4srbvzdg0kcakm0p2pqgwnw81cp"))))
6365 (build-system pyproject-build-system)
6366 (arguments
6367 (list
6368 #:imported-modules `(,@%cargo-build-system-modules
6369 ,@%pyproject-build-system-modules)
6370 #:modules '(((guix build cargo-build-system) #:prefix cargo:)
6371 (guix build pyproject-build-system)
6372 (guix build utils))
6373 #:phases
6374 #~(modify-phases %standard-phases
6375 (add-after 'unpack 'prepare-cargo-build-system
6376 (lambda args
6377 (for-each
6378 (lambda (phase)
6379 (format #t "Running cargo phase: ~a~%" phase)
6380 (apply (assoc-ref cargo:%standard-phases phase)
6381 #:cargo-target #$(cargo-triplet)
6382 args))
6383 '(unpack-rust-crates
6384 configure
6385 check-for-pregenerated-files
6386 patch-cargo-checksums)))))))
6387 (native-inputs
6388 (append
6389 (list maturin python-pytest rust `(,rust "cargo"))
6390 (or (and=> (%current-target-system)
6391 (compose list make-rust-sysroot))
6392 '())))
6393 (inputs (cargo-inputs 'python-nh3))
6394 (home-page "https://nh3.readthedocs.io")
6395 (synopsis "Python bindings to Ammonia HTML sanitization library")
6396 (description "This package provides Python bindings to Ammonia HTML
6397sanitizer Rust crate.")
6398 (license license:expat)))
6399
6400(define-public python-noiseprotocol
6401 (package
6402 (name "python-noiseprotocol")
6403 (version "0.3.1")
6404 (source
6405 (origin
6406 (method git-fetch)
6407 (uri (git-reference
6408 (url "https://github.com/plizonczyk/noiseprotocol")
6409 (commit (string-append "v" version))))
6410 (file-name (git-file-name name version))
6411 (sha256
6412 (base32 "1mk0rqpjifdv3v1cjwkdnjbrfmzzjm9f3qqs1r8vii4j2wvhm6am"))))
6413 (build-system pyproject-build-system)
6414 (propagated-inputs (list python-cryptography))
6415 (native-inputs (list python-setuptools python-pytest))
6416 (home-page "https://github.com/plizonczyk/noiseprotocol")
6417 (synopsis "Implementation of Noise Protocol Framework")
6418 (description
6419 "This package provides an implementation of Noise Protocol Framework.")
6420 (license license:expat)))
6421
6422(define-public python-webrtcvad-wheels
6423 (package
6424 (name "python-webrtcvad-wheels")
6425 (version "2.0.14")
6426 (source
6427 (origin
6428 (method git-fetch)
6429 (uri (git-reference
6430 (url "https://github.com/daanzu/py-webrtcvad-wheels")
6431 (commit (string-append "v" version))))
6432 (file-name (git-file-name name version))
6433 (sha256
6434 (base32 "0sqgg8jmg2j14f4h96h0rs42kr460v65lhanps6lhdvj5zp81cbh"))))
6435 (build-system pyproject-build-system)
6436 (native-inputs (list python-psutil python-pytest python-setuptools))
6437 (home-page "https://github.com/daanzu/py-webrtcvad-wheels")
6438 (synopsis "Python interface to the WebRTC Voice Activity Detector (VAD)")
6439 (description
6440 "This package provides a Python interface to the Google
6441@url{https://webrtc.org/, WebRTC} @acronym{VAD, Voice Activity Detector}.")
6442 (license license:expat)))
6443
6444(define-public python-websocket-client
6445 (package
6446 (name "python-websocket-client")
6447 (version "1.8.0")
6448 (source
6449 (origin
6450 (method url-fetch)
6451 (uri (pypi-uri "websocket_client" version))
6452 (sha256
6453 (base32 "1nn3qi5g59j55wfy2z02j6lq2cm281fq0wi406b2yqys8jgxyf9j"))))
6454 (build-system pyproject-build-system)
6455 (arguments
6456 (list
6457 #:test-flags
6458 ;; This test requires networking.
6459 '(list "-k" "not testConnect")))
6460 (native-inputs
6461 (list python-pysocks
6462 python-pytest
6463 python-setuptools
6464 python-websockets
6465 python-wheel))
6466 (home-page "https://github.com/websocket-client/websocket-client")
6467 (synopsis "WebSocket client for Python")
6468 (description "The Websocket-client module provides the low level APIs for
6469WebSocket usage in Python programs.")
6470 (license license:lgpl2.1+)))
6471
6472(define-public python-websocket-client-0.59
6473 (package
6474 (inherit python-websocket-client)
6475 (version "0.59.0")
6476 (source
6477 (origin
6478 (method url-fetch)
6479 (uri (pypi-uri "websocket-client" version))
6480 (sha256
6481 (base32 "0p0cz2mdissq7iw1n7jrmsfir0jfmgs1dvnpnrx477ffx9hbsxnk"))))
6482 (native-inputs
6483 (modify-inputs (package-native-inputs python-websocket-client)
6484 (append python-six)))))
6485
6486(define-public python-purl
6487 (package
6488 (name "python-purl")
6489 (version "1.6")
6490 (source
6491 (origin
6492 (method git-fetch)
6493 (uri (git-reference
6494 (url "https://github.com/codeinthehole/purl")
6495 (commit version)))
6496 (file-name (git-file-name name version))
6497 (sha256
6498 (base32 "01zngf0s0qfsrsk0skn57frbzyscwv8467pfjk6hxdfgdx2wkg95"))))
6499 (build-system pyproject-build-system)
6500 (arguments
6501 (list
6502 #:test-flags #~(list "--pyargs" "./tests")))
6503 (native-inputs (list python-pytest python-setuptools))
6504 (propagated-inputs (list python-six))
6505 (home-page "https://github.com/codeinthehole/purl")
6506 (synopsis "Python package for URL manipulation")
6507 (description "Purl is a Python package for handling URLs.")
6508 (license license:expat)))
6509
6510(define-public python-apiron
6511 (package
6512 (name "python-apiron")
6513 (version "5.1.0")
6514 (source
6515 (origin
6516 (method url-fetch)
6517 (uri (pypi-uri "apiron" version))
6518 (sha256
6519 (base32 "1qwbqn47sf0aqznj1snbv37v8ijx476qqkjf5l9pac7xjkxsr8qk"))))
6520 (build-system pyproject-build-system)
6521 (arguments
6522 (list #:test-flags '(list "-k" "not test_call")))
6523 (propagated-inputs
6524 (list python-requests))
6525 (native-inputs
6526 (list python-pytest python-pytest-cov
6527 python-setuptools python-wheel))
6528 (home-page "https://github.com/ithaka/apiron")
6529 (synopsis "Python wrapper for interacting with RESTful APIs")
6530 (description
6531 "@code{apiron} provides a declarative, structured configuration of
6532services and endpoints with a unified interface for interacting with RESTful
6533APIs.")
6534 (license license:expat)))
6535
6536(define-public python-beren
6537 (package
6538 (name "python-beren")
6539 (version "0.7.0")
6540 (source
6541 (origin
6542 (method git-fetch)
6543 (uri (git-reference
6544 (url "https://github.com/teffalump/beren")
6545 (commit (string-append "v" version))))
6546 (file-name (git-file-name name version))
6547 (sha256
6548 (base32 "19nnvbjx2wypslqklqi0j9fiwypk1a5qwfw1jcabjw03awm1yyrx"))))
6549 (build-system pyproject-build-system)
6550 (arguments
6551 ;; The test tries to open a connection to a remote server.
6552 `(#:tests? #f))
6553 (native-inputs (list python-setuptools))
6554 (propagated-inputs (list python-apiron))
6555 (home-page "https://github.com/teffalump/beren")
6556 (synopsis "REST client for Orthanc DICOM servers")
6557 (description
6558 "@code{beren} provides a REST client for Orthanc, a DICOM server.")
6559 (license license:gpl3+)))
6560
6561(define-public python-requests
6562 (package
6563 (name "python-requests")
6564 (version "2.32.5")
6565 (source (origin
6566 (method url-fetch)
6567 (uri (pypi-uri "requests" version))
6568 (sha256
6569 (base32
6570 "1kypqz701x9s7j4shm1pdnzy4pzx9lmvhwgan0yqa071asn0pfnv"))))
6571 (build-system pyproject-build-system)
6572 (arguments
6573 (list #:test-flags
6574 ;; These require internet access
6575 '(list "--ignore=tests/test_requests.py"
6576 "-k" (string-append "not test_use_proxy_from_environment"
6577 " and not requests.sessions.Session"
6578 " and not requests.models.PreparedRequest"
6579 " and not requests.api.request")
6580 "tests/")))
6581 (propagated-inputs
6582 (list python-certifi
6583 python-charset-normalizer
6584 python-idna
6585 python-urllib3))
6586 (native-inputs
6587 (list python-pytest
6588 python-pytest-mock
6589 python-setuptools))
6590 (home-page "https://requests.readthedocs.io/")
6591 (synopsis "Python HTTP library")
6592 (description
6593 "Requests is a Python HTTP client library. It aims to be easier to use
6594than Python’s urllib2 library.")
6595 (license license:asl2.0)))
6596
6597(define-deprecated/public-alias python-requests-next
6598 python-requests) ;may be removed after 2025-12-01
6599
6600(define-public python-requests-kerberos
6601 (package
6602 (name "python-requests-kerberos")
6603 (version "0.14.0")
6604 ;; No tests in the PyPI tarball.
6605 (source
6606 (origin
6607 (method git-fetch)
6608 (uri (git-reference
6609 (url "https://github.com/requests/requests-kerberos")
6610 (commit (string-append "v" version))))
6611 (file-name (git-file-name name version))
6612 (sha256
6613 (base32 "0s30pcnlir3j2jmf7yh065f294cf3x0x5i3ldskn8mm0a3657mv3"))))
6614 (build-system pyproject-build-system)
6615 (propagated-inputs (list python-cryptography
6616 python-pyspnego
6617 python-requests))
6618 (native-inputs (list python-pytest python-pytest-mock python-setuptools
6619 python-wheel))
6620 (home-page "https://github.com/requests/requests-kerberos")
6621 (synopsis "Kerberos authentication handler for python-requests")
6622 (description "This package provides a Kerberos authentication handler for
6623python-requests.")
6624 (license license:isc)))
6625
6626(define-public python-requests-unixsocket2
6627 (package
6628 (name "python-requests-unixsocket2")
6629 (version "1.0.1")
6630 (source
6631 (origin
6632 (method git-fetch)
6633 (uri (git-reference
6634 (url "https://gitlab.com/thelabnyc/requests-unixsocket2")
6635 (commit (string-append "v" version))))
6636 (sha256
6637 (base32 "0wb8ckagal9d6lfyl3pf9m45xn1krq6vg8kzciwv12chq9wwh0ra"))))
6638 (build-system pyproject-build-system)
6639 (native-inputs
6640 (list nss-certs-for-test
6641 python-hatchling
6642 python-pytest
6643 python-waitress))
6644 (propagated-inputs
6645 (list python-requests
6646 python-urllib3))
6647 (home-page "https://gitlab.com/thelabnyc/requests-unixsocket2")
6648 (synopsis "Talk HTTP via a UNIX domain socket")
6649 (description
6650 "This Python package lets you use the @code{requests} library to talk
6651HTTP via a UNIX domain socket.")
6652 (license license:asl2.0)))
6653
6654(define-deprecated-package python-requests-unixsocket
6655 python-requests-unixsocket2)
6656
6657(define-public python-requests-ntlm
6658 (package
6659 (name "python-requests-ntlm")
6660 (version "1.3.0")
6661 (source
6662 (origin
6663 (method git-fetch)
6664 (uri (git-reference
6665 (url "https://github.com/requests/requests-ntlm")
6666 (commit (string-append "v" version))))
6667 (file-name (git-file-name name version))
6668 (sha256
6669 (base32 "0snsk66zdihdlyfjz2zgpyfgdyjg814m3cc4g3my09hdnb5xvagv"))))
6670 (build-system pyproject-build-system)
6671 (arguments
6672 (list
6673 #:test-flags
6674 ;; XXX: Connection refused.
6675 #~(list "-k" (string-join
6676 (list "not test_ntlm_http_with_cbt"
6677 "test_ntlm_http_without_cbt"
6678 "test_ntlm_https_with_cbt"
6679 "test_ntlm_https_without_cbt")
6680 " and not "))
6681 #:phases
6682 #~(modify-phases %standard-phases
6683 (add-before 'check 'spawn-test-server
6684 (lambda _
6685 ;; Taken from .github/workflows/ci.yml.
6686 (spawn "python"
6687 (list "python" "-m" "tests.test_server")))))))
6688 (propagated-inputs
6689 (list python-cryptography python-pyspnego python-requests))
6690 (native-inputs (list python-flask python-pytest python-setuptools))
6691 (home-page "https://github.com/requests/requests-ntlm")
6692 (synopsis "NTLM authentication support for Requests")
6693 (description
6694 "This package allows for HTTP NTLM authentication using the requests
6695library.")
6696 (license license:isc)))
6697
6698(define-public python-requests-mock
6699 (package
6700 (name "python-requests-mock")
6701 (version "1.12.1")
6702 (source
6703 (origin
6704 (method url-fetch)
6705 (uri (pypi-uri "requests-mock" version))
6706 (sha256
6707 (base32 "008l6xysgs6ax56lairg1li5i4bb04i2z19w5bl5claj7crjxqg9"))))
6708 (build-system pyproject-build-system)
6709 (native-inputs
6710 (list python-purl
6711 python-pytest
6712 python-requests-futures
6713 python-setuptools
6714 python-setuptools-scm
6715 python-testtools))
6716 (propagated-inputs
6717 (list python-requests))
6718 (home-page "https://requests-mock.readthedocs.org/")
6719 (synopsis "Mock out responses from the requests package")
6720 (description
6721 "This module provides a building block to stub out the HTTP requests
6722portions of your testing code.")
6723 (license license:asl2.0)))
6724
6725(define-public python-requests-toolbelt
6726 (package
6727 (name "python-requests-toolbelt")
6728 (version "1.0.0")
6729 (source
6730 (origin
6731 (method url-fetch)
6732 (uri (pypi-uri "requests-toolbelt" version))
6733 (sha256
6734 (base32 "1ijvip427ki177ycrblcn1mfgsq7ixzpvqqfvidjn0a7s2is10bn"))))
6735 (build-system pyproject-build-system)
6736 (arguments
6737 (list
6738 #:test-flags
6739 ;; Requiring networking or fail due not valid certs: AttributeError:
6740 ;; 'MockHTTPResponse' object has no attribute 'close'
6741 #~(list "-k" (string-append "not test_dump_all"
6742 " and not test_dump_response"
6743 " and not test_prepared_request_override_base"
6744 " and not test_prepared_request_with_base"
6745 " and not test_request_override_base"
6746 " and not test_request_with_base"))))
6747 (native-inputs
6748 (list python-betamax
6749 python-mock
6750 python-pyopenssl
6751 python-pytest
6752 python-setuptools
6753 python-trustme
6754 python-wheel))
6755 (propagated-inputs
6756 (list python-requests))
6757 (synopsis "Extensions to python-requests")
6758 (description "This is a toolbelt of useful classes and functions to be used
6759with python-requests.")
6760 (home-page "https://github.com/requests/toolbelt/")
6761 (license license:asl2.0)))
6762
6763(define-public python-requests-ftp
6764 (package
6765 (name "python-requests-ftp")
6766 (version "0.3.1")
6767 (source
6768 (origin
6769 (method git-fetch)
6770 (uri (git-reference
6771 (url "https://github.com/Lukasa/requests-ftp")
6772 (commit (string-append "v" version))))
6773 (file-name (git-file-name name version))
6774 (sha256
6775 (base32 "1c7xbz2fxb12ldaw2pkfg5qd29g6slf4a2gavhqvz26cd1r82ny7"))))
6776 (build-system pyproject-build-system)
6777 (arguments
6778 ;; XXX: No connection adapters found.
6779 (list #:test-flags #~(list "--ignore=tests/test_ftp_proxy.py")))
6780 (native-inputs
6781 (list python-pyftpdlib python-pytest python-setuptools python-six))
6782 (propagated-inputs (list python-requests))
6783 (home-page "https://github.com/Lukasa/requests-ftp")
6784 (synopsis "FTP Transport Adapter for Requests")
6785 (description "Requests-FTP is an implementation of a simple FTP transport
6786adapter for use with the Requests library.")
6787 (license license:asl2.0)))
6788
6789(define-public python-aioftp
6790 (package
6791 (name "python-aioftp")
6792 (version "0.22.3")
6793 (source (origin
6794 (method url-fetch)
6795 (uri (pypi-uri "aioftp" version))
6796 (sha256
6797 (base32
6798 "0w621mg956m9rn7v39jpwi4gpnpl90pprwl29cp640dahqqv38ms"))))
6799 (build-system pyproject-build-system)
6800 (native-inputs
6801 (list python-async-timeout
6802 python-pytest
6803 python-pytest-asyncio
6804 python-pytest-cov
6805 python-setuptools
6806 python-trustme
6807 python-wheel))
6808 (propagated-inputs (list python-siosocks))
6809 (home-page "https://aioftp.readthedocs.io/")
6810 (synopsis "FTP client/server for asyncio in Python")
6811 (description
6812 "FTP client and server for asyncio (Python 3) Library implementing FTP
6813protocol, both client and server for Python asyncio module.
6814
6815 Supported commands as client: USER, PASS, ACCT, PWD, CWD, CDUP, MKD, RMD,
6816 MLSD, MLST, RNFR, RNTO, DELE, STOR, APPE, RETR, TYPE, PASV, ABOR, QUIT,
6817 REST, LIST (as fallback).
6818
6819 Supported commands as server: USER, PASS, QUIT, PWD, CWD, CDUP, MKD, RMD,
6820 MLSD, LIST (non-standard), MLST, RNFR, RNTO, DELE, STOR, RETR,
6821 TYPE (\"I\" and \"A\"), PASV, ABOR, APPE, REST.")
6822 (license license:asl2.0)))
6823
6824(define-public python-mohawk
6825 (let ((commit "b7899166880e890f01cf2531b5686094ba08df8f")
6826 (revision "0"))
6827 (package
6828 (name "python-mohawk")
6829 (version (git-version "1.1.0" revision commit))
6830 (source
6831 (origin
6832 (method git-fetch)
6833 (uri (git-reference
6834 (url "https://github.com/kumar303/mohawk")
6835 (commit commit)))
6836 (file-name (git-file-name name version))
6837 (sha256
6838 (base32 "00y9fimcj851rk2770wqk61fac9pnxfnzca4fvsci57zw18i50m6"))
6839 (patches
6840 (search-patches "python-mohawk-pytest.patch"))))
6841 (build-system pyproject-build-system)
6842 (arguments
6843 (list #:test-flags #~(list "mohawk/tests.py")))
6844 (native-inputs (list python-pytest python-setuptools))
6845 (propagated-inputs (list python-six)) ;TODO: remove python-mohawk when
6846 ;python-six is removed?
6847 (home-page "https://github.com/kumar303/mohawk")
6848 (synopsis "Library for Hawk HTTP authorization")
6849 (description
6850 "Mohawk is an alternate Python implementation of the Hawk HTTP
6851authorization scheme.")
6852 (license license:bsd-3))))
6853
6854(define-public python-msal
6855 (package
6856 (name "python-msal")
6857 (version "1.34.0")
6858 (home-page
6859 "https://github.com/AzureAD/microsoft-authentication-library-for-python")
6860 (source
6861 (origin
6862 (method git-fetch)
6863 (uri (git-reference
6864 (url home-page)
6865 (commit version)))
6866 (file-name (git-file-name name version))
6867 (sha256
6868 (base32 "1xcyiv742ihnzypjw7syamnhqffdy6wsvvv0f5jcl3pap0apbk0z"))
6869 (patches (search-patches "python-msal-requests.patch"))))
6870 (build-system pyproject-build-system)
6871 (arguments
6872 (list
6873 #:test-flags
6874 #~(list
6875 "--ignore=tests/test_benchmark.py"
6876 ;; XXX: Ignoring cryptography version scheme tests.
6877 "-k"
6878 "not test_ceiling_should_be_latest_cryptography_version_plus_three"
6879 ;; XXX: These tests try to access the network.
6880 "--ignore=tests/test_application.py"
6881 "--ignore=tests/test_ccs.py"
6882 ;; XXX: These tests assume they are run on Windows.
6883 "--ignore=tests/test_mi.py")
6884 #:phases
6885 #~(modify-phases %standard-phases
6886 (add-after 'unpack 'set-cryptography-version
6887 (lambda _
6888 (substitute* "tests/test_cryptography.py"
6889 (("^latest_cryptography_version = @version@")
6890 (format #f "latest_cryptography_version = ~s"
6891 #$(package-version
6892 (this-package-input "python-cryptography")))))))
6893 (add-before 'check 'configure-tests
6894 (lambda* (#:key tests? #:allow-other-keys)
6895 (when tests?
6896 (setenv "TRAVIS_TAG" "1")))))))
6897 (native-inputs
6898 (list nss-certs-for-test python-mock python-pytest python-setuptools))
6899 (propagated-inputs (list python-cryptography python-pyjwt python-requests))
6900 (synopsis "Microsoft Authentication Library (MSAL) for Python")
6901 (description
6902 "The Microsoft Authentication Library for Python enables applications to
6903integrate with the Microsoft identity platform. It allows you to sign in
6904users or apps with Microsoft identities (Azure AD, Microsoft Accounts and
6905Azure AD B2C accounts) and obtain tokens to call Microsoft APIs such as
6906Microsoft Graph or your own APIs registered with the Microsoft identity
6907platform. It is built using industry standard OAuth2 and OpenID Connect
6908protocols.")
6909 (license license:expat)))
6910
6911(define-public oauth2ms
6912 (let ((commit "a1ef0cabfdea57e9309095954b90134604e21c08")
6913 (revision "0"))
6914 (package
6915 (name "oauth2ms")
6916 (version (git-version "0.0.0" revision commit))
6917 (source (origin
6918 (method git-fetch)
6919 (uri (git-reference
6920 (url "https://github.com/harishkrupo/oauth2ms")
6921 (commit commit)))
6922 (file-name (git-file-name name version))
6923 (sha256
6924 (base32
6925 "0dqi6n4npdrvb42r672n4sl1jl8z5lsk554fwiiihpj0faa9dx64"))))
6926 (build-system copy-build-system)
6927 (arguments
6928 (list #:install-plan #~`(("oauth2ms" "bin/oauth2ms")
6929 ("." #$(string-append "share/doc/" name "-"
6930 version "/")
6931 #:include-regexp ("\\.org$")))
6932 #:phases #~(modify-phases %standard-phases
6933 (add-after 'install 'wrap-pythonpath
6934 (lambda* (#:key inputs outputs #:allow-other-keys)
6935 (let ((path (getenv "GUIX_PYTHONPATH")))
6936 (wrap-program (string-append #$output
6937 "/bin/oauth2ms")
6938 `("GUIX_PYTHONPATH" ":" prefix
6939 (,path)))))))))
6940 (inputs (list bash-minimal python python-gnupg python-msal python-pyxdg))
6941 (home-page "https://github.com/harishkrupo/oauth2ms")
6942 (synopsis "XOAUTH2 compatible Microsoft Office 365 token fetcher")
6943 (description
6944 "Oauth2ms can be used to fetch OAuth 2.0 tokens from the Microsoft Identity
6945endpoint. Additionally, it can encode the token in the XOAUTH2 format to be
6946used as authentication in IMAP mail servers.")
6947 (license license:asl2.0))))
6948
6949(define-public python-oauthlib
6950 (package
6951 (name "python-oauthlib")
6952 (version "3.3.1")
6953 (source
6954 (origin
6955 (method git-fetch)
6956 (uri (git-reference
6957 (url "https://github.com/oauthlib/oauthlib")
6958 (commit (string-append "v" version))))
6959 (file-name (git-file-name name version))
6960 (sha256
6961 (base32 "0aa38lpa6s1k56v7w7kw2w4l159kaz4gn03m698a8hfdjkx92fb5"))))
6962 (build-system pyproject-build-system)
6963 (native-inputs (list python-pytest python-pytest-cov python-mock
6964 python-setuptools))
6965 (propagated-inputs (list python-cryptography python-pyjwt python-blinker))
6966 (home-page "https://github.com/oauthlib/oauthlib")
6967 (synopsis "OAuth implementation for Python")
6968 (description
6969 "Oauthlib is a generic, spec-compliant, thorough implementation of the
6970OAuth request-signing logic.")
6971 (license license:bsd-3)))
6972
6973(define-public python-urllib3
6974 (package
6975 (name "python-urllib3")
6976 (version "2.5.0")
6977 (source
6978 (origin
6979 (method url-fetch)
6980 (uri (pypi-uri "urllib3" version))
6981 (sha256
6982 (base32
6983 "0q17z6zlpyjv9ax5c3d30qwp9fwhz2sc4gbb7yyd86g4qwrpgi1z"))))
6984 (build-system pyproject-build-system)
6985 (arguments `(#:tests? #f))
6986 (native-inputs
6987 (list python-hatch-vcs
6988 python-hatchling
6989 python-setuptools-scm))
6990 (propagated-inputs
6991 (append
6992 ;; These 5 inputs are used to build urrlib3[secure]
6993 (list python-certifi)
6994 (if (member (%current-system)
6995 (package-transitive-supported-systems python-cryptography))
6996 (list python-cryptography)
6997 '())
6998 (list python-idna)
6999 (if (member (%current-system)
7000 (package-transitive-supported-systems python-pyopenssl))
7001 (list python-pyopenssl)
7002 '())
7003 (list python-pysocks)))
7004 (home-page "https://urllib3.readthedocs.io/")
7005 (synopsis "HTTP library with thread-safe connection pooling")
7006 (description
7007 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7008can reuse the same socket connection for multiple requests, it can POST files,
7009supports url redirection and retries, and also gzip and deflate decoding.")
7010 (license license:expat)))
7011
7012(define-public python-urllib3-1.25
7013 (package
7014 (inherit python-urllib3)
7015 (version "1.25.19")
7016 (source
7017 (origin
7018 (method url-fetch)
7019 (uri (pypi-uri "urllib3" version))
7020 (sha256
7021 (base32
7022 "09rmjqm5syhhc8fx3v06h3yv6cqy0b1081jg8wm5grpwpr72j61h"))))
7023 (native-inputs
7024 (list python-setuptools
7025 python-wheel))))
7026
7027(define-public python-urllib3-1.26
7028 (package
7029 (inherit python-urllib3)
7030 (version "1.26.17")
7031 (source
7032 (origin
7033 (method url-fetch)
7034 (uri (pypi-uri "urllib3" version))
7035 (sha256
7036 (base32
7037 "08fzhaf77kbjj5abpl9xag6fpfxkdp1k5s7sqd3ayacdq91a5mi4"))))
7038 (native-inputs
7039 (list python-setuptools
7040 python-wheel))))
7041
7042(define-public python-awscrt
7043 (package
7044 (name "python-awscrt")
7045 (version "0.26.1")
7046 (source
7047 (origin
7048 (method url-fetch)
7049 (uri (pypi-uri "awscrt" version))
7050 (sha256
7051 (base32 "0plkc0i0gc6z8fqnyy8kbg43sv3jnv8shcavcz0wb134riykmmm8"))))
7052 (build-system pyproject-build-system)
7053 (arguments
7054 (list
7055 #:test-backend #~'unittest
7056 #:test-flags #~(list "discover" "--verbose")
7057 #:phases
7058 #~(modify-phases %standard-phases
7059 (add-after 'unpack 'disable-broken-tests
7060 (lambda _
7061 ;; Disable broken tests. These tests fail because the
7062 ;; certificate bundle at the default location does not exist.
7063 (substitute* "test/test_auth.py"
7064 (("def test_default_provider")
7065 "def _test_default_provider"))
7066 (substitute* "test/test_http_client.py"
7067 (("def test_h2_client")
7068 "def _test_h2_client"))
7069 (substitute* "test/test_s3.py"
7070 (("def test_sanity")
7071 "def _test_sanity")
7072 (("def test_sanity_secure")
7073 "def _test_sanity_secure")
7074 (("def test_wait_shutdown")
7075 "def _test_wait_shutdown"))))
7076 (add-after 'unpack 'override-cert-bundle-location
7077 (lambda* (#:key inputs #:allow-other-keys)
7078 (let ((bundle (search-input-file inputs
7079 "/etc/ssl/certs/ca-certificates.crt")))
7080 (setenv "SSL_CERT_FILE" bundle)
7081 (substitute* "awscrt/io.py"
7082 (("( +)opt = TlsContextOptions\\(\\)" m indent)
7083 (string-append m "\n"
7084 indent "import os\n"
7085 indent "\
7086opt.override_default_trust_store_from_path(None, os.getenv('SSL_CERT_FILE')) if os.getenv('SSL_CERT_FILE') else None\n")))
7087 (substitute* "test/appexit_http.py"
7088 (("( +)tls_ctx_opt = awscrt.io.TlsContextOptions.*" m indent)
7089 (string-append m indent
7090 "tls_ctx_opt.override_default_trust_store_from_path(None, '"
7091 bundle "')\n")))
7092 (substitute* "test/test_io.py"
7093 (("( +)opt = TlsContextOptions\\(\\).*" m indent)
7094 (string-append m indent
7095 "opt.override_default_trust_store_from_path(None, '"
7096 bundle "')\n"))))))
7097 (add-after 'unpack 'use-system-libraries
7098 (lambda _
7099 (setenv "AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO" "1"))))))
7100 (inputs (list openssl))
7101 (native-inputs (list cmake-minimal
7102 nss-certs-for-test
7103 python-boto3
7104 python-setuptools
7105 python-websockets))
7106 (home-page "https://github.com/awslabs/aws-crt-python")
7107 (synopsis "Common runtime for AWS Python projects")
7108 (description
7109 "This package provides a common runtime for AWS Python projects.")
7110 (license license:asl2.0)))
7111
7112(define-public awscli
7113 (package
7114 ;; Note: updating awscli typically requires updating botocore as well.
7115 (name "awscli")
7116 (version "1.42.61")
7117 (source
7118 (origin
7119 (method git-fetch)
7120 (uri (git-reference
7121 (url "https://github.com/aws/aws-cli")
7122 (commit version)))
7123 (file-name (git-file-name name version))
7124 (sha256
7125 (base32 "1fbqh4w7jj5abn87nbhyir25hdviirj0lblcdsqqkadcjh67877h"))))
7126 (build-system pyproject-build-system)
7127 (arguments
7128 (list
7129 ;; tests: 2692 passed, 40 warnings
7130 #:test-flags
7131 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
7132 ;; Compete test suite is huge and compute hungry, run just unit
7133 ;; tests.
7134 "--ignore=tests/dependencies"
7135 "--ignore=tests/functional"
7136 "--ignore=tests/integration"
7137 ;; TypeError: 'Mock' object is not subscriptable.
7138 "-k" "not test_no_groff_or_mandoc_exists")
7139 #:phases
7140 #~(modify-phases %standard-phases
7141 (add-after 'unpack 'fix-reference-to-groff
7142 (lambda _
7143 ;; XXX: Consider to use wrap-program instead, it tries to parse
7144 ;; the PATH.
7145 (substitute* "awscli/help.py"
7146 (("if self._exists_on_path\\('groff'\\):") "if 'groff':")
7147 (("raise ExecutableNotFoundError\\('groff'\\)") "")
7148 (("cmdline = \\['groff'")
7149 (format #f "cmdline = ['~a/bin/groff'"
7150 #$(this-package-input "groff-minimal"))))))
7151 (add-before 'check 'set-environment
7152 (lambda _
7153 ;; PermissionError: [Errno 13] Permission denied:
7154 ;; '/homeless-shelter'
7155 (setenv "HOME" "/tmp"))))))
7156 (native-inputs
7157 (list python-pytest
7158 python-pytest-xdist
7159 python-setuptools
7160 python-wheel))
7161 (inputs
7162 (list groff-minimal
7163 python-botocore
7164 python-colorama
7165 python-docutils-0.19
7166 python-pyyaml
7167 python-rsa-for-awscli-1
7168 python-s3transfer))
7169 (home-page "https://aws.amazon.com/cli/")
7170 (synopsis "Command line client for AWS")
7171 (description
7172 "AWS CLI provides a unified command line interface to the Amazon Web
7173Services (AWS) API.")
7174 (license license:asl2.0)))
7175
7176(define-public awscli-2
7177 (package
7178 (inherit awscli)
7179 ;; Note: updating awscli-2 typically requires updating python-awscrt.
7180 (name "awscli")
7181 ;; Upstream practices a very rapid (1h-1d) release cycles try to select
7182 ;; any fresh one compatible with current state of dependencies in Guix.
7183 (version "2.28.0")
7184 (source
7185 (origin
7186 (method git-fetch)
7187 (uri (git-reference
7188 (url "https://github.com/aws/aws-cli")
7189 (commit version)))
7190 (file-name (git-file-name name version))
7191 (sha256
7192 (base32
7193 "1a1jzvdm434x46yh7ir11lw0nzc64ns4qvxhp5wfra3rh5ykf36j"))))
7194 (build-system pyproject-build-system)
7195 (arguments
7196 (list
7197 ;; When updating and checking locally be very patient as build phase may
7198 ;; hang for 6-8 minutes but eventually passes through.
7199 ;;
7200 ;; tests: 4189 passed, 1 skipped, 2 warnings
7201 #:test-flags
7202 '(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
7203 ;; Full test suite contains more than 70k tests; ignore network
7204 ;; dependent, slow and compute intense tests, keep just unit
7205 ;; tests.
7206 "--ignore=tests/backends"
7207 "--ignore=tests/dependencies"
7208 "--ignore=tests/functional"
7209 "--ignore=tests/integration"
7210 "--ignore=tests/unit/botocore"
7211 ;; Flaky, something to do with PATH disappearing from os.environ?
7212 ;; Passes when run on its own, so maybe something else is
7213 ;; modifying this during the test run.
7214 "--ignore=tests/unit/customizations/emr/test_emr_utils.py"
7215 ;; TypeError: 'Mock' object is not subscriptable
7216 "-k" "not test_no_groff_or_mandoc_exists")
7217 #:phases
7218 #~(modify-phases %standard-phases
7219 (add-after 'unpack 'ignore-deprecations
7220 (lambda _
7221 (substitute* "pyproject.toml"
7222 (("\"error::") "\"ignore::"))))
7223 (add-after 'unpack 'fix-reference-to-groff
7224 (lambda* (#:key inputs #:allow-other-keys)
7225 (substitute* "awscli/help.py"
7226 (("if self._exists_on_path\\('groff'\\):") "if True:")
7227 (("cmdline = \\['groff'")
7228 (string-append "cmdline = ['"
7229 (search-input-file inputs "bin/groff")
7230 "'")))))
7231 (add-before 'check 'pre-check
7232 (lambda _ (setenv "HOME" "/tmp"))))))
7233 (inputs
7234 (list groff
7235 ;; less
7236 nss-certs-for-test
7237 python-awscrt
7238 python-colorama
7239 python-dateutil
7240 python-distro
7241 python-docutils
7242 python-jmespath
7243 python-prompt-toolkit
7244 python-ruamel.yaml
7245 python-ruamel.yaml.clib
7246 python-urllib3))
7247 (native-inputs
7248 (list python-flit-core
7249 python-pytest
7250 python-pytest-xdist))))
7251
7252(define-public python-wsgiproxy2
7253 (package
7254 (name "python-wsgiproxy2")
7255 (version "0.5.1")
7256 (source
7257 (origin
7258 (method git-fetch)
7259 (uri (git-reference
7260 (url "https://github.com/gawel/WSGIProxy2/")
7261 (commit version)))
7262 (file-name (git-file-name name version))
7263 (sha256
7264 (base32 "0aw9ibla2cqzlbm3vzyk1yk3d8pccpbpdkqx99q30hq1fz1izsm2"))))
7265 (build-system pyproject-build-system)
7266 (arguments (list #:test-backend #~'unittest))
7267 (native-inputs (list python-webtest python-setuptools))
7268 (propagated-inputs (list python-requests python-six python-urllib3
7269 python-webob))
7270 (home-page "https://github.com/gawel/WSGIProxy2/")
7271 (synopsis "WSGI Proxy with various http client backends")
7272 (description
7273 "WSGI turns HTTP requests into WSGI function calls. WSGIProxy turns WSGI
7274function calls into HTTP requests. It also includes code to sign requests and
7275pass private data, and to spawn subprocesses to handle requests.")
7276 (license license:expat)))
7277
7278(define-public python-pastedeploy
7279 (package
7280 (name "python-pastedeploy")
7281 (version "3.1.0")
7282 (source
7283 (origin
7284 (method url-fetch)
7285 (uri (pypi-uri "PasteDeploy" version))
7286 (sha256
7287 (base32 "15as15mgz9xn33abwrp0x0mbj537ib3q47z8ky5475c05wasznwx"))))
7288 (build-system pyproject-build-system)
7289 (native-inputs (list python-pytest python-pytest-cov python-setuptools))
7290 (home-page "https://pylonsproject.org/")
7291 (synopsis "Load, configure, and compose WSGI applications and servers")
7292 (description
7293 "This tool provides code to load WSGI applications and servers from URIs;
7294these URIs can refer to Python Eggs for INI-style configuration files. Paste
7295Script provides commands to serve applications based on this configuration
7296file.")
7297 (license license:expat)))
7298
7299(define-public python-webtest
7300 (package
7301 (name "python-webtest")
7302 (version "3.0.6")
7303 (source
7304 (origin
7305 (method url-fetch)
7306 (uri (pypi-uri "webtest" version))
7307 (sha256
7308 (base32 "0jwl8i9xvm5xim1h2jrwfbqac1g3fpiazfdwfp2md3s4899gsmj2"))))
7309 (build-system pyproject-build-system)
7310 (arguments
7311 ;; Tests require python-pyquery, which creates a circular dependency.
7312 `(#:tests? #f))
7313 (native-inputs
7314 (list python-setuptools))
7315 (propagated-inputs
7316 (list python-beautifulsoup4
7317 python-waitress
7318 python-webob))
7319 (home-page "https://docs.pylonsproject.org/projects/webtest/")
7320 (synopsis "Helper to test WSGI applications")
7321 (description
7322 "Webtest allows you to test your Python web applications without
7323starting an HTTP server. It supports anything that supports the minimum of
7324WSGI.")
7325 (license license:expat)))
7326
7327(define-public python-flask
7328 (package
7329 (name "python-flask")
7330 (version "3.1.0")
7331 (source
7332 (origin
7333 (method url-fetch)
7334 (uri (pypi-uri "flask" version))
7335 (sha256
7336 (base32 "1b1nb250jxrjplbs21wnwq69250vs3iz2pdhs7cwi5y8hi8kr1sz"))))
7337 (build-system pyproject-build-system)
7338 (native-inputs
7339 (list python-flit-core
7340 python-pytest))
7341 (propagated-inputs
7342 (list python-asgiref ;async extra
7343 python-click
7344 python-blinker
7345 python-importlib-metadata
7346 python-itsdangerous
7347 python-jinja2
7348 python-werkzeug))
7349 (home-page "https://palletsprojects.com/p/flask/")
7350 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
7351 (description "Flask is a micro web framework based on the Werkzeug toolkit
7352and Jinja2 template engine. It is called a micro framework because it does not
7353presume or force a developer to use a particular tool or library.")
7354 (license license:bsd-3)))
7355
7356(define-public python-flask-compress
7357 (package
7358 (name "python-flask-compress")
7359 (version "1.18")
7360 (source (origin
7361 (method url-fetch)
7362 (uri (pypi-uri "flask_compress" version))
7363 (sha256
7364 (base32
7365 "0fj1r0ixsjls7z3a2zzamxppjz4qcf8q4jcmn74gsk9kisyy3fpx"))))
7366 (build-system pyproject-build-system)
7367 (native-inputs
7368 (list python-flask-caching
7369 python-pytest
7370 python-setuptools
7371 python-setuptools-scm))
7372 (propagated-inputs
7373 (list python-brotli
7374 python-flask
7375 python-pyzstd))
7376 (home-page "https://github.com/colour-science/flask-compress")
7377 (synopsis "Compress responses in a Flask app")
7378 (description
7379 "This package lets you compress Flask application responses and static
7380files with gzip, deflate or brotli. Flask-Compress both adds the various
7381headers required for a compressed response and compresses the response data.")
7382 (license license:expat)))
7383
7384(define-public python-flask-seasurf
7385 (package
7386 (name "python-flask-seasurf")
7387 (version "2.0.0")
7388 (source (origin
7389 (method url-fetch)
7390 (uri (pypi-uri "Flask-SeaSurf" version))
7391 (sha256
7392 (base32
7393 "0g5dsm2ikv8q4qcrb2446pbs972l5wkxyfmxsriqdsl02nz06h4f"))))
7394 (build-system pyproject-build-system)
7395 (arguments
7396 (list #:tests? #false)) ;there are none
7397 (propagated-inputs (list python-flask))
7398 (native-inputs (list python-setuptools python-wheel))
7399 (home-page "https://github.com/maxcountryman/flask-seasurf/")
7400 (synopsis "CSRF extension for Flask")
7401 (description "SeaSurf is a Flask extension for preventing cross-site
7402request forgery (CSRF). CSRF attacks are problematic because the mechanism
7403they use is relatively easy to exploit. This extension attempts to aid you in
7404securing your application from such attacks. This extension is based on the
7405Django middleware.")
7406 (license license:bsd-3)))
7407
7408(define-public python-flask-wtf
7409 (package
7410 (name "python-flask-wtf")
7411 (version "1.2.2")
7412 (source
7413 (origin
7414 (method url-fetch)
7415 (uri (pypi-uri "Flask-WTF" version))
7416 (sha256
7417 (base32
7418 "0sv6hjva1fdizb7sr46230pplx8qz8rnb4bxrfy71xbc8cgfxlkr"))))
7419 (build-system pyproject-build-system)
7420 (propagated-inputs
7421 (list python-flask python-flask python-itsdangerous python-wtforms))
7422 (native-inputs
7423 (list python-hatchling python-pytest))
7424 (home-page "https://github.com/lepture/flask-wtf")
7425 (synopsis "Simple integration of Flask and WTForms")
7426 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
7427upload, and reCAPTCHA.")
7428 (license license:bsd-3)))
7429
7430(define-public python-flask-multistatic
7431 (package
7432 (name "python-flask-multistatic")
7433 (version "1.0")
7434 (source
7435 (origin
7436 (method url-fetch)
7437 (uri (pypi-uri "flask-multistatic" version))
7438 (sha256
7439 (base32
7440 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
7441 (build-system pyproject-build-system)
7442 (arguments (list #:tests? #f)) ; No tests upstream.
7443 (native-inputs (list python-setuptools))
7444 (propagated-inputs (list python-flask))
7445 (home-page "https://pagure.io/flask-multistatic")
7446 (synopsis "Flask plugin to allow overriding static files")
7447 (description "@code{flask-multistatic} is a flask plugin that adds support
7448for overriding static files.")
7449 (license license:gpl3+)))
7450
7451(define-public python-responses
7452 (package
7453 (name "python-responses")
7454 (version "0.25.3")
7455 (source (origin
7456 (method url-fetch)
7457 (uri (pypi-uri "responses" version))
7458 (sha256
7459 (base32
7460 "1fld6lsa143md4lxccwxq9iyqm9d8a05i9sp7lqjibnrmd3r4yv1"))))
7461 (build-system pyproject-build-system)
7462 (native-inputs
7463 (list python-pytest
7464 python-pytest-asyncio
7465 python-pytest-httpserver
7466 python-setuptools
7467 python-tomli
7468 python-tomli-w
7469 python-wheel))
7470 (propagated-inputs
7471 (list python-requests
7472 python-pyyaml
7473 python-urllib3))
7474 (home-page "https://github.com/getsentry/responses")
7475 (synopsis "Utility for mocking out the `requests` Python library")
7476 (description "A utility library for mocking out the `requests` Python
7477library.")
7478 (license license:asl2.0)))
7479
7480(define-public python-grequests
7481 (let ((commit "60f70e99e942a2df378b4e4f6202dcf862754c2d")
7482 (revision "0"))
7483 (package
7484 (name "python-grequests")
7485 (version (git-version "0.7.0" revision commit))
7486 (source
7487 (origin
7488 (method git-fetch)
7489 (uri (git-reference
7490 (url "https://github.com/kennethreitz/grequests")
7491 (commit commit)))
7492 (file-name (git-file-name name version))
7493 (sha256
7494 (base32 "0132yv1rr4pmrmwasrnasqbnd80pi6rgy52608731p7lidkmxz9a"))))
7495 (build-system pyproject-build-system)
7496 (arguments
7497 (list
7498 ;; XXX: Most failing tests seem to be caused by network access,
7499 ;; but there is no easy/flag way to disable tests selectively.
7500 #:tests? #f
7501 #:test-backend #~'unittest
7502 #:test-flags #~(list "tests.py")))
7503 (propagated-inputs (list python-gevent python-requests))
7504 (native-inputs (list python-setuptools))
7505 (home-page "https://github.com/kennethreitz/grequests")
7506 (synopsis "Python library for asynchronous HTTP requests")
7507 (description
7508 "GRequests is a Python library that allows you to use @code{Requests}
7509with @code{Gevent} to make asynchronous HTTP Requests easily.")
7510 (license license:bsd-2))))
7511
7512(define-public python-gwebsockets
7513 (package
7514 (name "python-gwebsockets")
7515 (version "0.7")
7516 (source
7517 (origin
7518 (method git-fetch)
7519 (uri (git-reference
7520 (url "https://github.com/sugarlabs/gwebsockets")
7521 (commit (string-append "v" version))))
7522 (file-name (git-file-name name version))
7523 (sha256
7524 (base32 "0w422yz0qdix5xb6aqrrci1s1hy4whncspwb03m9ankqww0s1yv2"))))
7525 (build-system pyproject-build-system)
7526 (arguments (list #:tests? #f)) ; No tests upstream.
7527 (native-inputs (list python-setuptools))
7528 (propagated-inputs (list python-pygobject))
7529 (home-page "https://github.com/sugarlabs/gwebsockets")
7530 (synopsis "GLib based websockets server")
7531 (description
7532 "This package provides a websocket server written in Python. It uses GIO
7533for network communication and hence it easily integrates with the GLib
7534mainloop.")
7535 (license license:asl2.0)))
7536
7537(define-public python-dpkt
7538 (package
7539 (name "python-dpkt")
7540 (version "1.9.8")
7541 (source
7542 (origin
7543 (method git-fetch)
7544 (uri (git-reference
7545 (url "https://github.com/kbandla/dpkt")
7546 (commit (string-append "v" version))))
7547 (file-name (git-file-name name version))
7548 (sha256
7549 (base32 "0dhy8l4sqfxqdda6lishb95g3v6hnw14l20ipqpzb6vaw1vf7mzj"))))
7550 (build-system pyproject-build-system)
7551 (arguments
7552 (list
7553 #:test-flags
7554 #~(list "--pyargs" "dpkt")))
7555 (native-inputs (list python-pytest python-pytest-cov python-setuptools))
7556 (home-page "https://github.com/kbandla/dpkt")
7557 (synopsis "Packet generator and parser for TCP/IP protocols")
7558 (description
7559 "The dpkt module is a fast, simple packet generator and parser for the
7560basic TCP/IP protocols.")
7561 (license license:bsd-3)))
7562
7563(define-public python-geventhttpclient
7564 (package
7565 (name "python-geventhttpclient")
7566 (version "2.3.3")
7567 (source (origin
7568 (method git-fetch)
7569 (uri (git-reference
7570 (url "https://github.com/geventhttpclient/geventhttpclient")
7571 (commit version)
7572 (recursive? #true)))
7573 (file-name (git-file-name name version))
7574 (sha256
7575 (base32
7576 "1ya0i0fbx054mfx5d1k75fcf64xzp7vva8lkwwzan41xbnc56nyj"))))
7577 (build-system pyproject-build-system)
7578 (arguments
7579 (list
7580 #:test-flags
7581 ;; Disable network tests.
7582 '(list "-k"
7583 (string-append "not test_client_simple"
7584 " and not test_client_ssl"
7585 " and not test_client_with_default_headers"
7586 " and not test_client_without_leading_slash"
7587 " and not test_download"
7588 " and not test_fail_invalid_ca_certificate"
7589 " and not test_httpbin_multipart"
7590 " and not test_multi_queries_greenlet_safe"
7591 " and not test_no_form_encode_header"
7592 " and not test_no_form_encoded_header"
7593 " and not test_request_with_headers"
7594 " and not test_response_context_manager"
7595 " and not test_urllib_request"))))
7596 (native-inputs (list nss-certs-for-test
7597 python-dpkt python-pytest python-requests
7598 python-setuptools python-wheel))
7599 (propagated-inputs (list python-brotli python-certifi python-gevent
7600 python-urllib3))
7601 (home-page "https://github.com/geventhttpclient/geventhttpclient")
7602 (synopsis "HTTP client library for gevent")
7603 (description "@code{python-geventhttpclient} is a high performance,
7604concurrent HTTP client library for python using @code{gevent}.")
7605 (license license:expat)))
7606
7607(define-public python-gevent-websocket
7608 (package
7609 (name "python-gevent-websocket")
7610 (version "0.10.1")
7611 (source
7612 (origin
7613 (method url-fetch)
7614 (uri (pypi-uri "gevent-websocket" version))
7615 (sha256
7616 (base32 "1c2zv2rahp1gil3cj66hfsqgy0n35hz9fny3ywhr2319d0lz7bky"))))
7617 (build-system pyproject-build-system)
7618 (arguments
7619 (list #:tests? #f)) ; no tests in PyPI or git
7620 (native-inputs
7621 (list python-setuptools
7622 python-wheel))
7623 (propagated-inputs
7624 (list python-gevent))
7625 (home-page "https://gitlab.com/noppo/gevent-websocket")
7626 (synopsis "Websocket handler for the gevent pywsgi server")
7627 (description
7628 "Websocket handler for the gevent pywsgi server, a Python network
7629library.
7630
7631Features include:
7632@itemize
7633@item integration on both socket level or using an abstract interface
7634@item RPC and PubSub framework using @acronym{WebSocket Application Messaging
7635Protocol, WAMP}
7636@item easily extendible using a simple WebSocket protocol plugin API
7637@end itemize")
7638 (license license:asl2.0)))
7639
7640(define-public python-requests-oauthlib
7641 (package
7642 (name "python-requests-oauthlib")
7643 (version "2.0.0")
7644 (source
7645 (origin
7646 (method git-fetch)
7647 (uri (git-reference (url
7648 "https://github.com/requests/requests-oauthlib")
7649 (commit (string-append "v" version))))
7650 (file-name (git-file-name name version))
7651 (sha256 (base32 "0i0vnanxqilnf2rgng7n96rl8fzq0dbcl3rpl7zkxj50kv66nqwl"))))
7652 (build-system pyproject-build-system)
7653 (arguments
7654 (list
7655 #:test-flags
7656 #~(list
7657 "--ignore=tests/test_core.py" ; requires network access.
7658 "--ignore=tests/examples/test_native_spa_pkce_auth0.py"
7659 "-k" "not test_fetch_access_token"))) ; flaky tests.
7660 (native-inputs
7661 (list python-requests-mock python-pytest python-setuptools))
7662 (propagated-inputs
7663 (list python-oauthlib python-requests))
7664 (home-page "https://github.com/requests/requests-oauthlib")
7665 (synopsis "OAuthlib authentication support for Requests")
7666 (description
7667 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
7668provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
7669 (license license:isc)))
7670
7671(define-public python-cachecontrol
7672 (package
7673 (name "python-cachecontrol")
7674 (version "0.14.1")
7675 (source
7676 (origin
7677 (method git-fetch)
7678 ;; Pypi does not have tests.
7679 (uri (git-reference
7680 (url "https://github.com/ionrock/cachecontrol")
7681 (commit (string-append "v" version))))
7682 (file-name (git-file-name name version))
7683 (sha256
7684 (base32
7685 "07ifs4dhahhsgj4vxgfl5ymnmb4my5l2wb8jiinn6fncszcfmr59"))))
7686 (build-system pyproject-build-system)
7687 (arguments
7688 ;; Versions > 0.11.6 depend on CherryPy for testing.
7689 ;; It's too much work to package CherryPy for now.
7690 `(#:tests? #f))
7691 (propagated-inputs
7692 (list python-filelock python-msgpack python-requests))
7693 (native-inputs
7694 (list python-flit-core))
7695 (home-page "https://github.com/ionrock/cachecontrol")
7696 (synopsis "The httplib2 caching algorithms for use with requests")
7697 (description "CacheControl is a port of the caching algorithms in
7698@code{httplib2} for use with @code{requests} session objects.")
7699 (license license:asl2.0)))
7700
7701(define-public python-betamax
7702 (package
7703 (name "python-betamax")
7704 (version "0.9.0")
7705 (source
7706 (origin
7707 (method url-fetch)
7708 (uri (pypi-uri "betamax" version))
7709 (sha256
7710 (base32
7711 "152zil1j4gl1whnldi08zwjr4z2bnlbd061kr3ipjs5wg4b6wcc2"))))
7712 (build-system pyproject-build-system)
7713 (arguments
7714 (list
7715 #:test-flags
7716 #~(list "-k" (string-join
7717 ;; Tests require network access to http://httpbin.org/get.
7718 (list "not test_creates_new_cassettes"
7719 "test_placeholders_work"
7720 "test_post_start_hook"
7721 "test_pre_stop_hook"
7722 "test_preplayback_hook"
7723 "test_prerecord_hook"
7724 "test_prerecord_ignoring_hook"
7725 "test_records_new_events_with_existing_cassette"
7726 "test_records_new_interaction"
7727 "test_records_new_interactions"
7728 "test_replaces_old_interactions"
7729 "test_replays_response_from_cassette"
7730 "test_requests_with_json_body"
7731 "test_saves_content_as_gzip"
7732 "test_unicode_is_saved_properly")
7733 " and not "))))
7734 (native-inputs
7735 (list nss-certs-for-test
7736 python-pytest
7737 python-setuptools))
7738 (propagated-inputs
7739 (list python-requests))
7740 (home-page "https://github.com/sigmavirus24/betamax")
7741 (synopsis "Record HTTP interactions with python-requests")
7742 (description
7743 "Betamax will record your test suite's HTTP interactions and replay them
7744during future tests. It is designed to work with python-requests.")
7745 (license license:expat)))
7746
7747(define-public python-betamax-matchers
7748 (package
7749 (name "python-betamax-matchers")
7750 (version "0.4.0")
7751 (source
7752 (origin
7753 (method git-fetch)
7754 (uri (git-reference
7755 (url "https://github.com/sigmavirus24/betamax_matchers")
7756 (commit version)))
7757 (file-name (git-file-name name version))
7758 (sha256
7759 (base32 "0lyg3r91hwfvavyi5k6sddcla37igigycfv1mx40c32byqwl6pq5"))))
7760 (build-system pyproject-build-system)
7761 (native-inputs (list python-pytest python-setuptools))
7762 (propagated-inputs (list python-betamax python-requests-toolbelt))
7763 (home-page "https://github.com/sigmavirus24/betamax_matchers")
7764 (synopsis "VCR imitation for python-requests")
7765 (description "@code{betamax-matchers} provides a set of Matchers for
7766Betamax.")
7767 (license license:asl2.0)))
7768
7769(define-public python-betamax-serializers
7770 (package
7771 (name "python-betamax-serializers")
7772 (version "0.2.1")
7773 (source
7774 (origin
7775 (method git-fetch)
7776 (uri (git-reference
7777 (url "https://gitlab.com/betamax/serializers")
7778 (commit version)))
7779 (file-name (git-file-name name version))
7780 (sha256
7781 (base32 "1p2l5w3vwvjacs2ndahgcjq55qb53i37p8mz1zh85pjxyszdyw2l"))))
7782 (build-system pyproject-build-system)
7783 (arguments (list #:tests? #f)) ; No tests.
7784 (native-inputs (list python-setuptools))
7785 (propagated-inputs (list python-betamax python-pyyaml))
7786 (synopsis "Set of third-party serializers for Betamax")
7787 (description
7788 "Betamax-Serializers are an experimental set of Serializers for Betamax
7789that may possibly end up in the main package.")
7790 (home-page "https://gitlab.com/betamax/serializers")
7791 (license license:asl2.0)))
7792
7793(define-public python-s3fs
7794 (package
7795 (name "python-s3fs")
7796 (version "2025.9.0")
7797 (source
7798 (origin
7799 (method url-fetch)
7800 (uri (pypi-uri "s3fs" version))
7801 (sha256
7802 (base32 "0c5w09ryyfwlrqbhxgn1yl2kl1ksmz2481vjs1l4k9lyy5z2ai3d"))))
7803 (build-system pyproject-build-system)
7804 ;; TODO: Many tests fail with "No such file or directory" raised by the
7805 ;; HTTP client.
7806 (arguments (list #:tests? #false))
7807 (native-inputs
7808 (list python-setuptools))
7809 (propagated-inputs
7810 (list python-aiobotocore
7811 python-aiohttp
7812 python-fsspec))
7813 (home-page "https://github.com/fsspec/s3fs/")
7814 (synopsis "Convenient filesystem interface over S3")
7815 (description "This package provides a convenient filesystem interface over
7816S3.")
7817 (license license:bsd-3)))
7818
7819(define-public python-s3transfer
7820 (package
7821 (name "python-s3transfer")
7822 (version "0.14.0")
7823 (source
7824 (origin
7825 (method url-fetch)
7826 (uri (pypi-uri "s3transfer" version))
7827 (sha256
7828 (base32 "09a17scf96zfdw2chb22yyvmnj4anfijgkncfi89id68wxj25wgg"))))
7829 (build-system pyproject-build-system)
7830 (arguments
7831 (list
7832 #:test-flags
7833 #~(list "--numprocesses" (number->string (parallel-job-count))
7834 ;; Tests require networking.
7835 "--ignore" "tests/integration")))
7836 (native-inputs
7837 (list python-pytest
7838 python-pytest-xdist
7839 python-setuptools))
7840 (propagated-inputs
7841 (list python-botocore))
7842 (home-page "https://github.com/boto/s3transfer")
7843 (synopsis "Amazon S3 Transfer Manager")
7844 (description
7845 "S3transfer is a Python library for managing Amazon S3 transfers.")
7846 (license license:asl2.0)))
7847
7848(define-public python-flask-restful
7849 (package
7850 (name "python-flask-restful")
7851 (version "0.3.10")
7852 (source
7853 (origin
7854 (method url-fetch)
7855 (uri (pypi-uri "Flask-RESTful" version))
7856 (sha256
7857 (base32
7858 "0dzckjjz3aw8nmisr5g9mnv02s2nqlhblykr9ydqzpr703pz4jpy"))))
7859 (build-system pyproject-build-system)
7860 (arguments
7861 ;; See <https://github.com/flask-restful/flask-restful/issues/980>.
7862 (list #:tests? #f))
7863 (propagated-inputs
7864 (list python-aniso8601 python-flask python-pytz))
7865 (native-inputs
7866 (list python-blinker
7867 python-mock
7868 python-pytest
7869 python-setuptools
7870 python-wheel))
7871 (home-page "https://github.com/flask-restful/flask-restful/")
7872 (synopsis "Flask module for creating REST APIs")
7873 (description
7874 "This package contains a Flask module for creating REST APIs.")
7875 (license license:bsd-3)))
7876
7877(define-public python-flask-sqlalchemy
7878 (package
7879 (name "python-flask-sqlalchemy")
7880 (version "3.1.1")
7881 (source (origin
7882 (method url-fetch)
7883 (uri (pypi-uri "flask_sqlalchemy" version))
7884 (sha256
7885 (base32
7886 "04l3dfivznlpvk9p9f20zdbyxl869k42z2w7glddlbc0h6w8pdp4"))))
7887 (build-system pyproject-build-system)
7888 (arguments
7889 (list
7890 #:test-flags
7891 #~(list "-k" (string-append "not test_explicit_table[db2]"
7892 " and not test_explicit_table[db4]"))))
7893 (native-inputs
7894 (list python-flit-core
7895 python-pytest))
7896 (propagated-inputs
7897 (list python-flask
7898 python-sqlalchemy-2))
7899 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
7900 (synopsis "Module adding SQLAlchemy support to your Flask application")
7901 (description
7902 "This package adds SQLAlchemy support to your Flask application.")
7903 (license license:bsd-3)))
7904
7905(define-public python-flask-restful-swagger
7906 (package
7907 (name "python-flask-restful-swagger")
7908 (version "0.20.1")
7909 ;; XXX: Unbundle minified javascript.
7910 (source
7911 (origin
7912 (method git-fetch)
7913 (uri (git-reference
7914 (url "https://github.com/rantav/flask-restful-swagger")
7915 (commit version)))
7916 (file-name (git-file-name name version))
7917 (sha256
7918 (base32 "1ppdwn25ijf8b3zchxkvwj4ipc68v3p522i8mm51jm0w6mg5bvsh"))))
7919 (build-system pyproject-build-system)
7920 (arguments (list #:tests? #f)) ; No tests.
7921 (native-inputs (list python-setuptools))
7922 (propagated-inputs (list python-flask-restful python-six))
7923 (home-page "https://github.com/rantav/flask-restful-swagger")
7924 (synopsis "Extract Swagger specs from Flask-Restful projects")
7925 (description "This package lets you extract Swagger API documentation
7926specs from your Flask-Restful projects.")
7927 (license license:expat)))
7928
7929(define-public python-htmlmin
7930 (package
7931 (name "python-htmlmin")
7932 (version "0.1.12")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "htmlmin" version))
7937 (sha256
7938 (base32
7939 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
7940 (build-system pyproject-build-system)
7941 (arguments
7942 (list #:tests? #f)) ; no tests
7943 (native-inputs (list python-setuptools))
7944 (home-page "https://htmlmin.readthedocs.org/en/latest/")
7945 (synopsis "HTML minifier")
7946 (description "@code{htmlmin} is an HTML minifier that just works.
7947It comes with safe defaults and easily configurable options.")
7948 (license license:bsd-3)))
7949
7950;; XXX: Forked renamed and updated version.
7951(define-public python-htmlmin2
7952 (package/inherit python-htmlmin
7953 (name "python-htmlmin2")
7954 (version "0.1.13")
7955 (source
7956 (origin
7957 (method git-fetch)
7958 (uri (git-reference
7959 (url "https://github.com/wilhelmer/htmlmin")
7960 (commit (string-append "v" version))))
7961 (file-name (git-file-name name version))
7962 (sha256
7963 (base32 "1y7mcx8d451hwa1wrg2lffg7ccdy3w5m7xwb5xqp8h2852pypfh2"))))
7964 (build-system pyproject-build-system)
7965 (arguments (list #:test-backend #~'unittest))
7966 (native-inputs (list python-setuptools))
7967 (home-page "https://github.com/wilhelmer/htmlmin")
7968 (description
7969 "@code{htmlmin2} is an HTML minifier that just works. It comes with safe
7970defaults and easily configurable options. This variant is an updated fork of
7971the original @code{python-htmlmin}.")
7972 (license license:bsd-3)))
7973
7974(define-public python-flask-htmlmin
7975 (package
7976 (name "python-flask-htmlmin")
7977 (version "3.0.0")
7978 (source
7979 (origin
7980 (method git-fetch)
7981 (uri (git-reference
7982 (url "https://github.com/hamidfzm/Flask-HTMLmin")
7983 (commit (string-append "v" version))))
7984 (file-name (git-file-name name version))
7985 (sha256
7986 (base32 "0ybqssnqwa9zgv61azp5r1grgnq28ypfhr80p9rp61x2z0y0zl32"))))
7987 (build-system pyproject-build-system)
7988 (native-inputs (list python-pytest python-setuptools))
7989 (propagated-inputs (list python-cssmin python-flask python-htmlmin2))
7990 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
7991 (synopsis "HTML response minifier for Flask")
7992 (description
7993 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
7994 (license license:bsd-3)))
7995
7996(define-public python-jsmin
7997 (package
7998 (name "python-jsmin")
7999 (version "3.0.1")
8000 (source
8001 (origin
8002 (method url-fetch)
8003 (uri (pypi-uri "jsmin" version))
8004 (sha256
8005 (base32
8006 "1z1brjsvni0260bypldkl8a05sgp0qk18x560zl44igr3q99m5f0"))))
8007 (build-system pyproject-build-system)
8008 (arguments (list #:test-backend #~'unittest))
8009 (native-inputs
8010 (list python-setuptools))
8011 (home-page "https://github.com/tikitu/jsmin/")
8012 (synopsis "Python JavaScript minifier")
8013 (description
8014 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
8015on the command line.")
8016 (license license:expat)))
8017
8018(define-public python-flask-login
8019 (package
8020 (name "python-flask-login")
8021 (version "0.6.3")
8022 (source
8023 (origin
8024 (method git-fetch)
8025 (uri (git-reference
8026 (url "https://github.com/maxcountryman/flask-login")
8027 (commit version)))
8028 (file-name (git-file-name name version))
8029 (sha256
8030 (base32 "0wk3dni5qssmbn8ii3hsh89qa3kwr97i92k27bzgsgxvvsfwwzja"))))
8031 (build-system pyproject-build-system)
8032 (propagated-inputs
8033 (list python-flask))
8034 (native-inputs
8035 ;; For tests.
8036 (list python-blinker
8037 python-mock
8038 python-pytest
8039 python-semantic-version
8040 python-setuptools
8041 python-werkzeug
8042 python-wheel))
8043 (home-page "https://github.com/maxcountryman/flask-login")
8044 (synopsis "User session management for Flask")
8045 (description
8046 "@code{Flask-Login} provides user session management for Flask. It
8047handles the common tasks of logging in, logging out, and remembering your
8048users' sessions over extended periods of time.")
8049 (license license:expat)))
8050
8051(define-public python-oauth2client
8052 (package
8053 (name "python-oauth2client")
8054 (version "4.1.3")
8055 (source
8056 (origin
8057 (method git-fetch)
8058 (uri (git-reference
8059 (url "https://github.com/google/oauth2client/")
8060 (commit (string-append "v" version))))
8061 (file-name (git-file-name name version))
8062 (sha256
8063 (base32 "0xm19dv5kmi82zzrx3d4mp326irr3x37q818hlspz514dzjq2ad1"))))
8064 (build-system pyproject-build-system)
8065 (arguments
8066 (list #:tests? #f))
8067 (native-inputs
8068 (list python-setuptools))
8069 (propagated-inputs
8070 (list python-httplib2
8071 python-pyasn1
8072 python-pyasn1-modules
8073 python-pyparsing
8074 python-rsa
8075 python-six))
8076 (home-page "https://github.com/google/oauth2client/")
8077 (synopsis "OAuth 2.0 client library")
8078 (description "@code{python-oauth2client} provides an OAuth 2.0 client
8079library for Python")
8080 (license license:asl2.0)))
8081
8082(define-public python-authlib
8083 (package
8084 (name "python-authlib")
8085 (version "1.5.1")
8086 (source
8087 (origin
8088 (method url-fetch)
8089 (uri (pypi-uri "authlib" version))
8090 (sha256
8091 (base32 "0blpvz2v2r8yvsgm1yr3n61mhwxvh1b0kyf2rp0i4wv6n3n8bg2w"))))
8092 (build-system pyproject-build-system)
8093 ;; No tests target.
8094 (arguments (list #:tests? #false))
8095 (propagated-inputs
8096 (list python-cryptography
8097 python-django
8098 python-flask
8099 python-httpx
8100 python-requests
8101 python-sqlalchemy-2
8102 python-starlette
8103 python-werkzeug))
8104 (native-inputs (list python-pytest python-setuptools python-wheel))
8105 (home-page "https://pypi.org/project/Authlib/1")
8106 (synopsis "Build OAuth and OpenID Connect servers and clients")
8107 (description
8108 "This is a Python library for building OAuth and OpenID Connect servers
8109and clients.")
8110 (license license:bsd-3)))
8111
8112(define-public python-flask-oidc
8113 (package
8114 (name "python-flask-oidc")
8115 (version "2.3.1")
8116 (source
8117 (origin
8118 (method url-fetch)
8119 (uri (pypi-uri "flask_oidc" version))
8120 (sha256
8121 (base32
8122 "1200xhqiqlqfmrq54v2p6cf3nny86njjw8r7sk5j59hlk9a683zk"))))
8123 (build-system pyproject-build-system)
8124 (propagated-inputs
8125 (list python-authlib
8126 python-blinker
8127 python-flask
8128 python-requests
8129 python-responses))
8130 (native-inputs
8131 (list python-pytest python-poetry-core))
8132 (home-page "https://github.com/puiterwijk/flask-oidc")
8133 (synopsis "OpenID Connect extension for Flask")
8134 (description "@code{python-flask-oidc} provides an OpenID Connect extension
8135for Flask.")
8136 (license license:bsd-2)))
8137
8138(define-public python-webassets
8139 (package
8140 (name "python-webassets")
8141 (version "3.0.0")
8142 (source
8143 (origin
8144 (method git-fetch)
8145 (uri (git-reference
8146 (url "https://github.com/miracle2k/webassets")
8147 (commit version)))
8148 (file-name (git-file-name name version))
8149 (sha256
8150 (base32 "11hxvdqw86q6r665iryjzwx21ys8jh2c63mw016ldr6j49l0zyyh"))))
8151 (build-system pyproject-build-system)
8152 (propagated-inputs (list python-pyyaml python-zope-dottedname))
8153 (native-inputs (list python-hatchling python-pytest))
8154 (home-page "https://github.com/miracle2k/webassets")
8155 (synopsis "Media asset management")
8156 (description
8157 "This package provides utilities to merge, minify and compress Javascript
8158and CSS files,supporting a variety of different filters, including YUI, jsmin,
8159jspacker or CSS tidy. It also supports URL rewriting in CSS files.")
8160 (license license:bsd-2)))
8161
8162(define-public python-cssmin
8163 (package
8164 (name "python-cssmin")
8165 (version "0.2.0")
8166 (source
8167 (origin
8168 (method git-fetch)
8169 (uri (git-reference
8170 (url "https://github.com/zacharyvoase/cssmin")
8171 (commit (string-append "v" version))))
8172 (file-name (git-file-name name version))
8173 (sha256
8174 (base32 "04bzpal6j26pjjjf3p7iq6g2wcr61j4g0ygqz6h847h4hsyah9qg"))))
8175 (build-system pyproject-build-system)
8176 (arguments (list #:tests? #f)) ; No tests.
8177 (native-inputs (list python-setuptools))
8178 (home-page "https://github.com/zacharyvoase/cssmin")
8179 (synopsis "Python port of the YUI CSS Compressor")
8180 (description "Python port of the YUI CSS Compressor.")
8181 (license (list license:expat license:bsd-3))))
8182
8183(define-public python-elastic-transport
8184 (package
8185 (name "python-elastic-transport")
8186 (version "9.1.0")
8187 (source
8188 (origin
8189 (method url-fetch)
8190 (uri (pypi-uri "elastic_transport" version))
8191 (sha256
8192 (base32 "0g879z8rqrfbwkxsm6xcycjha1swl7gdgs6m0y0j1zmh4m5f940m"))))
8193 (build-system pyproject-build-system)
8194 (arguments
8195 (list
8196 #:test-flags
8197 ;; Deselect failing tests (mostly due to network not reachable)
8198 #~(list "-k"
8199 (string-append
8200 "not .badssl.com"
8201 " and not test_assert_fingerprint_in_cert_chain_failure"))
8202 #:phases
8203 #~(modify-phases %standard-phases
8204 (add-after 'unpack 'fix-pytest-config
8205 (lambda _
8206 ;; Drop test coverage requirements.
8207 (substitute* "setup.cfg"
8208 (("--cov(-[^ ]*)?=[^ ]*") "\n")))))))
8209 (propagated-inputs (list python-certifi python-urllib3))
8210 (native-inputs (list nss-certs-for-test
8211 python-aiohttp
8212 ;; python-furo
8213 python-httpx
8214 python-opentelemetry-api
8215 python-opentelemetry-sdk
8216 python-orjson
8217 python-pytest
8218 python-pytest-asyncio
8219 ;; python-pytest-cov
8220 python-pytest-httpbin
8221 python-pytest-httpserver
8222 python-pytest-mock
8223 python-requests
8224 python-respx ;test
8225 python-setuptools
8226 ;; python-sphinx
8227 ;; python-sphinx-autodoc-typehints
8228 python-trustme
8229 python-wheel))
8230 (home-page "https://github.com/elastic/elastic-transport-python")
8231 (synopsis "Common library for Python Elastic client libraries")
8232 (description
8233 "This library was lifted from @code{elasticsearch-py} and then transformed to
8234be used across all Elastic services rather than only Elasticsearch. It
8235provides transport classes and utilities shared among Python Elastic client
8236libraries.")
8237 ;; Apache-2.0 in setup.py and LICENSE file.
8238 (license license:asl2.0)))
8239
8240(define-public python-elasticsearch
8241 (package
8242 (name "python-elasticsearch")
8243 (version "9.1.1")
8244 (source
8245 (origin
8246 (method git-fetch) ; no tests in PyPI release
8247 (uri (git-reference
8248 (url "https://github.com/elastic/elasticsearch-py")
8249 (commit (string-append "v" version))))
8250 (file-name (git-file-name name version))
8251 (sha256
8252 (base32 "015x73y84nyigcyg00lh32p2pfrqf834fr7clfnzymgzrrxa73jf"))))
8253 (build-system pyproject-build-system)
8254 (native-inputs
8255 (list nss-certs-for-test
8256 python-aiohttp
8257 python-dateutil
8258 python-mock
8259 python-orjson
8260 python-pytest
8261 python-pytest-asyncio
8262 python-pytest-cov
8263 python-pytz
8264 python-pyyaml
8265 python-requests
8266 python-hatchling))
8267 (propagated-inputs
8268 (list python-certifi
8269 python-elastic-transport))
8270 (home-page "https://github.com/elastic/elasticsearch-py")
8271 (synopsis "Low-level client for Elasticsearch")
8272 (description "Official low-level client for Elasticsearch. Its goal is to
8273provide common ground for all Elasticsearch-related code in Python; because of
8274this it tries to be opinion-free and very extendable.")
8275 ;; Apache-2.0 in setup.py and LICENSE file.
8276 (license license:asl2.0)))
8277
8278(define-public python-engineio
8279 (package
8280 (name "python-engineio")
8281 (version "4.12.2")
8282 (source
8283 (origin
8284 (method url-fetch)
8285 (uri (pypi-uri "python_engineio" version))
8286 (sha256
8287 (base32
8288 "1ynyf3n29biwkm6nwzzwzhr4m19lsir1x5azxq2nl7xyw7zi5rz7"))))
8289 (build-system pyproject-build-system)
8290 (arguments
8291 (list
8292 #:test-flags
8293 #~(list "-k"
8294 "not test_static_file_routing and not test_static_files")))
8295 (native-inputs
8296 (list python-pytest
8297 python-pytest-asyncio
8298 python-setuptools
8299 python-tornado))
8300 (propagated-inputs
8301 (list python-aiohttp
8302 python-requests
8303 python-simple-websocket
8304 python-websocket-client))
8305 (home-page "https://github.com/miguelgrinberg/python-engineio/")
8306 (synopsis "Engine.IO server")
8307 (description "This package provides a Python implementation of the
8308@code{Engine.IO} realtime client and server.")
8309 (license license:expat)))
8310
8311(define-public python-ephemeral-port-reserve
8312 (package
8313 (name "python-ephemeral-port-reserve")
8314 (version "1.1.4")
8315 (source
8316 (origin
8317 (method git-fetch) ;no tests in PyPI archvie
8318 (uri (git-reference
8319 (url "https://github.com/Yelp/ephemeral-port-reserve")
8320 (commit (string-append "v" version))))
8321 (file-name (git-file-name name version))
8322 (sha256
8323 (base32 "1ifmf5zcw7mhbm73awmf5jwc4rw8lhk81mn4zp797lwkysjm38s7"))))
8324 (build-system pyproject-build-system)
8325 (native-inputs
8326 (list python-pytest
8327 python-setuptools
8328 python-wheel))
8329 (home-page "https://github.com/Yelp/ephemeral-port-reserve/")
8330 (synopsis "Find an unused port, reliably")
8331 (description
8332 "Bind to an ephemeral port, force it into the TIME_WAIT state, and unbind
8333it.")
8334 (license license:expat)))
8335
8336(define-public python-flask-migrate
8337 (package
8338 (name "python-flask-migrate")
8339 (version "4.1.0")
8340 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
8341 (source (origin
8342 (method git-fetch)
8343 (uri (git-reference (url home-page)
8344 (commit (string-append "v" version))))
8345 (file-name (git-file-name name version))
8346 (sha256
8347 (base32
8348 "09qw1hhyssa5gahm199x67d55c55m3k9m23xp2bdacwsiv8jw57g"))))
8349 (build-system pyproject-build-system)
8350 (propagated-inputs
8351 (list python-flask python-alembic python-flask-sqlalchemy))
8352 (native-inputs
8353 (list python-pytest python-setuptools python-wheel))
8354 (synopsis "SQLAlchemy database migrations for Flask programs using
8355Alembic")
8356 (description "This package contains SQLAlchemy database migration tools
8357for Flask programs that are using @code{python-alembic}.")
8358 (license license:expat)))
8359
8360(define-public python-genshi
8361 (package
8362 (name "python-genshi")
8363 (version "0.7.10")
8364 (source
8365 (origin
8366 (method git-fetch)
8367 (uri (git-reference
8368 (url "https://github.com/edgewall/genshi")
8369 (commit version)))
8370 (file-name (git-file-name name version))
8371 (sha256
8372 (base32 "1dmf0ggp0s3371jv483kjriw9jscawxcik6q70a0wqjdfh5383i6"))))
8373 (build-system pyproject-build-system)
8374 (arguments (list #:test-backend #~'unittest))
8375 (native-inputs (list python-setuptools))
8376 (propagated-inputs (list python-six))
8377 (home-page "https://genshi.edgewall.org/")
8378 (synopsis "Toolkit for generation of output for the web")
8379 (description "Genshi is a Python library that provides an integrated set
8380of components for parsing, generating, and processing HTML, XML or other
8381textual content for output generation on the web.")
8382 (license license:bsd-3)))
8383
8384(define-public python-flask-principal
8385 (package
8386 (name "python-flask-principal")
8387 (version "0.4.0")
8388 (source
8389 (origin
8390 (method git-fetch)
8391 (uri (git-reference
8392 (url "https://github.com/pallets-eco/flask-principal")
8393 (commit version)))
8394 (file-name (git-file-name name version))
8395 (sha256
8396 (base32 "0hcqcj768inmyfsw1y2vk6pa9p22dh138ll809rhpz9vjz6spnqk"))))
8397 (build-system pyproject-build-system)
8398 (propagated-inputs (list python-blinker))
8399 (native-inputs (list python-flask python-pynose python-setuptools))
8400 (home-page "https://github.com/pallets-eco/flask-principal")
8401 (synopsis "Identity management for Flask")
8402 (description
8403 "@code{flask_principal} is a identity management library for Flask. It
8404supports managing both authentication and authorization data in a thread-local
8405variable.")
8406 (license license:expat)))
8407
8408(define-public python-flask-httpauth
8409 (package
8410 (name "python-flask-httpauth")
8411 (version "4.8.0")
8412 (source
8413 (origin
8414 (method url-fetch)
8415 (uri (pypi-uri "Flask-HTTPAuth" version))
8416 (sha256
8417 (base32
8418 "0yh9fn6pak64has89pcy03f1cn198vkil872y5jjr53kph2qlmk6"))))
8419 (build-system pyproject-build-system)
8420 (propagated-inputs (list python-flask))
8421 (native-inputs
8422 (list nss-certs-for-test
8423 python-pytest
8424 python-setuptools
8425 python-wheel))
8426 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
8427 (synopsis "Basic and Digest HTTP authentication for Flask routes")
8428 (description "@code{flask_httpauth} provides Basic and Digest HTTP
8429authentication for Flask routes.")
8430 (license license:expat)))
8431
8432(define-public python-uritemplate
8433 (package
8434 (name "python-uritemplate")
8435 (version "4.2.0")
8436 (source
8437 (origin
8438 (method url-fetch)
8439 (uri (pypi-uri "uritemplate" version))
8440 (sha256
8441 (base32
8442 "03lxxkk0kjn6z7z1f9hqvsaqfrny1qds7vi36f35b2c7h38jw328"))))
8443 (build-system pyproject-build-system)
8444 (native-inputs (list python-pytest python-setuptools))
8445 (home-page "https://uritemplate.readthedocs.io/")
8446 (synopsis "Library to deal with URI Templates")
8447 (description "@code{uritemplate} provides Python library to deal with URI
8448Templates.")
8449 ;; The software is made available under the terms of *either* of the
8450 ;; licenses found in LICENSE.APACHE or LICENSE.BSD. Contributions
8451 ;; are made under *both* licenses (excerpt from the LICENSE file).
8452 (license (list license:bsd-2 license:asl2.0))))
8453
8454(define-public python-uritemplate-3
8455 (package
8456 (inherit python-uritemplate)
8457 (name "python-uritemplate")
8458 (version "3.0.1")
8459 (source (origin
8460 (method url-fetch)
8461 (uri (pypi-uri "uritemplate" version))
8462 (sha256
8463 (base32 "1bkwmgr0ia9gcn4bszs2xlvml79f0bi2s4a87xg22ky9rq8avy2s"))))))
8464
8465(define-public python-publicsuffix
8466 (package
8467 (name "python-publicsuffix")
8468 (version "1.1.0")
8469 (source (origin
8470 (method url-fetch)
8471 (uri (pypi-uri "publicsuffix" version))
8472 (sha256
8473 (base32
8474 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
8475 (build-system python-build-system)
8476 (arguments
8477 `(#:tests? #f)) ; tests use the internet
8478 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
8479 (synopsis "Get suffix for a domain name")
8480 (description "Get a public suffix for a domain name using the Public Suffix
8481List.")
8482 (license license:expat)))
8483
8484(define-public python-publicsuffix2
8485 (package
8486 (name "python-publicsuffix2")
8487 (version "2.2019-12-21")
8488 (source
8489 (origin
8490 (method git-fetch)
8491 (uri (git-reference
8492 (url "https://github.com/pombredanne/python-publicsuffix2")
8493 (commit (string-append "release-" version))))
8494 (file-name (git-file-name name version))
8495 (sha256
8496 (base32 "1dkvfvl0izq9hqzilnw8ipkbgjs9xyad9p21i3864hzinbh0wp9r"))))
8497 (build-system pyproject-build-system)
8498 (arguments
8499 (list
8500 #:tests? #f ;the test suite requires network access
8501 #:phases
8502 #~(modify-phases %standard-phases
8503 (add-after 'unpack 'ignore-maintainer-inputs
8504 (lambda _
8505 ;; Comment out a demand for python-requests, which is used only by
8506 ;; the unused ‘update_psl’ helper command.
8507 (substitute* "setup.py"
8508 (("'requests " match)
8509 (format #f "# ~a" match))))))))
8510 (native-inputs (list python-setuptools))
8511 (home-page "https://github.com/pombredanne/python-publicsuffix2")
8512 (synopsis
8513 "Get a public suffix for a domain name using the Public Suffix List")
8514 (description
8515 "Get a public suffix for a domain name using the Public Suffix List.
8516Forked from and using the same API as the publicsuffix package.")
8517 (license (list license:expat license:mpl2.0))))
8518
8519(define-public python-werkzeug
8520 (package
8521 (name "python-werkzeug")
8522 (version "3.1.3")
8523 (source
8524 (origin
8525 (method url-fetch)
8526 (uri (pypi-uri "werkzeug" version))
8527 (sha256
8528 (base32
8529 "0ij7si3aa3ykac7k7fz481h4majqqwn2iqwhjxkji4y18plkqwk0"))))
8530 (build-system pyproject-build-system)
8531 (arguments
8532 (list
8533 #:test-flags
8534 ;; Test requiring networking setup.
8535 #~(list "--ignore=tests/test_serving.py"
8536 "--deselect=tests/test_debug.py::test_basic"
8537 "--deselect=tests/test_exceptions.py::test_response_body"
8538 "--deselect=tests/middleware/test_http_proxy.py::test_http_proxy")))
8539 (native-inputs
8540 (list python-flit-core
8541 python-pytest
8542 python-watchdog
8543 python-ephemeral-port-reserve
8544 python-pytest-timeout
8545 python-pytest-xprocess))
8546 (propagated-inputs
8547 (list python-markupsafe
8548 python-requests))
8549 (home-page "https://palletsprojects.com/p/werkzeug/")
8550 (synopsis "Utilities for WSGI applications")
8551 (description "One of the most advanced WSGI utility modules. It includes a
8552powerful debugger, full-featured request and response objects, HTTP utilities to
8553handle entity tags, cache control headers, HTTP dates, cookie handling, file
8554uploads, a powerful URL routing system and a bunch of community-contributed
8555addon modules.")
8556 (license license:x11)))
8557
8558(define-public python-werkzeug-1.0
8559 (package
8560 (inherit python-werkzeug)
8561 (version "1.0.1")
8562 (source (origin
8563 (method url-fetch)
8564 (uri (pypi-uri "Werkzeug" version))
8565 (sha256
8566 (base32
8567 "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c"))
8568 (patches (search-patches "python-werkzeug-tests.patch"))))
8569 (arguments
8570 (list
8571 #:phases
8572 '(modify-phases %standard-phases
8573 (add-after 'unpack 'ignore-warnings
8574 (lambda _
8575 (substitute* "setup.cfg"
8576 ((" error.*") "")))))))
8577 (propagated-inputs
8578 (list python-requests))
8579 (native-inputs
8580 (list python-pytest python-pytest-timeout python-setuptools
8581 python-wheel))))
8582
8583(define-public python-bottle
8584 (package
8585 (name "python-bottle")
8586 (version "0.13.4")
8587 (source
8588 (origin
8589 (method url-fetch)
8590 (uri (pypi-uri "bottle" version))
8591 (sha256
8592 (base32 "0irz5i3h73pqz0ssgp3yk12zx33q7lrlh8p0in9jgchjgqr7hzkq"))))
8593 (build-system pyproject-build-system)
8594 (native-inputs (list python-pytest python-setuptools))
8595 (home-page "https://bottlepy.org/")
8596 (synopsis "WSGI framework for small web-applications")
8597 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
8598 (license license:expat)))
8599
8600(define-public python-wtforms
8601 (package
8602 (name "python-wtforms")
8603 (version "3.1.2")
8604 (source
8605 (origin
8606 (method url-fetch)
8607 (uri (pypi-uri "wtforms" version))
8608 (sha256
8609 (base32 "1fblnkzvs6339glwx8bskdjy7nhn2ap90y9g6b399713sy063mzq"))))
8610 (build-system pyproject-build-system)
8611 (native-inputs (list python-hatchling python-pytest))
8612 (propagated-inputs (list python-babel python-email-validator
8613 python-markupsafe))
8614 (home-page "https://wtforms.readthedocs.io/")
8615 (synopsis
8616 "Form validation and rendering library for Python web development")
8617 (description
8618 "WTForms is a flexible forms validation and rendering library
8619for Python web development. It is very similar to the web form API
8620available in Django, but is a standalone package.")
8621 (license license:bsd-3)))
8622
8623(define-public python-wtforms-sqlalchemy
8624 (package
8625 (name "python-wtforms-sqlalchemy")
8626 (version "0.4.1")
8627 (source
8628 (origin
8629 (method url-fetch)
8630 (uri (pypi-uri "WTForms-SQLAlchemy" version))
8631 (sha256
8632 (base32 "1nx4x0ifanlbrzh3f9ns8ihnchlkzf54ilvqmgcgcz2j72vm43rp"))))
8633 (build-system pyproject-build-system)
8634 (native-inputs (list python-pytest python-setuptools python-wheel))
8635 (propagated-inputs (list python-sqlalchemy python-wtforms))
8636 (home-page "https://github.com/wtforms/wtforms-sqlalchemy/")
8637 (synopsis "SQLAlchemy tools for WTForms")
8638 (description
8639 "WTForms-SQLAlchemy is a fork of the @code{wtforms.ext.sqlalchemy}
8640package from WTForms. The package has been renamed to
8641@code{wtforms_sqlalchemy} but otherwise should function the same as
8642@code{wtforms.ext.sqlalchemy} did.")
8643 (license license:bsd-3)))
8644
8645(define-public python-urlgrabber
8646 (package
8647 (name "python-urlgrabber")
8648 (version "4.1.0")
8649 (source
8650 (origin
8651 (method url-fetch)
8652 (uri (pypi-uri "urlgrabber" version))
8653 (sha256
8654 (base32 "0fg16zlw49cw7pjq9dhpc5vd35d5zz1mlki55m464qxfmfpzhnh7"))))
8655 (build-system pyproject-build-system)
8656 (arguments
8657 (list
8658 #:tests? #f ; Most tests require network access.
8659 #:phases
8660 #~(modify-phases %standard-phases
8661 (replace 'check
8662 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8663 (when tests?
8664 (invoke "python" "test/runtests.py")))))))
8665 (native-inputs (list python-setuptools))
8666 (propagated-inputs
8667 (list python-pycurl python-setuptools python-six))
8668 (home-page "http://urlgrabber.baseurl.org/") ; no HTTPS
8669 (synopsis "High-level cross protocol url-grabber")
8670 (description
8671 "@code{urlgrabber} is a library that unifies access to files available on
8672the web, FTP or locally. It supports HTTP, FTP and file:// protocols, it
8673supports features like HTTP keep-alive, reget, throttling and more.")
8674 (license license:lgpl2.1+)))
8675
8676(define-public python-pycares
8677 (package
8678 (name "python-pycares")
8679 (version "4.11.0")
8680 (source
8681 (origin
8682 (method git-fetch)
8683 (uri (git-reference
8684 (url "https://github.com/saghul/pycares")
8685 (commit (string-append "v" version))))
8686 (file-name (git-file-name name version))
8687 (sha256
8688 (base32 "18syxp9bpm70zfiw427p7cpp6wg0ybrw6b32c1zvdp2i8jgd82xl"))
8689 (snippet #~(begin
8690 (rmdir "deps/c-ares")))))
8691 (build-system pyproject-build-system)
8692 (arguments
8693 (list
8694 ;; XXX: Half of the tests require internet access
8695 ;; There is currently no markers to avoid running them.
8696 #:tests? #f
8697 #:phases
8698 #~(modify-phases %standard-phases
8699 (add-after 'unpack 'configure-system-lib
8700 (lambda _
8701 (setenv "PYCARES_USE_SYSTEM_LIB" "1"))))))
8702 (native-inputs (list python-pytest python-setuptools))
8703 (inputs (list c-ares))
8704 (propagated-inputs (list python-cffi))
8705 (home-page "https://github.com/saghul/pycares")
8706 (synopsis "Python interface for @code{c-ares}")
8707 (description
8708 "@code{pycares} is a Python module which provides an interface to
8709@code{c-ares}, a C library that performs DNS requests and name resolutions
8710asynchronously.")
8711 (license license:expat)))
8712
8713(define-public python-yarl
8714 (package
8715 (name "python-yarl")
8716 (version "1.18.3")
8717 (source
8718 (origin
8719 (method url-fetch)
8720 (uri (pypi-uri "yarl" version))
8721 (sha256
8722 (base32
8723 "1qfj6kvdxr8bzka4lp0bh0xfgr5mzx7zzvj2jb4vcxxzbk20265c"))))
8724 (build-system pyproject-build-system)
8725 (arguments
8726 (list
8727 #:test-flags '(list "--ignore-glob=tests/test_*_benchmarks.py")
8728 #:phases
8729 '(modify-phases %standard-phases
8730 (add-after 'unpack 'patch-build-system
8731 (lambda _
8732 ;; XXX: I don't know how to tell it to build the extensions in
8733 ;; place.
8734 (substitute* "packaging/pep517_backend/_backend.py"
8735 (("build_inplace=False") "build_inplace=True")))))))
8736 (native-inputs
8737 (list python-covdefaults
8738 python-cython
8739 python-expandvars
8740 python-pytest
8741 python-pytest-cov
8742 python-pytest-xdist
8743 python-setuptools
8744 python-tomli
8745 python-wheel))
8746 (propagated-inputs
8747 (list python-packaging python-idna python-multidict python-propcache))
8748 (home-page "https://github.com/aio-libs/yarl/")
8749 (synopsis "Yet another URL library")
8750 (description "@code{yarl} module provides handy @code{URL} class
8751for URL parsing and changing.")
8752 (license license:asl2.0)))
8753
8754(define-public python-canvasapi
8755 (package
8756 (name "python-canvasapi")
8757 (version "3.4.0")
8758 (source (origin
8759 (method git-fetch)
8760 (uri (git-reference
8761 (url "https://github.com/ucfopen/canvasapi")
8762 (commit (string-append "v" version))))
8763 (file-name (git-file-name name version))
8764 (sha256
8765 (base32
8766 "017gashyd4avxzlz3imwn18vmfd0cjyhbm063isra3d2wk3ivrkx"))))
8767 (build-system pyproject-build-system)
8768 (propagated-inputs (list python-arrow python-pytz python-requests))
8769 (native-inputs (list python-pytest
8770 python-requests-mock
8771 python-setuptools
8772 python-urllib3))
8773 (home-page "https://github.com/ucfopen/canvasapi")
8774 (synopsis "API wrapper for the Canvas LMS")
8775 (description
8776 "CanvasAPI is a Python library for accessing Instructure’s Canvas LMS API.
8777The library enables developers to programmatically manage Canvas courses,
8778users, gradebooks, and more.")
8779 (license license:expat)))
8780
8781(define-public python-google
8782 (package
8783 (name "python-google")
8784 (version "3.0.0")
8785 (source
8786 (origin
8787 (method url-fetch)
8788 (uri (pypi-uri "google" version))
8789 (sha256
8790 (base32 "1gncv3l11za0mpxvmpaf5n5j3jzp282rz62yml4ha4z55q930d8l"))))
8791 (build-system pyproject-build-system)
8792 (arguments (list #:tests? #f)) ;There are no tests.
8793 (native-inputs (list python-setuptools))
8794 (propagated-inputs (list python-beautifulsoup4))
8795 (home-page "https://breakingcode.wordpress.com/")
8796 (synopsis "Python bindings to the Google search engine")
8797 (description
8798 "This package provides Python bindings for using the Google search
8799engine. Its module is called @code{googlesearch}.")
8800 (license license:bsd-3)))
8801
8802(define-public python-google-api-client
8803 (package
8804 (name "python-google-api-client")
8805 (version "2.187.0")
8806 (source
8807 (origin
8808 (method git-fetch)
8809 (uri (git-reference
8810 (url "https://github.com/google/google-api-python-client")
8811 (commit (string-append "v" version))))
8812 (file-name (git-file-name name version))
8813 (sha256
8814 (base32 "09vq5d32avri0gl8c7nn5dv2xds1jzjms7vqk3gn66nm2m37x8mv"))))
8815 (build-system pyproject-build-system)
8816 (arguments
8817 (list
8818 #:test-flags
8819 #~(list
8820 "-k"
8821 (string-join
8822 (list
8823 ;; XXX: Deprecated behavior.
8824 "not test_client_options_universe_configured_with_mtls"
8825 "test_universe_env_var_configured_with_mtls"
8826 ;; XXX: Requires CA certificates.
8827 "test_credentials_and_credentials_file_mutually_exclusive")
8828 " and not ")
8829 "tests")))
8830 (native-inputs
8831 (list python-parameterized
8832 python-pytest
8833 python-setuptools))
8834 (propagated-inputs
8835 (list python-google-api-core
8836 python-google-auth
8837 python-google-auth-httplib2
8838 python-httplib2
8839 python-pyparsing
8840 python-uritemplate-3))
8841 (home-page "https://github.com/google/google-api-python-client")
8842 (synopsis "Core Python library for accessing Google APIs")
8843 (description "Python client library for Google's discovery based APIs")
8844 (license license:asl2.0)))
8845
8846(define-public python-google-auth-httplib2
8847 (package
8848 (name "python-google-auth-httplib2")
8849 (version "0.2.0")
8850 (source (origin
8851 (method url-fetch)
8852 (uri (pypi-uri "google-auth-httplib2" version))
8853 (sha256
8854 (base32 "018fckshilc6z2qpj1pclh8haanbq3lr85w6p4g4z5wgyjnppaiq"))))
8855 (build-system pyproject-build-system)
8856 (propagated-inputs
8857 (list python-google-auth python-httplib2))
8858 (native-inputs
8859 (list python-pytest
8860 python-pyparsing
8861 python-pytest-localserver
8862 python-flask
8863 python-setuptools))
8864 (home-page
8865 "https://github.com/GoogleCloudPlatform/google-auth-library-python-httplib2")
8866 (synopsis "Google Authentication Library: httplib2 transport")
8867 (description "This package provides a Google Authentication Library plugin
8868for httplib2 transport.")
8869 (license license:asl2.0)))
8870
8871(define-public python-google-auth-oauthlib
8872 (package
8873 (name "python-google-auth-oauthlib")
8874 (version "1.2.3")
8875 (home-page
8876 "https://github.com/GoogleCloudPlatform/\
8877google-auth-library-python-oauthlib")
8878 (source
8879 (origin
8880 (method git-fetch)
8881 (uri (git-reference
8882 (url home-page)
8883 (commit (string-append "v" version))))
8884 (file-name (git-file-name name version))
8885 (sha256
8886 (base32 "1f269aaj02403shbj0iz4w16wwxr6im5fl42dkkk4mf2jw8ns46l"))))
8887 (build-system pyproject-build-system)
8888 (propagated-inputs (list python-google-auth python-requests-oauthlib))
8889 (native-inputs
8890 (list python-click python-mock python-pytest python-setuptools))
8891 (synopsis "Google Authentication Library: oauthlib")
8892 (description "This package provides a Google Authentication Library plugin
8893with oauthlib.")
8894 (license license:asl2.0)))
8895
8896(define-public whoogle-search
8897 (package
8898 (name "whoogle-search")
8899 (version "0.8.4")
8900 (source (origin
8901 (method url-fetch)
8902 (uri (pypi-uri "whoogle-search" version))
8903 (sha256
8904 (base32
8905 "0hsy4l98nzj6i1lf63wvqd0yharkaz44zsxh863ymy47rxnwimz7"))))
8906 (build-system pyproject-build-system)
8907 (arguments
8908 (list
8909 ;; The tests need network access
8910 #:tests? #f))
8911 (propagated-inputs
8912 (list python-beautifulsoup4
8913 python-brotli
8914 python-cryptography
8915 python-cssutils
8916 python-defusedxml
8917 python-flask
8918 python-dotenv
8919 python-requests
8920 python-stem
8921 python-validators
8922 python-waitress))
8923 (native-inputs (list python-setuptools python-wheel))
8924 (home-page "https://github.com/benbusby/whoogle-search")
8925 (synopsis "Self-hosted, ad-free, privacy-respecting metasearch engine")
8926 (description
8927 "Get Google results, but without any ads, javascript, AMP links,
8928cookies, or IP address tracking. Quick and simple to implement as a primary
8929search engine replacement on both desktop and mobile.")
8930 (license license:expat)))
8931
8932(define-public python-hawkauthlib
8933 (package
8934 (name "python-hawkauthlib")
8935 (version "2.0.0")
8936 (source
8937 (origin
8938 (method git-fetch)
8939 (uri (git-reference
8940 (url "https://github.com/mozilla-services/hawkauthlib")
8941 (commit (string-append "v" version))))
8942 (file-name (git-file-name name version))
8943 (sha256
8944 (base32 "0pdpk3fp87ngfsyp4lm2z7z8b203jxsmvbz59q6r6xgg9sp4cl3l"))))
8945 (build-system pyproject-build-system)
8946 (arguments (list #:test-backend #~'unittest))
8947 (native-inputs (list python-setuptools))
8948 (propagated-inputs (list python-requests python-webob))
8949 (home-page "https://github.com/mozilla-services/hawkauthlib")
8950 (synopsis "Hawk Access Authentication protocol")
8951 (description
8952 "This is a low-level Python library for implementing Hawk Access
8953Authentication, a simple HTTP request-signing scheme.")
8954 (license license:mpl2.0)))
8955
8956(define-public python-pybrowserid
8957 (package
8958 (name "python-pybrowserid")
8959 (version "0.14.0")
8960 (source
8961 (origin
8962 (method git-fetch)
8963 (uri (git-reference
8964 (url "https://github.com/mozilla/PyBrowserID")
8965 (commit version)))
8966 (file-name (git-file-name name version))
8967 (sha256
8968 (base32 "0in0sbj56wrz5mlrj6wkd3h7rrp7714c5rkxvkfwp60s2hr6ynj6"))))
8969 (build-system pyproject-build-system)
8970 (arguments (list #:test-backend #~'unittest))
8971 (propagated-inputs (list python-requests))
8972 (native-inputs (list python-mock python-setuptools))
8973 (home-page "https://github.com/mozilla/PyBrowserID")
8974 (synopsis "Python library for the BrowserID protocol")
8975 (description
8976 "This is a Python client library for the BrowserID protocol that
8977underlies Mozilla Persona.")
8978 (license license:mpl2.0)))
8979
8980(define-public python-pyfxa
8981 (package
8982 (name "python-pyfxa")
8983 (version "0.8.1")
8984 (source
8985 (origin
8986 (method git-fetch)
8987 (uri (git-reference
8988 (url "https://github.com/mozilla/PyFxA")
8989 (commit (string-append "v" version))))
8990 (file-name (git-file-name name version))
8991 (sha256
8992 (base32 "11iaw50x5ic9cqp3jwkvhk8mz00dhg8xhl1kkx45zrb8nnrfw2vs"))))
8993 (build-system pyproject-build-system)
8994 (arguments
8995 (list
8996 ;; These tests require network access
8997 #:test-flags #~(list "--ignore=fxa/tests/test_core.py")))
8998 (propagated-inputs
8999 (list python-cryptography
9000 python-pyjwt
9001 python-parameterized
9002 python-hawkauthlib
9003 python-requests))
9004 (native-inputs
9005 (list python-grequests
9006 python-hatchling
9007 python-mock
9008 python-pytest
9009 python-responses))
9010 (home-page "https://github.com/mozilla/PyFxA")
9011 (synopsis "Firefox Accounts client library for Python")
9012 (description
9013 "This is a Python library for interacting with the Firefox Accounts
9014ecosystem.")
9015 (license license:mpl2.0)))
9016
9017(define-public python-hyperlink
9018 (package
9019 (name "python-hyperlink")
9020 (version "21.0.0")
9021 (source
9022 (origin
9023 (method url-fetch)
9024 (uri (pypi-uri "hyperlink" version))
9025 (sha256
9026 (base32
9027 "0sx50lkivsfjxx9zr4yh7l9gll2l9kvl0v0w8w4wk2x5v9bzjyj2"))))
9028 (build-system pyproject-build-system)
9029 (arguments
9030 (list #:phases
9031 #~(modify-phases %standard-phases
9032 (add-before 'check 'pretend-to-be-CI
9033 (lambda _
9034 ;; Pretend to be a CI system to skip flaky tests.
9035 (setenv "CI" "true"))))))
9036 (native-inputs
9037 (list python-pytest python-setuptools python-wheel))
9038 (propagated-inputs
9039 (list python-idna))
9040 (home-page "https://github.com/python-hyper/hyperlink")
9041 (synopsis "Python module to create immutable URLs according to spec")
9042 (description "This package provides a Python module to create immutable, and
9043correct URLs for Python according to RFCs 3986 and 3987.")
9044 (license license:expat)))
9045
9046(define-public python-treq
9047 (package
9048 (name "python-treq")
9049 (version "24.9.1")
9050 (source
9051 (origin
9052 (method url-fetch)
9053 (uri (pypi-uri "treq" version))
9054 (sha256
9055 (base32
9056 "1a7yrq2m7hf77fia4fc0c6zanvwnykpgirdbs1cyvr7k0k27znhm"))))
9057 (build-system pyproject-build-system)
9058 (native-inputs
9059 (list python-httpbin
9060 python-pytest
9061 python-service-identity
9062 python-setuptools
9063 python-wheel))
9064 (propagated-inputs
9065 (list python-attrs
9066 python-hyperlink
9067 python-incremental
9068 python-requests
9069 python-twisted
9070 python-typing-extensions))
9071 (home-page "https://github.com/twisted/treq")
9072 (synopsis "Requests-like API built on top of twisted.web's Agent")
9073 (description "This package provides an HTTP library inspired by
9074@code{requests} but written on top of Twisted's @code{Agents}. It offers a
9075high level API for making HTTP requests when using Twisted.")
9076 (license license:expat)))
9077
9078(define-public python-autobahn
9079 (package
9080 (name "python-autobahn")
9081 (version "25.11.1")
9082 (source
9083 (origin
9084 (method url-fetch)
9085 (uri (pypi-uri "autobahn" version))
9086 (sha256
9087 (base32
9088 "1w9wyyqzg1dil8jsjm08n2pnk6jws87scli932drhghcr2f2prjj"))))
9089 (build-system pyproject-build-system)
9090 (arguments
9091 (list
9092 ;; The tests fail to run:
9093 ;; https://github.com/crossbario/autobahn-python/issues/1117
9094 #:tests? #f
9095 #:phases #~(modify-phases %standard-phases
9096 (add-after 'unpack 'relax-zope-interface
9097 (lambda _
9098 ;; python-zope-interface is a world rebuild package
9099 ;; and our one-digit lower minor version seems to be
9100 ;; fine.
9101 (substitute* "setup.py"
9102 (("zope.interface>=5.2.0")
9103 "zope.interface>=5.1.0"))))
9104 (add-after 'unpack 'strip-xbr
9105 (lambda _
9106 ;; Strip new XBR feature which isn't available in Guix.
9107 (setenv "AUTOBAHN_STRIP_XBR" "1"))))))
9108 (native-inputs (list python-setuptools python-wheel))
9109 (propagated-inputs (list python-cbor2
9110 python-cryptography
9111 python-hyperlink
9112 python-msgpack
9113 python-py-ubjson
9114 python-twisted
9115 python-txaio
9116 python-ujson))
9117 (home-page "https://github.com/crossbario/autobahn-python/")
9118 (synopsis "Web Application Messaging Protocol implementation")
9119 (description "This package provides an implementation of the @dfn{Web Application
9120Messaging Protocol} (WAMP). WAMP connects components in distributed
9121applications using Publish and Subscribe (PubSub) and routed Remote Procedure
9122Calls (rRPC). It is ideal for distributed, multi-client and server applications
9123such as IoT applications or multi-user database-driven business applications.")
9124 (license license:expat)))
9125
9126(define-public python-ws4py
9127 (package
9128 (name "python-ws4py")
9129 (version "0.6.0")
9130 (source
9131 (origin
9132 (method git-fetch)
9133 (uri (git-reference
9134 (url "https://github.com/Lawouach/WebSocket-for-Python")
9135 (commit version)))
9136 (file-name (git-file-name name version))
9137 (sha256
9138 (base32
9139 "00y6s8gk20936njqbxr8vjliviiz7r7pqrlwg7xi8zzs6903xvv6"))))
9140 (build-system pyproject-build-system)
9141 (arguments
9142 (list
9143 #:phases
9144 #~(modify-phases %standard-phases
9145 (add-after 'unpack 'remove-cherrypy-support
9146 (lambda _
9147 (delete-file "ws4py/server/cherrypyserver.py")
9148 (delete-file "test/test_cherrypy.py"))))))
9149 (native-inputs (list python-setuptools python-pytest))
9150 (propagated-inputs
9151 (list python-gevent python-tornado))
9152 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
9153 (synopsis "WebSocket client and server library")
9154 (description
9155 "This package provides a WebSocket client and server library for Python.")
9156 (license license:bsd-3)))
9157
9158(define-public python-slowapi
9159 (package
9160 (name "python-slowapi")
9161 (version "0.1.9")
9162 (source
9163 (origin
9164 (method git-fetch)
9165 (uri (git-reference
9166 (url "https://github.com/laurents/slowapi")
9167 (commit (string-append "v" version))))
9168 (file-name (git-file-name name version))
9169 (sha256
9170 (base32 "1lc1n6lvh01dhhrc507qri9rz1w72l2riii03ixh7n7n1gwjpws7"))))
9171 (build-system pyproject-build-system)
9172 (arguments
9173 (list
9174 #:test-flags
9175 ;; These tests fail because the timestamp contains more decimal points
9176 ;; than expected, so a simple equality comparison fails.
9177 '(list "-k" (string-append "not test_headers_no_breach"
9178 " and not test_headers_breach"))))
9179 (propagated-inputs (list python-limits python-redis))
9180 (native-inputs
9181 (list python-fastapi
9182 python-hiro
9183 python-mock
9184 python-poetry-core
9185 python-pytest))
9186 (home-page "https://github.com/laurents/slowapi")
9187 (synopsis "Rate limiting extension for Starlette and Fastapi")
9188 (description
9189 "This package provides a rate limiting extension for Starlette and
9190Fastapi.")
9191 (license license:expat)))
9192
9193(define-public python-slugify
9194 (package
9195 (name "python-slugify")
9196 (version "8.0.4")
9197 (source
9198 (origin
9199 (method git-fetch)
9200 (uri (git-reference
9201 (url "https://github.com/un33k/python-slugify")
9202 (commit (string-append "v" version))))
9203 (file-name (git-file-name name version))
9204 (sha256
9205 (base32 "0z83nwy7acc72mb2jv3516nfplah1wm61wkmnzl71dh8i4q985yd"))))
9206 (build-system pyproject-build-system)
9207 (arguments (list #:test-backend #~'unittest))
9208 (native-inputs (list python-setuptools))
9209 (propagated-inputs (list python-unidecode python-text-unidecode))
9210 (home-page "https://github.com/un33k/python-slugify")
9211 (synopsis "Python Slugify application that handles Unicode")
9212 (description "This package provides a @command{slufigy} command and
9213library to create slugs from unicode strings while keeping it DRY.")
9214 (license license:expat)))
9215
9216(define-public python-branca
9217 (package
9218 (name "python-branca")
9219 (version "0.7.2")
9220 (source
9221 (origin
9222 (method git-fetch) ; no tests in PyPI
9223 (uri (git-reference
9224 (url "https://github.com/python-visualization/branca")
9225 (commit (string-append "v" version))))
9226 (file-name (git-file-name name version))
9227 (sha256
9228 (base32 "1vs94nqa7r6iwm8mj3m29hg090gmgz4ywnayxh8qiz9ij8jv96wa"))))
9229 (build-system pyproject-build-system)
9230 (arguments
9231 ;; This file requires Selenium.
9232 (list #:test-flags #~(list "--ignore" "tests/test_iframe.py"
9233 ;; This test passes but is very slow.
9234 "-k" "not test_color_brewer_extendability")
9235 #:phases
9236 #~(modify-phases %standard-phases
9237 (add-before 'build 'pretend-version
9238 ;; The version string is usually derived via setuptools-scm,
9239 ;; but without the git metadata available, the version string
9240 ;; is set to '0.0.0'.
9241 (lambda _
9242 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
9243 #$(package-version this-package)))))))
9244 (propagated-inputs (list python-jinja2))
9245 (native-inputs
9246 (list python-numpy
9247 python-pytest
9248 python-setuptools
9249 python-setuptools-scm
9250 python-wheel))
9251 (home-page "https://github.com/python-visualization/branca")
9252 (synopsis "Generate complex HTML+JS pages with Python")
9253 (description "This library is a spinoff from @code{folium} that would host
9254the non-map-specific features. It can be used to generate HTML + JS.")
9255 (license license:expat)))
9256
9257(define-public python-tinycss2
9258 (package
9259 (name "python-tinycss2")
9260 (version "1.4.0")
9261 (source
9262 (origin
9263 (method git-fetch)
9264 (uri (git-reference
9265 (url "https://github.com/Kozea/tinycss2")
9266 (commit (string-append "v" version))
9267 (recursive? #true)))
9268 (file-name (git-file-name name version))
9269 (sha256
9270 (base32 "11m5vhpdz6zlzq2lqqklkhd0h4jxblpvcrdf9cc4s06nhr9acp0r"))))
9271 (build-system pyproject-build-system)
9272 (native-inputs
9273 (list python-flit
9274 python-pytest
9275 python-pytest-cov))
9276 (propagated-inputs
9277 (list python-webencodings))
9278 (home-page "https://tinycss2.readthedocs.io/")
9279 (synopsis "Low-level CSS parser for Python")
9280 (description "@code{tinycss2} can parse strings, return Python objects
9281representing tokens and blocks, and generate CSS strings corresponding to
9282these objects.
9283
9284Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
9285grammar of CSS but doesn’t know specific rules, properties or values supported
9286in various CSS modules.")
9287 (license license:bsd-3)))
9288
9289(define-public python-cssselect2
9290 (package
9291 (name "python-cssselect2")
9292 (version "0.4.1")
9293 (source
9294 (origin
9295 (method url-fetch)
9296 (uri (pypi-uri "cssselect2" version))
9297 (sha256
9298 (base32 "1j2fcr217rsvkipsg6zjq03rl64rxnvb5hqqpx0dv58fhspvkywk"))))
9299 (build-system pyproject-build-system)
9300 (arguments
9301 `(#:phases
9302 (modify-phases %standard-phases
9303 (add-after 'unpack 'disable-linters
9304 ;; Their check fails; none of our business.
9305 (lambda _
9306 (substitute* '("setup.py" "pyproject.toml")
9307 (("'pytest-flake8',") "")
9308 (("'pytest-isort',") "")
9309 (("--flake8") "")
9310 (("--isort") "")))))))
9311 (propagated-inputs
9312 (list python-tinycss2))
9313 (native-inputs
9314 (list python-flit python-pytest-cov python-pytest-runner))
9315 (home-page "https://cssselect2.readthedocs.io/")
9316 (synopsis "CSS selectors for Python ElementTree")
9317 (description "@code{cssselect2} is a straightforward implementation of
9318CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
9319ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
9320
9321Unlike the Python package @code{cssselect}, it does not translate selectors to
9322XPath and therefore does not have all the correctness corner cases that are
9323hard or impossible to fix in cssselect.")
9324 (license license:bsd-3)))
9325
9326(define-public python-uvloop
9327 (package
9328 (name "python-uvloop")
9329 (version "0.21.0")
9330 (source
9331 (origin
9332 (method url-fetch)
9333 (uri (pypi-uri "uvloop" version))
9334 (sha256
9335 (base32 "1qq46ym3ymzfn4j6fnykfmr1f4qnb7x7p15dlw37hi38v87jpw9v"))
9336 (modules '((guix build utils)))
9337 (snippet
9338 '(begin (delete-file-recursively "vendor")
9339 (delete-file "uvloop/loop.c")))))
9340 (build-system pyproject-build-system)
9341 (arguments
9342 (list
9343 #:test-flags
9344 ;; The tests are prone to get stuck. Use pytest-timeout’s --timeout flag
9345 ;; to get a meaningful idea about where.
9346 #~(list "--timeout=300"
9347 "--timeout-method=thread"
9348 "-k" (string-join
9349 (list
9350 ;; Timeout, because SIGINT cannot be sent to child.
9351 "not test_signals_sigint_pycode_continue"
9352 "test_signals_sigint_pycode_stop"
9353 "test_signals_sigint_uvcode"
9354 "test_signals_sigint_uvcode_two_loop_runs"
9355 ;; This test is racy and prone to get stuck on
9356 ;; various platforms, possibly a aiohttp issue:
9357 ;; https://github.com/MagicStack/uvloop/issues/412
9358 "test_remote_shutdown_receives_trailing_data"
9359 ;; It looks like pytest is preventing
9360 ;; custom stdout/stderr redirection,
9361 ;; even with -s.
9362 "test_process_streams_redirect"
9363 ;; FileNotFoundError: [Errno 2] No such file or
9364 ;; directory
9365 "test_process_env_2"
9366 ;; socket.gaierror: [Errno -2] Name or service not known
9367 "test_getaddrinfo_21"
9368 #$@(if (target-riscv64?)
9369 `("test_renegotiation")
9370 `()))
9371 " and not "))
9372 #:phases
9373 #~(modify-phases %standard-phases
9374 (add-after 'unpack 'preparations
9375 (lambda _
9376 ;; Use packaged libuv.
9377 (substitute* "setup.py" (("self.use_system_libuv = False")
9378 "self.use_system_libuv = True"))
9379 ;; Replace hardcoded shell command.
9380 (substitute* "uvloop/loop.pyx"
9381 (("b'/bin/sh'") (string-append "b'" (which "sh") "'")))))
9382 #$@(if (target-riscv64?)
9383 `((add-after 'unpack 'adjust-test-timeouts
9384 (lambda _
9385 (substitute* '("tests/test_tcp.py"
9386 "tests/test_unix.py")
9387 (("SSL_HANDSHAKE_TIMEOUT = 15\\.0")
9388 "SSL_HANDSHAKE_TIMEOUT = 30.0")))))
9389 '())
9390 (add-before 'check 'pre-check
9391 (lambda* (#:key tests? #:allow-other-keys)
9392 (when tests?
9393 ;; Remove Python module, which conflicts with the installed
9394 ;; version, but lacks the built C module.
9395 (delete-file-recursively "uvloop")))))))
9396 (native-inputs
9397 (list python-aiohttp
9398 python-cython
9399 python-psutil
9400 python-pyopenssl
9401 python-pytest
9402 python-pytest-timeout
9403 python-setuptools
9404 python-wheel))
9405 (inputs
9406 (list libuv))
9407 (home-page "https://github.com/MagicStack/uvloop")
9408 (synopsis "Fast implementation of asyncio event loop on top of libuv")
9409 (description
9410 "@code{uvloop} is a fast, drop-in replacement of the built-in asyncio
9411event loop. It is implemented in Cython and uses libuv under the hood.")
9412 (license license:expat)))
9413
9414(define-public gunicorn
9415 (package
9416 (name "gunicorn")
9417 (version "22.0.0")
9418 (source
9419 (origin
9420 (method url-fetch)
9421 (uri (pypi-uri "gunicorn" version))
9422 (sha256
9423 (base32
9424 "0qzc3ghayc137hlwrqqwkkhaf8f5h9ja21qwy4rznxpz75i462sa"))))
9425 ;; CVE-2024-1135 is fixed in version 22.0.0.
9426 (properties `((lint-hidden-cve . ("CVE-2024-1135"))))
9427 (outputs '("out" "doc"))
9428 (build-system pyproject-build-system)
9429 (arguments
9430 `(#:test-flags
9431 ;; Disable the geventlet tests because eventlet uses dnspython, which
9432 ;; does not work in the build container due to lack of /etc/resolv.conf
9433 '("--ignore=tests/workers/test_geventlet.py")
9434 #:phases (modify-phases %standard-phases
9435 (add-after 'build 'build-doc
9436 (lambda _
9437 (invoke "make"
9438 "-C"
9439 "docs"
9440 "PAPER=a4"
9441 "html"
9442 "info")
9443 (delete-file "docs/build/texinfo/Makefile")
9444 (delete-file "docs/build/texinfo/Gunicorn.texi")))
9445 (add-after 'install 'install-doc
9446 (lambda* (#:key outputs #:allow-other-keys)
9447 (let* ((doc (string-append (assoc-ref outputs "doc")
9448 "/share/doc/"
9449 ,name "-"
9450 ,version))
9451 (html (string-append doc "/html"))
9452 (info (string-append doc "/info"))
9453 (examples (string-append doc "/examples")))
9454 (mkdir-p html)
9455 (mkdir-p info)
9456 (mkdir-p examples)
9457 (copy-recursively "docs/build/html" html)
9458 (copy-recursively "docs/build/texinfo" info)
9459 (copy-recursively "examples" examples)
9460 (for-each (lambda (file)
9461 (copy-file file
9462 (string-append doc "/" file)))
9463 '("README.rst" "NOTICE" "LICENSE" "THANKS")))))
9464 ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see
9465 ;; <https://bugs.gnu.org/25235>), leading to an inflated closure
9466 ;; size. Override it to only add the essential entries.
9467 (replace 'wrap
9468 (lambda* (#:key native-inputs inputs outputs
9469 #:allow-other-keys)
9470 (let* ((out (assoc-ref outputs "out"))
9471 (python (assoc-ref (or native-inputs inputs)
9472 "python"))
9473 (sitedir (string-append "/lib/python"
9474 (python-version python)
9475 "/site-packages")))
9476 (wrap-program (string-append out "/bin/gunicorn")
9477 `("PYTHONPATH" ":" prefix
9478 ,(map (lambda (output)
9479 (string-append output sitedir))
9480 (list python out))))))))))
9481 (inputs (list bash-minimal))
9482 (native-inputs (list binutils ;for ctypes.util.find_library()
9483 python-aiohttp
9484 python-gevent
9485 python-pytest
9486 python-pytest-cov
9487 python-sphinx
9488 texinfo))
9489 (propagated-inputs (list python-packaging python-setuptools python-wheel))
9490 (home-page "https://gunicorn.org/")
9491 (synopsis "Python WSGI HTTP Server for UNIX")
9492 (description
9493 "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
9494Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
9495Unicorn project. The Gunicorn server is broadly compatible with
9496various web frameworks, simply implemented, light on server resources,
9497and fairly speedy.")
9498 (license license:expat)))
9499
9500;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
9501;; its tests
9502(define-public gunicorn-bootstrap
9503 (package
9504 (inherit gunicorn)
9505 (name "gunicorn")
9506 (arguments `(#:tests? #f))
9507 (properties '((hidden? . #t)))
9508 (native-inputs `())))
9509
9510(define-public python-httptools
9511 (package
9512 (name "python-httptools")
9513 (version "0.7.1")
9514 (source
9515 (origin
9516 ;; PyPI tarball comes with a vendored http-parser and no tests.
9517 (method git-fetch)
9518 (uri (git-reference
9519 (url "https://github.com/MagicStack/httptools")
9520 (commit (string-append "v" version))))
9521 (file-name (git-file-name name version))
9522 (sha256
9523 (base32 "0j9c1av3y1smg6lgh0i031l07i9plzbvv14jj53vpzm35sy7kbl7"))
9524 (modules '((guix build utils)))
9525 (snippet
9526 #~(begin (delete-file-recursively "vendor")))))
9527 (build-system pyproject-build-system)
9528 (arguments
9529 (list
9530 #:test-flags
9531 ;; XXX: AssertionError: HttpParserError not raised.
9532 #~(list "-k" "not test_parser_response_leninent_headers_1")
9533 #:phases
9534 #~(modify-phases %standard-phases
9535 (add-after 'unpack 'configure-build-ext
9536 (lambda _
9537 (with-output-to-file "setup.cfg"
9538 (lambda ()
9539 (display "\
9540[build_ext]
9541use_system_llhttp = true
9542use_system_http_parser = true
9543cython_always = true"))))))))
9544 (native-inputs
9545 (list python-cython
9546 python-pytest
9547 python-setuptools))
9548 (inputs
9549 (list http-parser
9550 llhttp))
9551 (home-page "https://github.com/MagicStack/httptools")
9552 (synopsis "Collection of framework independent HTTP protocol utils")
9553 (description
9554 "@code{httptools} is a Python binding for the nodejs HTTP parser.")
9555 (license license:expat)))
9556
9557(define-public python-uvicorn
9558 (package
9559 (name "python-uvicorn")
9560 (version "0.34.0")
9561 (source
9562 (origin
9563 ;; PyPI tarball has no tests.
9564 (method git-fetch)
9565 (uri (git-reference
9566 (url "https://github.com/encode/uvicorn")
9567 (commit version)))
9568 (file-name (git-file-name name version))
9569 (sha256
9570 (base32 "05lkxnpzmr0kik81kdcvavjvvc4d1lgmw88mr4vbwsqk147wgqbc"))))
9571 (build-system pyproject-build-system)
9572 (arguments
9573 (list
9574 #:test-flags
9575 #~(list "-o" "asyncio_mode=auto"
9576 ;; For some reason tests stacked in infinity re-invocation loop:
9577 ;; AssertionError where is_alive =
9578 ;; <uvicorn.supervisors.multiprocess.Process object at
9579 ;; 0x7ffff39b6110>.is_alive.
9580 ;; Maybe this <https://github.com/encode/uvicorn/issues/2466>.
9581 "--ignore=tests/supervisors/test_multiprocess.py"
9582
9583 #$@(cond
9584 ((or (target-aarch64?)
9585 (target-riscv64?))
9586 '("-k not test_send_binary_data_to_server_bigger_than_default_on_websockets"))
9587 (#t '())))))
9588 (native-inputs
9589 (list nss-certs-for-test
9590 python-a2wsgi
9591 python-hatchling
9592 python-httpx-bootstrap
9593 python-pytest
9594 python-pytest-asyncio-0.26
9595 python-pytest-mock
9596 python-requests
9597 python-trustme
9598 python-wsproto))
9599 (propagated-inputs
9600 (list python-a2wsgi
9601 python-click
9602 python-dotenv
9603 python-h11
9604 python-httptools
9605 python-pyyaml
9606 python-uvloop
9607 python-watchfiles
9608 python-websockets))
9609 (home-page "https://github.com/encode/uvicorn")
9610 (synopsis "Fast ASGI server implementation")
9611 (description
9612 "@code{uvicorn} is a fast ASGI server implementation, using @code{uvloop}
9613and @code{httptools}. It currently supports HTTP/1.1 and WebSockets. Support
9614for HTTP/2 is planned.")
9615 (license license:bsd-3)))
9616
9617(define-public python-translation-finder
9618 (package
9619 (name "python-translation-finder")
9620 (version "2.22")
9621 (source
9622 (origin
9623 (method url-fetch)
9624 (uri (pypi-uri "translation_finder" version))
9625 (sha256
9626 (base32 "1hav99ccijvk2w8wpvba2pc7ba1z150vja2wvaimd069mc08pjd2"))))
9627 (build-system pyproject-build-system)
9628 (arguments
9629 (list
9630 #:test-flags
9631 ;; AssertionError: 31 != 30 : Mismatched count of results
9632 #~(list "--deselect=translation_finder/test_api.py::APITest::test_discover_file")))
9633 (native-inputs
9634 (list python-pytest
9635 python-setuptools))
9636 (propagated-inputs
9637 (list python-charset-normalizer
9638 python-ruamel.yaml
9639 python-weblate-language-data))
9640 (home-page "https://weblate.org/")
9641 (synopsis "Translation file finder for Weblate")
9642 (description "This package provides a function to find translation file in
9643the source code of a project. It supports many translation file formats and
9644is part of the Weblate translation platform.")
9645 (license license:gpl3+)))
9646
9647(define-public python-gitlab
9648 (package
9649 (name "python-gitlab")
9650 (version "7.0.0")
9651 (source
9652 (origin
9653 (method git-fetch)
9654 (uri (git-reference
9655 (url "https://github.com/python-gitlab/python-gitlab")
9656 (commit (string-append "v" version))))
9657 (file-name (git-file-name name version))
9658 (sha256
9659 (base32 "0rf1hz5n724f8sfc7g3fzfz96jsv9y145pi6gc8qscsjq3z4vi37"))))
9660 (build-system pyproject-build-system)
9661 (arguments
9662 (list
9663 #:test-flags
9664 #~(list "--ignore=tests/unit/test_graphql.py"
9665 ;; XXX: Missing helper script.
9666 "-k" "not test_data_from_helper" "tests/unit")))
9667 (native-inputs
9668 (list python-anyio
9669 python-pytest
9670 python-responses
9671 python-setuptools))
9672 (propagated-inputs (list python-requests python-requests-toolbelt))
9673 (home-page "https://github.com/python-gitlab/python-gitlab")
9674 (synopsis "Interact with GitLab API")
9675 (description "This package provides an extended library for interacting
9676with GitLab instances through their API.")
9677 (license license:lgpl3+)))
9678
9679(define-public python-path-and-address
9680 (package
9681 (name "python-path-and-address")
9682 (version "2.0.1")
9683 (source
9684 (origin
9685 (method git-fetch)
9686 (uri (git-reference
9687 (url "https://github.com/joeyespo/path-and-address")
9688 (commit (string-append "v" version))))
9689 (file-name (git-file-name name version))
9690 (sha256
9691 (base32 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
9692 (build-system pyproject-build-system)
9693 (native-inputs
9694 (list python-pytest python-setuptools))
9695 (home-page "https://github.com/joeyespo/path-and-address")
9696 (synopsis "Functions for command-line server tools used by humans")
9697 (description "Path-and-address resolves ambiguities of command-line
9698interfaces, inferring which argument is the path, and which is the address.")
9699 (license license:expat)))
9700
9701;; XXX: This project missed maintainer upstream, see
9702;; <https://github.com/joeyespo/grip/issues/387>.
9703;; Consider to remove if it keeps failing to build.
9704(define-public grip
9705 (package
9706 (name "grip")
9707 (version "4.6.1")
9708 (source
9709 (origin
9710 (method git-fetch)
9711 (uri (git-reference
9712 (url "https://github.com/joeyespo/grip")
9713 (commit (string-append "v" version))))
9714 (file-name (git-file-name name version))
9715 (sha256
9716 (base32 "0vhimd99zw7s1fihwr6yfij6ywahv9gdrfcf5qljvzh75mvzcwh8"))))
9717 (build-system pyproject-build-system)
9718 (arguments
9719 (list
9720 #:test-flags
9721 ;; All tests fail requiring network access, ignore the whole file.
9722 #~(list "--ignore=tests/test_github.py")
9723 #:phases
9724 #~(modify-phases %standard-phases
9725 ;; This fixes the removal of `charset` attribute of requests from
9726 ;; Werkzeug 2.3.0.
9727 ;; Fixed in grip's commit <2784eb2c1515f1cdb1554d049d48b3bff0f42085>.
9728 (add-after 'unpack 'fix-response-encoding
9729 (lambda _
9730 (substitute* "grip/app.py"
9731 (("response.charset")
9732 "getattr(response, 'charset', 'utf-8')")))))))
9733 (native-inputs
9734 (list nss-certs-for-test
9735 python-pytest
9736 python-responses
9737 python-setuptools
9738 python-wheel))
9739 (propagated-inputs
9740 (list python-docopt
9741 python-flask
9742 python-markdown
9743 python-path-and-address
9744 python-pygments
9745 python-requests))
9746 (home-page "https://github.com/joeyespo/grip")
9747 (synopsis "Preview Markdown files using the GitHub API")
9748 (description
9749 "Grip is a command-line server application written in Python that uses
9750the GitHub Markdown API to render a local Markdown file. The styles and
9751rendering come directly from GitHub, so you'll know exactly how it will
9752appear. Changes you make to the file will be instantly reflected in the
9753browser without requiring a page refresh.")
9754 (license license:expat)))
9755
9756(define-public python-port-for
9757 (package
9758 (name "python-port-for")
9759 (version "0.7.4")
9760 (source
9761 (origin
9762 (method url-fetch)
9763 (uri (pypi-uri "port_for" version))
9764 (sha256
9765 (base32 "13826s2d4hzzmv69wws6a7ryhminclv2bqaw6cpl929gnbki6xzw"))))
9766 (build-system pyproject-build-system)
9767 (propagated-inputs
9768 (list python-urllib3))
9769 (native-inputs
9770 (list python-pytest python-setuptools python-wheel))
9771 (home-page "https://github.com/kmike/port-for/")
9772 (synopsis "TCP localhost port finder and association manager")
9773 (description
9774 "This package provides a utility that helps with local TCP ports
9775management. It can find an unused TCP localhost port and remember the
9776association.")
9777 (license license:expat)))
9778
9779(define-public python-livereload
9780 (package
9781 (name "python-livereload")
9782 (version "2.7.1")
9783 (source
9784 (origin
9785 (method git-fetch)
9786 (uri (git-reference
9787 (url "https://github.com/lepture/python-livereload")
9788 (commit (string-append "v" version))))
9789 (file-name (git-file-name name version))
9790 (sha256
9791 (base32 "19wkdd1grw6mcd4qi8iaw4jdr207h3m24951vgy69j7g904lynjq"))))
9792 (build-system pyproject-build-system)
9793 (arguments (list #:test-backend #~'unittest))
9794 (native-inputs (list python-django python-setuptools))
9795 (propagated-inputs (list python-tornado))
9796 (home-page "https://github.com/lepture/python-livereload")
9797 (synopsis "Python LiveReload")
9798 (description
9799 "Python LiveReload provides a command line utility, @command{livereload},
9800for starting a web server in a directory. It can trigger arbitrary commands
9801and serve updated contents upon changes to the directory.")
9802 (license license:bsd-3)))
9803
9804(define-public python-vf-1
9805 (package
9806 (name "python-vf-1")
9807 (version "1.0.0")
9808 (source
9809 (origin
9810 (method git-fetch)
9811 (uri (git-reference
9812 (url "https://git.sr.ht/~solderpunk/VF-1")
9813 (commit (string-append "v" version))))
9814 (file-name (git-file-name name version))
9815 (sha256
9816 (base32 "1j8l4xivm6rs8jms1ixx0i9fz4yxr84hbz1pdc498jgkgzy1v8ih"))))
9817 (build-system pyproject-build-system)
9818 (arguments (list #:tests? #f)) ; No tests.
9819 (native-inputs (list python-setuptools))
9820 (home-page "https://git.sr.ht/~solderpunk/VF-1")
9821 (synopsis "Command line gopher client")
9822 (description "@code{VF-1} is a command line gopher client with
9823@acronym{TLS, Transport Layer Security} support.")
9824 (license license:bsd-2)))
9825
9826(define-public python-httpcore
9827 (package
9828 (name "python-httpcore")
9829 (version "1.0.9")
9830 (source
9831 (origin
9832 ;; PyPI tarball does not contain tests.
9833 (method git-fetch)
9834 (uri (git-reference
9835 (url "https://github.com/encode/httpcore")
9836 (commit version)))
9837 (file-name (git-file-name name version))
9838 (sha256
9839 (base32 "0yhm2n8qflpwjsjggyj757m0gw3n68al0my0ljybndwp933ipl32"))))
9840 (build-system pyproject-build-system)
9841 (native-inputs
9842 (list nss-certs-for-test
9843 python-hatch-fancy-pypi-readme
9844 python-hatchling
9845 python-pytest
9846 python-pytest-asyncio
9847 python-pytest-httpbin
9848 python-pytest-trio
9849 python-uvicorn
9850 python-trustme))
9851 (propagated-inputs
9852 (list python-anyio
9853 python-certifi
9854 python-h11
9855 python-h2
9856 python-sniffio
9857 python-socksio
9858 python-trio
9859 python-trio-typing))
9860 (home-page "https://github.com/encode/httpcore")
9861 (synopsis "Minimal, low-level HTTP client")
9862 (description
9863 "HTTP Core provides a minimal and low-level HTTP client, which does one
9864thing only: send HTTP requests.
9865
9866Some things HTTP Core does do:
9867
9868@itemize
9869@item Sending HTTP requests.
9870@item Provides both sync and async interfaces.
9871@item Supports HTTP/1.1 and HTTP/2.
9872@item Async backend support for asyncio and trio.
9873@item Automatic connection pooling.
9874@item HTTP(S) proxy support.
9875@end itemize")
9876 (license license:bsd-3)))
9877
9878;;; Variant used to break a cycle between python-httpx and python-uvicorn.
9879(define-public python-httpcore-bootstrap
9880 (hidden-package
9881 (package/inherit python-httpcore
9882 (name "python-httpcore-bootstrap")
9883 (arguments (list #:tests? #f))
9884 (native-inputs (list python-hatchling
9885 python-hatch-fancy-pypi-readme)))))
9886
9887(define-public python-httpx
9888 (package
9889 (name "python-httpx")
9890 (version "0.28.1")
9891 (source
9892 (origin
9893 ;; PyPI tarball does not contain tests.
9894 (method git-fetch)
9895 (uri (git-reference
9896 (url "https://github.com/encode/httpx")
9897 (commit version)))
9898 (file-name (git-file-name name version))
9899 (sha256
9900 (base32 "00d6rb21xwazwb0sj68zhra0qxxcwkd0vv7bg3k1jg94dmk2w7xl"))))
9901 (build-system pyproject-build-system)
9902 (arguments
9903 (list
9904 ;; 1401 passed, 1 skipped, 5 deselected
9905 #:test-flags
9906 #~(list "-o" "asyncio_mode=auto"
9907 ;; CLI tests are broken.
9908 "--ignore=tests/test_main.py"
9909 "-k" (string-join
9910 ;; These tests try to open an outgoing connection.
9911 (list "not test_async_proxy_close"
9912 "test_sync_proxy_clos"
9913 "test_write_timeout")
9914 " and not "))))
9915 (native-inputs
9916 (list nss-certs-for-test
9917 python-chardet
9918 python-cryptography
9919 python-hatch-fancy-pypi-readme
9920 python-hatchling
9921 python-pytest
9922 python-pytest-asyncio
9923 python-pytest-trio
9924 python-setuptools
9925 python-trio
9926 python-trustme
9927 python-uvicorn))
9928 (propagated-inputs
9929 (list python-anyio
9930 python-certifi
9931 python-httpcore
9932 python-idna
9933 ;; [brotli]
9934 python-brotli
9935 ;; [http2]
9936 python-h2
9937 ;; [socks]
9938 python-socksio
9939 ;; [zstd]
9940 python-zstandard
9941 ;; For trio, see:
9942 ;; <https://github.com/python-trio/trio/issues/2802>.
9943 python-sniffio))
9944 (home-page "https://www.python-httpx.org/")
9945 (synopsis "HTTP client for Python")
9946 (description
9947 "HTTPX is a fully featured HTTP client for Python 3, which provides sync
9948and async APIs, and support for both HTTP/1.1 and HTTP/2.
9949
9950HTTPX builds on the well-established usability of requests, and gives you:
9951
9952@itemize
9953@item A broadly requests-compatible API.
9954@item Standard synchronous interface, but with async support if you need it.
9955@item HTTP/1.1 and HTTP/2 support.
9956@item Ability to make requests directly to WSGI applications or ASGI applications.
9957@item Strict timeouts everywhere.
9958@item Fully type annotated.
9959@item 99% test coverage.
9960@end itemize
9961
9962Plus all the standard features of requests:
9963
9964@itemize
9965@item International Domains and URLs
9966@item Keep-Alive & Connection Pooling
9967@item Sessions with Cookie Persistence
9968@item Browser-style SSL Verification
9969@item Basic/Digest Authentication
9970@item Elegant Key/Value Cookies
9971@item Automatic Decompression
9972@item Automatic Content Decoding
9973@item Unicode Response Bodies
9974@item Multipart File Uploads
9975@item HTTP(S) Proxy Support
9976@item Connection Timeouts
9977@item Streaming Downloads
9978@item .netrc Support
9979@item Chunked Requests
9980@end itemize")
9981 (license license:bsd-3)))
9982
9983;;; Variant used to break a cycle with python-uvicorn.
9984(define-public python-httpx-bootstrap
9985 (hidden-package
9986 (package/inherit python-httpx
9987 (name "python-httpx-bootstrap")
9988 (arguments (list #:tests? #f))
9989 (native-inputs
9990 (list python-hatchling
9991 python-hatch-fancy-pypi-readme))
9992 (propagated-inputs
9993 (modify-inputs (package-propagated-inputs python-httpx)
9994 (replace "python-httpcore" python-httpcore-bootstrap))))))
9995
9996(define-public python-wsgiprox
9997 (package
9998 (name "python-wsgiprox")
9999 (version "1.5.2")
10000 (source
10001 (origin
10002 (method url-fetch)
10003 (uri (pypi-uri "wsgiprox" version))
10004 (sha256
10005 (base32 "11fsm199pvwbmqx2lccznvws65aam1rqqv0w79gal8hispwgd5rs"))))
10006 (build-system pyproject-build-system)
10007 (arguments
10008 ;; The test suite hangs (see:
10009 ;; https://github.com/webrecorder/wsgiprox/issues/6).
10010 (list
10011 #:tests? #f
10012 #:phases
10013 #~(modify-phases %standard-phases
10014 (add-after 'unpack 'fix-pytest-argument
10015 (lambda _
10016 ;; See: https://github.com/webrecorder/wsgiprox/issues/7.
10017 (substitute* "setup.py"
10018 (("--doctest-module")
10019 "--doctest-modules")))))))
10020 (propagated-inputs
10021 (list python-certauth python-gevent python-websocket-client))
10022 (native-inputs
10023 (list python-mock python-pytest-cov python-waitress python-setuptools))
10024 (home-page "https://github.com/webrecorder/wsgiprox")
10025 (synopsis "HTTP/S proxy with WebSockets over WSGI")
10026 (description
10027 "@code{wsgiprox} is a Python WSGI (Web Server Gateway Interface)
10028middle-ware for adding HTTP and HTTPS proxy support to a WSGI application.
10029The library accepts HTTP and HTTPS proxy connections, and routes them to a
10030designated prefix.")
10031 (license license:asl2.0)))
10032
10033(define-public python-warcio
10034 ;; The PyPI release is missing some test support files (see:
10035 ;; https://github.com/webrecorder/warcio/issues/132).
10036 (package
10037 (name "python-warcio")
10038 (version "1.7.5")
10039 (source
10040 (origin
10041 (method git-fetch)
10042 (uri (git-reference
10043 (url "https://github.com/webrecorder/warcio")
10044 (commit (string-append "v" version))))
10045 (file-name (git-file-name name version))
10046 (sha256
10047 (base32
10048 "0r3kijsm8wsbipi5pxsrqpg5nn4w8iaw5i8010b0ligmfxnxamlb"))))
10049 (build-system pyproject-build-system)
10050 (arguments
10051 (list
10052 #:test-flags ; These tests fail due to networking requirements.
10053 '(list "-k" (format #f "not ~a"
10054 (string-join
10055 '("test_post_chunked"
10056 "test_remote"
10057 "test_capture_http_proxy"
10058 "test_capture_https_proxy"
10059 "test_capture_https_proxy_same_session")
10060 " and not "))
10061 ; The following test requires the hookdns package.
10062 "--ignore=test/test_capture_http_proxy.py")))
10063 (native-inputs
10064 ;; These inputs are required for the test suite.
10065 (list python-httpbin
10066 python-pytest-cov
10067 python-requests
10068 python-setuptools
10069 python-wheel
10070 python-wsgiprox))
10071 (home-page "https://github.com/webrecorder/warcio")
10072 (synopsis "Streaming web archival archive (WARC) library")
10073 (description "warcio is a Python library to read and write the WARC format
10074commonly used in Web archives. It is designed for fast, low-level access to
10075web archival content, oriented around a stream of WARC records rather than
10076files.")
10077 (license license:asl2.0)))
10078
10079(define-public python-websockets
10080 (package
10081 (name "python-websockets")
10082 (version "13.1")
10083 (source
10084 (origin
10085 (method git-fetch)
10086 (uri (git-reference
10087 (url "https://github.com/aaugustin/websockets")
10088 (commit version)))
10089 (file-name (git-file-name name version))
10090 (sha256
10091 (base32
10092 "1dx3rf6fmg4ir9cfcn1fil446qz879cwrjq2rcz5zvl71xkw6hb3"))))
10093 (build-system pyproject-build-system)
10094 (arguments
10095 (list #:test-backend #~'unittest
10096 #:phases
10097 #~(modify-phases %standard-phases
10098 (add-before 'check 'extend-test-timeout
10099 (lambda _
10100 ;; Some architectures need an even longer timeout. Make it
10101 ;; long enough that it should never fail due to timeout.
10102 #$@(if (target-riscv64?)
10103 #~((setenv "WEBSOCKETS_TESTS_TIMEOUT_FACTOR" "100"))
10104 #~((setenv "WEBSOCKETS_TESTS_TIMEOUT_FACTOR" "10"))))))))
10105 (native-inputs
10106 (list python-setuptools
10107 python-wheel))
10108 (home-page "https://github.com/aaugustin/websockets")
10109 (synopsis
10110 "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
10111 (description
10112 "@code{websockets} is a library for building WebSocket servers and clients
10113in Python with a focus on correctness and simplicity.
10114
10115Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
10116it provides an elegant coroutine-based API.")
10117 (license license:bsd-3)))
10118
10119(define-public selenium-manager
10120 (package
10121 (name "selenium-manager")
10122 (version "4.34.2")
10123 (source
10124 (origin
10125 (method git-fetch)
10126 (uri (git-reference
10127 (url "https://github.com/SeleniumHQ/selenium")
10128 (commit (string-append "selenium-" version "-python"))))
10129 (file-name (git-file-name name version))
10130 (sha256
10131 (base32 "14fg8r4rm9d7169rlm29l5yn08wgllmqk1zc6six3dlrzzf5mxil"))))
10132 (build-system cargo-build-system)
10133 (arguments
10134 (list
10135 ;; XXX: Almost all tests require either browsers or network access.
10136 #:tests? #f
10137 #:install-source? #f ; Most likely intended as a leaf.
10138 #:phases
10139 #~(modify-phases %standard-phases
10140 (add-after 'unpack 'chdir
10141 (lambda _
10142 (chdir "rust"))))))
10143 (native-inputs (list pkg-config))
10144 (inputs (cons* (list zstd "lib") xz
10145 (cargo-inputs 'selenium-manager)))
10146 (home-page "https://www.selenium.dev")
10147 (synopsis "CLI tool to manager the browser test infrastructure")
10148 (description
10149 "Selenium simplifies web browser automation. It specifically provides
10150infrastructure for the W3C WebDriver specification — a platform and
10151language-neutral coding interface compatible with all major web browsers.
10152
10153Selenium Manager is a CLI tool that automatically manages the browser/driver
10154infrastructure required by Selenium.")
10155 (license license:asl2.0)))
10156
10157(define-public python-selenium
10158 (package/inherit selenium-manager
10159 (name "python-selenium")
10160 (build-system pyproject-build-system)
10161 (arguments
10162 (list
10163 ;; XXX: Disable failing tests.
10164 #:test-flags
10165 #~(list "--ignore-glob=test/selenium/webdriver/*"
10166 ;; Probably requires those.
10167 "--ignore-glob=test/unit/selenium/webdriver/chrome/*"
10168 "--ignore-glob=test/unit/selenium/webdriver/firefox/*"
10169 ;; XXX: SSL certificates access.
10170 "--ignore=test/unit/selenium/webdriver/remote/remote_connection_tests.py"
10171 "-k" "not test_missing_cdp_devtools_version_falls_back")
10172 #:phases
10173 #~(modify-phases %standard-phases
10174 (add-after 'unpack 'chdir
10175 (lambda _
10176 (chdir "py")))
10177 (add-after 'chdir 'inject-selenium-manager-binary
10178 (lambda* (#:key inputs #:allow-other-keys)
10179 (substitute* "selenium/webdriver/common/selenium_manager.py"
10180 (("compiled_path = Path.*")
10181 (format #f "return Path(~s)~%"
10182 (search-input-file inputs "bin/selenium-manager"))))
10183 (substitute* "pyproject.toml"
10184 (("\\[\\[tool\\.setuptools-rust\\.bins\\]\\]")
10185 "")
10186 (("target = \"selenium\\.webdriver\\.common.*\"")
10187 ""))))
10188 (add-after 'chdir 'relax-requirements
10189 (lambda _
10190 (substitute* "pyproject.toml"
10191 (("\"(typing_extensions|trio)~=.*\"," _ target)
10192 (format #f "~s," target))))))))
10193 (propagated-inputs (list python-certifi
10194 python-trio
10195 python-trio-websocket
10196 python-typing-extensions
10197 python-urllib3
10198 python-websocket-client))
10199 (inputs (list selenium-manager))
10200 (native-inputs (list python-filetype
10201 python-pytest
10202 python-pytest-mock
10203 python-pytest-trio
10204 python-setuptools
10205 python-setuptools-rust))
10206 (synopsis "Python bindings for Selenium")
10207 (description
10208 "Selenium enables web browser automation. It specifically provides
10209infrastructure for the W3C WebDriver specification — a platform and
10210language-neutral coding interface compatible with all major web browsers.")))
10211
10212(define-public python-rapidjson
10213 (package
10214 (name "python-rapidjson")
10215 (version "1.10")
10216 (source
10217 (origin
10218 (method url-fetch)
10219 (uri (pypi-uri "python-rapidjson" version))
10220 (sha256
10221 (base32
10222 "0h1m9m4a5rlf5hw6ak7z3qbgdhmqarzxw9d140mcf7mrxpswpzmc"))
10223 (modules '((guix build utils)))
10224 (snippet
10225 '(delete-file-recursively "rapidjson"))))
10226 (build-system pyproject-build-system)
10227 (arguments
10228 (list
10229 #:test-flags '(list "tests")
10230 #:phases
10231 #~(modify-phases %standard-phases
10232 ;; We cannot seem to use #:configure-flags with the
10233 ;; pyproject-build-system to override rj_include_dir.
10234 (add-after 'unpack 'override-rapidjson-sources
10235 (lambda _
10236 (substitute* "setup.py"
10237 (("^rj_include_dir =.*")
10238 (string-append "rj_include_dir = '"
10239 #$(this-package-native-input "rapidjson")
10240 "/include/rapidjson" "'"))
10241 (("if not os.path.isdir.*") "if False:")))))))
10242 (native-inputs
10243 (list rapidjson python-pytest python-pytz python-setuptools python-wheel))
10244 (home-page "https://github.com/python-rapidjson/python-rapidjson")
10245 (synopsis "Python wrapper around rapidjson")
10246 (description "This package provides a python wrapper around rapidjson.")
10247 (license license:expat)))
10248
10249(define-public python-venusian
10250 (package
10251 (name "python-venusian")
10252 (version "3.1.1")
10253 (source
10254 (origin
10255 (method url-fetch)
10256 (uri (pypi-uri "venusian" version))
10257 (sha256
10258 (base32 "0h8cdwx5x6i1ydc9s0hxwvy73l6iwlqijn2l77mq74k6anrv6ksk"))))
10259 (build-system pyproject-build-system)
10260 (arguments
10261 (list
10262 #:phases
10263 #~(modify-phases %standard-phases
10264 (add-after 'unpack 'fix-pytest-config
10265 (lambda _
10266 (substitute* "setup.cfg"
10267 (("--cov --cov-report=term-missing ") "")))))))
10268 (native-inputs
10269 (list python-pytest
10270 python-setuptools))
10271 (home-page "https://docs.pylonsproject.org/projects/venusian")
10272 (synopsis "Library for deferring decorator actions")
10273 (description
10274 "Venusian is a library which allows framework authors to defer decorator
10275actions. Instead of taking actions when a function (or class) decorator is
10276executed at import time, you can defer the action usually taken by the
10277decorator until a separate scan phase.")
10278 (license license:repoze)))
10279
10280(define-public python-zope-deprecation
10281 (package
10282 (name "python-zope-deprecation")
10283 (version "6.0")
10284 (source (origin
10285 (method url-fetch)
10286 (uri (pypi-uri "zope_deprecation" version))
10287 (sha256
10288 (base32
10289 "0pzimp7xr8m0836bbsrx8wa9ybl58s5hwacas95nsfp6m2ypwwhq"))))
10290 (build-system pyproject-build-system)
10291 (arguments
10292 (list #:tests? #f)) ;no tests in PyPI
10293 (native-inputs
10294 (list python-setuptools))
10295 (home-page "https://zopedeprecation.readthedocs.io/")
10296 (synopsis "Function for marking deprecations")
10297 (description "The @code{zope.deprecation} module provides a function for
10298marking modules, classes, functions, methods and properties as deprecated,
10299displaying warnings when usaged in application code.")
10300 (license license:zpl2.1)))
10301
10302(define-public python-translationstring
10303 (package
10304 (name "python-translationstring")
10305 (version "1.4")
10306 (source (origin
10307 (method url-fetch)
10308 (uri (pypi-uri "translationstring" version))
10309 (sha256
10310 (base32
10311 "1wvncdzi1wj37x226qcf0yycz7js6l83na0pmc9blsbfsww7b55z"))))
10312 (build-system pyproject-build-system)
10313 (native-inputs
10314 (list python-pytest
10315 python-setuptools))
10316 (home-page "https://docs.pylonsproject.org/projects/translationstring")
10317 (synopsis "Internationalization tooling for the Pylons project")
10318 (description "This package provides a library used by various Pylons
10319project packages for internationalization (i18n) duties related to
10320translation.")
10321 (license license:repoze)))
10322
10323(define-public python-plaster
10324 (package
10325 (name "python-plaster")
10326 (version "1.1.2")
10327 (source (origin
10328 (method url-fetch)
10329 (uri (pypi-uri "plaster" version))
10330 (sha256
10331 (base32
10332 "167gfh0ahdll9m96ypgasji6yry2hkn9f0ml1b0lf4ccpxagrgpq"))))
10333 (build-system pyproject-build-system)
10334 (native-inputs
10335 (list python-pytest
10336 python-setuptools))
10337 (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
10338 (synopsis "Configuration loader for multiple config file formats")
10339 (description
10340 "Plaster is a loader interface around multiple config file formats. It
10341exists to define a common API for applications to use when they wish to load
10342configuration. The library itself does not aim to handle anything except a
10343basic API that applications may use to find and load configuration settings.
10344Any specific constraints should be implemented in a pluggable loader which can
10345be registered via an entrypoint.")
10346 (license license:repoze)))
10347
10348(define-public python-plaster-pastedeploy
10349 (package
10350 (name "python-plaster-pastedeploy")
10351 (version "1.0.1")
10352 (source (origin
10353 (method url-fetch)
10354 (uri (pypi-uri "plaster_pastedeploy" version))
10355 (sha256
10356 (base32
10357 "04hl71p76wnwiy195p5w51bn3c6ba0lgx8nsfm42d9s15rnjw9my"))))
10358 (build-system pyproject-build-system)
10359 (native-inputs
10360 (list python-pytest
10361 python-setuptools))
10362 (propagated-inputs
10363 (list python-plaster python-pastedeploy))
10364 (home-page "https://github.com/Pylons/plaster_pastedeploy")
10365 (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
10366 (description
10367 "This plugin for @code{python-plaster} adds support for PasteDeploy
10368syntax, it provides a plaster @code{Loader} object that can parse ini files
10369according to the standard set by PasteDeploy")
10370 (license license:expat)))
10371
10372(define-public python-hupper
10373 (package
10374 (name "python-hupper")
10375 (version "1.12.1")
10376 (source
10377 (origin
10378 (method url-fetch)
10379 (uri (pypi-uri "hupper" version))
10380 (sha256
10381 (base32 "1srj7sqxdgxr0nnhh9lw8jmp64chwgg8iwfm9b4g9v7l1wbm9gq6"))))
10382 (build-system pyproject-build-system)
10383 (arguments
10384 (list
10385 ;; RuntimeError: timeout waiting for change to
10386 ;; file=/tmp/guix-build-python-hupper-1.12.1.drv-0/tmpm9n4697p
10387 #:test-flags #~(list "--ignore=tests/test_it.py")))
10388 (native-inputs
10389 (list python-pytest
10390 python-pytest-cov
10391 python-setuptools
10392 python-wheel))
10393 (propagated-inputs
10394 (list python-watchdog))
10395 (home-page "https://readthedocs.org/projects/hupper")
10396 (synopsis "Integrated process monitor tracking changes to imported Python files")
10397 (description
10398 "Hupper is an integrated process monitor that will track changes to any
10399imported Python files in sys.modules as well as custom paths. When files are
10400changed the process is restarted.")
10401 (license license:expat)))
10402
10403(define-public python-pyowm
10404 (package
10405 (name "python-pyowm")
10406 (version "3.3.0")
10407 (source
10408 (origin
10409 (method git-fetch)
10410 (uri (git-reference
10411 (url "https://github.com/csparpa/pyowm")
10412 (commit version)))
10413 (file-name (git-file-name name version))
10414 (sha256
10415 (base32
10416 "1ha4pp96y3jk33qnyir5851cnj4dc06q6wqn1b0w54l3fsds28vi"))))
10417 (build-system pyproject-build-system)
10418 (arguments (list #:test-flags #~(list "tests/unit")))
10419 (native-inputs (list python-pytest python-setuptools python-wheel))
10420 (propagated-inputs
10421 (list python-geojson-for-pyowm
10422 python-pysocks
10423 python-requests))
10424 (home-page "https://github.com/csparpa/pyowm")
10425 (synopsis "Python wrapper around OpenWeatherMap web APIs")
10426 (description
10427 "This package provides a Python wrapper around OpenWeatherMap web APIs.")
10428 (license license:expat)))
10429
10430(define-public python-pyramid
10431 (package
10432 (name "python-pyramid")
10433 (version "2.0.2")
10434 (source (origin
10435 (method url-fetch)
10436 (uri (pypi-uri "pyramid" version))
10437 (sha256
10438 (base32
10439 "1phqdz068hl3zda263qkjp5am8fmvmpcxp3nrhsna8g472kkh89p"))))
10440 (build-system pyproject-build-system)
10441 (propagated-inputs
10442 (list python-hupper
10443 python-plaster
10444 python-plaster-pastedeploy
10445 python-setuptools
10446 python-translationstring
10447 python-venusian
10448 python-webob
10449 python-zope-component
10450 python-zope-deprecation
10451 python-zope-interface))
10452 (native-inputs (list python-pytest python-webtest python-wheel))
10453 (home-page "https://trypyramid.com/")
10454 (synopsis "Python web-framework suitable for small and large sites")
10455 (description
10456 "Pyramid makes it easy to write web applications. From minimal
10457request/response web apps to larger, grown applications.")
10458 (license license:repoze)))
10459
10460(define-public python-pyramid-chameleon
10461 ;; PyPI lacks a fresh release, use the latest commit assosiated with
10462 ;; unrleased version, see:
10463 ;; <https://github.com/Pylons/pyramid_chameleon/issues/27>
10464 (let ((commit "956c77ba37120c430e871c834d3cd4ed5ac8dccf")
10465 (revision "0"))
10466 (package
10467 (name "python-pyramid-chameleon")
10468 (version (git-version "0.4.dev0" revision commit))
10469 (source
10470 (origin
10471 (method git-fetch)
10472 (uri (git-reference
10473 (url "https://github.com/Pylons/pyramid_chameleon")
10474 (commit commit)))
10475 (file-name (git-file-name name version))
10476 (sha256
10477 (base32 "0rsb921xi7736h1xikc904bq2zzmrj1g8qgyimjw5wxdcd8927b1"))))
10478 (build-system pyproject-build-system)
10479 (native-inputs
10480 (list python-pytest
10481 python-setuptools))
10482 (propagated-inputs
10483 (list python-chameleon
10484 python-pyramid))
10485 (home-page "https://github.com/Pylons/pyramid_chameleon")
10486 (synopsis "Chameleon template compiler for pyramid")
10487 (description
10488 "These package provides bindings for the Chameleon templating system
10489 for the Pyramid web framework.")
10490 (license license:repoze))))
10491
10492(define-public python-pyramid-debugtoolbar
10493 (package
10494 (name "python-pyramid-debugtoolbar")
10495 (version "4.12.1")
10496 (source
10497 (origin
10498 (method url-fetch)
10499 (uri (pypi-uri "pyramid_debugtoolbar" version))
10500 (sha256
10501 (base32 "0gdlc7vcga4vzma53h5csnhh4gwfmv3w8v9y5fhwqpy8979qis3i"))))
10502 (build-system pyproject-build-system)
10503 (arguments
10504 (list
10505 #:test-flags
10506 ;; Large diff assertion not equal faileurs.
10507 #~(list #$@(map (lambda (test)
10508 (string-append "--deselect=tests"
10509 "/test_panels/test_sqla.py::" test))
10510 (list "TestSimpleSelect::test_panel"
10511 "TestTransactionCommit::test_panel"
10512 "TestTransactionRollback::test_panel")))))
10513 (native-inputs
10514 (list python-pytest
10515 python-setuptools
10516 python-webtest))
10517 (propagated-inputs
10518 (list python-pyramid
10519 python-pyramid-chameleon
10520 python-pyramid-jinja2
10521 python-pyramid-mako
10522 ;; python-selenium ; see: guix/guix#3478
10523 python-sqlalchemy
10524 python-waitress))
10525 (home-page "https://github.com/Pylons/pyramid_debugtoolbar")
10526 (synopsis "Pyramid debug toolbar")
10527 (description
10528 "This package provides an interactive HTML debugger for Pyramid application
10529development.")
10530 (license license:bsd-3)))
10531
10532(define-public python-pyramid-jinja2
10533 (package
10534 (name "python-pyramid-jinja2")
10535 (version "2.10.1")
10536 (source
10537 (origin
10538 (method url-fetch)
10539 (uri (pypi-uri "pyramid_jinja2" version))
10540 (sha256
10541 (base32 "0xqnqbqhx9bkrg2ic3blflsk8xc8kh7i2dm2kha9apqkbjrqql4c"))))
10542 (build-system pyproject-build-system)
10543 (arguments
10544 (list
10545 #:test-flags
10546 ;; Two tests failed with assertion not equal.
10547 #~(list "-k" "not test_it_relative_to_package and not test_options")
10548 #:phases
10549 #~(modify-phases %standard-phases
10550 (add-after 'unpack 'fix-pytest-config
10551 (lambda _
10552 (substitute* "setup.cfg"
10553 ((" --cov") "")))))))
10554 (native-inputs
10555 (list python-pytest
10556 python-setuptools
10557 python-webtest))
10558 (propagated-inputs
10559 (list python-jinja2
10560 python-markupsafe
10561 python-pyramid
10562 python-zope-deprecation))
10563 (home-page "https://github.com/Pylons/pyramid_jinja2")
10564 (synopsis "Jinja2 template bindings for the Pyramid web framework")
10565 (description "This package provides Jinja2 template bindings for the
10566Pyramid web framework.")
10567 (license license:repoze)))
10568
10569(define-public python-pyramid-mako
10570 ;; 1.1.0 was released in 2019, there a lot of compatability changes on
10571 ;; master, us the latest commit for now.
10572 (let ((commit "1a6f4c00c7134530d2975f34d904b64a41b28b21")
10573 (revision "0"))
10574 (package
10575 (name "python-pyramid-mako")
10576 (version (git-version "1.1.0" revision commit))
10577 (source
10578 (origin
10579 (method git-fetch)
10580 (uri (git-reference
10581 (url "https://github.com/Pylons/pyramid_mako")
10582 (commit commit)))
10583 (file-name (git-file-name name version))
10584 (sha256
10585 (base32 "0v0571z2gby4apsalkdk83gs0d5mw79d56518h3bwwxzbq32kkns"))))
10586 (build-system pyproject-build-system)
10587 (arguments
10588 (list
10589 #:phases
10590 #~(modify-phases %standard-phases
10591 (add-after 'unpack 'fix-pytest-config
10592 (lambda _
10593 (substitute* "pyproject.toml"
10594 ((" --cov --cov-report=term-missing") "")))))))
10595 (native-inputs
10596 (list python-pytest
10597 python-setuptools))
10598 (propagated-inputs
10599 (list python-mako
10600 python-pyramid))
10601 (home-page "https://github.com/Pylons/pyramid_mako")
10602 (synopsis "Mako template bindings for the Pyramid web framework")
10603 (description
10604 "This package provides Mako template bindings for the Pyramid web
10605framework.")
10606 (license license:repoze))))
10607
10608(define-public python-pyramid-retry
10609 (package
10610 (name "python-pyramid-retry")
10611 (version "2.1.1")
10612 (source
10613 (origin
10614 (method url-fetch)
10615 (uri (pypi-uri "pyramid_retry" version))
10616 (sha256
10617 (base32 "1jf07v6zhli0abgm2qajzfwg68bl9zy4xygjwl4svawbwrm2ga5s"))))
10618 (build-system pyproject-build-system)
10619 (native-inputs
10620 (list python-pytest
10621 python-setuptools
10622 python-webtest))
10623 (propagated-inputs
10624 (list python-pyramid
10625 python-zope-interface))
10626 (home-page "https://github.com/Pylons/pyramid_retry")
10627 (synopsis "Pyramid execution policy supporting retrying failed requests")
10628 (description
10629 "@code{pyramid_retry} is an execution policy for Pyramid that wraps requests
10630and can retry them a configurable number of times under certain \"retryable\"
10631error conditions before indicating a failure to the client.")
10632 (license license:expat)))
10633
10634(define-public python-pyramid-tm
10635 (package
10636 (name "python-pyramid-tm")
10637 (version "2.6")
10638 (source
10639 (origin
10640 (method url-fetch)
10641 (uri (pypi-uri "pyramid_tm" version))
10642 (sha256
10643 (base32 "173hg16hldfh5n3mn482xx64nldk308dzri31jd0qa4528cx4j41"))))
10644 (build-system pyproject-build-system)
10645 (arguments
10646 (list
10647 #:phases
10648 #~(modify-phases %standard-phases
10649 (add-after 'unpack 'fix-pytest-config
10650 (lambda _
10651 (substitute* "setup.cfg"
10652 ((" --cov") "")))))))
10653 (native-inputs
10654 (list python-pytest
10655 python-setuptools
10656 python-webtest))
10657 (propagated-inputs
10658 (list python-pyramid
10659 python-transaction))
10660 (home-page "https://github.com/Pylons/pyramid_tm")
10661 (synopsis "Centralized transaction management for Pyramid")
10662 (description
10663 "@code{pyramid_tm} is a package which allows Pyramid requests to join the
10664active @url{https://pypi.org/project/transaction/, transaction} as provided by
10665the Python transaction package.")
10666 (license license:repoze)))
10667
10668(define-public python-random-user-agent
10669 (package
10670 (name "python-random-user-agent")
10671 (version "1.0.1")
10672 (source
10673 (origin
10674 (method url-fetch)
10675 (uri (pypi-uri "random_user_agent" version))
10676 (sha256
10677 (base32 "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
10678 (build-system pyproject-build-system)
10679 (arguments (list #:tests? #f)) ; No tests.
10680 (native-inputs (list python-setuptools))
10681 (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
10682 (synopsis "List of user agents")
10683 (description
10684 "This package provides a list of user agents, from a collection of more
10685than 326,000 known user-agents. Users can pick a random one, or select one
10686based on filters.")
10687 (license license:expat)))
10688
10689(define-public python-rangehttpserver
10690 (package
10691 (name "python-rangehttpserver")
10692 (version "1.4.0")
10693 (source
10694 (origin
10695 (method git-fetch)
10696 (uri (git-reference
10697 (url "https://github.com/danvk/RangeHTTPServer")
10698 (commit version)))
10699 (file-name (git-file-name name version))
10700 (sha256
10701 (base32 "1dx533fsbq1mbz3by7qkm5bh2c253nwvm8214pqbwbfq07kqkwf2"))))
10702 (build-system pyproject-build-system)
10703 (native-inputs
10704 (list python-pytest
10705 python-requests
10706 python-setuptools))
10707 (home-page "https://github.com/danvk/RangeHTTPServer")
10708 (synopsis "SimpleHTTPServer with support for range requests")
10709 (description
10710 "This tool provides a simple HTTP server with support for Range
10711requests.")
10712 (license license:asl2.0)))
10713
10714(define-public python-flask-restx
10715 (package
10716 (name "python-flask-restx")
10717 (version "1.3.0")
10718 (source
10719 (origin
10720 (method git-fetch) ;no tests in PyPI archive
10721 (uri (git-reference
10722 (url "https://github.com/python-restx/flask-restx")
10723 (commit version)))
10724 (file-name (git-file-name name version))
10725 (sha256
10726 (base32 "1qmm3i1cdv0bvzsc1gn4ql2dsf1fbx85fk69vcmzpsdxzczmw508"))))
10727 (build-system pyproject-build-system)
10728 (arguments
10729 (list
10730 ;; 1214 passed, 6 skipped, 16 deselected, 3 warnings
10731 #:test-flags
10732 #~(list "--benchmark-skip"
10733 ;; ValueError: http://www.google.com is not a valid URL. Domain
10734 ;; does not exists.
10735 "--deselect=tests/test_inputs.py::URLTest::test_check"
10736 "-k" (string-join
10737 ;; See: <https://github.com/python-restx/flask-restx/issues/620>.
10738 (list "not test_rfc822_value"
10739 "test_iso8601_value"
10740 ;; assert 404 == 2000
10741 "test_specs_endpoint_host_and_subdomain"
10742 ;; ValueError: [email protected] is not a valid email
10743 "test_valid_value_check")
10744 " and not "))))
10745 (native-inputs
10746 (list python-blinker
10747 python-faker
10748 python-pytest
10749 python-pytest-benchmark
10750 python-pytest-flask
10751 python-pytest-mock
10752 python-setuptools))
10753 (propagated-inputs
10754 (list python-aniso8601
10755 python-flask
10756 python-importlib-resources
10757 python-jsonschema
10758 python-pytz
10759 python-werkzeug))
10760 (home-page "https://github.com/python-restx/flask-restx")
10761 (synopsis
10762 "Framework for fast, easy and documented API development with Flask")
10763 (description
10764 "Flask-RESTX is an extension for Flask that adds support for quickly building
10765REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
10766 with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
10767decorators and tools to describe your API and expose its documentation properly using
10768Swagger.")
10769 (license license:bsd-3)))
10770
10771(define-deprecated-package python-flask-restplus
10772 python-flask-restx)
10773
10774(define-public python-flask-socketio
10775 (package
10776 (name "python-flask-socketio")
10777 (version "5.5.1")
10778 (source
10779 (origin
10780 (method url-fetch)
10781 (uri (pypi-uri "flask_socketio" version))
10782 (sha256
10783 (base32
10784 "1i0yqn39b4v4r2whppx47sg7iicvqzssd1clx7cclk07l52cjinr"))))
10785 (build-system pyproject-build-system)
10786 (propagated-inputs
10787 (list python-flask python-socketio))
10788 (native-inputs
10789 (list python-pytest python-redis python-setuptools python-wheel))
10790 (home-page "https://github.com/miguelgrinberg/Flask-SocketIO/")
10791 (synopsis "Socket.IO integration for Flask applications")
10792 (description "Socket.IO integration for Flask applications")
10793 (license license:expat)))
10794
10795(define-public python-manuel
10796 (package
10797 (name "python-manuel")
10798 (version "1.13.0")
10799 (source
10800 (origin
10801 (method url-fetch)
10802 (uri (pypi-uri "manuel" version))
10803 (sha256
10804 (base32 "0nl8psji3fizbxw34gdg22dndlg9lf5f56mnh1vr4vgsx06i4qsx"))))
10805 (build-system pyproject-build-system)
10806 (arguments
10807 (list
10808 ;; FIXME: Tests are broken, see: <https://github.com/benji-york/manuel/pull/32>.
10809 #:tests? #f))
10810 (propagated-inputs
10811 (list python-setuptools)) ;install requires
10812 (home-page "https://pypi.org/project/manuel/")
10813 (synopsis "Build tested documentation")
10814 (description
10815 "Manuel lets you mix and match traditional doctests with custom test syntax.")
10816 (license license:asl2.0)))
10817
10818(define-public python-marshmallow-jsonapi
10819 (package
10820 (name "python-marshmallow-jsonapi")
10821 (version "0.26.0")
10822 (source
10823 (origin
10824 (method git-fetch)
10825 (uri (git-reference
10826 ;; XXX: Deprecated upstream: This repository has been archived
10827 ;; by the owner on Jun 6, 2024. It is now read-only.
10828 ;; Using a maintained fork. The pypi name of this fork
10829 ;; is marshmallow-jsonapi-minfork.
10830 (url "https://github.com/tadams42/marshmallow-jsonapi")
10831 (commit version)))
10832 (file-name (git-file-name name version))
10833 (sha256
10834 (base32 "07sizh4m03rrk1139ci3psh5npk42cdsdfsdp574pz1fd5ncrq91"))))
10835 (build-system pyproject-build-system)
10836 (native-inputs
10837 (list python-faker
10838 python-flask
10839 python-pytest
10840 python-setuptools))
10841 (propagated-inputs (list python-marshmallow))
10842 (home-page "https://github.com/marshmallow-code/marshmallow-jsonapi")
10843 (synopsis "JSON:API 1.0 formatting with Marshmallow")
10844 (description
10845 "The marshmallow-jsonapi package provides a simple way to produce
10846@uref{https://jsonapi.org, JSON:API}-compliant data in any Python Web
10847framework. It includes optional utilities to integrate with Flask. This is a
10848forked version whose pypi name is @code{marshmallow_jsonapi_minfork}.")
10849 (license license:expat)))
10850
10851(define-public python-pecan
10852 (package
10853 (name "python-pecan")
10854 (version "1.6.1")
10855 (source
10856 (origin
10857 (method git-fetch) ;no tests in pypi release
10858 (uri (git-reference
10859 (url "https://github.com/pecan/pecan")
10860 (commit version)))
10861 (file-name (git-file-name name version))
10862 (sha256
10863 (base32
10864 "1ybjvpws741bvxd7aq5hh8gv5sk9836hb9afgalqsm0lxsq0li3a"))))
10865 (build-system pyproject-build-system)
10866 (arguments
10867 (list
10868 #:test-flags '(list "--pyargs" "pecan")))
10869 (native-inputs
10870 (list gunicorn
10871 python-genshi
10872 python-jinja2
10873 python-pytest
10874 python-sqlalchemy))
10875 (propagated-inputs
10876 (list python-logutils
10877 python-mako
10878 python-six
10879 python-webob
10880 python-webtest))
10881 (home-page "http://github.com/pecan/pecan")
10882 (synopsis "WSGI object-dispatching web framework")
10883 (description "This package provides a WSGI object-dispatching web
10884framework, designed to be lean and fast, with few dependencies.")
10885 (license license:bsd-3)))
10886
10887(define-public python-persistent
10888 (package
10889 (name "python-persistent")
10890 (version "6.1.1")
10891 (source
10892 (origin
10893 (method git-fetch)
10894 (uri (git-reference
10895 (url "https://github.com/zopefoundation/persistent/")
10896 (commit version)))
10897 (file-name (git-file-name name version))
10898 (sha256
10899 (base32 "19qwqg49zql2c8l4vjxjb9haw0bzd6lk8p4v3hip2irch6a4578a"))))
10900 (build-system pyproject-build-system)
10901 (arguments
10902 (list
10903 #:phases
10904 #~(modify-phases %standard-phases
10905 (replace 'check
10906 (lambda* (#:key tests? #:allow-other-keys)
10907 (if tests?
10908 (invoke "zope-testrunner" "--test-path=src"
10909 ;; XXX: Ignore doc tests.
10910 "!persistent.tests.test_docs")
10911 (format #t "test suite not run~%")))))))
10912 (propagated-inputs
10913 (list python-cffi
10914 python-zope-deferredimport
10915 python-zope-interface
10916 python-zope-testrunner))
10917 (native-inputs
10918 (list python-manuel python-zope-testrunner python-setuptools))
10919 (home-page "https://github.com/zopefoundation/persistent/")
10920 (synopsis "Translucent persistent objects")
10921 (description
10922 "This package contains a generic persistence implementation for Python.
10923It forms the core protocol for making objects interact \"transparently\" with
10924a database such as the ZODB.")
10925 (license license:zpl2.1)))
10926
10927(define-public python-btrees
10928 (package
10929 (name "python-btrees")
10930 (version "6.1")
10931 (source
10932 (origin
10933 (method git-fetch)
10934 (uri (git-reference
10935 (url "https://github.com/zopefoundation/BTrees")
10936 (commit version)))
10937 (file-name (git-file-name name version))
10938 (sha256
10939 (base32 "0vcibmd725ddgsl5yzmi8d403day3796h82xlq84w91xbdrbd5d5"))))
10940 (build-system pyproject-build-system)
10941 (arguments
10942 (list
10943 #:phases
10944 #~(modify-phases %standard-phases
10945 (replace 'check
10946 (lambda* (#:key tests? #:allow-other-keys)
10947 (if tests?
10948 (invoke "zope-testrunner" "--test-path=src")
10949 (format #t "test suite not run~%")))))))
10950 (propagated-inputs (list python-persistent python-zope-interface))
10951 (native-inputs (list python-persistent python-transaction
10952 python-zope-testrunner python-setuptools))
10953 (home-page "https://github.com/zopefoundation/BTrees")
10954 (synopsis "Scalable persistent object containers")
10955 (description
10956 "This package contains a set of persistent object containers built around a
10957modified BTree data structure. The trees are optimized for use inside ZODB's
10958\"optimistic concurrency\" paradigm, and include explicit resolution of
10959conflicts detected by that mechanism.")
10960 (license license:zpl2.1)))
10961
10962(define-public python-transaction
10963 (package
10964 (name "python-transaction")
10965 (version "5.0")
10966 (source
10967 (origin
10968 (method url-fetch)
10969 (uri (pypi-uri "transaction" version))
10970 (sha256
10971 (base32 "0x0i5graxb93aa8bwf5rmm9zq7d7r6q2b4pw358wph5whbbpnvhh"))))
10972 (build-system pyproject-build-system)
10973 (native-inputs
10974 (list python-pytest
10975 python-setuptools))
10976 (propagated-inputs
10977 (list python-zope-interface))
10978 (home-page "https://github.com/zopefoundation/transaction")
10979 (synopsis "Transaction management for Python")
10980 (description "This package contains a generic transaction implementation
10981for Python. It is mainly used by the ZODB.")
10982 (license license:zpl2.1)))
10983
10984(define-public python-truststore
10985 (package
10986 (name "python-truststore")
10987 (version "0.10.4")
10988 (source
10989 (origin
10990 (method url-fetch)
10991 (uri (pypi-uri "truststore" version))
10992 (sha256
10993 (base32 "00f3xc7720rkddsn291yrw871kfnimi6d9xbwi75xbb3ci1vv4cx"))))
10994 (build-system pyproject-build-system)
10995 (arguments
10996 (list #:tests? #f)) ;all tests require Internet access
10997 (native-inputs
10998 (list python-flit-core))
10999 (home-page "https://github.com/sethmlarson/truststore")
11000 (synopsis "Verify certificates using native system trust stores")
11001 (description
11002 "Truststore is a library which exposes native system certificate stores (ie
11003\"trust stores\") through an @code{ssl.SSLContext-like} API. This means that
11004Python applications no longer need to rely on certifi as a root certificate
11005store.")
11006 (license license:expat)))
11007
11008(define-public python-robot-detection
11009 (package
11010 (name "python-robot-detection")
11011 (version "0.4.0")
11012 (source
11013 (origin
11014 (method git-fetch)
11015 (uri (git-reference
11016 (url "https://github.com/rory/robot-detection")
11017 (commit (string-append "v" version))))
11018 (file-name (git-file-name name version))
11019 (sha256
11020 (base32 "1gxk13rn0gw5pfc4abhfnzg8qi05xa0ygs26pgkp0swygkzq6wsq"))))
11021 (build-system pyproject-build-system)
11022 (arguments (list #:test-backend #~'unittest))
11023 (native-inputs (list python-setuptools))
11024 (propagated-inputs (list python-six))
11025 (home-page "https://github.com/rory/robot-detection")
11026 (synopsis "Detect web crawlers")
11027 (description
11028 "@code{robot_detection} is a python module to detect if a given HTTP User
11029Agent is a web crawler. It uses the list of registered robots from
11030@url{http://www.robotstxt.org}.")
11031 (license license:gpl3+)))
11032
11033(define-public python-robotframework-requests
11034 (package
11035 (name "python-robotframework-requests")
11036 (version "0.9.7")
11037 (source
11038 (origin
11039 (method git-fetch) ; no tests in PyPI release
11040 (uri (git-reference
11041 (url "https://github.com/MarketSquare/robotframework-requests")
11042 (commit (string-append "v" version))))
11043 (file-name (git-file-name name version))
11044 (sha256
11045 (base32 "077j8p5k41v53slyv8h32fcmqfi7m6z3r4gmyqqaawm5szfmy61m"))))
11046 (build-system pyproject-build-system)
11047 (native-inputs
11048 (list python-pytest
11049 python-setuptools
11050 python-wheel))
11051 (propagated-inputs
11052 (list python-requests
11053 python-robotframework))
11054 (home-page "https://github.com/MarketSquare/robotframework-requests")
11055 (synopsis "Robot Framework keyword library wrapper around requests")
11056 (description
11057 "@code{RequestsLibrary} is a @url{https://robotframework.org/, Robot
11058Framework} library aimed to provide HTTP API testing functionalities by
11059wrapping the @code{requests} Python library.")
11060 (license license:expat)))
11061
11062(define-public python-pysolr
11063 (package
11064 (name "python-pysolr")
11065 (version "3.10.0")
11066 (source
11067 (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "pysolr" version))
11070 (sha256
11071 (base32 "02gl1sma5cnpd7srpri1g68lpsg3s5n3lr462p5ll8v9s4nllyqj"))))
11072 (build-system pyproject-build-system)
11073 (arguments
11074 '(#:tests? #f)) ; Tests require network access.
11075 (native-inputs
11076 (list python-setuptools
11077 python-setuptools-scm
11078 python-wheel))
11079 (propagated-inputs
11080 (list python-requests))
11081 (home-page "https://github.com/django-haystack/pysolr/")
11082 (synopsis "Lightweight python wrapper for Apache Solr")
11083 (description
11084 "This module provides an interface that queries the Apache Solr server
11085using a pure Python implementation.")
11086 (license license:bsd-3)))
11087
11088(define-public python-pyjsparser
11089 ;; XXX: This project is potentially abandonware, consider to remove in next
11090 ;; refresh cycle, see:
11091 ;; <https://github.com/PiotrDabkowski/pyjsparser/issues/28>,
11092 ;; <https://github.com/PiotrDabkowski/pyjsparser/issues/39>, and
11093 ;; <https://github.com/PiotrDabkowski/pyjsparser/issues/40>.
11094 (package
11095 (name "python-pyjsparser")
11096 (version "2.7.1")
11097 (source
11098 (origin
11099 (method url-fetch)
11100 (uri (pypi-uri "pyjsparser" version))
11101 (sha256
11102 (base32 "0ycmf9fsvwliqmm1n6sfz7x71y7i2kbfgn39d8lsbiccfxmxlq5y"))))
11103 (build-system pyproject-build-system)
11104 (arguments
11105 '(#:tests? #f)) ;no tests in PyPI
11106 (native-inputs (list python-setuptools))
11107 (home-page "https://github.com/PiotrDabkowski/pyjsparser")
11108 (synopsis "Fast JavaScript parser")
11109 (description
11110 "This package provides a fast JavaScript parser (based on esprima.js)")
11111 (license license:expat)))
11112
11113(define-public python-js2py
11114 (package
11115 (name "python-js2py")
11116 (version "0.74")
11117 (source
11118 (origin
11119 (method url-fetch)
11120 (uri (pypi-uri "Js2Py" version))
11121 (sha256
11122 (base32 "0bwpp23qpx9amzqisiqvzlr17hr7vxqp4ry8lgxhw639hjmadwrr"))))
11123 (build-system pyproject-build-system)
11124 (arguments
11125 (list #:tests? #f)) ; tests require Node
11126 (native-inputs
11127 (list python-setuptools))
11128 (propagated-inputs
11129 (list python-pyjsparser
11130 python-six
11131 python-tzlocal))
11132 (home-page "https://github.com/PiotrDabkowski/Js2Py")
11133 (synopsis "JavaScript to Python translator")
11134 (description
11135 "This package provides a JavaScript to Python translator and a JavaScript
11136interpreter written in pure Python.")
11137 (license license:expat)))
11138
11139(define-public python-http-ece
11140 (package
11141 (name "python-http-ece")
11142 (version "1.2.1")
11143 (source
11144 (origin
11145 (method git-fetch)
11146 (uri (git-reference
11147 (url "https://github.com/web-push-libs/encrypted-content-encoding")
11148 (commit (string-append "v" version))))
11149 (file-name (git-file-name name version))
11150 (sha256
11151 (base32 "16kd9dsfpyfvq4iw6bbrrqrvsnf5lwgwa6p9f3b1y56ab18y0kzx"))))
11152 (build-system pyproject-build-system)
11153 (arguments
11154 `(#:phases
11155 (modify-phases %standard-phases
11156 (add-after 'unpack 'change-directory
11157 (lambda _ (chdir "python") #t)))))
11158 (native-inputs
11159 (list python-pytest
11160 python-pytest-cov
11161 python-setuptools))
11162 (propagated-inputs
11163 (list python-cryptography))
11164 (home-page "https://github.com/web-push-libs/encrypted-content-encoding")
11165 (synopsis "Encrypted Content Encoding for HTTP")
11166 (description
11167 "This package provides a simple implementation of Encrypted Content
11168Encoding for HTTP.")
11169 (license license:expat)))
11170
11171(define-public python-cloud-init
11172 (package
11173 (name "python-cloud-init")
11174 (version "24.2")
11175 (source
11176 (origin
11177 (method git-fetch)
11178 (uri (git-reference
11179 (url "https://github.com/canonical/cloud-init")
11180 (commit version)))
11181 (file-name (git-file-name name version))
11182 (sha256
11183 (base32 "18872z2y9wkh558y1bx5r0rksb4i584jbc8z4g8marwawhwxq506"))))
11184 (build-system pyproject-build-system)
11185 (arguments
11186 (list
11187 #:test-flags
11188 '(list
11189 ;; This requires usermod
11190 "--ignore=tests/unittests/distros/test_create_users.py"
11191 ;; This writes to /var
11192 "--ignore=tests/unittests/net/test_dhcp.py"
11193 "-k"
11194 (string-append
11195 ;; This test messes with PATH, so it cannot find mkdir
11196 "not test_path_env_gets_set_from_main"
11197 " and not test_apt_configure_sources_list_"
11198 ;; These all fail because /bin/sh doesn't exist. We cannot patch
11199 ;; this because the generated scripts must use /bin/sh as they are
11200 ;; supposed to be run on minimal systems.
11201 " and not test_handler_creates_and_runs_bootcmd_script_with_instance_id"
11202 " and not test_handler_runs_bootcmd_script_with_error"
11203 " and not test_subp_combined_stderr_stdout"
11204 " and not test_handle_part"))
11205 #:phases
11206 #~(modify-phases %standard-phases
11207 (add-after 'unpack 'patch-references
11208 (lambda _
11209 (substitute* "tests/unittests/cmd/test_clean.py"
11210 (("#!/bin/sh") (string-append "#!" (which "sh"))))))
11211 (add-after 'install 'move-files
11212 (lambda* (#:key inputs outputs #:allow-other-keys)
11213 (for-each (lambda (dir)
11214 (let ((source (string-append (site-packages inputs outputs) "/" dir))
11215 (target (string-append #$output "/" (basename dir))))
11216 (copy-recursively source target)
11217 (delete-file-recursively source)))
11218 (list "etc" "lib" "usr/lib" "usr/share")))))))
11219 (propagated-inputs
11220 (list python-configobj
11221 python-jinja2
11222 python-jsonpatch
11223 python-jsonschema
11224 python-netifaces
11225 python-oauthlib
11226 python-pyserial
11227 python-pyyaml
11228 python-responses))
11229 (native-inputs
11230 (list procps ;for ps when running tests
11231 python-pytest
11232 python-pytest-cov
11233 python-pytest-mock
11234 python-passlib
11235 python-setuptools
11236 python-wheel))
11237 (home-page "https://github.com/canonical/cloud-init")
11238 (synopsis "Cloud instance initialization tools")
11239 (description
11240 "Cloud-init is the multi-distribution method for cross-platform cloud
11241instance initialization. It is supported across all major public cloud
11242providers, provisioning systems for private cloud infrastructure, and
11243bare-metal installations.")
11244 ;; Either license can be chosen
11245 (license (list license:asl2.0 license:gpl3))))
11246
11247(define-public python-cloudscraper
11248 (package
11249 (name "python-cloudscraper")
11250 (version "3.0.0")
11251 (source
11252 (origin
11253 (method git-fetch)
11254 (uri (git-reference
11255 (url "https://github.com/VeNoMouS/cloudscraper")
11256 (commit version)))
11257 (file-name (git-file-name name version))
11258 (sha256
11259 (base32 "13w0ywz2y8x0zwpwzrnn46wyq307hfpdcz49zy33yyf46rq9n10n"))
11260 (modules '((guix build utils)))
11261 (snippet
11262 '(with-directory-excursion "cloudscraper"
11263 (for-each delete-file
11264 '("captcha/9kw.py" "captcha/anticaptcha.py"))
11265 (substitute* "__init__.py"
11266 ;; Perhaps it's a joke, but don't promote proprietary software.
11267 (("([Th]is feature is not available) in the .*'" _ prefix)
11268 (string-append prefix ".'")))))))
11269 (build-system pyproject-build-system)
11270 (arguments
11271 (list
11272 #:test-flags
11273 #~(list "-k" "not test_403_handling")
11274 #:phases
11275 #~(modify-phases %standard-phases
11276 (add-after 'unpack 'relax-requirements
11277 (lambda _
11278 ;; XXX: Relax brotli dependency.
11279 (substitute* "pyproject.toml"
11280 (("\"brotli>=.*\"")
11281 "\"brotli\""))
11282 ;; XXX: Dependencies, that have not yet been packaged
11283 ;; and cause an import error when included.
11284 (delete-file "cloudscraper/interpreters/v8.py")))
11285 (add-after 'unpack 'fix-references
11286 (lambda _
11287 (substitute* "cloudscraper/interpreters/nodejs.py"
11288 (("'node'")
11289 (string-append "'" (which "node") "'"))))))))
11290 (inputs (list node-lts))
11291 (propagated-inputs
11292 (list python-pycryptodome
11293 python-brotli
11294 python-js2py
11295 python-polling2
11296 python-requests
11297 python-requests-toolbelt
11298 python-responses
11299 python-pyparsing
11300 python-websocket-client))
11301 (native-inputs (list python-pytest python-setuptools))
11302 (home-page "https://github.com/venomous/cloudscraper")
11303 (synopsis "Cloudflare anti-bot bypass")
11304 (description
11305 "This module acts as a webbrowser solving Cloudflare's Javascript
11306challenges.")
11307 (license license:expat)))
11308
11309(define-public python-imap-tools
11310 (package
11311 (name "python-imap-tools")
11312 (version "1.9.0")
11313 (source
11314 (origin
11315 (method git-fetch) ; no tests in PyPI release
11316 (uri (git-reference
11317 (url "https://github.com/ikvk/imap_tools")
11318 (commit (string-append "v" version))))
11319 (file-name (git-file-name name version))
11320 (sha256
11321 (base32 "0iawc6shxn8p0ysiqiahfic5rp1r16f7rfn11c8y2fl8falckynr"))))
11322 (arguments
11323 (list
11324 #:test-flags
11325 ;; Tests require a network connection
11326 #~(list "-k" (string-append "not test_action"
11327 " and not test_attributes"
11328 " and not test_connection"
11329 " and not test_folders"
11330 " and not test_idle"
11331 " and not test_live"))))
11332 (build-system pyproject-build-system)
11333 (native-inputs
11334 (list python-pytest python-setuptools python-wheel))
11335 (home-page "https://github.com/ikvk/imap_tools")
11336 (synopsis "Work with email and mailbox by IMAP")
11337 (description
11338 "This Python library provides tools to deal with email and mailboxes
11339over IMAP:
11340
11341@itemize
11342@item Parsed email message attributes
11343@item Query builder for searching emails
11344@item Work with emails in folders (copy, delete, flag, move, seen)
11345@item Work with mailbox folders (list, set, get, create, exists, rename, delete, status)
11346@end itemize")
11347 (license license:asl2.0)))
11348
11349(define-public python-giturlparse
11350 (package
11351 (name "python-giturlparse")
11352 (version "0.12.0")
11353 (source
11354 (origin
11355 (method git-fetch)
11356 (uri (git-reference
11357 (url "https://github.com/nephila/giturlparse")
11358 (commit version)))
11359 (file-name (git-file-name name version))
11360 (sha256
11361 (base32 "1fdbxp176p17sn5xc1418mz2vk00hlcsd5qmi2fdcfphqal6raan"))))
11362 (build-system pyproject-build-system)
11363 (native-inputs (list python-pytest python-setuptools))
11364 (home-page "https://github.com/nephila/giturlparse")
11365 (synopsis "Git URL parsing module")
11366 (description
11367 "This package provides a git URL parsing module which supports parsing
11368and rewriting of remote git URLs from various hosting providers.")
11369 (license license:asl2.0)))
11370
11371(define-public python-hstspreload
11372 (package
11373 (name "python-hstspreload")
11374 (version "2025.1.1")
11375 (source
11376 (origin
11377 (method git-fetch)
11378 (uri (git-reference
11379 (url "https://github.com/sethmlarson/hstspreload")
11380 (commit version)))
11381 (file-name (git-file-name name version))
11382 (sha256
11383 (base32 "02mdzhgdz3sprgc26qb084zy639h2zw2yc8d2vm1r18ap9k51ayq"))))
11384 (build-system pyproject-build-system)
11385 (arguments (list #:tests? #f)) ; tests require external resources.
11386 (native-inputs (list python-setuptools))
11387 (home-page "https://github.com/sethmlarson/hstspreload")
11388 (synopsis "Chromium HSTS Preload list as a Python package")
11389 (description
11390 "@code{python-hstspreload} contains Chromium HSTS Preload list
11391as a Python package.")
11392 (license license:bsd-3)))
11393
11394(define-public python-sanic-routing
11395 (package
11396 (name "python-sanic-routing")
11397 (version "23.12.0")
11398 (source
11399 (origin
11400 (method url-fetch)
11401 (uri (pypi-uri "sanic-routing" version))
11402 (sha256
11403 (base32 "014bhkharcgyprdvlk7wjxhjp1pr0cva1nwj4f2qrr23qiidrjhx"))))
11404 (build-system pyproject-build-system)
11405 (arguments
11406 ;; PyPi sources does not contain tests, recursive dependency on
11407 ;; python-sanic.
11408 (list #:tests? #f))
11409 (native-inputs (list python-setuptools python-wheel))
11410 (home-page "https://github.com/sanic-org/sanic-routing/")
11411 (synopsis "Routing component for Sanic")
11412 (description "Internal package for @code{python-sanic}, which provides
11413the @code{BasicRouter}.")
11414 (license license:expat)))
11415
11416(define-public python-sanic-testing
11417 (package
11418 (name "python-sanic-testing")
11419 (version "23.12.0")
11420 (source
11421 (origin
11422 (method url-fetch)
11423 (uri (pypi-uri "sanic-testing" version))
11424 (sha256
11425 (base32 "0gqkzv90sbj9rw7yfly9c58lq9dq30g5hhcgjl3ihzjb66vm571b"))))
11426 (build-system pyproject-build-system)
11427 (arguments
11428 ;; PyPi sources does not contain tests, recursive dependency on
11429 ;; python-sanic.
11430 (list #:tests? #f))
11431 (propagated-inputs (list python-httpx python-sanic-bootstrap))
11432 (native-inputs (list python-setuptools python-wheel))
11433 (home-page "https://github.com/sanic-org/sanic-testing/")
11434 (synopsis "Test clients for Sanic")
11435 (description "Internal package for @code{python-sanic}, which is
11436meant to be the core testing utility and clients for testing Sanic
11437applications.")
11438 (license license:expat)))
11439
11440(define-public python-sanic
11441 (package
11442 (name "python-sanic")
11443 (version "25.3.0")
11444 (source
11445 (origin
11446 (method url-fetch)
11447 (uri (pypi-uri "sanic" version))
11448 (sha256
11449 (base32 "1fv9wgsj54scbr7qhmwdgc4zqnqpwacpakcfxhsg10gc04h54pbp"))
11450 ;; Loosen requirements for both python-sanic and python-sanic-bootstrap.
11451 (modules '((guix build utils)))
11452 (snippet #~(substitute* "setup.py"
11453 (("setuptools>=[0-9.]*")
11454 "setuptools")))))
11455 (build-system pyproject-build-system)
11456 (arguments
11457 (list
11458 #:test-flags
11459 #~(list "--asyncio-mode=auto"
11460 "--ignore=tests/benchmark/"
11461 "--ignore=tests/typing/test_typing.py"
11462 ;; Most tests hang or fail
11463 "--ignore=tests/test_cli.py"
11464 "--ignore=tests/worker/test_worker_serve.py"
11465 "-k"
11466 (string-append
11467 ;; PyPi sources lack examples module.
11468 "not test_gunicorn_"
11469 ;; Does not expect brotli and reordered headers.
11470 " and not test_raw_headers"
11471 ;; These look like buggy testcases.
11472 " and not test_zero_downtime"
11473 " and not test_non_default_uvloop_config_raises_warning"
11474 " and not test_listeners_triggered"
11475 " and not test_keep_alive_connection_context"
11476 " and not test_keep_alive_client_timeout"
11477 " and not test_conflicting_body_methods_overload"
11478 " and not test_unix_connection"
11479 ;; Unclear why they fail since core-updates merge.
11480 " and not test_missing_sni"
11481 " and not test_no_matching_cert"
11482 " and not test_wildcards"
11483 ;; These tests fail because subprotocols appear to be
11484 ;; parameterized as None
11485 " and not test_websocket_route_with_subprotocols"
11486 ;; AF_UNIX path too long
11487 " and not test_setup_and_teardown_unix"
11488 " and not test_configure_socket"
11489 ;; Freezes
11490 " and not test_server_run_with_repl"
11491 " and not test_server_run"
11492 " and not test_no_workers"))))
11493 (propagated-inputs
11494 (list python-aiofiles
11495 python-aioquic
11496 python-html5tagger
11497 python-httptools
11498 python-multidict
11499 python-sanic-routing
11500 python-tracerite
11501 python-typing-extensions
11502 python-ujson
11503 python-uvloop
11504 python-websockets))
11505 (native-inputs
11506 (list python-beautifulsoup4
11507 python-chardet
11508 python-cryptography
11509 python-docutils
11510 python-mypy
11511 python-pygments
11512 python-pytest
11513 python-pytest-asyncio
11514 python-pytest-benchmark
11515 python-pytest-sanic
11516 python-sanic-testing
11517 python-setuptools
11518 python-slotscheck
11519 python-towncrier
11520 python-types-ujson
11521 python-uvicorn
11522 python-wheel))
11523 (home-page "https://github.com/sanic-org/sanic/")
11524 (synopsis "Async Python web server/framework")
11525 (description
11526 "Sanic is a Python web server and web framework that's written to go
11527fast. It allows the usage of the @code{async/await} syntax added in Python
115283.5, which makes your code non-blocking and speedy.")
11529 (license license:expat)))
11530
11531(define-public python-sanic-bootstrap
11532 (package
11533 (inherit python-sanic)
11534 (name "python-sanic-bootstrap")
11535 (arguments (list #:tests? #f))
11536 (native-inputs (list python-setuptools python-wheel))))
11537
11538(define-public python-socketio
11539 (package
11540 (name "python-socketio")
11541 (version "5.12.1")
11542 (source
11543 (origin
11544 (method url-fetch)
11545 (uri (pypi-uri "python_socketio" version))
11546 (sha256
11547 (base32
11548 "175sd3fdld3s477i6b3v49yhf1alsbm1vaxzq44nqrqb8wgzz682"))))
11549 (build-system pyproject-build-system)
11550 (arguments
11551 (list #:test-flags
11552 '(list "--timeout=60"
11553 ;; These tests freeze.
11554 "--ignore-glob=tests/async/*")))
11555 (propagated-inputs
11556 (list python-bidict python-engineio python-msgpack))
11557 (native-inputs
11558 (list python-pytest
11559 python-pytest-asyncio
11560 python-pytest-timeout
11561 python-setuptools
11562 python-uvicorn
11563 python-wheel))
11564 (home-page "https://github.com/miguelgrinberg/python-socketio/")
11565 (synopsis "Python Socket.IO server")
11566 (description
11567 "This package provides a Python implementation of the @code{Socket.IO}
11568realtime client and server.")
11569 (license license:expat)))
11570
11571(define-public python-socks
11572 (package
11573 (name "python-socks")
11574 (version "2.7.2")
11575 (source
11576 (origin
11577 (method git-fetch)
11578 (uri (git-reference
11579 (url "https://github.com/romis2012/python-socks")
11580 (commit (string-append "v" version))))
11581 (file-name (git-file-name name version))
11582 (sha256
11583 (base32 "1alrfjkir69006qmr2ax3inrffk2bllpljwmprwczb44r0mya77m"))))
11584 (build-system pyproject-build-system)
11585 (propagated-inputs (list python-trio))
11586 (native-inputs
11587 (list python-anyio
11588 python-async-timeout
11589 python-flask
11590 python-pytest
11591 python-pytest-asyncio
11592 python-pytest-trio
11593 python-setuptools
11594 python-tiny-proxy
11595 python-trustme
11596 python-yarl))
11597 (home-page "https://github.com/romis2012/python-socks")
11598 (synopsis
11599 "Core proxy (SOCKS4, SOCKS5, HTTP tunneling) functionality for Python")
11600 (description
11601 "Socks is a library providing core proxy (SOCKS4, SOCKS5, HTTP tunneling)
11602 functionality.")
11603 (license license:asl2.0)))
11604
11605(define-public python-socksio
11606 (package
11607 (name "python-socksio")
11608 (version "1.0.0")
11609 (source
11610 (origin
11611 (method url-fetch)
11612 (uri (pypi-uri "socksio" version))
11613 (sha256
11614 (base32 "1b64j45w35jzhjhnq44bnyad9ydh1iyyd7a6j2c8phxmllyyp2zq"))))
11615 (build-system pyproject-build-system)
11616 (native-inputs
11617 (list python-flit-core
11618 python-pytest
11619 python-pytest-cov))
11620 (home-page "https://github.com/sethmlarson/socksio")
11621 (synopsis "Sans-I/O implementation of SOCKS4, SOCKS4A, and SOCKS5")
11622 (description "The @code{socksio} Python module is a client-side sans-I/O
11623SOCKS proxy implementation. It supports SOCKS4, SOCKS4A, and SOCKS5.
11624@code{socksio} is a sans-I/O library similar to @code{h11} or @code{h2}; this
11625means the library itself does not handle the actual sending of the bytes
11626through the network, it only deals with the implementation details of the
11627SOCKS protocols. It can be paired with any I/O library.")
11628 (license license:expat)))
11629
11630(define-public python-simple-websocket
11631 (package
11632 (name "python-simple-websocket")
11633 (version "1.1.0")
11634 (source
11635 (origin
11636 (method url-fetch)
11637 (uri (pypi-uri "simple_websocket" version))
11638 (sha256
11639 (base32 "1r1all55d5dimiw3qwdhj53cxj9yjgnskcysmcscarx0g9726fbr"))))
11640 (build-system pyproject-build-system)
11641 (arguments
11642 ;; Requires Internet access to resolve example.com
11643 (list #:test-flags '(list "--ignore=tests/test_client.py")))
11644 (propagated-inputs (list python-wsproto))
11645 (native-inputs (list python-pytest
11646 python-setuptools))
11647 (home-page "https://github.com/miguelgrinberg/simple-websocket")
11648 (synopsis "Simple WebSocket server and client for Python")
11649 (description "This package provides a simple @code{WebSocket} server and
11650client for Python.")
11651 (license license:expat)))
11652
11653(define-public python-siosocks
11654 (package
11655 (name "python-siosocks")
11656 (version "0.3.0")
11657 (source
11658 (origin
11659 (method git-fetch)
11660 (uri (git-reference
11661 (url "https://github.com/pohmelie/siosocks")
11662 (commit (string-append "v" version))))
11663 (file-name (git-file-name name version))
11664 (sha256
11665 (base32 "0zcib4j5bfxlryfa412wmlkk8ivsiwxrfbpij5s7ag839ii2lxa5"))))
11666 (build-system pyproject-build-system)
11667 (native-inputs
11668 (list python-pytest
11669 python-pytest-asyncio
11670 python-pytest-cov
11671 python-pytest-trio
11672 python-setuptools))
11673 (propagated-inputs (list python-trio))
11674 (home-page "https://github.com/pohmelie/siosocks")
11675 (synopsis "SOCKSv4 & SOCKSv5 TCP proxy protocol implementation in Python")
11676 (description
11677 "This package provides a Python module and framework for sans-io socks proxy
11678client/server with couple io backends.
11679
11680Features:
11681@itemize
11682@item Only TCP connect (no BIND, no UDP)
11683@item Both client and server
11684@item SOCKS versions: 4, 4a, 5
11685@item SOCKSv5 auth: no auth, username/password
11686@item Couple io backends: @code{asyncio}, @code{trio}, @code{socketserver}
11687@item One-shot socks server (@code{python -m siosocks})
11688@end itemize")
11689 (license license:expat)))
11690
11691(define-public python-tiny-proxy
11692 (package
11693 (name "python-tiny-proxy")
11694 (version "0.2.1")
11695 (source
11696 (origin
11697 (method url-fetch)
11698 (uri (pypi-uri "tiny_proxy" version))
11699 (sha256
11700 (base32 "05nq62fn3p7s1a6dkdvnrzmk39d9ddrzb3pqbbli025qs3m9j1bq"))))
11701 (build-system pyproject-build-system)
11702 ;; There are only a handful of tests and they require the as yet
11703 ;; unpackaged httpx_socks.
11704 (arguments (list #:tests? #false))
11705 (propagated-inputs (list python-anyio))
11706 (native-inputs
11707 (list python-httpx
11708 python-pytest
11709 python-setuptools
11710 python-wheel))
11711 (home-page "https://github.com/romis2012/tiny-proxy")
11712 (synopsis "Simple proxy server (SOCKS4(a), SOCKS5(h), HTTP tunnel)")
11713 (description "This package provides a simple proxy server (SOCKS4(a),
11714SOCKS5(h), HTTP tunnel).")
11715 (license license:asl2.0)))
11716
11717(define-public python-azure-nspkg
11718 (package
11719 (name "python-azure-nspkg")
11720 (version "3.0.2")
11721 (source
11722 (origin
11723 (method url-fetch)
11724 (uri (pypi-uri "azure-nspkg" version ".zip"))
11725 (sha256
11726 (base32
11727 "1l4xwdh0fcnvrv0mzig4g2kgqkfbsy64zjm1ggc6grk3mykcxlz7"))))
11728 (build-system pyproject-build-system)
11729 (arguments (list #:tests? #f)) ;no tests in package
11730 (native-inputs (list unzip python-setuptools))
11731 (home-page "https://github.com/Azure/azure-sdk-for-python")
11732 (synopsis "Azure namespace internals")
11733 (description
11734 "This package is an internal Azure namespace package.")
11735 (license license:expat)))
11736
11737(define-public python-azure-storage-nspkg
11738 (package
11739 (name "python-azure-storage-nspkg")
11740 (version "3.1.0")
11741 (source
11742 (origin
11743 (method url-fetch)
11744 (uri (pypi-uri "azure-storage-nspkg" version))
11745 (sha256
11746 (base32 "049qcmgshz7dj9yaqma0fwcgbxwddgwyfcw4gmv45xfmaa3bwfvg"))))
11747 (build-system pyproject-build-system)
11748 (arguments
11749 (list #:tests? #f)) ;no tests in PyPI archive
11750 (native-inputs (list python-setuptools))
11751 (propagated-inputs (list python-azure-nspkg))
11752 (home-page "https://github.com/Azure/azure-storage-python")
11753 (synopsis "Microsoft Azure Storage Namespace package")
11754 (description
11755 "This project provides a client library in Python that makes it easy to
11756communicate with Microsoft Azure Storage services.")
11757 (license license:expat)))
11758
11759(define-public python-azure-common
11760 (package
11761 (name "python-azure-common")
11762 (version "1.1.28")
11763 (source
11764 (origin
11765 (method url-fetch)
11766 (uri (pypi-uri "azure-common" version ".zip"))
11767 (sha256
11768 (base32 "18q4cy1xl2zly3rk7a1sc14w932x59r8c9j4d8dnlsz32hrcvh2a"))))
11769 (build-system pyproject-build-system)
11770 (arguments
11771 (list #:tests? #f)) ;no tests in PyPI archive
11772 (propagated-inputs (list python-azure-nspkg))
11773 (native-inputs (list python-setuptools unzip))
11774 (home-page "https://github.com/Azure/azure-sdk-for-python")
11775 (synopsis "Microsoft Azure Client library for Python")
11776 (description "This package provides the Microsoft Azure Client library for
11777Python.")
11778 (license license:expat)))
11779
11780(define-public python-azure-core
11781 (package
11782 (name "python-azure-core")
11783 (version "1.32.0")
11784 (source
11785 (origin
11786 (method url-fetch)
11787 (uri (pypi-uri "azure_core" version))
11788 (sha256
11789 (base32 "1r9hqyqr5fxiiai0irr0n98gwgzj5f8y46vc1yci9bidddfw7cr2"))))
11790 (build-system pyproject-build-system)
11791 (arguments
11792 (list
11793 #:test-flags
11794 `(list ;; This fails because devtools_testutils doesn't exist.
11795 "--ignore=tests/test_connection_string_parsing.py"
11796 ;; These all need network access.
11797 "--ignore=samples"
11798 "--ignore=tests/async_tests/test_streaming_async.py"
11799 "--ignore=tests/test_streaming.py"
11800 "-m" "not asyncio and not live_test_only"
11801 "-k" ,(string-append
11802 "not test_decompress_plain_no_header"
11803 " and not test_compress_plain_no_header"
11804 " and not test_decompress_compressed_no_header"
11805 " and not test_requests_socket_timeout"))
11806 #:phases
11807 #~(modify-phases %standard-phases
11808 (add-before 'check 'add-test-pythonpath
11809 (lambda* (#:key tests? #:allow-other-keys)
11810 (when tests?
11811 (setenv "PYTHONPATH"
11812 (string-append
11813 (getcwd) "/tests/testserver_tests/coretestserver:"
11814 (getenv "GUIX_PYTHONPATH")))))))))
11815 (propagated-inputs
11816 (list python-aiohttp
11817 python-requests
11818 python-six
11819 python-typing-extensions))
11820 (native-inputs
11821 (list python-flask
11822 python-pytest
11823 python-pytest-aiohttp
11824 python-pytest-asyncio
11825 python-pytest-trio
11826 python-setuptools
11827 python-wheel))
11828 (home-page "https://github.com/Azure/azure-sdk-for-python")
11829 (synopsis "Microsoft Azure Core library for Python")
11830 (description "This package provides the Microsoft Azure Core library for
11831Python.")
11832 (license license:expat)))
11833
11834(define-public python-azure-storage-blob
11835 (package
11836 (name "python-azure-storage-blob")
11837 (version "12.27.0")
11838 (source
11839 (origin
11840 (method url-fetch)
11841 (uri (pypi-uri "azure_storage_blob" version))
11842 (sha256
11843 (base32 "16nb17f6bi0k53qlxybwqxdld3nj742hmsk4qcq3jwka5b6y5s4r"))))
11844 (build-system pyproject-build-system)
11845 (arguments
11846 ;; XXX: devtools_testutils is not provided as a proper package on PyPI,
11847 ;; Git does not contains setup.py, setup.cfg or pyproject.toml which makes
11848 ;; it hard to package in Guix.
11849 ;; <https://raw.githubusercontent.com/Azure/azure-sdk-for-python/refs/
11850 ;; heads/main/tools/azure-sdk-tools/devtools_testutils/README.md>.
11851 (list #:tests? #f))
11852 (native-inputs
11853 (list python-setuptools))
11854 (propagated-inputs
11855 (list python-azure-core
11856 python-cryptography
11857 python-isodate
11858 python-typing-extensions))
11859 (home-page "https://github.com/Azure/azure-sdk-for-python/")
11860 (synopsis "Microsoft Azure Blob Storage client library for Python")
11861 (description "This package provides the Microsoft Azure Blob Storage
11862Client Library for Python.")
11863 (license license:expat)))
11864
11865(define-public python-azure-storage-file-datalake
11866 (package
11867 (name "python-azure-storage-file-datalake")
11868 (version "12.22.0")
11869 (source
11870 (origin
11871 (method url-fetch)
11872 (uri (pypi-uri "azure_storage_file_datalake" version))
11873 (sha256
11874 (base32 "0xxg94684b630p8jrz38sg7mdcwp1wa0p5di27mswyrjycshvvcs"))))
11875 (build-system pyproject-build-system)
11876 (arguments
11877 ;; XXX: devtools_testutils is not provided as a proper package on PyPI,
11878 ;; Git does not contains setup.py, setup.cfg or pyproject.toml which makes
11879 ;; it hard to package in Guix.
11880 ;; <https://raw.githubusercontent.com/Azure/azure-sdk-for-python/refs/
11881 ;; heads/main/tools/azure-sdk-tools/devtools_testutils/README.md>.
11882 (list #:tests? #f))
11883 (native-inputs
11884 (list python-setuptools))
11885 (propagated-inputs
11886 (list python-azure-core
11887 python-azure-storage-blob
11888 python-isodate
11889 python-typing-extensions))
11890 (home-page "https://github.com/Azure/azure-sdk-for-python")
11891 (synopsis "Microsoft Azure File DataLake Storage Client Library for Python")
11892 (description
11893 "This package provides the Microsoft Azure File @code{DataLake} Storage
11894Client Library for Python.")
11895 (license license:expat)))
11896
11897(define-public python-google-auth
11898 (package
11899 (name "python-google-auth")
11900 (version "2.41.1")
11901 (source
11902 (origin
11903 (method url-fetch)
11904 (uri (pypi-uri "google_auth" version))
11905 (sha256
11906 (base32 "1lmzkiq3gvpgf0k9kxlyjm4g5vjam7v183c7i1zcpw31kqgpnsxp"))))
11907 (build-system pyproject-build-system)
11908 (arguments
11909 (list
11910 #:test-flags
11911 ;; This one test uses crypto.sign with an outdated calling convention.
11912 '(list "--ignore=tests/transport/test__mtls_helper.py")))
11913 (propagated-inputs
11914 (list python-aiohttp
11915 python-cachetools
11916 python-pyasn1-modules
11917 python-requests
11918 python-rsa
11919 python-urllib3))
11920 (native-inputs
11921 (list nss-certs-for-test
11922 python-aioresponses
11923 python-cryptography
11924 python-flask
11925 python-freezegun
11926 python-grpcio
11927 python-mock
11928 python-oauth2client
11929 python-packaging
11930 python-pyjwt
11931 python-pyopenssl
11932 python-pytest
11933 python-pytest-asyncio
11934 python-pytest-localserver
11935 python-pyu2f
11936 python-responses
11937 python-setuptools))
11938 (home-page "https://github.com/googleapis/google-auth-library-python")
11939 (synopsis "Google Authentication Library")
11940 (description "This library simplifies using Google's various
11941server-to-server authentication mechanisms to access Google APIs.")
11942 (license license:asl2.0)))
11943
11944(define-public python-google-resumable-media
11945 (package
11946 (name "python-google-resumable-media")
11947 (version "2.8.0")
11948 (source
11949 (origin
11950 (method git-fetch)
11951 (uri (git-reference
11952 (url
11953 "https://github.com/googleapis/google-resumable-media-python")
11954 (commit (string-append "v" version))))
11955 (file-name (git-file-name name version))
11956 (sha256
11957 (base32 "0ndida5yr06bal0m09yri80bvf8x7yy690b14ywnxl4ixi8rlh6s"))))
11958 (build-system pyproject-build-system)
11959 (arguments
11960 (list
11961 #:test-flags
11962 #~(list
11963 ;; XXX: Missing test_utils.retry.
11964 "--ignore-glob=tests*/system/"
11965 ;; XXX: md5_hash is not mock.sentinel.md5_hash
11966 "-k" (string-join
11967 (list "not test_brotli"
11968 "test_constructor"
11969 "test_decompress")
11970 " and not "))))
11971 (propagated-inputs (list python-google-crc32c))
11972 (native-inputs
11973 (list python-google-auth
11974 python-mock
11975 python-pytest
11976 python-pytest-asyncio
11977 python-setuptools
11978 python-test-utils))
11979 (home-page "https://github.com/googleapis/google-resumable-media-python")
11980 (synopsis "Utilities for Google Media Downloads and Resumable Uploads")
11981 (description "This package provides utilities for Google Media Downloads
11982and Resumable Uploads.")
11983 (license license:asl2.0)))
11984
11985(define-public python-googleapis-common-protos
11986 (package
11987 (name "python-googleapis-common-protos")
11988 (version "1.66.0")
11989 (source
11990 (origin
11991 (method git-fetch)
11992 (uri (git-reference
11993 (url "https://github.com/googleapis/python-api-common-protos")
11994 (commit (string-append "v" version))))
11995 (file-name (git-file-name name version))
11996 (sha256
11997 (base32 "1fb7bcmjngmwwhqrldslli6r5z3s6r2kj4ywjmdjj92d1i51c29r"))))
11998 (build-system pyproject-build-system)
11999 (propagated-inputs (list python-protobuf))
12000 (native-inputs (list python-pytest python-setuptools))
12001 (home-page "https://github.com/googleapis/python-api-common-protos")
12002 (synopsis "Common protobufs used in Google APIs")
12003 (description
12004 "This package contains Python classes generated from the common protos in
12005the @code{googleapis/api-common-protos} repository.")
12006 (license license:asl2.0)))
12007
12008(define-public python-google-api-core
12009 (package
12010 (name "python-google-api-core")
12011 (version "2.28.1")
12012 (source
12013 (origin
12014 (method git-fetch)
12015 (uri (git-reference
12016 (url "https://github.com/googleapis/python-api-core")
12017 (commit (string-append "v" version))))
12018 (file-name (git-file-name name version))
12019 (sha256
12020 (base32 "1h12187s5jlj3x6gl13byfwkr2mnyiabyc6i74kc6bazz3r4iizx"))))
12021 (build-system pyproject-build-system)
12022 (propagated-inputs
12023 (list python-google-auth
12024 python-googleapis-common-protos
12025 python-protobuf
12026 python-proto-plus
12027 python-requests))
12028 (native-inputs
12029 (list python-mock
12030 python-pytest
12031 python-pytest-asyncio
12032 python-pytest-mock
12033 python-setuptools))
12034 (home-page "https://github.com/googleapis/python-api-core")
12035 (synopsis "Google API client core library")
12036 (description
12037 "This library defines common helpers used by all Google API clients.")
12038 (license license:asl2.0)))
12039
12040(define-public python-google-cloud-core
12041 (package
12042 (name "python-google-cloud-core")
12043 (version "2.5.0")
12044 (source
12045 (origin
12046 (method git-fetch)
12047 (uri (git-reference
12048 (url "https://github.com/googleapis/python-cloud-core")
12049 (commit (string-append "v" version))))
12050 (file-name (git-file-name name version))
12051 (sha256
12052 (base32 "1d7li74cakgl9vghxfir9nxwy36980alvxwgwjg0zyla3hgj07cq"))))
12053 (build-system pyproject-build-system)
12054 (propagated-inputs (list python-google-api-core python-google-auth))
12055 (native-inputs
12056 (list python-grpcio
12057 python-grpcio-status
12058 python-pytest
12059 python-setuptools))
12060 (home-page "https://github.com/googleapis/python-cloud-core")
12061 (synopsis "Google Cloud API client core library")
12062 (description
12063 "This library defines common helpers (e.g. base @code{Client} classes)
12064used by all of the @code{google-cloud-*} packages.")
12065 (license license:asl2.0)))
12066
12067(define-public python-google-cloud-storage
12068 (package
12069 (name "python-google-cloud-storage")
12070 (version "2.19.0")
12071 (source
12072 (origin
12073 (method git-fetch)
12074 (uri (git-reference
12075 (url "https://github.com/googleapis/python-storage")
12076 (commit (string-append "v" version))))
12077 (file-name (git-file-name name version))
12078 (sha256
12079 (base32 "19w10v2j4ciwlf8j2ylm77f8z1b0kqzg8lkh9rvh2swv1zrhydpj"))))
12080 (build-system pyproject-build-system)
12081 (arguments
12082 (list
12083 #:test-flags
12084 #~(list
12085 ;; XXX: Missing test_utils.retry.
12086 "--ignore=tests/system/"
12087 ;; Needs docker.
12088 "--ignore=tests/conformance/"
12089 ;; XXX: Deprecations.
12090 "-k" (string-join
12091 (list "not test_set_api_request_attr"
12092 "test_create_bucket_w_custom_endpoint"
12093 "test_ctor_w_api_endpoint_override"
12094 "test_ctor_w_custom_endpoint_use_auth"
12095 "test_list_buckets_w_custom_endpoint")
12096 " and not ")
12097 "tests")))
12098 (native-inputs
12099 (list python-googleapis-common-protos
12100 python-mock
12101 python-pytest
12102 python-test-utils
12103 python-setuptools))
12104 (propagated-inputs
12105 (list python-google-api-core
12106 python-google-auth
12107 python-google-cloud-core
12108 python-google-resumable-media
12109 python-protobuf
12110 python-requests))
12111 (home-page "https://github.com/googleapis/python-storage")
12112 (synopsis "Google Cloud Storage API client library")
12113 (description
12114 "Google Cloud Storage allows you to store data on Google infrastructure,
12115and it can be used to distribute large data objects to users via direct
12116download. This package provides a Google Cloud Storage API client library for
12117Python.")
12118 (license license:asl2.0)))
12119
12120(define-public python-smart-open
12121 (package
12122 (name "python-smart-open")
12123 (version "7.3.0")
12124 (source
12125 (origin
12126 (method git-fetch) ;no tests in PyPI archive
12127 (uri (git-reference
12128 (url "https://github.com/piskvorky/smart_open")
12129 (commit (string-append "v" version))))
12130 (file-name (git-file-name name version))
12131 (sha256
12132 (base32 "1jk3dj0j7idv94g1ga5wyvybakj4l150g26cbsjkrjfpy017vxab"))))
12133 (build-system pyproject-build-system)
12134 (arguments
12135 (list
12136 #:test-flags
12137 #~(list "--ignore=ci_helpers/"
12138 "--ignore=integration-tests/"
12139 ;; FIXME: Enable when guix/guix#1436 is resolved.
12140 "--deselect=tests/test_smart_open.py::ParseUriTest::test_gs_uri"
12141 "--deselect=tests/test_smart_open.py::ParseUriTest::test_gs_uri_contains_question_mark"
12142 "--deselect=tests/test_smart_open.py::ParseUriTest::test_gs_uri_contains_slash"
12143 "--deselect=tests/test_smart_open.py::ParseUriTest::test_scheme"
12144 "--ignore=tests/test_gcs.py")
12145 #:phases
12146 #~(modify-phases %standard-phases
12147 (add-before 'build 'set-version
12148 (lambda _
12149 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
12150 (propagated-inputs
12151 (list python-azure-common
12152 python-azure-core
12153 python-azure-storage-blob
12154 python-boto3
12155 ;; python-google-cloud-storage ;see guix/guix#1436
12156 python-paramiko
12157 python-requests
12158 python-wrapt
12159 python-zstandard))
12160 (native-inputs
12161 (list python-numpy
12162 python-moto
12163 python-pytest
12164 python-pytest-rerunfailures
12165 python-responses
12166 python-setuptools
12167 python-setuptools-scm
12168 python-wheel))
12169 (home-page "https://github.com/piskvorky/smart_open")
12170 (synopsis "Utilities for streaming large files")
12171 (description
12172 "This package provides utilities for streaming large files (S3, HDFS,
12173GCS, Azure Blob Storage, gzip, bz2, etc.)")
12174 (license license:expat)))
12175
12176(define-public python-smart-open-6
12177 (package
12178 (inherit python-smart-open)
12179 (name "python-smart-open")
12180 (version "6.4.0")
12181 (source
12182 (origin
12183 (method git-fetch)
12184 (uri (git-reference
12185 (url "https://github.com/piskvorky/smart_open")
12186 (commit (string-append "v" version))))
12187 (file-name (git-file-name name version))
12188 (sha256
12189 (base32 "1vpx37b6lsb6iwi59776ywjrqk1czv8arlhaf9073lrsbilqvj3x"))))
12190 (arguments
12191 (list
12192 ;; XXX: Tests need some older native inputs, disable for now.
12193 #:tests? #f))))
12194
12195(define-public python-w3lib
12196 (package
12197 (name "python-w3lib")
12198 (version "2.3.1")
12199 (source
12200 (origin
12201 (method url-fetch)
12202 (uri (pypi-uri "w3lib" version))
12203 (sha256
12204 (base32
12205 "1929layzxwdnf43hhrz7rabv388b2yibj7mnq9s62mr760mc12jw"))))
12206 (build-system pyproject-build-system)
12207 (native-inputs
12208 (list python-pytest python-setuptools python-wheel))
12209 (home-page "https://github.com/scrapy/w3lib")
12210 (synopsis "Python library of web-related functions")
12211 (description
12212 "This is a Python library of web-related functions, such as: remove
12213comments, or tags from HTML snippets, extract base url from HTML snippets,
12214translate entities on HTML strings, among other things.")
12215 (license license:bsd-3)))
12216
12217(define-public python-webcolors
12218 (package
12219 (name "python-webcolors")
12220 (version "24.11.1")
12221 (source
12222 (origin
12223 (method url-fetch)
12224 (uri (pypi-uri "webcolors" version))
12225 (sha256
12226 (base32 "1xl0vn4xa03vjwx6fj19q9kgb94g65gvdf3p0ivsy0i2ydldgczc"))))
12227 (build-system pyproject-build-system)
12228 (arguments
12229 (list
12230 #:phases
12231 '(modify-phases %standard-phases
12232 (add-after 'unpack 'patch-pyproject
12233 (lambda _
12234 ;; XXX Our version of python-pdm-backend does not recognize
12235 ;; "dependency-groups", but is fine with the bogus
12236 ;; "tool.whatever".
12237 (substitute* "pyproject.toml"
12238 (("\\[dependency-groups\\]") "[tool.whatever]")))))))
12239 (native-inputs
12240 (list python-pdm-backend python-pytest))
12241 (home-page "https://github.com/ubernostrum/webcolors")
12242 (synopsis "HTML/CSS color definitions library")
12243 (description "@code{python-webcolors} is a module for working with
12244HTML/CSS color definitions. Normalizing and converting between the following
12245formats is supported.
12246@itemize
12247@item Specification-defined color names
12248@item Six-digit hexadecimal
12249@item Three-digit hexadecimal
12250@item Integer rgb() triplet
12251@item Percentage rgb() triplet
12252@end itemize
12253Only the RGB colorspace is supported. Conversion to/from the HSL colorspace
12254can be handled by the @code{colorsys} module in the Python standard library.")
12255 (license license:bsd-3)))
12256
12257(define-public python-woob
12258 ;; TODO: woob requires backends which are currently installed on the fly in
12259 ;; ~/.local/share/woob/modules/3.7/woob_modules/ , perhaps we should install
12260 ;; them in the store instead. Many modules are included in the modules
12261 ;; directory in the source tree, but it is unclear how to install them.
12262 ;; Many modules require extra dependencies though, so maybe they should be
12263 ;; packaged independently of woob itself.
12264 (package
12265 (name "python-woob")
12266 (version "3.7")
12267 (source
12268 (origin
12269 (method git-fetch)
12270 (uri (git-reference
12271 (url "https://gitlab.com/woob/woob.git")
12272 (commit version)))
12273 (file-name (git-file-name name version))
12274 (sha256
12275 (base32 "1sy0aykff56xs4dnc7ak6m8is2zgz9fprf3i1pk8n861xz1z748i"))))
12276 (build-system pyproject-build-system)
12277 (arguments
12278 (list
12279 #:test-flags
12280 ;; Deselect tests that require DNS lookup.
12281 #~(list
12282 "--deselect=tests/browser/adapters.py::TestAdapter::test_ciphers"
12283 "--deselect=tests/browser/browsers.py::TestBrowser::test_verify")
12284 #:phases
12285 #~(modify-phases %standard-phases
12286 (add-before 'build 'relax-requirements
12287 (lambda _
12288 ;; "packaging ~= 23.0",
12289 (substitute* "pyproject.toml"
12290 (("\"packaging .*\",")
12291 "")))))))
12292 (native-inputs
12293 (list nss-certs-for-test
12294 python-pytest
12295 python-setuptools))
12296 (propagated-inputs
12297 (list python-babel
12298 python-colorama
12299 python-cssselect
12300 python-dateutil
12301 python-feedparser
12302 python-html2text
12303 python-lxml
12304 python-packaging
12305 python-pillow
12306 python-prettytable
12307 python-pycountry
12308 python-pyyaml
12309 python-requests
12310 python-responses
12311 python-rich
12312 python-termcolor
12313 python-unidecode))
12314 (home-page "https://woob.tech/")
12315 (synopsis "Woob, Web Outside Of Browsers")
12316 (description
12317 "Woob is a collection of applications able to interact with
12318websites, without requiring the user to open them in a browser. It also
12319provides well-defined APIs to talk to websites lacking one.")
12320 (license license:lgpl3+)))
12321
12322(define-public python-flask-combo-jsonapi
12323 (let ((commit "3cfff98ecdbadc45d25a3fd443ad67d3743be6f5")
12324 (revision "0"))
12325 (package
12326 (name "python-flask-combo-jsonapi")
12327 (version (git-version "1.1.0" revision commit))
12328 (source
12329 (origin
12330 (method git-fetch)
12331 (uri (git-reference
12332 (url "https://github.com/AdCombo/flask-combo-jsonapi")
12333 (commit commit)))
12334 (file-name (git-file-name name version))
12335 (sha256
12336 (base32 "1lp81v96qh9hdj3c95kvfaq0vy5vd8cm55j03aszc93bs8z5jg7h"))))
12337 (build-system pyproject-build-system)
12338 (arguments
12339 (list
12340 #:test-flags
12341 #~(list
12342 "-k"
12343 (string-join
12344 (list
12345 ;; XXX: This tests a feature that doesn't make sense when dropping
12346 ;; marshmallow < 3 support.
12347 "not test_compute_schema_propagate_context"
12348 ;; The following tests fail for unknown reasons (see:
12349 ;; https://github.com/AdCombo/flask-combo-jsonapi/issues/66).
12350 "test_get_list_with_simple_filter_relationship_custom_qs_api"
12351 "test_get_list_with_simple_filter_relationship_error")
12352 " and not "))
12353 #:phases
12354 #~(modify-phases %standard-phases
12355 (add-after 'unpack 'loosen-requirements
12356 (lambda _
12357 ;; Don't pin specific versions of dependencies.
12358 (substitute* "requirements.txt"
12359 (("^(sqlalchemy|marshmallow|Flask)[=<>].*" _ dep)
12360 (string-append dep "\n"))
12361 (("^marshmallow_jsonapi[=<>].*")
12362 "marshmallow_jsonapi_minfork\n"))
12363 ;; Drop support for marshmallow < 3.
12364 (substitute* (list "flask_combo_jsonapi/data_layers/alchemy.py"
12365 "flask_combo_jsonapi/schema.py")
12366 (("from marshmallow\\.base import SchemaABC")
12367 "from marshmallow import Schema")
12368 (("if isinstance\\(related_schema_cls, SchemaABC\\):")
12369 "if isinstance(related_schema_cls, Schema):"))
12370 (substitute* "tests/test_sqlalchemy_data_layer.py"
12371 (("default=None")
12372 "dump_default=None")
12373 (("missing=")
12374 "load_default=")))))))
12375 (propagated-inputs
12376 (list python-flask
12377 python-marshmallow
12378 python-marshmallow-jsonapi
12379 python-simplejson
12380 python-sqlalchemy
12381 python-apispec
12382 python-simplejson
12383 python-six))
12384 (native-inputs
12385 (list python-pytest python-setuptools))
12386 (home-page "https://github.com/AdCombo/flask-combo-jsonapi")
12387 (synopsis "Flask extension to quickly create JSON:API 1.0 REST Web APIs")
12388 (description
12389 "Flask-COMBO-JSONAPI is a Python Flask extension for building REST Web
12390APIs compliant with the @uref{https://jsonapi.org, JSON:API 1.0}
12391specification.
12392
12393It tries to combine the power of Flask-Restless with the flexibility of
12394Flask-RESTful to quickly build APIs that fit the complexity of existing
12395real-life projects with legacy data and diverse storage providers.")
12396 (license license:expat))))
12397
12398(define-public python-mwparserfromhell
12399 (package
12400 (name "python-mwparserfromhell")
12401 (version "0.7.2")
12402 (source
12403 (origin
12404 (method git-fetch)
12405 (uri (git-reference
12406 (url "https://github.com/earwig/mwparserfromhell")
12407 (commit (string-append "v" version))))
12408 (file-name (git-file-name name version))
12409 (sha256
12410 (base32 "083ir0nccm14431mmn243862gq731ww98fwpd95zm1yccvpzdy68"))))
12411 (build-system pyproject-build-system)
12412 (native-inputs (list python-pytest python-setuptools))
12413 (home-page "https://github.com/earwig/mwparserfromhell")
12414 (synopsis "Python parser for MediaWiki wikicode")
12415 (description
12416 "The MediaWiki Parser From Hell is a python library package that provides
12417a parser for MediaWiki.
12418
12419It exposes parses as normal string objects with additional methods giving
12420access to the special Wikicode features it contains (hyperlinks, tags,
12421templates…). The parser doesn't interpolate strings at all, it remains at a
12422purely formal level.
12423
12424Full documentation may be found at
12425@uref{https://mwparserfromhell.readthedocs.io, ReadTheDocs}")
12426 (license license:expat)))
12427
12428(define-public python-tweepy
12429 (package
12430 (name "python-tweepy")
12431 (version "4.16.0")
12432 (source
12433 (origin
12434 (method git-fetch)
12435 (uri
12436 (git-reference
12437 (url "https://github.com/tweepy/tweepy")
12438 (commit (string-append "v" version))))
12439 (file-name (git-file-name name version))
12440 (sha256
12441 (base32 "1k99qf0h1ykz0c56wdnlsyvd6zrcsrc4rl7rnlaxrpjppxjnpcpn"))))
12442 (build-system pyproject-build-system)
12443 (arguments
12444 ;; tests: 149 passed, 3 skipped, 1 warning
12445 (list #:test-backend #~'unittest
12446 #:test-flags #~(list "discover" "tests")))
12447 (native-inputs
12448 (list nss-certs-for-test
12449 python-flit-core
12450 python-urllib3-1.26
12451 python-vcrpy))
12452 (propagated-inputs
12453 (list python-aiohttp
12454 python-async-lru
12455 python-oauthlib
12456 python-requests
12457 python-requests-oauthlib))
12458 (home-page "https://www.tweepy.org/")
12459 (synopsis "Twitter library for Python")
12460 (description
12461 "This package provides @code{Tweepy}, an easy-to-use Python library for
12462accessing the Twitter API.")
12463 (license license:expat)))
12464
12465(define-public python-quart
12466 (package
12467 (name "python-quart")
12468 (version "0.19.9")
12469 (source
12470 (origin
12471 (method git-fetch) ; no tests in PyPI release
12472 (uri (git-reference
12473 (url "https://github.com/pallets/quart")
12474 (commit version)))
12475 (file-name (git-file-name name version))
12476 (sha256
12477 (base32 "1h5ifv8g9dc9m07vj4v7dfalam83v38545d845vvgys1gan1pscd"))))
12478 (build-system pyproject-build-system)
12479 (arguments
12480 (list
12481 #:phases
12482 #~(modify-phases %standard-phases
12483 (add-after 'unpack 'remove-coverage-pytest-options
12484 (lambda _
12485 (substitute* "pyproject.toml"
12486 (("--no-cov-on-fail") "")))))))
12487 (native-inputs
12488 (list python-poetry-core
12489 python-pytest
12490 python-pytest-asyncio))
12491 (propagated-inputs
12492 (list hypercorn
12493 python-aiofiles
12494 python-blinker
12495 python-click
12496 python-dotenv
12497 python-flask
12498 python-itsdangerous
12499 python-jinja2
12500 python-markupsafe
12501 python-toml
12502 python-werkzeug))
12503 (home-page "https://gitlab.com/pgjones/quart/")
12504 (synopsis "Python ASGI web microframework with the same API as Flask")
12505 (description
12506 "This package provides a Python ASGI web microframework with the same API
12507as Flask.")
12508 (license license:expat)))
12509
12510(define-public python-quart-trio
12511 (package
12512 (name "python-quart-trio")
12513 (version "0.12.0")
12514 (source
12515 (origin
12516 (method url-fetch)
12517 (uri (pypi-uri "quart_trio" version))
12518 (sha256
12519 (base32 "130r8hdk7xxjp380z1r3m28lw86q2a6g9rf0mgp9gs6hk04q9v02"))))
12520 (build-system pyproject-build-system)
12521 (arguments
12522 (list
12523 #:phases
12524 #~(modify-phases %standard-phases
12525 (add-after 'unpack 'remove-coverage-pytest-options
12526 (lambda _
12527 (substitute* "pyproject.toml"
12528 (("--no-cov-on-fail") "")))))))
12529 (native-inputs
12530 (list python-pdm-backend
12531 python-pytest
12532 python-pytest-sugar
12533 python-pytest-trio))
12534 (propagated-inputs
12535 (list hypercorn
12536 python-exceptiongroup
12537 python-quart
12538 python-trio))
12539 (home-page "https://github.com/pgjones/quart-trio")
12540 (synopsis "Extension for Quart to support the Trio event loop")
12541 (description
12542 "This package provides a Quart extension to provide Trio support. This
12543is an alternative to using the asyncio event loop present in the Python
12544standard library and supported by default in Quart.")
12545 (license license:expat)))
12546
12547(define-public python-ajsonrpc
12548 (package
12549 (name "python-ajsonrpc")
12550 (version "1.2.0")
12551 (source
12552 (origin
12553 (method git-fetch)
12554 (uri (git-reference
12555 (url "https://github.com/pavlov99/ajsonrpc")
12556 (commit version)))
12557 (file-name (git-file-name name version))
12558 (sha256
12559 (base32 "0c7jxfkv5q2m95j54dn650gcvdbpag2qcki7phvmrwsgb36w09kd"))))
12560 (build-system pyproject-build-system)
12561 (arguments
12562 (list
12563 #:phases
12564 #~(modify-phases %standard-phases
12565 (add-after 'unpack 'set-version
12566 (lambda _
12567 (substitute* "ajsonrpc/__init__.py"
12568 (("^__version__ = .*")
12569 (string-append "__version__ = \"" #$version "\"\n"))))))))
12570 (native-inputs
12571 (list python-pytest
12572 python-setuptools))
12573 (propagated-inputs
12574 (list python-quart
12575 python-sanic
12576 python-tornado))
12577 (home-page "https://github.com/pavlov99/ajsonrpc")
12578 (synopsis "Async JSON-RPC 2.0 protocol and server")
12579 (description
12580 "This package provides a Python JSON-RPC 2.0 protocol and server powered
12581by asyncio.")
12582 (license license:expat)))
12583
12584(define-public python-protego
12585 (package
12586 (name "python-protego")
12587 (version "0.4.0")
12588 (source
12589 (origin
12590 (method url-fetch)
12591 (uri (pypi-uri "protego" version))
12592 (sha256
12593 (base32 "1xn2aska8v94jqnbyv4ywczb55gaqvr298q8ybhs168knrifd9ck"))))
12594 (build-system pyproject-build-system)
12595 (native-inputs (list python-pytest python-setuptools python-wheel))
12596 (home-page "https://github.com/scrapy/protego")
12597 (synopsis "Python robots.txt parser with support for modern conventions")
12598 (description "Protego is a pure-Python @file{robots.txt} parser with support
12599for modern conventions.")
12600 (license license:bsd-3)))
12601
12602(define-public python-parsel
12603 (package
12604 (name "python-parsel")
12605 (version "1.10.0")
12606 (source
12607 (origin
12608 (method url-fetch)
12609 (uri (pypi-uri "parsel" version))
12610 (sha256
12611 (base32 "1050v20gzijfcaxpm1d4bvxqw2l7xhyf9pxrawrv8lczanwpvw8l"))))
12612 (build-system pyproject-build-system)
12613 (propagated-inputs
12614 (list python-cssselect
12615 python-jmespath
12616 python-lxml
12617 python-typing-extensions
12618 python-w3lib))
12619 (native-inputs
12620 (list python-psutil python-pytest python-setuptools python-wheel))
12621 (home-page "https://github.com/scrapy/parsel")
12622 (synopsis "Extract data from HTML and XML using XPath and CSS selectors")
12623 (description "Parsel is a library to extract and remove data from
12624HTML and XML using XPath and CSS selectors, optionally combined with
12625regular expressions.")
12626 (license license:bsd-3)))
12627
12628(define-public python-scrapy
12629 (package
12630 (name "python-scrapy")
12631 (version "2.13.3")
12632 (source
12633 (origin
12634 (method url-fetch)
12635 (uri (pypi-uri "scrapy" version))
12636 (sha256
12637 (base32 "0k90pni6vkj7axx3cji0b2x7yg4yfh5kh1csqiq9ssp42265h5xz"))))
12638 (build-system pyproject-build-system)
12639 (arguments
12640 (list #:test-flags
12641 #~(list "--numprocesses" (number->string (parallel-job-count))
12642 "-k" (string-join
12643 ;; ConnectionRefusedError: [Errno 111] Connection
12644 ;; refused
12645 (list "not test_append"
12646 "test_append_active_mode"
12647 "test_overwrite"
12648 "test_overwrite_active_mode"
12649 "test_persist"
12650 ;; AssertionError
12651 "test_start_deprecated_super")
12652 " and not ")
12653 ;; Skip documentation testing.
12654 "--ignore=docs")
12655 #:phases
12656 #~(modify-phases %standard-phases
12657 (add-before 'check 'prepare-test-environment
12658 (lambda _
12659 (setenv "HOME" "/tmp"))))))
12660 (propagated-inputs
12661 (list python-cryptography
12662 python-cssselect
12663 python-defusedxml
12664 python-itemadapter
12665 python-itemloaders
12666 python-lxml
12667 python-packaging
12668 python-parsel
12669 python-protego
12670 python-pydispatcher
12671 python-pyopenssl
12672 python-pypydispatcher
12673 python-queuelib
12674 python-service-identity
12675 python-tldextract
12676 python-twisted
12677 python-w3lib
12678 python-zope-interface))
12679 (native-inputs
12680 (list nss-certs-for-test
12681 python-hatchling
12682 python-pexpect
12683 python-pytest
12684 python-pytest-xdist
12685 python-setuptools
12686 python-sybil
12687 python-testfixtures))
12688 (home-page "https://scrapy.org")
12689 (synopsis "High-level Web crawling and Web scraping framework")
12690 (description "Scrapy is a fast high-level web crawling and web
12691scraping framework, used to crawl websites and extract structured data
12692from their pages. It can be used for a wide range of purposes, from data
12693mining to monitoring and automated testing.")
12694 (license license:bsd-3)))
12695
12696(define-public python-jstyleson
12697 (let ((commit "8c47cc9e665b3b1744cccfaa7a650de5f3c575dd")
12698 (revision "0"))
12699 (package
12700 (name "python-jstyleson")
12701 (version (git-version "0.0.2" revision commit))
12702 (source
12703 (origin
12704 (method git-fetch)
12705 (uri (git-reference
12706 (url "https://github.com/linjackson78/jstyleson")
12707 (commit commit)))
12708 (file-name (git-file-name name version))
12709 (sha256
12710 (base32 "0r72mq7h294w5icpdbjd202w25kwr1dz7nh79f6m74xisc9cixia"))))
12711 (build-system pyproject-build-system)
12712 (native-inputs (list python-pytest python-setuptools))
12713 (home-page "https://github.com/linjackson78/jstyleson")
12714 (synopsis "JSON parser supporting js-style comments")
12715 (description
12716 "@code{jstyleson} is a Python library to parse JSON. Contrary to the
12717standard Python @code{json} library, it understands js-style comments.
12718Trailing comma is also supported.")
12719 (license license:expat))))
12720
12721(define-public python-html-text
12722 (package
12723 (name "python-html-text")
12724 (version "0.7.0")
12725 (source
12726 (origin
12727 (method url-fetch)
12728 (uri (pypi-uri "html_text" version))
12729 (sha256
12730 (base32 "10lixghras86av966ha9piqfl1iscf7nffg69dmz13sxjh371jrx"))))
12731 (build-system pyproject-build-system)
12732 (native-inputs
12733 (list python-pytest
12734 python-setuptools
12735 python-wheel))
12736 (propagated-inputs
12737 (list python-lxml
12738 python-lxml-html-clean))
12739 (home-page "https://github.com/TeamHG-Memex/html-text")
12740 (synopsis "Extract text from HTML")
12741 (description "HTML to Text is a Python library for extract text from HTML.
12742Contrary to other solution such as LXML or Beautiful Soup, the text extracted
12743with @code{html_text} does not contain elements such as JavaScript or inline
12744styles not normally visible to users. It also normalizes white space
12745characters in a smarter, more visually pleasing style.")
12746 (license license:expat)))
12747
12748(define-public python-mf2py
12749 (package
12750 (name "python-mf2py")
12751 (version "2.0.1")
12752 (source
12753 (origin
12754 (method git-fetch)
12755 (uri (git-reference
12756 (url "https://github.com/microformats/mf2py")
12757 (commit (string-append "v" version))))
12758 (file-name (git-file-name name version))
12759 (sha256
12760 (base32 "0ajnf0zrh1l48fvix9fbs1qvgbqhiljqnrm51rx44p7dbarpw4ls"))))
12761 (build-system pyproject-build-system)
12762 (native-inputs (list python-mock python-poetry-core python-pytest))
12763 (propagated-inputs
12764 (list python-beautifulsoup4 python-html5lib python-requests))
12765 (home-page "https://github.com/microformats/mf2py")
12766 (synopsis "Python Microformats2 parser")
12767 (description
12768 "This Python library provides a Microformats2 parser implementing the
12769full Microformats2 (mf2) specification, including backward compatibility with
12770Microformats1 (mf1).")
12771 (license license:expat)))
12772
12773(define-public python-extruct
12774 (package
12775 (name "python-extruct")
12776 (version "0.18.0")
12777 (source (origin
12778 (method git-fetch) ;for tests
12779 (uri (git-reference
12780 (url "https://github.com/scrapinghub/extruct")
12781 (commit (string-append "v" version))))
12782 (file-name (git-file-name name version))
12783 (sha256
12784 (base32
12785 "03qdldqrvmbsk6klq4nkxvvp3b2a0qqgqg115i3crbmialiaai45"))))
12786 (build-system pyproject-build-system)
12787 (arguments
12788 (list
12789 #:test-flags
12790 ;; 67 passed, 3 deselected
12791 ;; XXX: 3 tests fail with errors in assertion.
12792 #~(list "-k" (string-append
12793 "not test_microformat"
12794 " and not test_microformat"
12795 " and not test_umicroformat"))))
12796 (native-inputs
12797 (list python-pytest
12798 python-setuptools
12799 python-wheel))
12800 (propagated-inputs
12801 (list python-html-text
12802 python-jstyleson
12803 python-lxml
12804 python-mf2py
12805 python-pyrdfa3
12806 python-rdflib
12807 python-w3lib))
12808 (home-page "https://github.com/scrapinghub/extruct")
12809 (synopsis "Extract embedded metadata from HTML markup")
12810 (description "@code{extruct} is a Python library for extracting embedded
12811metadata from HTML markup. Currently, extruct supports:
12812@itemize
12813@item W3C's HTML Microdata
12814@item embedded JSON-LD
12815@item Microformat via mf2py
12816@item Facebook's Open Graph
12817@item (experimental) RDFa via rdflib
12818@item Dublin Core Metadata (DC-HTML-2003)
12819@end itemize")
12820 (license license:bsd-3)))
12821
12822(define-public python-wadllib
12823 (package
12824 (name "python-wadllib")
12825 (version "2.0.0")
12826 (source
12827 (origin
12828 (method url-fetch)
12829 (uri (pypi-uri "wadllib" version))
12830 (sha256
12831 (base32 "09vlfg4mzdmkqk6br7j8ms3116qk5am0nf4v1jkzwd7swhisznqy"))))
12832 (build-system pyproject-build-system)
12833 (arguments
12834 (list
12835 ;; XXX: Doctests are currently failing.
12836 #:tests? #f
12837 #:phases
12838 #~(modify-phases %standard-phases
12839 (replace 'check
12840 (lambda* (#:key tests? #:allow-other-keys)
12841 (if tests?
12842 (invoke "zope-testrunner" "--test-path=src")
12843 (format #t "test suite not run~%")))))))
12844 (native-inputs
12845 (list python-multipart python-setuptools python-zope-testrunner))
12846 (propagated-inputs (list python-lazr-uri))
12847 (home-page "https://launchpad.net/wadllib")
12848 (synopsis "Web Application Description Language (WADL) navigation library")
12849 (description "The @code{wadllib} Python library allows navigating HTTP
12850resources using Web Application Description Language (WADL) files as guides.")
12851 (license license:lgpl3)))
12852
12853(define-public python-zeep
12854 (package
12855 (name "python-zeep")
12856 (version "4.3.1")
12857 (source
12858 (origin
12859 (method url-fetch)
12860 (uri (pypi-uri "zeep" version))
12861 (sha256
12862 (base32 "0vm0asfak0pxfa9i753imcy72hk8gkxbj6pmw185b7dhw7lqalzl"))))
12863 (build-system pyproject-build-system)
12864 (arguments
12865 (list
12866 #:phases
12867 '(modify-phases %standard-phases
12868 (add-after 'unpack 'compatibility
12869 (lambda _
12870 ;; Relax requests-file requirement.
12871 (substitute* "pyproject.toml"
12872 (("\"requests-file.*\",")
12873 "\"requests-file\","))
12874 ;; httpx removed the "proxies" keyword. It's now either "mounts"
12875 ;; or "proxy". See https://github.com/encode/httpx/pull/2879.
12876 (substitute* "src/zeep/transports.py"
12877 (("proxies=") "proxy="))))
12878 ;; One test requires write access
12879 (add-before 'check 'set-HOME
12880 (lambda _ (setenv "HOME" (getcwd)))))))
12881 (propagated-inputs
12882 (list python-attrs
12883 python-isodate
12884 python-lxml
12885 python-platformdirs
12886 python-pytz
12887 python-requests
12888 python-requests-file
12889 python-requests-toolbelt))
12890 (native-inputs
12891 (list nss-certs-for-test
12892 python-freezegun
12893 python-pretend
12894 python-pytest
12895 python-pytest-asyncio
12896 python-pytest-cov
12897 python-pytest-httpx
12898 python-requests-mock
12899 python-setuptools
12900 python-wheel))
12901 (home-page "https://docs.python-zeep.org/en/stable/")
12902 (synopsis "Python SOAP client based on lxml / requests")
12903 (description "Zeep is a Python SOAP client. Highlights:
12904
12905@itemize
12906@item Build on top of @code{lxml} and @code{requests}.
12907@item Support for Soap 1.1, Soap 1.2 and HTTP bindings.
12908@item Support for WS-Addressing headers.
12909@item Support for WSSE (UserNameToken / x.509 signing).
12910@item Support for @code{asyncio} via @code{httpx}.
12911@item Experimental support for XOP messages.
12912@end itemize")
12913 (license license:expat)))
12914
12915(define-public python-pysimplesoap
12916 (package
12917 (name "python-pysimplesoap")
12918 (version "1.16.2")
12919 (source (origin
12920 (method url-fetch)
12921 (uri (pypi-uri "PySimpleSOAP" version))
12922 (sha256
12923 (base32
12924 "1qb7dn8m1cjwzql7vqj9i1hsscb7nyhimmlp45jrpzxds38g9fxi"))))
12925 (build-system python-build-system)
12926 (arguments
12927 (list #:tests? #f)) ;tests fail due to attempted web access
12928 (home-page "https://github.com/pysimplesoap/pysimplesoap")
12929 (synopsis "Simple and lightweight SOAP library for Python")
12930 (description
12931 "This package provides a simple and lightweight Python SOAP library for
12932client and server webservices interfaces, aimed to be as small and easy as
12933possible, supporting most common functionality.")
12934 (license license:lgpl3+)))
12935
12936(define-public python-http-client
12937 (package
12938 (name "python-http-client")
12939 (version "3.3.7")
12940 (source
12941 (origin
12942 (method git-fetch)
12943 (uri (git-reference
12944 (url "https://github.com/sendgrid/python-http-client")
12945 (commit version)))
12946 (file-name (git-file-name name version))
12947 (sha256
12948 (base32 "0z0ziw3f4zw5fj4spiwhhs2x8qs3i5999ry2p6a5sc8b1lkkj2zi"))))
12949 (build-system pyproject-build-system)
12950 (arguments
12951 (list
12952 #:test-backend #~'unittest
12953 #:phases
12954 #~(modify-phases %standard-phases
12955 (add-after 'unpack 'fix-tests
12956 (lambda _
12957 ;; The test expects the copyright to be updated each year.
12958 (substitute* "tests/test_daterange.py"
12959 (("time\\.strftime\\(\"%Y\"\\)") "2022")))))))
12960 (native-inputs
12961 (list python-setuptools))
12962 (home-page "https://github.com/sendgrid/python-http-client")
12963 (synopsis "HTTP REST client for Python")
12964 (description
12965 "This package provides access to any RESTful or RESTful-like API.")
12966 (license license:expat)))
12967
12968(define-public python-sendgrid
12969 (package
12970 (name "python-sendgrid")
12971 (version "6.9.7")
12972 (source
12973 (origin
12974 (method git-fetch)
12975 (uri (git-reference
12976 (url "https://github.com/sendgrid/sendgrid-python")
12977 (commit version)))
12978 (file-name (git-file-name name version))
12979 (sha256
12980 (base32 "0kvp4gm3bpcsj2mkv05pgvlcv1jlsfhcljcv61wz5kq9d273h7rg"))))
12981 (build-system pyproject-build-system)
12982 (arguments
12983 (list
12984 #:test-flags
12985 #~(list "--ignore=test/integ"
12986 ;; Network access is required.
12987 "--ignore=live_test.py")))
12988 (native-inputs
12989 (list python-pytest
12990 python-setuptools))
12991 (propagated-inputs
12992 (list python-cryptography
12993 python-http-client
12994 python-flask
12995 python-pyyaml
12996 python-six ;hard dependency
12997 python-starkbank-ecdsa
12998 python-werkzeug))
12999 (home-page "https://github.com/sendgrid/sendgrid-python/")
13000 (synopsis "SendGrid API library for Python")
13001 (description
13002 "The @code{sendgrid} Python library allows access to the
13003SendGrid Web API v3. Version 3+ of the library provides full support for all
13004SendGrid Web API v3 endpoints, including the new v3 /mail/send.")
13005 (license license:expat)))
13006
13007(define-public python-starlette
13008 (package
13009 (name "python-starlette")
13010 (version "0.42.0")
13011 (source (origin
13012 (method git-fetch)
13013 (uri (git-reference
13014 (url "https://github.com/encode/starlette")
13015 (commit version)))
13016 (file-name (git-file-name name version))
13017 (sha256
13018 (base32
13019 "0r46v6b687pqr4sjcv0rwd1ln248fnx0xkawbn945r04pg7c999q"))))
13020 (build-system pyproject-build-system)
13021 (propagated-inputs (list python-anyio
13022 python-typing-extensions
13023 ;; [all] extra dependencies:
13024 python-itsdangerous
13025 python-jinja2
13026 python-multipart
13027 python-pyyaml
13028 python-requests))
13029 (native-inputs (list python-hatchling
13030 python-httpx
13031 python-pytest
13032 python-typing-extensions))
13033 (home-page "https://github.com/encode/starlette")
13034 (synopsis "Little ASGI library")
13035 (description
13036 "Starlette is a lightweight ASGI (Asynchronous Server Gateway
13037Interface) framework/toolkit for building async web services in Python.")
13038 (license license:bsd-3)))
13039
13040(define-public python-starsessions
13041 (package
13042 (name "python-starsessions")
13043 (version "1.3.0")
13044 (source (origin
13045 (method git-fetch)
13046 (uri (git-reference
13047 (url "https://github.com/alex-oleshkevich/starsessions")
13048 (commit (string-append "v" version))))
13049 (file-name (git-file-name name version))
13050 (sha256
13051 (base32
13052 "00dkdhp22vfmcn0w4y7f2ii8m1xj5i7409x58g3l8lvk6v5ng2nf"))))
13053 (build-system pyproject-build-system)
13054 (arguments
13055 (list
13056 #:test-flags
13057 ;; These tests require a running redis server
13058 '(list "--ignore=tests/backends/test_redis.py"
13059 ;; XXX: this failure indicates a real compatibility problem, but
13060 ;; it seems restricted to the tests only.
13061 ;; AttributeError: 'Cookies' object has no attribute
13062 ;; 'clear_session_cookies'
13063 "-k"
13064 (string-append "not test_session_clears_on_tab_close"
13065 ;; This fails because an error is not raised.
13066 " and not test_session_wants_secret_key"))
13067 #:phases
13068 '(modify-phases %standard-phases
13069 (add-after 'unpack 'compatibilitiy
13070 (lambda _
13071 ;; aioredis has been renamed
13072 (substitute* "starsessions/backends/redis.py"
13073 (("aioredis") "redis")))))))
13074 (propagated-inputs
13075 (list python-redis
13076 python-itsdangerous
13077 python-starlette))
13078 (native-inputs
13079 (list python-httpx
13080 python-poetry-core
13081 python-pytest
13082 python-pytest-asyncio
13083 python-requests))
13084 (home-page "https://github.com/alex-oleshkevich/starsessions")
13085 (synopsis "Pluggable session support for Starlette and FastAPI")
13086 (description
13087 "This package adds pluggable session backends and ships default
13088@code{InMemoryBackend} and @code{CookieBackend} implementations for Starlette
13089and FastAPI.")
13090 (license license:expat)))
13091
13092(define-public python-whereismyip
13093 (package
13094 (name "python-whereismyip")
13095 (version "0.1.0")
13096 (source
13097 (origin
13098 (method url-fetch)
13099 (uri (pypi-uri "whereismyip" version))
13100 (sha256
13101 (base32 "0psrlvax8249ccs2rvgdygpckzz22vxjcyzr2pql06d48k61gk54"))))
13102 (build-system pyproject-build-system)
13103 (arguments (list #:tests? #false)) ; There are no tests.
13104 (native-inputs (list python-setuptools))
13105 (home-page "https://pypi.org/project/whereismyip/")
13106 (synopsis "Queries multiple geolocation services until one succeeds")
13107 (description
13108 "This package provides a simple Python library that queries multiple geolocation
13109services until one succeeds.")
13110 (license license:gpl3)))
13111
13112(define-public python-whitenoise
13113 (package
13114 (name "python-whitenoise")
13115 (version "6.9.0")
13116 (source (origin
13117 (method git-fetch) ; PyPI missing test failes
13118 (uri (git-reference
13119 (url "https://github.com/evansd/whitenoise")
13120 (commit version)))
13121 (file-name (git-file-name name version))
13122 (sha256
13123 (base32
13124 "0y00a59ww9f631m51d5db5xcnbckzcwfm64wabp5vamn7l1kqqsj"))))
13125 (build-system pyproject-build-system)
13126 (arguments
13127 (list
13128 #:test-flags #~(list "-k" "not test_modified"))) ; HTTP 304 error
13129 (native-inputs (list python-brotli
13130 python-django
13131 python-requests
13132 python-pytest
13133 python-setuptools
13134 python-wheel))
13135 (home-page "https://github.com/evansd/whitenoise")
13136 (synopsis "Static file serving for WSGI applications")
13137 (description
13138 "WhiteNoise allows your web app to serve its own static files, making it
13139a self-contained unit that can be deployed anywhere without relying on nginx,
13140Amazon S3 or any other external service.")
13141 (license license:expat)))
13142
13143(define-public python-suds
13144 (package
13145 (name "python-suds")
13146 (version "1.2.0")
13147 (source
13148 (origin
13149 (method url-fetch)
13150 (uri (pypi-uri "suds" version))
13151 (sha256
13152 (base32 "1byyg7b2ixpr8hc849a6dd0qn5daxqawz6lb3php8lrmsb1n5cc3"))))
13153 (build-system pyproject-build-system)
13154 (arguments
13155 (list #:phases
13156 #~(modify-phases %standard-phases
13157 ;; XXX: chirp expects suds instead of suds_community
13158 (add-after 'install 'add-custom-dist-info
13159 (lambda _
13160 (for-each
13161 (lambda (dir)
13162 (with-directory-excursion (dirname dir)
13163 (symlink
13164 (basename dir)
13165 (string-append "suds-" #$version ".dist-info"))))
13166 (find-files #$output
13167 (lambda (file stat)
13168 (string-suffix? ".dist-info" file))
13169 #:directories? #t)))))))
13170 (native-inputs
13171 (list python-pytest
13172 python-setuptools
13173 python-wheel))
13174 (home-page "https://github.com/suds-community/suds")
13175 (synopsis "Lightweight SOAP python client for consuming Web Services")
13176 (description
13177 "Suds is a lightweight SOAP-based web service client for Python.")
13178 (license license:lgpl3+)))
13179
13180(define-public python-fastapi
13181 (package
13182 (name "python-fastapi")
13183 (version "0.124.0")
13184 (source
13185 (origin
13186 (method url-fetch)
13187 (uri (pypi-uri "fastapi" version))
13188 (sha256
13189 (base32 "1rplb37099ivd9bxyy80hljb4979zsqdjbqzk5cx5rkmmmwd2316"))))
13190 (build-system pyproject-build-system)
13191 (arguments
13192 (list
13193 ;; tests: 1126 passed, 12 skipped, 2 deselected
13194 #:test-flags
13195 #~(list "--ignore=tests/test_tutorial/"
13196 "--ignore=docs_src/"
13197 ;; Coverage is required.
13198 "--deselect=tests/test_fastapi_cli.py::test_fastapi_cli"
13199 ;; pytest.PytestUnraisableExceptionWarning: Exception ignored
13200 ;; in: <function MemoryObjectReceiveStream.__del__ at
13201 ;; 0x7ffff654af20>
13202 "-Wignore::pytest.PytestUnraisableExceptionWarning")))
13203 (native-inputs
13204 (list python-anyio
13205 python-dirty-equals
13206 python-flask
13207 python-inline-snapshot
13208 python-pdm-backend
13209 ;; python-pwdlib
13210 python-pyjwt
13211 python-pytest
13212 python-sqlalchemy
13213 ;; python-sqlmodel
13214 python-types-orjson
13215 python-types-ujson))
13216 (propagated-inputs
13217 (list python-starlette
13218 python-pydantic
13219 python-typing-extensions
13220 python-annotated-doc
13221 ;; [optional]
13222 python-email-validator
13223 python-fastapi-cli
13224 python-httpx
13225 python-itsdangerous
13226 python-jinja2
13227 python-multipart
13228 python-orjson
13229 python-pydantic-extra-types
13230 python-pydantic-settings
13231 python-pyyaml
13232 python-ujson
13233 python-uvicorn))
13234 (home-page "https://github.com/tiangolo/fastapi")
13235 (synopsis "Web framework based on type hints")
13236 (description "FastAPI provides a web API framework based on pydantic and
13237starlette.")
13238 (license license:expat)))
13239
13240(define-public python-fastapi-csrf-protect
13241 (package
13242 (name "python-fastapi-csrf-protect")
13243 (version "0.3.3")
13244 (source (origin
13245 (method git-fetch)
13246 (uri (git-reference
13247 (url "https://github.com/aekasitt/fastapi-csrf-protect")
13248 (commit (string-append "v" version))))
13249 (file-name (git-file-name name version))
13250 (sha256
13251 (base32
13252 "181yawlbpd4709mamsradr9zj0jrbp4qvwfvmggs80pd36iiwyy8"))))
13253 (build-system pyproject-build-system)
13254 (propagated-inputs
13255 (list python-fastapi python-itsdangerous
13256 python-pydantic))
13257 (native-inputs
13258 (list python-poetry-core
13259 python-pytest))
13260 (home-page "https://github.com/aekasitt/fastapi-csrf-protect")
13261 (synopsis "Cross-Site Request Forgery (XSRF) protection")
13262 (description
13263 "This package provides a stateless implementation of @dfn{Cross-Site
13264Request Forgery} (XSRF) Protection by using the Double Submit Cookie mitigation
13265pattern.")
13266 (license license:expat)))
13267
13268(define-public python-fastapi-pagination-minimal
13269 (package
13270 (name "python-fastapi-pagination-minimal")
13271 (version "0.12.34")
13272 (source (origin
13273 (method git-fetch)
13274 (uri (git-reference
13275 (url "https://github.com/uriyyo/fastapi-pagination")
13276 (commit version)))
13277 (file-name (git-file-name name version))
13278 (sha256
13279 (base32
13280 "004w9h4ana0p766n7f0z0n06v1472yjci1hvbys9gncpclcc49gj"))))
13281 (build-system pyproject-build-system)
13282 ;; We run the tests in python-fastapi-pagination only.
13283 (arguments (list #:tests? #false))
13284 ;; These are the only required dependencies,
13285 ;; please add all optional dependencies to the
13286 ;; full python-fastapi-pagination below.
13287 (propagated-inputs (list python-fastapi python-pydantic))
13288 (native-inputs (list python-poetry-core))
13289 (home-page "https://github.com/uriyyo/fastapi-pagination")
13290 (synopsis "FastAPI pagination library")
13291 (description "@code{fastapi-pagination} is a Python library designed to
13292simplify pagination in FastAPI applications. It provides a set of utility
13293functions and data models to help you paginate your database queries and
13294return paginated responses to your clients.")
13295 (license license:expat)))
13296
13297(define-public python-fastapi-pagination
13298 (package
13299 (inherit python-fastapi-pagination-minimal)
13300 (name "python-fastapi-pagination")
13301 (arguments
13302 (list
13303 #:test-flags
13304 #~(list "--asyncio-mode=auto"
13305 "--unit-tests"
13306 "--ignore=tests/ext"
13307 ;; Netwok access is required.
13308 "-k" (string-join
13309 (list "not test_optional_params[postgres-default]"
13310 "test_optional_params[postgres-limit-offset]"
13311 "test_optional_params[sqlite-default]"
13312 "test_optional_params[sqlite-limit-offset]")
13313 " and not "))
13314 #:phases
13315 '(modify-phases %standard-phases
13316 (add-after 'unpack 'patch-tests
13317 (lambda _
13318 ;; We don't have a package for python-cassandra or motor, but we
13319 ;; also don't need them as we only run the unit tests anyway.
13320 (substitute* "tests/conftest.py"
13321 (("from cassandra.cluster.*") "")
13322 (("from motor.*") "")))))))
13323 (propagated-inputs
13324 (modify-inputs (package-propagated-inputs
13325 python-fastapi-pagination-minimal)
13326 (prepend python-asyncpg
13327 python-databases
13328 python-django
13329 python-fastapi
13330 python-pydantic
13331 python-sqlalchemy
13332 (package
13333 (inherit python-tortoise-orm)
13334 (arguments
13335 (substitute-keyword-arguments (package-arguments
13336 python-tortoise-orm)
13337 ((#:phases phases '%standard-phases)
13338 `(modify-phases ,phases
13339 (delete 'sanity-check)))))
13340 (propagated-inputs
13341 (modify-inputs (package-propagated-inputs python-tortoise-orm)
13342 (replace "python-aiosqlite" python-aiosqlite)))))))
13343 (native-inputs
13344 (list python-aiosqlite
13345 python-asgi-lifespan
13346 python-asyncpg
13347 python-faker
13348 python-httpx
13349 python-poetry-core
13350 python-pytest
13351 python-pytest-asyncio
13352 python-sqlalchemy
13353 python-typing-extensions))
13354 (description
13355 (string-append (package-description python-fastapi-pagination-minimal)
13356 "
13357
13358This package, as opposed to @code{python-fastapi-pagination-minimal}, depends on
13359all available optional dependencies supported by mainline
13360@code{fastapi-pagination}."))))
13361
13362(define-public python-fastapi-cli
13363 (package
13364 (name "python-fastapi-cli")
13365 (version "0.0.7")
13366 (source
13367 (origin
13368 (method url-fetch)
13369 (uri (pypi-uri "fastapi_cli" version))
13370 (sha256
13371 (base32 "0pk0ldmymc25ys4v6mslzd5vsjh9r69hfylh2ljl29pmarcvdcq2"))))
13372 (build-system pyproject-build-system)
13373 ;; Tests require fastapi, which depends on this package.
13374 (arguments (list #:tests? #false))
13375 (propagated-inputs (list python-rich-toolkit python-typer python-uvicorn))
13376 (native-inputs
13377 (list python-inline-snapshot python-pdm-backend python-pytest))
13378 (home-page "https://pypi.org/project/fastapi-cli/")
13379 (synopsis
13380 "Run and manage FastAPI apps from the command line with FastAPI CLI")
13381 (description
13382 "FastAPI CLI is a command line program fastapi that you can use to serve
13383your FastAPI app, manage your FastAPI project, and more.")
13384 (license license:expat)))
13385
13386(define-public python-pyactiveresource
13387 (package
13388 (name "python-pyactiveresource")
13389 (version "2.2.2")
13390 (source
13391 (origin
13392 (method git-fetch)
13393 (uri (git-reference
13394 (url "https://github.com/Shopify/pyactiveresource")
13395 (commit (string-append "v" version))))
13396 (file-name (git-file-name name version))
13397 (sha256
13398 (base32 "03pw6fwqjn09fbd6xmng0arlz75pp6ykw25c8d1snp4bxlzkrwqf"))))
13399 (build-system pyproject-build-system)
13400 (native-inputs (list python-dateutil python-pytest python-pyyaml
13401 python-setuptools))
13402 (propagated-inputs (list python-six))
13403 (home-page "https://github.com/Shopify/pyactiveresource/")
13404 (synopsis "ActiveResource for Python")
13405 (description
13406 "This package provides a Python port of the ActiveResource project.
13407
13408Active Resource attempts to provide a coherent wrapper object-relational
13409mapping for REST web services. It follows the same philosophy as Active
13410Record, in that one of its prime aims is to reduce the amount of code needed
13411to map to these resources. This is made possible by relying on a number of
13412code- and protocol-based conventions that make it easy for Active Resource to
13413infer complex relations and structures.")
13414 (license license:expat)))
13415
13416(define-public python-shopifyapi
13417 (package
13418 (name "python-shopifyapi")
13419 (version "12.7.0")
13420 (source
13421 (origin
13422 (method git-fetch)
13423 (uri (git-reference
13424 (url "https://github.com/Shopify/shopify_python_api")
13425 (commit (string-append "v" version))))
13426 (file-name (git-file-name name version))
13427 (sha256
13428 (base32 "11zjm3aspb247wwlmfmq6wwk6lv3xyv3lqnd78sczjg9anba3779"))))
13429 (build-system pyproject-build-system)
13430 (arguments
13431 (list
13432 #:test-flags
13433 #~'("-k"
13434 ;; Disable a failing test.
13435 "not test_raises_if_aud_doesnt_match_api_key")))
13436 (native-inputs (list python-mock python-pytest python-setuptools))
13437 (propagated-inputs (list python-pyactiveresource python-pyjwt
13438 python-pyyaml python-six))
13439 (home-page "https://github.com/Shopify/shopify_python_api")
13440 (synopsis "Shopify API for Python")
13441 (description
13442 "This package provides the Shopify API for Python.
13443
13444The ShopifyAPI library allows Python developers to programmatically access the
13445admin section of stores using an ActiveResource-like interface similar the
13446ruby Shopify API gem. The library makes HTTP requests to Shopify in order to
13447list, create, update, or delete resources (e.g. Order, Product, Collection).")
13448 (license license:expat)))
13449
13450(define-public python-pybadges
13451 (package
13452 (name "python-pybadges")
13453 (version "3.0.1")
13454 (source (origin
13455 (method git-fetch)
13456 (uri (git-reference
13457 (url "https://github.com/google/pybadges")
13458 (commit version)))
13459 (file-name (git-file-name name version))
13460 (sha256
13461 "1zgb9idz7m3mzf8wvik0gwmyrxp753axqjv2pab326cr5myj1s4b")))
13462 (build-system pyproject-build-system)
13463 (arguments
13464 (list
13465 #:test-flags
13466 #~'("-k"
13467 ;; Disable network dependent tests.
13468 "not test_changes and not test_not_image_url and not test_http_url")))
13469 (propagated-inputs (list python-jinja2 python-requests))
13470 (native-inputs (list python-flask
13471 python-fonttools
13472 python-pillow
13473 python-pytest
13474 python-setuptools
13475 python-wheel
13476 python-xmldiff))
13477 (home-page "https://github.com/google/pybadges")
13478 (synopsis "Generate Github-style badges on the command-line")
13479 (description
13480 "This package provides @code{python-pybadges}: a library and command-line
13481tool for generating Github-style badges as SVG images.")
13482 (license license:asl2.0)))
13483
13484(define-public python-grid5000
13485 (package
13486 (name "python-grid5000")
13487 (version "1.2.4")
13488 (source (origin
13489 (method git-fetch)
13490 (uri (git-reference
13491 (url "https://gitlab.inria.fr/msimonin/python-grid5000")
13492 (commit (string-append "v" version))))
13493 (file-name (git-file-name name version))
13494 (sha256
13495 "0px5dr6kn7i5dyy4g42vqap1zpkc4hdvg7prrxdkkl57lfhz5w61")))
13496 (build-system pyproject-build-system)
13497 (arguments
13498 (list #:tests? #f)) ; No tests.
13499 (native-inputs (list python-setuptools))
13500 (propagated-inputs (list python-requests python-ipython python-pyyaml))
13501 (home-page "https://pypi.org/project/python-grid5000/")
13502 (synopsis "Grid5000 python client")
13503 (description
13504 "python-grid5000 is a python package wrapping the Grid5000 REST API.
13505You can use it as a library in your python project or you can explore the
13506Grid5000 resources interactively using the embedded shell.")
13507 (license license:gpl3+)))
13508
13509(define-public python-enoslib
13510 (package
13511 (name "python-enoslib")
13512 (version "8.0.1")
13513 (source
13514 (origin
13515 (method git-fetch)
13516 (uri (git-reference
13517 (url "https://gitlab.inria.fr/discovery/enoslib")
13518 (commit (string-append "v" version))))
13519 (file-name (git-file-name name version))
13520 (sha256 "0vs6b0bnlv95mzv0rjbxqwrhzkgjkn91gqipgwdf7y4ffpz8nybg")))
13521 (arguments
13522 (list
13523 #:test-flags
13524 #~(list "enoslib/tests/unit"
13525 "--ignore" "enoslib/tests/unit/infra/test_utils.py"
13526 "--ignore-glob" "enoslib/tests/unit/infra/enos_iotlab/*")
13527 #:phases
13528 #~(modify-phases %standard-phases
13529 (add-before 'check 'pre-check
13530 (lambda* (#:key tests? #:allow-other-keys)
13531 (when tests?
13532 ;; Otherwise Ansible fails to create its config directory.
13533 (setenv "HOME" "/tmp"))))
13534 ;; Disable the sanity check, which fails with the following error:
13535 ;;
13536 ;; ContextualVersionConflict(rich 12.4.1
13537 ;; (/gnu/store/...-python-rich-12.4.1/lib/python3.9/site-packages),
13538 ;; Requirement.parse('rich[jupyter]~=12.0.0'), {'enoslib'})
13539 ;;
13540 ;; The optional jupyter dependency of rich isn't critical for
13541 ;; EnOSlib to work
13542 (delete 'sanity-check))))
13543 (build-system pyproject-build-system)
13544 (native-inputs
13545 (list python-ddt
13546 python-freezegun
13547 python-pytest
13548 python-setuptools
13549 python-wheel))
13550 (propagated-inputs
13551 (list ansible
13552 python-cryptography
13553 python-grid5000
13554 python-jsonschema
13555 python-netaddr
13556 python-packaging
13557 python-requests
13558 python-rich
13559 python-sshtunnel
13560 python-pytz))
13561 (home-page "https://discovery.gitlabpages.inria.fr/enoslib/index.html")
13562 (synopsis "Deploy distributed testbeds on a variety of platforms")
13563 (description
13564 "EnOSlib is a library to build experimental frameworks on various
13565scientific testbeds. It lets you deploy networks of machines on actual
13566hardware on Grid'5000 or via OpenStack, to Vagrant, Chameleon, and more.")
13567 (license license:gpl3+)))
13568
13569(define-public python-pynetbox
13570 (package
13571 (name "python-pynetbox")
13572 (version "7.4.1")
13573 (source (origin
13574 (method url-fetch)
13575 (uri (pypi-uri "pynetbox" version))
13576 (sha256
13577 (base32
13578 "1hq0mqykwdsmcrj61fxxzdkpc7wnld4grhkcxy560ym79jbbb0iz"))))
13579 (build-system pyproject-build-system)
13580 (arguments
13581 (list
13582 #:test-flags
13583 ;; Integration tests depend on docker.
13584 '(list "--ignore=tests/integration")))
13585 (propagated-inputs (list python-packaging python-requests))
13586 (native-inputs
13587 (list python-pytest
13588 python-setuptools
13589 python-setuptools-scm
13590 python-wheel))
13591 (home-page "https://github.com/netbox-community/pynetbox")
13592 (synopsis "NetBox API client library")
13593 (description "Python module to query and edit data stored in a
13594@url{https://netbox.dev,NetBox} instance.")
13595 (license license:asl2.0)))
13596
13597(define-public python-waybackpack
13598 (package
13599 (name "python-waybackpack")
13600 (version "0.6.4")
13601 (source
13602 (origin
13603 (method url-fetch)
13604 (uri (pypi-uri "waybackpack" version))
13605 (sha256
13606 (base32 "16lcr2hv7gmp199fh3psrnv68j20pfxria8v6gchrpl1jqx9f923"))))
13607 (build-system pyproject-build-system)
13608 (arguments
13609 (list #:tests? #f)) ; would require network (and SSL certificates)
13610 (propagated-inputs (list python-requests))
13611 (native-inputs (list python-pytest python-setuptools python-wheel))
13612 (home-page "https://github.com/jsvine/waybackpack")
13613 (synopsis
13614 "Download the entire Wayback Machine archive for a given URL")
13615 (description
13616 "This package provides a library and a command-line tool that lets
13617you download the entire Wayback Machine archive for a given URL.")
13618 (license license:expat)))
13619
13620(define-public python-xyzservices
13621 (package
13622 (name "python-xyzservices")
13623 (version "2025.4.0")
13624 (source
13625 (origin
13626 (method url-fetch)
13627 (uri (pypi-uri "xyzservices" version))
13628 (sha256
13629 (base32 "1n096zg9bd4n6w6axcm16m9sxdkc6qy1mipva0scbyj86rqn9rvg"))))
13630 (build-system pyproject-build-system)
13631 (arguments
13632 (list
13633 #:test-flags #~(list "-m" "not request")))
13634 (native-inputs
13635 (list python-pytest
13636 python-mercantile
13637 python-requests
13638 python-setuptools
13639 python-setuptools-scm))
13640 (home-page "https://github.com/geopandas/xyzservices")
13641 (synopsis "Source of XYZ tiles providers")
13642 (description "@code{xyzservices} is a lightweight library providing a
13643repository of available XYZ services offering raster basemap tiles. The
13644repository is provided via Python API and as a compressed JSON file.")
13645 (license license:bsd-3)))
13646
13647(define-public s3cmd
13648 (package
13649 (name "s3cmd")
13650 (version "2.4.0")
13651 (source
13652 (origin
13653 (method git-fetch)
13654 (uri (git-reference
13655 (url "https://github.com/s3tools/s3cmd")
13656 (commit (string-append "v" version))))
13657 (file-name (git-file-name name version))
13658 (sha256
13659 (base32 "168c49d1v8r7azv66zz0w07jalf434c2jpg2xzads5jnxzmiy73k"))))
13660 (build-system pyproject-build-system)
13661 (arguments
13662 (list
13663 #:tests? #f ; XXX: Tests require network access.
13664 #:phases
13665 #~(modify-phases %standard-phases
13666 (add-after 'unpack 'hide-wrapping
13667 (lambda _
13668 (substitute* "S3/MultiPart.py"
13669 (("sys\\.argv\\[0\\]")
13670 "\"s3cmd\""))
13671 (substitute* "s3cmd"
13672 (("optparser\\.get_prog_name\\(\\)")
13673 "\"s3cmd\"")))))))
13674 (native-inputs (list python-setuptools))
13675 (inputs (list python-dateutil python-magic))
13676 (home-page "https://s3tools.org/s3cmd")
13677 (synopsis "Command line tool for S3-compatible storage services")
13678 (description
13679 "S3cmd is a command line tool for uploading, retrieving and managing data
13680in storage services that are compatible with the Amazon Simple Storage
13681Service (S3) protocol, including S3 itself. It supports rsync-like backup,
13682GnuPG encryption, and more. It also supports management of Amazon's
13683CloudFront content delivery network.")
13684 (license license:gpl2+)))