projects/guix·blob wip-postfix · refs

8728 lines · 314.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Eric Dvorsak <[email protected]>
3;;; Copyright © 2015-2023 Efraim Flashner <[email protected]>
4;;; Copyright © 2017 Christopher Baines <[email protected]>
5;;; Copyright © 2016, 2017 Danny Milosavljevic <[email protected]>
6;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <[email protected]>
7;;; Copyright © 2016, 2017, 2019-2022 Marius Bakke <[email protected]>
8;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Ricardo Wurmus <[email protected]>
9;;; Copyright © 2017, 2021 Roel Janssen <[email protected]>
10;;; Copyright © 2016, 2017, 2020 Julien Lepiller <[email protected]>
11;;; Copyright © 2016, 2017 Nikita <[email protected]>
12;;; Copyright © 2014, 2017, 2021 Eric Bavier <[email protected]>
13;;; Copyright © 2014, 2015 Mark H Weaver <[email protected]>
14;;; Copyright © 2015 Cyril Roelandt <[email protected]>
15;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <[email protected]>
16;;; Copyright © 2016, 2019, 2022 Hartmut Goebel <[email protected]>
17;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <[email protected]>
18;;; Copyright © 2015, 2017 Ben Woodcroft <[email protected]>
19;;; Copyright © 2015, 2016 Christine Lemmer-Webber <[email protected]>
20;;; Copyright © 2017 Adriano Peluso <[email protected]>
21;;; Copyright © 2016 Dylan Jeffers <sapientech@[email protected]>
22;;; Copyright © 2016 David Craven <[email protected]>
23;;; Copyright © 2017 Oleg Pykhalov <[email protected]>
24;;; Copyright © 2015, 2016 David Thompson <[email protected]>
25;;; Copyright © 2017 Mark Meyer <[email protected]>
26;;; Copyright © 2018 Tomáš Čech <[email protected]>
27;;; Copyright © 2018, 2019, 2021 Nicolas Goaziou <[email protected]>
28;;; Copyright © 2018 Mathieu Othacehe <[email protected]>
29;;; Copyright © 2018, 2020, 2021, 2022, 2023 Maxim Cournoyer <[email protected]>
30;;; Copyright © 2019 Vagrant Cascadian <[email protected]>
31;;; Copyright © 2019 Brendan Tildesley <[email protected]>
32;;; Copyright © 2019 Pierre Langlois <[email protected]>
33;;; Copyright © 2019, 2020 Tanguy Le Carrour <[email protected]>
34;;; Copyright © 2020 Jakub Kądziołka <[email protected]>
35;;; Copyright © 2020 Evan Straw <[email protected]>
36;;; Copyright © 2020 Alexandros Theodotou <[email protected]>
37;;; Copyright © 2020 Holger Peters <[email protected]>
38;;; Copyright © 2020 Noisytoot <[email protected]>
39;;; Copyright © 2020 Edouard Klein <[email protected]>
40;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego <[email protected]>
41;;; Copyright © 2020 Konrad Hinsen <[email protected]>
42;;; Copyright © 2020, 2022 Giacomo Leidi <[email protected]>
43;;; Copyright © 2021 Ekaitz Zarraga <[email protected]>
44;;; Copyright © 2021 Greg Hogan <[email protected]>
45;;; Copyright © 2021 Maxime Devos <[email protected]>
46;;; Copyright © 2021 Pradana Aumars <[email protected]>
47;;; Copyright © 2021, 2022 Arun Isaac <[email protected]>
48;;; Copyright © 2021, 2022 jgart <[email protected]>
49;;; Copyright © 2021 Alice Brenon <[email protected]>
50;;; Copyright © 2022 John Kehayias <[email protected]>
51;;; Copyright © 2022 Denis 'GNUtoo' Carikli <[email protected]>
52;;; Copyright © 2022, 2023 Felix Gruber <[email protected]>
53;;; Copyright © 2022 Peter Polidoro <[email protected]>
54;;; Copyright © 2022 Antero Mejr <[email protected]>
55;;; Copyright © 2022 Luis Henrique Gomes Higino <[email protected]>
56;;; Copyright © 2022 Nicolas Graves <[email protected]>
57;;; Copyright © 2022 Tomasz Jeneralczyk <[email protected]>
58;;; Copyright © 2022 msimonin <[email protected]>
59;;; Copyright © 2022 Michael Rohleder <[email protected]>
60;;; Copyright © 2022 Baptiste Strazzulla <[email protected]>
61;;; Copyright © 2023 John Kehayias <[email protected]>
62;;; Copyright © 2023 Ivan Vilata-i-Balaguer <[email protected]>
63;;;
64;;; This file is part of GNU Guix.
65;;;
66;;; GNU Guix is free software; you can redistribute it and/or modify it
67;;; under the terms of the GNU General Public License as published by
68;;; the Free Software Foundation; either version 3 of the License, or (at
69;;; your option) any later version.
70;;;
71;;; GNU Guix is distributed in the hope that it will be useful, but
72;;; WITHOUT ANY WARRANTY; without even the implied warranty of
73;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74;;; GNU General Public License for more details.
75;;;
76;;; You should have received a copy of the GNU General Public License
77;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
78
79(define-module (gnu packages python-web)
80 #:use-module (guix packages)
81 #:use-module (guix download)
82 #:use-module (guix git-download)
83 #:use-module (guix build-system copy)
84 #:use-module (guix build-system pyproject)
85 #:use-module (guix build-system python)
86 #:use-module (guix gexp)
87 #:use-module (guix utils)
88 #:use-module (gnu packages)
89 #:use-module (gnu packages admin)
90 #:use-module (gnu packages base)
91 #:use-module (gnu packages bash)
92 #:use-module (gnu packages check)
93 #:use-module (gnu packages compression)
94 #:use-module (gnu packages curl)
95 #:use-module (gnu packages databases)
96 #:use-module (gnu packages django)
97 #:use-module (gnu packages freedesktop)
98 #:use-module (gnu packages glib)
99 #:use-module (gnu packages gnupg)
100 #:use-module (gnu packages graphviz)
101 #:use-module (gnu packages groff)
102 #:use-module (gnu packages libevent)
103 #:use-module (gnu packages libffi)
104 #:use-module (gnu packages node)
105 #:use-module (gnu packages openstack)
106 #:use-module (gnu packages pcre)
107 #:use-module (gnu packages protobuf)
108 #:use-module (gnu packages pkg-config)
109 #:use-module (gnu packages python)
110 #:use-module (gnu packages python-build)
111 #:use-module (gnu packages python-check)
112 #:use-module (gnu packages python-crypto)
113 #:use-module (gnu packages python-science)
114 #:use-module (gnu packages python-xyz)
115 #:use-module (gnu packages qt)
116 #:use-module (gnu packages rdf)
117 #:use-module (gnu packages rpc)
118 #:use-module (gnu packages serialization)
119 #:use-module (gnu packages sphinx)
120 #:use-module (gnu packages texinfo)
121 #:use-module (gnu packages tls)
122 #:use-module (gnu packages time)
123 #:use-module (gnu packages version-control)
124 #:use-module (gnu packages web)
125 #:use-module (gnu packages xml)
126 #:use-module ((guix licenses) #:prefix license:)
127 #:use-module (srfi srfi-1))
128
129(define-public python-lazr-restfulclient
130 (package
131 (name "python-lazr-restfulclient")
132 (version "0.14.4")
133 (source
134 (origin
135 (method url-fetch)
136 (uri (pypi-uri "lazr.restfulclient" version))
137 (sha256
138 (base32 "11yhlqmdf2cqbdfzn8gdmzvmcivh4fflr18zf412sflvfjrdc3xz"))))
139 (build-system python-build-system)
140 ;; Disable the test suite to avoid the lazr.authentication requirement,
141 ;; which requires the ancient 'oauth', a Python 2 only library.
142 (arguments (list #:tests? #f))
143 (propagated-inputs
144 (list python-distro
145 python-httplib2
146 python-oauthlib
147 python-pyparsing
148 python-six
149 python-wadllib))
150 (home-page "https://launchpad.net/lazr.restfulclient")
151 (synopsis "Web client Python library extending wadlib")
152 (description "This package provides a programmable client library that
153adds functionality on top of @code{wadlib}.")
154 (license license:lgpl3+)))
155
156(define-public python-launchpadlib
157 (package
158 (name "python-launchpadlib")
159 (version "1.10.16")
160 (source
161 (origin
162 (method url-fetch)
163 (uri (pypi-uri "launchpadlib" version))
164 (sha256
165 (base32 "106aixwchwyb100wlf4cnj1vgsi2d7x40ps8xv8az27r6qwv3x0d"))))
166 (build-system python-build-system)
167 (arguments
168 (list #:phases #~(modify-phases %standard-phases
169 (add-before 'check 'set-home
170 (lambda _
171 ;; Tests require a writable home.
172 (setenv "HOME" "/tmp"))))))
173 (propagated-inputs
174 (list python-httplib2
175 python-keyring
176 python-lazr-restfulclient
177 python-lazr-uri))
178 (native-inputs (list python-mock python-testresources python-wadllib))
179 (home-page "https://help.launchpad.net/API/launchpadlib")
180 (synopsis "Python client library for Launchpad's web service")
181 (description "@code{launchpadlib} is a Python library that allows
182scripting Launchpad via its the web service API.")
183 (license license:lgpl3+)))
184
185(define-public python-lazr-uri
186 (package
187 (name "python-lazr-uri")
188 (version "1.0.6")
189 (source
190 (origin
191 (method url-fetch)
192 (uri (pypi-uri "lazr.uri" version))
193 (sha256
194 (base32 "0r44rw0bj5mayhqwfwj1dnrjgzj1lrh7ishiddd1vygnrczqa9jh"))))
195 (build-system python-build-system)
196 (native-inputs (list python-zope-testrunner))
197 (home-page "https://launchpad.net/lazr.uri")
198 (synopsis "Python URI manipulation library")
199 (description "This Python package provides a self-contained, easily
200reusable library for parsing, manipulating, and generating URIs.")
201 (license license:lgpl3)))
202
203(define-public python-prawcore
204 (package
205 (name "python-prawcore")
206 (version "2.3.0")
207 (source
208 (origin
209 (method url-fetch)
210 (uri (pypi-uri "prawcore" version))
211 (sha256
212 (base32 "0vgmhjddqxnz5vy70dyqvakak51fg1nk6j3xavkc83d8nzacrwfs"))))
213 (build-system python-build-system)
214 (native-inputs
215 (list python-betamax
216 python-betamax-matchers
217 python-betamax-serializers
218 python-mock
219 python-pytest
220 python-testfixtures))
221 (propagated-inputs
222 (list python-requests))
223 (synopsis "Core component of PRAW")
224 (description "PRAWcore is a low-level communication layer used by PRAW.")
225 (home-page "https://praw.readthedocs.io/en/latest/")
226 (license license:bsd-2)))
227
228(define-public python-praw
229 (package
230 (name "python-praw")
231 (version "7.6.1")
232 (source
233 (origin
234 (method url-fetch)
235 (uri (pypi-uri "praw" version))
236 (sha256
237 (base32 "17pvdlcasr08p5hb1x7shjh8yvn621lzm0bvnwd3b1r1qpzrbz07"))))
238 (build-system python-build-system)
239 (arguments
240 `(#:phases
241 (modify-phases %standard-phases
242 (add-after 'unpack 'disable-failing-tests
243 (lambda _
244 (with-directory-excursion "tests"
245 ;; Integration tests depend on files that are not included.
246 (for-each delete-file-recursively
247 '("integration/models" "unit/models"))
248 ;; The configuration file does not seem to exist.
249 (delete-file "unit/test_config.py"))))
250 (replace 'check
251 (lambda* (#:key tests? #:allow-other-keys)
252 (when tests?
253 (invoke "pytest" "-k"
254 ;; These tests depend on test files that don't exist.
255 (string-append "not test_bad_request_without_json_text_plain_response"
256 " and not test_bad_request_without_json_text_html_response"))))))))
257 (native-inputs
258 (list python-betamax python-betamax-matchers python-pytest))
259 (propagated-inputs
260 (list python-prawcore python-update-checker python-websocket-client))
261 (synopsis "Python Reddit API Wrapper")
262 (description "PRAW is a Python package that allows for simple access to
263Reddit’s API. It aims to be easy to use and internally follows all of Reddit’s
264API rules.")
265 (home-page "https://praw.readthedocs.io/en/latest/")
266 (license license:bsd-2)))
267
268(define-public python-frozenlist
269 (package
270 (name "python-frozenlist")
271 (version "1.2.0")
272 (source
273 (origin
274 (method url-fetch)
275 (uri (pypi-uri "frozenlist" version))
276 (sha256
277 (base32 "1pkr23by7pk9lsmsh0wiqirpkq3f1f08b0615nbzysn51bk1n838"))))
278 (build-system python-build-system)
279 (arguments
280 '(#:phases
281 (modify-phases %standard-phases
282 (replace 'check
283 (lambda* (#:key tests? #:allow-other-keys)
284 (when tests?
285 (invoke "pytest" "tests")))))))
286 (native-inputs (list python-pytest))
287 (home-page "https://github.com/aio-libs/frozenlist")
288 (synopsis "List-like data structure for Python")
289 (description "@code{frozenlist.FrozenList} is a list-like structure which
290implements @code{collections.abc.MutableSequence}. It can be made immutable
291by calling @code{FrozenList.freeze}.")
292 (license license:asl2.0)))
293
294(define-public python-aiosignal
295 (package
296 (name "python-aiosignal")
297 (version "1.3.1")
298 (source
299 (origin
300 (method url-fetch)
301 (uri (pypi-uri "aiosignal" version))
302 (sha256
303 (base32 "1z4cnqww6j0xl6f3vx2r6kfv1hdny1pnlll7difvfj8nbvhrdkal"))))
304 (build-system pyproject-build-system)
305 (arguments (list #:test-flags #~(list "tests")))
306 (propagated-inputs (list python-frozenlist))
307 (native-inputs (list python-pytest python-pytest-asyncio python-pytest-cov))
308 (home-page "https://github.com/aio-libs/aiosignal")
309 (synopsis "Callback manager for Python @code{asyncio} projects")
310 (description "This Python module provides @code{Signal}, an abstraction to
311register asynchronous callbacks. The @code{Signal} abstraction can be used
312for adding, removing and dropping callbacks.")
313 (license license:asl2.0)))
314
315(define-public python-aiohttp
316 (package
317 (name "python-aiohttp")
318 (version "3.8.4")
319 (source
320 (origin
321 (method url-fetch)
322 (uri (pypi-uri "aiohttp" version))
323 (sha256
324 (base32 "0p5bj6g7ca19gvwk8fz00k579ma9w9kd27ssh2zl3r61ca8ilbmz"))
325 (snippet
326 #~(begin
327 (use-modules ((guix build utils)))
328 ;; TODO: Unbundle the llhttp sources.
329 ;; (delete-file-recursively "vendor")
330 (delete-file "aiohttp/_helpers.c")
331 (delete-file "aiohttp/_http_parser.c")
332 (delete-file "aiohttp/_http_writer.c")
333 (delete-file "aiohttp/_websocket.c")))))
334 (build-system python-build-system)
335 (arguments
336 '(#:phases
337 (modify-phases %standard-phases
338 (add-after 'unpack 'fix-tests
339 (lambda _
340 ;; Disable brotli tests, because we’re not providing that
341 ;; optional library.
342 (substitute* "tests/test_http_parser.py"
343 ((" async def test_feed_eof_no_err_brotli")
344 " @pytest.mark.xfail\n async def test_feed_eof_no_err_brotli"))
345 ;; Make sure the timestamp of this file is > 1990, because a few
346 ;; tests like test_static_file_if_modified_since_past_date depend
347 ;; on it.
348 (let ((late-90s (* 60 60 24 365 30)))
349 (utime "tests/data.unknown_mime_type" late-90s late-90s))
350
351 ;; Disable test that attempts to access httpbin.org.
352 (substitute* "tests/test_formdata.py"
353 (("async def test_mark_formdata_as_processed.*" all)
354 (string-append "@pytest.mark.xfail\n" all)))
355
356 ;; Don't test the aiohttp pytest plugin to avoid a dependency loop.
357 (delete-file "tests/test_pytest_plugin.py")))
358 (add-before 'build 'cythonize
359 (lambda _
360 ;; Adapted from the Makefile.
361 (with-directory-excursion "aiohttp"
362 (for-each
363 (lambda (file)
364 (invoke "cython" "-3"
365 file "-I" "."))
366 (find-files "." "_.*\\.pyx$")))))
367 (replace 'check
368 (lambda* (#:key tests? #:allow-other-keys)
369 (let ((skipped-tests
370 (string-append
371 ;; This test probably requires to be run with the
372 ;; library loaded from the the build directory.
373 "not test_c_parser_loaded and "
374 ;; TODO: These tests fail with recent versions of Pytest
375 ;; and the fix is difficult to backport:
376 ;; https://github.com/aio-libs/aiohttp/pull/6872
377 ;; Re-enable after 3.9.
378 "not test_session_close_awaitable and "
379 "not test_async_with_session and "
380 "not test_close_run_until_complete_not_deprecated and "
381 ;; Disable the following tests as they require
382 ;; networking.
383 "not TestDeflateBuffer and "
384 "not test_client_session_timeout_zero and "
385 "not test_empty_body and "
386 "not test_mark_formdata_as_processed[pyloop] and "
387 "not test_receive_runtime_err[pyloop] "
388 ;; These tests fail for unknown reasons (see:
389 ;; https://github.com/aio-libs/aiohttp/issues/7130)
390 "and not test_no_warnings "
391 "and not test_default_loop "
392 "and not test_ctor_global_loop "
393 "and not test_set_loop_default_loop ")))
394 (when tests?
395 ;; This tests requires the 'proxy.py' module, not yet
396 ;; packaged.
397 (delete-file "tests/test_proxy_functional.py")
398 ;; Sometimes tests fail when run in parallel.
399 (invoke "pytest" "-vv"
400 "-o" "addopts=''" "--ignore=aiohttp"
401 ;; These tests cause errors (see:
402 ;; https://github.com/aio-libs/aiohttp/issues/7130).
403 "--ignore" "tests/test_web_sendfile_functional.py"
404 "--ignore" "tests/test_web_urldispatcher.py"
405 "-k" skipped-tests))))))))
406 (propagated-inputs
407 (list python-aiodns
408 python-aiosignal
409 python-attrs
410 python-asynctest
411 python-async-timeout
412 python-charset-normalizer
413 python-frozenlist
414 python-idna-ssl
415 python-multidict
416 python-yarl))
417 (native-inputs
418 (list gunicorn-bootstrap
419 python-async-generator
420 python-cython
421 python-freezegun
422 python-pytest
423 python-pytest-mock
424 python-pytest-xdist
425 python-re-assert))
426 (home-page "https://github.com/aio-libs/aiohttp/")
427 (synopsis "Async HTTP client/server framework (asyncio)")
428 (description "@code{aiohttp} is an asynchronous HTTP client/server
429framework.
430
431Its main features are:
432@itemize
433@item Supports both client and server side of HTTP protocol.
434@item Supports both client and server Web-Sockets out-of-the-box without the
435Callback Hell.
436@item Web-server has middlewares and pluggable routing.
437@end itemize")
438 (license license:asl2.0)))
439
440(define-public python-aiohttp-socks
441 (package
442 (name "python-aiohttp-socks")
443 (version "0.7.1")
444 (source
445 (origin
446 (method url-fetch)
447 (uri (pypi-uri "aiohttp_socks" version))
448 (sha256
449 (base32
450 "06il43dv6qm858af841vq9qadw6h7qsfs06nnwagmwqyi72cl592"))))
451 (build-system python-build-system)
452 (propagated-inputs
453 (list python-aiohttp python-attrs python-socks))
454 (home-page "https://github.com/romis2012/aiohttp-socks")
455 (synopsis "SOCKS proxy connector for aiohttp")
456 (description "This package provides a SOCKS proxy connector for
457aiohttp. It supports SOCKS4(a) and SOCKS5.")
458 (license license:asl2.0)))
459
460(define-public python-aiodns
461 (package
462 (name "python-aiodns")
463 (version "3.0.0")
464 (source
465 (origin
466 (method url-fetch)
467 (uri (pypi-uri "aiodns" version))
468 (sha256
469 (base32
470 "1mlcw14hxyzd2yg89gj1l84gfi8nbl7h32iw17myxz23wymxyswl"))))
471 (build-system python-build-system)
472 (propagated-inputs (list python-pycares))
473 (arguments
474 `(#:tests? #f)) ;tests require internet access
475 (home-page "https://github.com/saghul/aiodns")
476 (synopsis "Simple DNS resolver for asyncio")
477 (description "@code{aiodns} provides a simple way for doing
478asynchronous DNS resolutions with a synchronous looking interface by
479using @url{https://github.com/saghul/pycares,pycares}.")
480 (license license:expat)))
481
482(define-public python-aiorpcx
483 (package
484 (name "python-aiorpcx")
485 (version "0.22.1")
486 (source
487 (origin
488 (method url-fetch)
489 (uri (pypi-uri "aiorpcX" version))
490 (sha256
491 (base32
492 "0lx54bcinp44fmr8q4bbffsqbkg8kdcwykf9i5jj0bj3sfzgf9k0"))))
493 (build-system python-build-system)
494 (propagated-inputs
495 (list python-attrs))
496 (home-page "https://github.com/kyuupichan/aiorpcX")
497 (synopsis "Generic asyncio RPC implementation")
498 (description
499 "The aiorpcX library is a generic asyncio implementation of RPC suitable
500for an application that is a client, server or both.
501
502The package includes a module with full coverage of JSON RPC versions 1.0 and
5032.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
504comes with a SOCKS proxy client.")
505 (license (list license:expat license:bsd-2))))
506
507(define-public python-aiorpcx-0.18
508 (package
509 (inherit python-aiorpcx)
510 (version "0.18.7")
511 (source
512 (origin
513 (method url-fetch)
514 (uri (pypi-uri "aiorpcX" version))
515 (sha256
516 (base32
517 "1rswrspv27x33xa5bnhrkjqzhv0sknv5kd7pl1vidw9d2z4rx2l0"))))))
518
519(define-public python-aiostream
520 (package
521 (name "python-aiostream")
522 (version "0.4.5")
523 (source (origin
524 ;; Tests not included in pypi release.
525 (method git-fetch)
526 (uri (git-reference
527 (url "https://github.com/vxgmichel/aiostream")
528 (commit (string-append "v" version))))
529 (file-name (git-file-name name version))
530 (sha256
531 (base32
532 "0l2ijb7yk0820wiyf6zrzx8fhzf8925an7r06mcaw3in1mr6rssq"))))
533 (build-system python-build-system)
534 (native-inputs
535 (list python-pytest
536 python-pytest-asyncio
537 python-pytest-cov
538 python-pytest-runner))
539 (home-page "https://github.com/vxgmichel/aiostream")
540 (synopsis "Generator-based operators for asynchronous iteration")
541 (description "@code{aiostream} provides a collection of stream operators that can
542be combined to create asynchronous pipelines of operations. It can be seen as an
543asynchronous version of @code{itertools}, although some aspects are slightly
544different. All the provided operators return a unified interface called a stream. A
545stream is an enhanced asynchronous iterable.")
546 (license license:gpl3)))
547
548(define-public python-asgiref
549 (package
550 (name "python-asgiref")
551 (version "3.4.1")
552 (source (origin
553 (method url-fetch)
554 (uri (pypi-uri "asgiref" version))
555 (sha256
556 (base32 "1saqgpgbdvb8awzm0f0640j0im55hkrfzvcw683cgqw4ni3apwaf"))))
557 (build-system python-build-system)
558 (arguments
559 '(#:phases
560 (modify-phases %standard-phases
561 (replace 'check
562 (lambda* (#:key tests? #:allow-other-keys)
563 (when tests?
564 (invoke "pytest" "-vv")))))))
565 (native-inputs
566 (list python-pytest python-pytest-asyncio))
567 (home-page "https://github.com/django/asgiref/")
568 (synopsis "ASGI specs, helper code, and adapters")
569 (description
570 "ASGI is a standard for Python asynchronous web apps and servers to
571communicate with each other, and positioned as an asynchronous successor to
572WSGI. This package includes libraries for implementing ASGI servers.")
573 (license license:bsd-3)))
574
575(define-public python-asgi-csrf
576 (package
577 (name "python-asgi-csrf")
578 (version "0.9")
579 (source (origin
580 (method git-fetch) ;for tests
581 (uri (git-reference
582 (url "https://github.com/simonw/asgi-csrf")
583 (commit version)))
584 (file-name (git-file-name name version))
585 (sha256
586 (base32
587 "1j134mjh0ff61rvkm3q67m463j1bhyxc9dwsdany3scnd4vsqqws"))))
588 (build-system pyproject-build-system)
589 (arguments
590 (list #:test-flags
591 ;; Provide a null config to avoid the extraneous dependency on
592 ;; python-pytest-coverage.
593 #~(list "-c" "/dev/null"
594 ;; Disable two failing tests (see:
595 ;; https://github.com/simonw/asgi-csrf/issues/24).
596 "-k" (string-append
597 "not (test_multipart "
598 "or test_multipart_failure_wrong_token)"))))
599 (propagated-inputs (list python-itsdangerous python-multipart))
600 (native-inputs (list python-asgi-lifespan
601 python-httpx
602 python-pytest
603 python-pytest-asyncio
604 python-starlette))
605 (home-page "https://github.com/simonw/asgi-csrf")
606 (synopsis "ASGI middleware for protecting against CSRF attacks")
607 (description "This Asynchronous Server Gateway Interface (ASGI)
608middleware protects against Cross-site request forgery (CSRF) attacks.
609It implements the Double Submit Cookie pattern, where a cookie is set
610that is then compared to a @code{csrftoken} hidden form field or a
611@code{x-csrftoken} HTTP header.")
612 (license license:asl2.0)))
613
614(define-public python-asgi-lifespan
615 (package
616 (name "python-asgi-lifespan")
617 (version "1.0.1")
618 (source (origin
619 (method git-fetch) ;for tests
620 (uri (git-reference
621 (url "https://github.com/florimondmanca/asgi-lifespan")
622 (commit version)))
623 (file-name (git-file-name name version))
624 (sha256
625 (base32
626 "10a5ci9ddr8wnjf3wai7xifbbplirhyrgvw4p28q0ha63cvhb2j2"))))
627 (build-system pyproject-build-system)
628 (arguments
629 (list
630 #:test-flags
631 '(list "-c" "/dev/null" ;ignore coverage-related options
632 "-k"
633 (string-append
634 ;; XXX: Some tests fail because of a 'lifespan.shutdown.failed'
635 ;; extra event, perhaps because our version of trio is older.
636 "not (test_lifespan_manager[asyncio-None-ValueError-None]"
637 " or test_lifespan_manager[asyncio-ValueError-None-None]"
638 " or test_lifespan_manager[asyncio-ValueError-ValueError-None]"
639 " or test_lifespan_manager[trio-None-ValueError-None]"
640 " or test_lifespan_manager[trio-ValueError-None-None]"
641 " or test_lifespan_manager[trio-ValueError-ValueError-None])"))))
642 (native-inputs (list python-pytest
643 python-pytest-asyncio
644 python-pytest-trio
645 python-starlette))
646 (propagated-inputs (list python-sniffio))
647 (home-page "https://github.com/florimondmanca/asgi-lifespan")
648 (synopsis "Programmatic startup/shutdown of ASGI apps")
649 (description "Programmatically send startup/shutdown lifespan events
650into Asynchronous Server Gateway Interface (ASGI) applications. When
651used in combination with an ASGI-capable HTTP client such as HTTPX, this
652allows mocking or testing ASGI applications without having to spin up an
653ASGI server.")
654 (license license:expat)))
655
656(define-public python-css-html-js-minify
657 (package
658 (name "python-css-html-js-minify")
659 (version "2.5.5")
660 (source (origin
661 (method url-fetch)
662 (uri (pypi-uri "css-html-js-minify" version ".zip"))
663 (sha256
664 (base32
665 "0v3l2dqdk2y4r6ax259gs4ij1zzm9yxg6491s6254vs9w3vi37sa"))))
666 (build-system python-build-system)
667 ;; XXX: The git repository has no tags, and the PyPI releases do not
668 ;; contain tests.
669 (arguments '(#:tests? #f))
670 (native-inputs (list unzip))
671 (home-page "https://github.com/juancarlospaco/css-html-js-minify")
672 (synopsis "CSS/HTML/JS minifier")
673 (description
674 "This package provides a single-file minifier for CSS, HTML, and JavaScript.")
675 ;; XXX: The README just says "GNU GPL and GNU LGPL and MIT". From
676 ;; <https://github.com/juancarlospaco/css-html-js-minify/issues/9> it
677 ;; looks like the user can choose a license.
678 (license (list license:gpl3+ license:lgpl3+ license:expat))))
679
680(define-public python-aws-sam-translator
681 (package
682 (name "python-aws-sam-translator")
683 (version "1.51.0")
684 (source (origin
685 (method url-fetch)
686 (uri (pypi-uri "aws-sam-translator" version))
687 (sha256
688 (base32
689 "1ywzchc3nk13xh593j7b14qp3y0fdx7cfbdhnm34p39av66xffac"))))
690 (build-system python-build-system)
691 (arguments
692 `(;; XXX: Tests are not distributed with the PyPI archive, and would
693 ;; introduce a circular dependency on python-cfn-lint.
694 #:tests? #f
695 #:phases (modify-phases %standard-phases
696 (add-after 'unpack 'loosen-requirements
697 (lambda _
698 ;; The package needlessly specifies exact versions
699 ;; of dependencies, when it works fine with others.
700 (substitute* "requirements/base.txt"
701 (("(.*)(~=[0-9\\.]+)" all package version)
702 package)))))))
703 (propagated-inputs
704 (list python-boto3 python-jsonschema python-six))
705 (home-page "https://github.com/aws/serverless-application-model")
706 (synopsis "Transform AWS SAM templates into AWS CloudFormation templates")
707 (description
708 "AWS SAM Translator is a library that transform @dfn{Serverless Application
709Model} (SAM) templates into AWS CloudFormation templates.")
710 (license license:asl2.0)))
711
712(define-public python-aws-xray-sdk
713 (package
714 (name "python-aws-xray-sdk")
715 (version "2.12.0")
716 (home-page "https://github.com/aws/aws-xray-sdk-python")
717 (source (origin
718 (method git-fetch)
719 (uri (git-reference (url home-page) (commit version)))
720 (file-name (git-file-name name version))
721 (sha256
722 (base32
723 "0082q89dq5ww0a7q7rnyhywqvy4i8h3c0mnj7ilv3b0indhkasl8"))))
724 (build-system pyproject-build-system)
725 (arguments
726 (list
727 #:test-flags
728 '(list ;; Tries to connect to external network resources
729 "--ignore=tests/ext/httpx"
730 ;; TODO: How to configure Django for these tests?
731 "--ignore=tests/ext/django"
732 ;; These tests require packages not yet in Guix.
733 "--ignore=tests/ext/aiobotocore/test_aiobotocore.py"
734 "--ignore=tests/ext/aiohttp/test_middleware.py"
735 "--ignore=tests/ext/pg8000/test_pg8000.py"
736 "--ignore=tests/ext/psycopg2/test_psycopg2.py"
737 "--ignore=tests/ext/pymysql/test_pymysql.py"
738 "--ignore=tests/ext/pynamodb/test_pynamodb.py"
739 "--ignore=tests/ext/sqlalchemy_core/test_postgres.py"
740 "--ignore=tests/test_async_recorder.py"
741 ;; FIXME: Why is this failing?
742 "--ignore=tests/test_patcher.py"
743 ;; These tests want to access httpbin.org.
744 "--ignore=tests/ext/requests/test_requests.py"
745 "--ignore=tests/ext/httplib/test_httplib.py"
746 "--ignore=tests/ext/aiohttp/test_client.py")
747 #:phases
748 '(modify-phases %standard-phases
749 (add-before 'check 'pre-check
750 (lambda _
751 ;; Allow "import tests.utils" to work as expected.
752 (setenv "PYTHONPATH" (getcwd)))))))
753 (native-inputs
754 (list ;; These are required for the test suite.
755 python-bottle
756 python-flask
757 python-flask-sqlalchemy
758 python-httpx
759 python-mock
760 python-pymysql
761 python-pytest
762 python-pytest-aiohttp
763 python-pytest-asyncio
764 python-pytest-benchmark
765 python-requests
766 python-sqlalchemy
767 python-webtest))
768 (propagated-inputs
769 (list python-aiohttp
770 python-botocore
771 python-future
772 python-jsonpickle
773 python-urllib3
774 python-wrapt))
775 (synopsis "Profile applications on AWS X-Ray")
776 (description
777 "The AWS X-Ray SDK for Python enables Python developers to record and
778emit information from within their applications to the AWS X-Ray service.")
779 (license license:asl2.0)))
780
781(define-public python-ovh
782 (package
783 (name "python-ovh")
784 (version "1.1.0")
785 (source (origin
786 (method url-fetch)
787 (uri (pypi-uri "ovh" version))
788 (sha256
789 (base32
790 "0ygniv12lixh9rvnjcd01gzbzk2b5xwcg2a59b7964a77dd9p3qh"))))
791 (build-system pyproject-build-system)
792 (arguments (list #:tests? #f)) ; XXX: tests require networking
793 (propagated-inputs (list python-requests))
794 (native-inputs (list python-black
795 python-coverage
796 python-flake8
797 python-isort
798 python-pytest
799 python-pytest-cov
800 python-setuptools
801 python-sphinx
802 python-wheel))
803 (home-page "https://api.ovh.com")
804 (synopsis "Interact with OVHcloud APIs")
805 (description "This package provides the official module to perform HTTP requests
806to the OVHcloud APIs.")
807 (license license:bsd-3)))
808
809(define-public python-cbor2
810 (package
811 (name "python-cbor2")
812 (version "5.4.2.post1")
813 (source
814 (origin
815 (method url-fetch)
816 (uri (pypi-uri "cbor2" version))
817 (sha256
818 (base32 "15y78xcc3zkmvj1mdzz8gyhf3apbl91073kwhzbjk5abc1civwlw"))))
819 (build-system python-build-system)
820 (arguments
821 (list
822 #:phases
823 #~(modify-phases %standard-phases
824 (replace 'check
825 (lambda* (#:key tests? #:allow-other-keys)
826 (when tests?
827 (invoke "pytest" "-vv")))))))
828 (native-inputs (list python-pytest python-pytest-cov python-setuptools-scm))
829 (home-page "https://github.com/agronholm/cbor2")
830 (synopsis "Concise Binary Object Representation (CBOR) (de)serializer")
831 (description "This Python library provides encoding and decoding for the
832Concise Binary Object
833Representation (CBOR) (@url{https://www.rfc-editor.org/rfc/rfc8949.html, RFC
8348949}) serialization format. The specification is fully compatible with the
835original RFC 7049. Among its features are:
836@itemize
837@item Simple API like the @code{json} or @code{pickle} modules.
838@item Support many CBOR tags with stdlib objects.
839@item Generic tag decoding.
840@item Shared value references including cyclic references.
841@item String references compact encoding with repeated strings replaced with
842indices.
843@item Optional C module backend tested on big- and little-endian architectures.
844@item Extensible tagged value handling using tag_hook and object_hook on
845decode and default on encode.
846@end itemize")
847 (license license:expat)))
848
849(define-public python-cfn-lint
850 (package
851 (name "python-cfn-lint")
852 (version "0.65.0")
853 (home-page "https://github.com/aws-cloudformation/cfn-lint")
854 (source (origin
855 (method git-fetch)
856 (uri (git-reference
857 (url home-page)
858 (commit (string-append "v" version))))
859 (file-name (git-file-name name version))
860 (sha256
861 (base32
862 "1rfacp39jssrbchrzb49vwrqyzhx5v7jfcgngqnb9r7qfs4bwi3w"))))
863 (build-system python-build-system)
864 (arguments
865 `(#:phases
866 (modify-phases %standard-phases
867 (add-after 'unpack 'skip-network-test
868 (lambda _
869 ;; This test requires networking.
870 (substitute* "test/unit/module/formatters/test_formatters.py"
871 (("def test_sarif_formatter") "def _test_sarif_formatter"))))
872 (replace 'check
873 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
874 (when tests?
875 (let ((out (assoc-ref outputs "out")))
876 ;; Remove test for the documentation update scripts
877 ;; to avoid a dependency on 'git'.
878 (delete-file
879 "test/unit/module/maintenance/test_update_documentation.py")
880 (delete-file
881 "test/unit/module/maintenance/test_update_resource_specs.py")
882 (add-installed-pythonpath inputs outputs)
883 (setenv "PATH" (string-append out "/bin:"
884 (getenv "PATH")))
885 (invoke "python" "-m" "unittest" "discover"
886 "-s" "test"))))))))
887 (native-inputs
888 (list python-pydot python-mock))
889 (propagated-inputs
890 (list python-aws-sam-translator
891 python-importlib-resources
892 python-jschema-to-python
893 python-jsonpatch
894 python-jsonschema
895 python-junit-xml
896 python-networkx
897 python-pyyaml
898 python-sarif-om
899 python-six))
900 (synopsis "Validate CloudFormation templates")
901 (description
902 "This package lets you validate CloudFormation YAML/JSON templates against
903the CloudFormation spec and additional checks. Includes checking valid values
904for resource properties and best practices.")
905 (license license:expat)))
906
907(define-public python-jschema-to-python
908 (package
909 (name "python-jschema-to-python")
910 (version "1.2.3")
911 (source (origin
912 (method url-fetch)
913 (uri (pypi-uri "jschema_to_python" version))
914 (sha256
915 (base32
916 "14cvaiwm56g0v6p7zviikaa5i9ln3yqy910jmp60hirhbpz19zvn"))))
917 (build-system python-build-system)
918 (propagated-inputs (list python-attrs python-jsonpickle python-pbr))
919 (native-inputs (list python-pytest))
920 (home-page "https://github.com/microsoft/jschema-to-python")
921 (synopsis "Generate Python classes from a JSON schema")
922 (description "This package generates source code for Python classes from a
923@url{http://jschema.org,JSchema} JSON schema.")
924 (license license:expat)))
925
926(define-public python-sarif-om
927 (package
928 (name "python-sarif-om")
929 (version "1.0.4")
930 (source (origin
931 (method url-fetch)
932 (uri (pypi-uri "sarif_om" version))
933 (sha256
934 (base32
935 "167gb8xjm0310km3w1s12bqldbv7zyklkr4j5900vq4361ml2pyd"))))
936 (build-system python-build-system)
937 (propagated-inputs (list python-attrs))
938 (native-inputs (list python-pbr))
939 (home-page "https://github.com/microsoft/sarif-python-om")
940 (synopsis "Python implementation of the SARIF 2.1.0 object model")
941 (description "This module contains classes for the object model defined
942by the @url{https://sarifweb.azurewebsites.net,Static Analysis Results
943Interchange Format (SARIF)} file format.")
944 (license license:expat)))
945
946(define-public python-falcon
947 (package
948 (name "python-falcon")
949 (version "3.1.0")
950 (source
951 (origin
952 ;; Use git, as there are some test files missing from the PyPI release,
953 ;; such as 'examples' directory.
954 (method git-fetch)
955 (uri (git-reference
956 (url "https://github.com/falconry/falcon")
957 (commit version)))
958 (file-name (git-file-name name version))
959 (modules '((guix build utils)))
960 (snippet
961 '(begin
962 (delete-file-recursively "falcon/vendor")
963 (substitute* "setup.py"
964 ((".*falcon\\.vendor\\.mimeparse.*") ""))
965 (substitute* '("falcon/media/handlers.py"
966 "falcon/request.py"
967 "tests/test_deps.py")
968 (("from falcon\\.vendor ") "")
969 (("mimeparse.mimeparse") "mimeparse"))))
970 (sha256
971 (base32
972 "17k31d8avl63xsr6fzvmkxcsm7gnz5dqpgsz65psm1lpc38c79k3"))))
973 (build-system python-build-system)
974 (arguments
975 `(#:phases
976 (modify-phases %standard-phases
977 (replace 'check
978 (lambda* (#:key inputs outputs #:allow-other-keys)
979 ;; Skip orjson, which requires rust to build.
980 (substitute* "tests/test_media_handlers.py"
981 (("== 'CPython") "!= 'CPython"))
982 (setenv "HOME" "/tmp")
983 (invoke "pytest" "-vv" "tests"))))))
984 (propagated-inputs
985 (list python-mimeparse))
986 (native-inputs
987 (list python-aiofiles
988 python-cbor2
989 python-cython ;for faster binaries
990 python-fakeredis
991 python-httpx
992 python-mujson
993 python-msgpack
994 python-pecan
995 python-pillow
996 python-pytest
997 python-pytest-asyncio
998 python-pytest-runner
999 python-pyyaml
1000 python-rapidjson
1001 python-requests
1002 python-testtools
1003 python-ujson
1004 python-websockets))
1005 (home-page "https://falconframework.org")
1006 (synopsis "Web framework for building APIs and application backends")
1007 (description "Falcon is a web API framework for building microservices,
1008application backends and higher-level frameworks. Among its features are:
1009@itemize
1010@item Optimized and extensible code base
1011@item Routing via URI templates and REST-inspired resource
1012classes
1013@item Access to headers and bodies through request and response
1014classes
1015@item Request processing via middleware components and hooks
1016@item Idiomatic HTTP error responses
1017@item Straightforward exception handling
1018@item Unit testing support through WSGI helpers and mocks
1019@item Compatible with both CPython and PyPy
1020@item Cython support for better performance when used with CPython
1021@end itemize")
1022 (license license:asl2.0)))
1023
1024(define-public python-falcon-cors
1025 (package
1026 (name "python-falcon-cors")
1027 (version "1.1.7")
1028 (source
1029 (origin
1030 (method url-fetch)
1031 (uri (pypi-uri "falcon-cors" version))
1032 (sha256
1033 (base32
1034 "12pym7hwsbd8b0c1azn95nas8gm3f1qpr6lpyx0958xm65ffr20p"))))
1035 (build-system python-build-system)
1036 (native-inputs
1037 (list python-falcon))
1038 (home-page
1039 "https://github.com/lwcolton/falcon-cors")
1040 (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
1041 (description "This middleware provides @dfn{cross-origin resource
1042sharing} (CORS) support for Falcon. It allows applying a specially crafted
1043CORS object to the incoming requests, enabling the ability to serve resources
1044over a different origin than that of the web application.")
1045 (license license:asl2.0)))
1046
1047(define-public python-furl
1048 (package
1049 (name "python-furl")
1050 (version "2.1.3")
1051 (source
1052 (origin
1053 (method url-fetch)
1054 (uri (pypi-uri "furl" version))
1055 (sha256
1056 (base32
1057 "0knc76pm8pzigs3bpx9fccfsfxqrgblqphar46hq9i364vz8hqas"))))
1058 (build-system python-build-system)
1059 (propagated-inputs
1060 (list python-six python-orderedmultidict))
1061 (native-inputs
1062 (list python-flake8))
1063 (home-page "https://github.com/gruns/furl")
1064 (synopsis "URL manipulation in Python")
1065 (description "Furl provides an easy-to-use alternative to the
1066@code{urllib} and @code{urlparse} modules for manipulating URLs.")
1067 (license license:unlicense)))
1068
1069(define-public python-httplib2
1070 (package
1071 (name "python-httplib2")
1072 (version "0.22.0")
1073 (source
1074 (origin
1075 ;; Tests not included in the release tarball.
1076 (method git-fetch)
1077 (uri (git-reference
1078 (url "https://github.com/httplib2/httplib2")
1079 (commit (string-append "v" version))))
1080 (file-name (git-file-name name version))
1081 (sha256
1082 (base32
1083 "1zkp3glv0iha7p68p5m0sb8mrrammkdc0mx32517xry52s4iva7g"))))
1084 (build-system pyproject-build-system)
1085 (arguments
1086 (list
1087 #:phases
1088 #~(modify-phases %standard-phases
1089 (add-after 'unpack 'adjust-test-requirements
1090 (lambda _
1091 (substitute* "requirements-test.txt"
1092 (("==") ">=")))))))
1093 (native-inputs
1094 (list python-cryptography
1095 python-flake8
1096 python-future
1097 python-mock
1098 python-pytest
1099 python-pytest-cov
1100 python-pytest-forked
1101 python-pytest-randomly
1102 python-pytest-timeout
1103 python-pytest-xdist
1104 python-six))
1105 (home-page "https://github.com/httplib2/httplib2")
1106 (synopsis "Comprehensive HTTP client library")
1107 (description
1108 "A comprehensive HTTP client library supporting many features left out of
1109other HTTP libraries.")
1110 (license license:expat)))
1111
1112(define-public httpie
1113 (package
1114 (name "httpie")
1115 (version "3.2.1")
1116 (source
1117 (origin
1118 (method url-fetch)
1119 (uri (pypi-uri "httpie" version))
1120 (sha256
1121 (base32
1122 "1v736y2h7lcyrnxs9y5sf4xwzgll7pc2s6r3ny929mm8lcn07h69"))))
1123 (build-system python-build-system)
1124 (arguments
1125 ;; The tests attempt to access external web servers, so we cannot run them.
1126 '(#:tests? #f))
1127 (propagated-inputs
1128 (list python-colorama
1129 python-pygments
1130 python-requests
1131 python-requests-toolbelt
1132 python-pysocks
1133 python-charset-normalizer
1134 python-defusedxml
1135 python-rich
1136 python-multidict))
1137 (home-page "https://httpie.io")
1138 (synopsis "cURL-like tool for humans")
1139 (description
1140 "A command line HTTP client with an intuitive UI, JSON support,
1141syntax highlighting, wget-like downloads, plugins, and more. It consists of
1142a single http command designed for painless debugging and interaction with
1143HTTP servers, RESTful APIs, and web services.")
1144 ;; This was fixed in 1.0.3.
1145 (properties `((lint-hidden-cve . ("CVE-2019-10751"))))
1146 (license license:bsd-3)))
1147
1148(define-public parfive
1149 (package
1150 (name "parfive")
1151 (version "2.0.1")
1152 (source (origin
1153 (method url-fetch)
1154 (uri (pypi-uri "parfive" version))
1155 (sha256
1156 (base32
1157 "19dcbb6g56l5s3ih0bhs3p4acgc0gf4zdzpj4w87m69li2nhmgpx"))))
1158 (build-system python-build-system)
1159 (arguments
1160 (list #:phases #~(modify-phases %standard-phases
1161 (add-before 'check 'disable-test-requiring-network
1162 (lambda _
1163 (substitute* "parfive/tests/test_downloader.py"
1164 (("def test_ftp")
1165 "def __off_test_ftp"))))
1166 (replace 'check
1167 (lambda* (#:key tests? #:allow-other-keys)
1168 (when tests?
1169 (invoke "python" "-m" "pytest" "-vvv" "parfive")))))))
1170 (propagated-inputs (list python-aiofiles python-aioftp python-aiohttp
1171 python-tqdm))
1172 (native-inputs (list python-pytest
1173 python-pytest-asyncio
1174 python-pytest-cov
1175 python-pytest-localserver
1176 python-pytest-socket
1177 python-setuptools-scm))
1178 (home-page "https://parfive.readthedocs.io/")
1179 (synopsis "HTTP and FTP parallel file downloader")
1180 (description
1181 "This package provides CLI tool and Python library @code{parallel} file
1182downloader using asyncio. parfive can handle downloading multiple files in
1183parallel as well as downloading each file in a number of chunks.
1184
1185asciicast demo of parfive parfive works by creating a downloader object,
1186appending files to it and then running the download. parfive has a synchronous
1187API, but uses asyncio to paralellise downloading the files.")
1188 (license license:expat)))
1189
1190(define-public python-html2text
1191 (package
1192 (name "python-html2text")
1193 (version "2020.1.16")
1194 (source
1195 (origin
1196 (method url-fetch)
1197 (uri (pypi-uri "html2text" version))
1198 (sha256
1199 (base32
1200 "1fvv4z6dblii2wk1x82981ag8yhxbim1v2ksgywxsndh2s7335p2"))))
1201 (build-system python-build-system)
1202 (arguments
1203 '(#:phases
1204 (modify-phases %standard-phases
1205 (replace 'check
1206 (lambda _
1207 (invoke "pytest" "test/"))))))
1208 (native-inputs
1209 (list python-pytest))
1210 (home-page "https://github.com/Alir3z4/html2text")
1211 (synopsis "Convert HTML into plain text")
1212 (description "html2text takes HTML and converts it into plain ASCII text
1213which is also valid markdown. html2text was originally written by Aaron
1214Swartz.")
1215 (license license:gpl3+)))
1216
1217(define-public python-jose
1218 (package
1219 (name "python-jose")
1220 (version "3.3.0")
1221 (home-page "https://github.com/mpdavis/python-jose")
1222 (source (origin
1223 (method git-fetch)
1224 (uri (git-reference (url home-page) (commit version)))
1225 (file-name (git-file-name name version))
1226 (sha256
1227 (base32
1228 "18whsdpllg8574ma4r0qawkgw4nam6lsf63pi6761j38rvl84lg9"))))
1229 (build-system python-build-system)
1230 (arguments
1231 `(#:phases
1232 (modify-phases %standard-phases
1233 (replace 'check
1234 (lambda* (#:key tests? #:allow-other-keys)
1235 (if tests?
1236 (invoke "pytest" "-vv")
1237 (format #t "test suite not run~%"))
1238 #t)))))
1239 (native-inputs
1240 (list ;; All native inputs are for tests.
1241 python-pyasn1 python-pytest python-pytest-cov
1242 python-pytest-runner))
1243 (propagated-inputs
1244 (list python-cryptography python-ecdsa python-rsa python-six))
1245 (synopsis "JOSE implementation in Python")
1246 (description
1247 "The @dfn{JavaScript Object Signing and Encryption} (JOSE) technologies
1248- JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and
1249JSON Web Algorithms (JWA) - collectively can be used to encrypt and/or sign
1250content using a variety of algorithms.")
1251 (license license:expat)))
1252
1253(define-public python-pyscss
1254 (package
1255 (name "python-pyscss")
1256 (version "1.3.7")
1257 (source
1258 (origin
1259 (method git-fetch) ; no tests in PyPI release
1260 (uri (git-reference
1261 (url "https://github.com/Kronuz/pyScss")
1262 (commit version)))
1263 (file-name (git-file-name name version))
1264 (sha256
1265 (base32 "0701hziiiw67blafgpmjhzspmrss8mfvif7fw0rs8fikddwwc9g6"))))
1266 (build-system python-build-system)
1267 (arguments
1268 ;; XXX: error in test collection, possible incompatibility with Pytest 6.
1269 `(#:tests? #f
1270 #:phases
1271 (modify-phases %standard-phases
1272 (replace 'check
1273 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1274 (when tests?
1275 (add-installed-pythonpath inputs outputs)
1276 (invoke "python" "-m" "pytest" "--pyargs" "scss")))))))
1277 (native-inputs
1278 (list python-pytest python-pytest-cov))
1279 (inputs
1280 (list pcre))
1281 (home-page "https://github.com/Kronuz/pyScss")
1282 (synopsis "Scss compiler for Python")
1283 (description "@code{pyScss} is a compiler for Sass, a superset language of
1284CSS3 that adds programming capabilities and some other syntactic sugar.")
1285 (license license:expat)))
1286
1287(define-public python-jsonpickle
1288 (package
1289 (name "python-jsonpickle")
1290 (version "1.5.2")
1291 (source (origin
1292 (method url-fetch)
1293 (uri (pypi-uri "jsonpickle" version))
1294 (sha256
1295 (base32
1296 "0n93h9b9ad58lxdfbvgsh4b25mkg146qikzcgghyc75vjk7rp2cy"))))
1297 (build-system python-build-system)
1298 (arguments
1299 `(#:phases (modify-phases %standard-phases
1300 (replace 'check
1301 (lambda _
1302 (invoke "pytest" "-vv"
1303 ;; Prevent running the flake8 and black
1304 ;; pytest plugins, which only tests style
1305 ;; and frequently causes harmless failures.
1306 "-o" "addopts=''"))))))
1307 (native-inputs
1308 (list python-setuptools-scm
1309 python-toml ;XXX: for setuptools_scm[toml]
1310 ;; For tests.
1311 python-numpy
1312 python-pandas
1313 python-pytest))
1314 (home-page "https://jsonpickle.github.io/")
1315 (synopsis "Serialize object graphs into JSON")
1316 (description
1317 "This package provides a Python library for serializing any arbitrary
1318object graph to and from JSON.")
1319 (license license:bsd-3)))
1320
1321(define-public python-mechanicalsoup
1322 (package
1323 (name "python-mechanicalsoup")
1324 (version "1.0.0")
1325 (source
1326 (origin
1327 (method url-fetch)
1328 (uri (pypi-uri "MechanicalSoup" version))
1329 (sha256
1330 (base32 "01sddjxy3rznh63hnl5lbv1hhk6xyiviwmkiw4x7v4ap35fb3lrp"))))
1331 (build-system python-build-system)
1332 (propagated-inputs
1333 (list python-beautifulsoup4 python-lxml python-requests python-six))
1334 (native-inputs
1335 (list python-pytest-cov
1336 python-pytest-flake8
1337 python-pytest-httpbin
1338 python-pytest-mock
1339 python-pytest-runner
1340 python-requests-mock))
1341 (home-page "https://mechanicalsoup.readthedocs.io/")
1342 (synopsis "Python library for automating website interaction")
1343 (description
1344 "MechanicalSoup is a Python library for automating interaction with
1345websites. It automatically stores and sends cookies, follows redirects, and can
1346follow links and submit forms. It doesn’t do JavaScript.")
1347 (license license:expat)))
1348
1349(define-public python-hyperframe
1350 (package
1351 (name "python-hyperframe")
1352 (version "6.0.1")
1353 (source
1354 (origin
1355 (method url-fetch)
1356 (uri (pypi-uri "hyperframe" version))
1357 (sha256
1358 (base32 "055951gyhnjqpa2al52rj34g8yrls9inyn56n7nfkj0x4d300ldf"))))
1359 (build-system python-build-system)
1360 (arguments
1361 `(#:phases
1362 (modify-phases %standard-phases
1363 (replace 'check
1364 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
1365 (when tests?
1366 (add-installed-pythonpath inputs outputs)
1367 (invoke "pytest" "-vv" "test")))))))
1368 (native-inputs
1369 (list python-pytest))
1370 (home-page "https://github.com/python-hyper/hyperframe")
1371 (synopsis "HTTP/2 framing layer for Python")
1372 (description
1373 "This library contains the HTTP/2 framing code used in the hyper project.
1374It provides a pure-Python codebase that is capable of decoding a binary stream
1375into HTTP/2 frames.")
1376 (license license:expat)))
1377
1378(define-public python-hpack
1379 (package
1380 (name "python-hpack")
1381 (version "4.0.0")
1382 (source
1383 (origin
1384 ;; PyPI tarball is missing some files necessary for the tests.
1385 (method git-fetch)
1386 (uri (git-reference
1387 (url "https://github.com/python-hyper/hpack")
1388 (commit (string-append "v" version))))
1389 (file-name (git-file-name name version))
1390 (sha256
1391 (base32 "11qdayvz5a8zlzdcdm37f2z1fgnl67pz6j8xj2dz5rfa5lds29yq"))))
1392 (build-system python-build-system)
1393 (arguments
1394 `(#:phases
1395 (modify-phases %standard-phases
1396 (replace 'check
1397 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
1398 (when tests?
1399 (add-installed-pythonpath inputs outputs)
1400 (invoke "pytest" "-vv" "test")))))))
1401 (native-inputs
1402 (list python-pytest))
1403 (home-page "https://hyper.rtfd.org")
1404 (synopsis "Pure-Python HPACK header compression")
1405 (description
1406 "This module contains a pure-Python HTTP/2 header encoding (HPACK) logic
1407for use in Python programs that implement HTTP/2.")
1408 (license license:expat)))
1409
1410(define-public python-h11
1411 (package
1412 (name "python-h11")
1413 (version "0.14.0")
1414 (source
1415 (origin
1416 (method url-fetch)
1417 (uri (pypi-uri "h11" version))
1418 (sha256
1419 (base32 "17b97c56y31hi0n0x0cb5a87x4xr9jijf2y06pzj0977k6zgn6cg"))))
1420 (build-system pyproject-build-system)
1421 (native-inputs
1422 (list python-pytest))
1423 (home-page "https://github.com/python-hyper/h11")
1424 (synopsis "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1")
1425 (description
1426 "This is a little HTTP/1.1 library written from scratch in Python, heavily
1427inspired by hyper-h2. It's a bring-your-own-I/O library; h11 contains no IO
1428code whatsoever. This means you can hook h11 up to your favorite network API,
1429and that could be anything you want.")
1430 (license license:expat)))
1431
1432(define-public python-h2
1433 (package
1434 (name "python-h2")
1435 (version "4.1.0")
1436 (source
1437 (origin
1438 (method url-fetch)
1439 (uri (pypi-uri "h2" version))
1440 (sha256
1441 (base32 "1fraip114fm1ha5w37pdc0sk8dn9pb0ck267zrwwpap7zc4clfm8"))))
1442 (build-system python-build-system)
1443 (arguments
1444 `(#:phases
1445 (modify-phases %standard-phases
1446 (replace 'check
1447 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
1448 (when tests?
1449 (add-installed-pythonpath inputs outputs)
1450 (invoke "python" "-m" "pytest" "-vv" "test")))))))
1451 (native-inputs
1452 (list python-hypothesis python-pytest))
1453 (propagated-inputs
1454 (list python-hpack python-hyperframe))
1455 (home-page "https://github.com/python-hyper/h2")
1456 (synopsis "HTTP/2 State-Machine based protocol implementation")
1457 (description
1458 "This module contains a pure-Python implementation of a HTTP/2 protocol
1459stack. It does not provide a parsing layer, a network layer, or any rules
1460about concurrency. Instead, it's a purely in-memory solution, defined in
1461terms of data actions and HTTP/2 frames. This is one building block of a full
1462Python HTTP implementation.")
1463 (license license:expat)))
1464
1465(define-public python-sockjs-tornado
1466 (package
1467 (name "python-sockjs-tornado")
1468 (version "1.0.6")
1469 (source
1470 (origin
1471 (method url-fetch)
1472 (uri (pypi-uri "sockjs-tornado" version))
1473 (sha256
1474 (base32
1475 "15dgv6hw6c7h3m310alw1h6p5443lrm9pyqhcv2smc13fz1v04pc"))))
1476 (build-system python-build-system)
1477 (arguments
1478 `(;; There are no tests, and running the test phase requires missing
1479 ;; dependencies
1480 #:tests? #f))
1481 (propagated-inputs
1482 (list python-tornado))
1483 (home-page "https://github.com/mrjoes/sockjs-tornado/")
1484 (synopsis
1485 "SockJS Python server implementation on top of the Tornado framework")
1486 (description
1487 "SockJS-tornado provides the server-side counterpart to a SockJS client
1488library, through the Tornado framework.
1489
1490SockJS provides a low-latency, full-duplex, cross-domain communication channel
1491between a web browser and web server.")
1492 (license license:expat)))
1493
1494(define-public python-flask-assets
1495 (package
1496 (name "python-flask-assets")
1497 (version "2.0")
1498 (source
1499 (origin
1500 (method url-fetch)
1501 (uri (pypi-uri "Flask-Assets" version))
1502 (sha256
1503 (base32 "1hmqldxc7zciksmcl35jx0wbyrrxc7vk2a57mmmd8i07whsymz8x"))))
1504 (build-system python-build-system)
1505 (arguments
1506 ;; Tests require python-flask-script which is incompatible with Flask2.
1507 `(#:tests? #f))
1508 (propagated-inputs
1509 (list python-flask python-webassets))
1510 (home-page "https://github.com/miracle2k/flask-assets")
1511 (synopsis "Asset management for Flask")
1512 (description "This package integrates @code{webassets} with Flask, adding
1513support for merging, minifying and compiling CSS and Javascript files.")
1514 (license license:bsd-2)))
1515
1516(define-public python-flask-babel
1517 (package
1518 (name "python-flask-babel")
1519 (version "2.0.0")
1520 (source
1521 (origin
1522 (method url-fetch)
1523 (uri (pypi-uri "Flask-Babel" version))
1524 (sha256
1525 (base32
1526 "0z95v77vib5il8hphyh16n7i15a2gmc06i615vm346ifvdfg9ypr"))))
1527 (build-system python-build-system)
1528 (propagated-inputs
1529 (list python-flask python-babel python-jinja2 python-pytz))
1530 (home-page "https://github.com/python-babel/flask-babel")
1531 (synopsis "Add i18n/l10n support to Flask applications")
1532 (description "This package implements internationalization and localization
1533support for Flask. This is based on the Python babel module as well as pytz -
1534both of which are installed automatically if you install this library.")
1535 (license license:bsd-3)))
1536
1537(define-public python-flask-cors
1538 (package
1539 (name "python-flask-cors")
1540 (version "3.0.10")
1541 (source (origin
1542 (method url-fetch)
1543 (uri (pypi-uri "Flask-Cors" version))
1544 (sha256
1545 (base32
1546 "1pl16615fn1pc5n0vdrqlxm45mqsdjjxqv3gfkrs111v7wwkj25n"))))
1547 (build-system python-build-system)
1548 (native-inputs
1549 (list python-flask python-nose python-packaging))
1550 (propagated-inputs
1551 (list python-six))
1552 (home-page "https://flask-cors.readthedocs.io/en/latest/")
1553 (synopsis "Handle Cross-Origin Resource Sharing with Flask")
1554 (description
1555 "This package provides a Flask extension for handling @acronym{CORS,Cross
1556Origin Resource Sharing}, making cross-origin AJAX possible.")
1557 (license license:expat)))
1558
1559(define-public python-flask-markdown
1560 (package
1561 (name "python-flask-markdown")
1562 (version "0.3")
1563 (source
1564 (origin
1565 (method url-fetch)
1566 (uri (pypi-uri "Flask-Markdown" version))
1567 (sha256
1568 (base32
1569 "0l32ikv4f7va926jlq4f7gx0xid247bhlxl6bd9av5dk8ljz1hyq"))))
1570 (build-system python-build-system)
1571 (arguments
1572 '(#:tests? #f)) ; Tests seem to be incompatible with latest python
1573 (propagated-inputs
1574 (list python-markdown python-flask))
1575 (native-inputs
1576 (list python-nose))
1577 (home-page "https://github.com/dcolish/flask-markdown")
1578 (synopsis "Small extension to help with using Markdown in Flask")
1579 (description
1580 "Flask-Markdown supports several extensions for Markdown and integrates
1581into Jinja2 by default.")
1582 (license license:bsd-3)))
1583
1584(define-public python-flask-misaka
1585 (package
1586 (name "python-flask-misaka")
1587 (version "1.0.0")
1588 (source
1589 (origin
1590 (method url-fetch)
1591 (uri (pypi-uri "Flask-Misaka" version))
1592 (sha256
1593 (base32
1594 "12gm6hq3lvlj0ddw8p6lk5pky8jk3pw758ihffjl49shnnzc68zl"))))
1595 (build-system python-build-system)
1596 (native-inputs
1597 (list python-coverage python-mock))
1598 (propagated-inputs
1599 (list python-flask python-misaka))
1600 (home-page "https://github.com/singingwolfboy/flask-misaka/")
1601 (synopsis "Flask interface to Misaka, a Markdown parsing library")
1602 (description
1603 "This package provides an interface between the Flask web framework and
1604the Misaka Markdown parser.")
1605 (license license:expat)))
1606
1607(define-public python-flask-session
1608 (package
1609 (name "python-flask-session")
1610 (version "0.4.0")
1611 (source
1612 (origin
1613 (method url-fetch)
1614 (uri (pypi-uri "Flask-Session" version))
1615 (sha256
1616 (base32
1617 "0ihzlhdhss8f93p3njzva9rdm7kmhaakdlzz680wmi583wr59vf9"))))
1618 (build-system python-build-system)
1619 (arguments
1620 '(#:tests? #f)) ; Tests require the various storage backends to be present
1621 (propagated-inputs
1622 (list python-cachelib python-flask))
1623 (home-page "https://github.com/fengsp/flask-session")
1624 (synopsis "Adds server-side session support to your Flask application")
1625 (description
1626 "Flask-Session is an extension for Flask that adds support for
1627Server-side sessions, with a variety of different backends for session
1628storage.")
1629 (license license:bsd-3)))
1630
1631(define-public python-html5lib
1632 (package
1633 (name "python-html5lib")
1634 (version "1.1")
1635 (source
1636 (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "html5lib" version))
1639 (sha256
1640 (base32
1641 "0vqlhk0hgbsfkh7ybmby93xhlx8dq6pr5blf356ka3z2c41b9rdj"))))
1642 (build-system python-build-system)
1643 (propagated-inputs
1644 (list python-six python-webencodings
1645 ;; Required by Calibre 5.
1646 python-chardet))
1647 (arguments
1648 `(#:test-target "check"))
1649 (home-page
1650 "https://github.com/html5lib/html5lib-python")
1651 (synopsis
1652 "Python HTML parser based on the WHATWG HTML specification")
1653 (description
1654 "Html5lib is an HTML parser based on the WHATWG HTML specification
1655and written in Python.")
1656 (license license:expat)))
1657
1658(define-public python-html5-parser
1659 (package
1660 (name "python-html5-parser")
1661 (version "0.4.10")
1662 (source (origin
1663 (method url-fetch)
1664 (uri (pypi-uri "html5-parser" version))
1665 (sha256
1666 (base32
1667 "195wgxls3df7djry9cz3p2k9644l6bfd66fczbaw55fsq0c48agr"))))
1668 (build-system python-build-system)
1669 (native-inputs
1670 (list pkg-config))
1671 (inputs
1672 (list libxml2))
1673 (propagated-inputs
1674 (list python-lxml python-beautifulsoup4 python-chardet))
1675 (home-page "https://html5-parser.readthedocs.io")
1676 (synopsis "Fast C-based HTML5 parsing for Python")
1677 (description "This package provides a fast implementation of the HTML5
1678parsing spec for Python. Parsing is done in C using a variant of the gumbo
1679parser. The gumbo parse tree is then transformed into an lxml tree, also in
1680C, yielding parse times that can be a thirtieth of the html5lib parse times.")
1681 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
1682 ;; indicate ASL2.0, including the LICENSE file for the whole project.
1683 (license (list license:asl2.0 license:gpl3))))
1684
1685(define-public python-minio
1686 (package
1687 (name "python-minio")
1688 (version "7.1.9")
1689 (source (origin
1690 (method url-fetch)
1691 (uri (pypi-uri "minio" version))
1692 (sha256
1693 (base32
1694 "02nh865xbf2glxvcy70ir6gkcwqxl119zryfc70q7w0yjvkg64d7"))))
1695 (build-system python-build-system)
1696 (arguments
1697 '(#:phases (modify-phases %standard-phases
1698 (add-before 'check 'disable-failing-tests
1699 (lambda _
1700 ;; This test requires network access.
1701 (delete-file "tests/unit/credentials_test.py"))))))
1702 (native-inputs
1703 (list python-faker python-mock python-nose))
1704 (propagated-inputs
1705 (list python-certifi python-dateutil python-pytz python-urllib3))
1706 (home-page "https://github.com/minio/minio-py")
1707 (synopsis "Programmatically access Amazon S3 from Python")
1708 (description
1709 "This package provides a Python library for interacting with any
1710Amazon S3 compatible object storage server.")
1711 (license license:asl2.0)))
1712
1713(define-public python-pycurl
1714 (package
1715 (name "python-pycurl")
1716 (version "7.45.2")
1717 (source
1718 (origin
1719 (method url-fetch)
1720 (uri (pypi-uri "pycurl" version))
1721 (sha256
1722 (base32 "1ji46b924caa4saxvjxs9h673yy0kif297nxpnjn84r7w05mjc2p"))))
1723 (build-system python-build-system)
1724 (arguments
1725 ;; The tests attempt to access external web servers, so we cannot run
1726 ;; them. Furthermore, they are skipped altogether when using Python 2.
1727 '(#:tests? #f
1728 #:phases (modify-phases %standard-phases
1729 (add-before 'build 'configure-tls-backend
1730 (lambda _
1731 ;; XXX: PycURL fails to automatically determine which TLS
1732 ;; backend to use when cURL is built with --disable-static.
1733 ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
1734 (setenv "PYCURL_SSL_LIBRARY" "gnutls")
1735 #t)))))
1736 (native-inputs
1737 (list python-nose python-bottle))
1738 (inputs
1739 (list curl gnutls))
1740 (home-page "http://pycurl.io/")
1741 (synopsis "Lightweight Python wrapper around libcurl")
1742 (description "Pycurl is a lightweight wrapper around libcurl. It provides
1743high-speed transfers via libcurl and frequently outperforms alternatives.")
1744
1745 ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
1746 ;; under the terms of LGPLv2.1+ or Expat.
1747 (license (list license:lgpl2.1+ license:expat))))
1748
1749(define-public python-webencodings
1750 (package
1751 (name "python-webencodings")
1752 (version "0.5.1")
1753 (source (origin
1754 (method url-fetch)
1755 (uri (pypi-uri "webencodings" version))
1756 (sha256
1757 (base32
1758 "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
1759 (build-system python-build-system)
1760 (arguments
1761 '(#:phases
1762 (modify-phases %standard-phases
1763 (replace 'check
1764 (lambda _
1765 (invoke "py.test" "-v" "webencodings/tests.py")
1766 #t)))))
1767 (native-inputs
1768 (list python-pytest))
1769 (home-page "https://github.com/SimonSapin/python-webencodings")
1770 (synopsis "Character encoding aliases for legacy web content")
1771 (description
1772 "In order to be compatible with legacy web content when interpreting
1773something like @code{Content-Type: text/html; charset=latin1}, tools need
1774to use a particular set of aliases for encoding labels as well as some
1775overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
1776the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
1777or @code{UTF-16} BOM takes precedence over any other encoding declaration.
1778The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
1779defines all such details so that implementations do not have to
1780reverse-engineer each other.
1781
1782This module implements the Encoding standard and has encoding labels and
1783BOM detection, but the actual implementation for encoders and decoders
1784is Python’s.")
1785 (license license:bsd-3)))
1786
1787(define-public python-omnipath
1788 (package
1789 (name "python-omnipath")
1790 (version "1.0.6")
1791 (source (origin
1792 (method url-fetch)
1793 (uri (pypi-uri "omnipath" version))
1794 (sha256
1795 (base32
1796 "01hmcp1202g5drs8dkxnyyb5v14g503dj4zfiqypghmigi9ipw86"))))
1797 (build-system pyproject-build-system)
1798 (arguments
1799 (list
1800 #:phases
1801 '(modify-phases %standard-phases
1802 (add-after 'unpack 'relax
1803 (lambda _
1804 (substitute* "requirements.txt"
1805 (("wrapt>=1.12.0")
1806 "wrapt>=1.11.0"))))
1807 (add-after 'unpack 'set-home
1808 (lambda _ (setenv "HOME" "/tmp"))))))
1809 (propagated-inputs
1810 (list python-attrs
1811 python-docrep
1812 python-inflect
1813 python-networkx
1814 python-packaging
1815 python-pandas
1816 python-requests
1817 python-tqdm
1818 python-typing-extensions
1819 python-urllib3
1820 python-wrapt))
1821 (native-inputs
1822 (list python-bump2version
1823 python-pre-commit
1824 python-pytest
1825 python-pytest-mock
1826 python-requests-mock
1827 python-setuptools-scm
1828 python-tox))
1829 (home-page "https://omnipathdb.org/")
1830 (synopsis "Python client for the OmniPath web service")
1831 (description "This package provides a Python client for the OmniPath web
1832service.")
1833 (license license:expat)))
1834
1835(define-public python-openai
1836 (package
1837 (name "python-openai")
1838 (version "0.27.8")
1839 (source (origin
1840 (method url-fetch)
1841 (uri (pypi-uri "openai" version))
1842 (sha256
1843 (base32
1844 "0dlmxnib71fih9xzmd3v41alwv4qb8qrxixsrrsf5vmigmf0k0r4"))))
1845 (build-system pyproject-build-system)
1846 (arguments
1847 (list
1848 #:test-flags
1849 ;; These require internet access and an openai API key.
1850 '(list "--ignore=openai/tests/asyncio/test_endpoints.py"
1851 "--ignore=openai/tests/test_endpoints.py"
1852 "-k" "not test_requestor_cycle_sessions\
1853 and not test_requestor_sets_request_id\
1854 and not test_file_cli")))
1855 (propagated-inputs (list python-aiohttp python-requests python-tqdm
1856 python-typing-extensions))
1857 (native-inputs (list python-black python-pytest python-pytest-asyncio
1858 python-pytest-mock))
1859 (home-page "https://github.com/openai/openai-python")
1860 (synopsis "Python client library for the OpenAI API")
1861 (description "This package provides a Python client library for the
1862OpenAI API.")
1863 (license license:expat)))
1864
1865(define-public python-openapi-schema-validator
1866 (package
1867 (name "python-openapi-schema-validator")
1868 (version "0.2.3")
1869 (source
1870 (origin
1871 (method git-fetch) ;no tests in pypi release
1872 (uri (git-reference
1873 (url "https://github.com/p1c2u/openapi-schema-validator")
1874 (commit version)))
1875 (file-name (git-file-name name version))
1876 (sha256
1877 (base32
1878 "1swm8h74nhg63nxk347blwq9f1qn6iiq3zisndcvm7axkq3pc2df"))))
1879 (build-system pyproject-build-system)
1880 (arguments
1881 (list
1882 #:phases
1883 #~(modify-phases %standard-phases
1884 (add-after 'unpack 'remove-coverage-pytest-options
1885 (lambda _
1886 (substitute* "pyproject.toml"
1887 (("^--cov.*") "")))))))
1888 (native-inputs (list python-poetry-core python-pytest))
1889 (propagated-inputs
1890 (list python-isodate
1891 python-jsonschema
1892 python-rfc3339-validator
1893 python-strict-rfc3339))
1894 (home-page "https://github.com/p1c2u/openapi-schema-validator")
1895 (synopsis "OpenAPI schema validation library for Python")
1896 (description "Openapi-schema-validator is a Python library that validates
1897a schema against:
1898@itemize
1899@item OpenAPI Schema Specification v3.0 which is an extended subset of the
1900JSON Schema Specification Wright Draft 00.
1901@item OpenAPI Schema Specification v3.1 which is an extended superset of the
1902JSON Schema Specification Draft 2020-12.
1903@end itemize")
1904 (license license:bsd-3)))
1905
1906(define-public python-openapi-spec-validator
1907 (package
1908 (name "python-openapi-spec-validator")
1909 (version "0.4.0")
1910 (source
1911 (origin
1912 (method git-fetch) ;no tests in pypi release
1913 (uri (git-reference
1914 (url "https://github.com/p1c2u/openapi-spec-validator")
1915 (commit version)))
1916 (file-name (git-file-name name version))
1917 (sha256
1918 (base32
1919 "1q09sjh4hsc0c8yqbd97h5mp6rwh427y6zyn8kv8wljk6sa0fs4q"))))
1920 (build-system pyproject-build-system)
1921 (arguments
1922 (list
1923 ;; The example tests attempt to fetch resources from the Internet
1924 ;; (see: https://github.com/p1c2u/openapi-spec-validator/issues/151).
1925 #:test-flags #~'("-k" "not Example and not Exampe")
1926 #:phases
1927 #~(modify-phases %standard-phases
1928 (add-after 'unpack 'remove-coverage-pytest-options
1929 (lambda _
1930 (substitute* "pyproject.toml"
1931 (("^--cov.*") "")))))))
1932 (native-inputs (list python-poetry-core python-pytest))
1933 (propagated-inputs
1934 (list python-jsonschema
1935 python-openapi-schema-validator
1936 python-pyyaml
1937 python-requests
1938 python-setuptools))
1939 (home-page "https://github.com/p1c2u/openapi-spec-validator")
1940 (synopsis "OpenAPI spec validator")
1941 (description "OpenAPI Spec Validator is a Python library that validates an
1942OpenAPI specification against the OpenAPI 2.0 (also known as Swagger), OpenAPI
19433.0 and OpenAPI 3.1 specifications. The validator aims to check for full
1944compliance with the specification.")
1945 (license license:asl2.0)))
1946
1947(define-public python-openapi-core
1948 (package
1949 (name "python-openapi-core")
1950 (version "0.14.2")
1951 (source
1952 (origin
1953 (method git-fetch)
1954 (uri (git-reference
1955 (url "https://github.com/p1c2u/openapi-core")
1956 (commit version)))
1957 (file-name (git-file-name name version))
1958 (sha256
1959 (base32
1960 "1npsibyf8zx6z230yl19kyap8g25kqvgm7z1w6rm6jxv58yqsp7r"))))
1961 (build-system pyproject-build-system)
1962 (arguments
1963 (list
1964 #:test-flags
1965 '(list "tests/unit"
1966 ;; Ignore Pytest configuration in setup.cfg that adds
1967 ;; unwanted flake8 and coverage options.
1968 "-c" "/dev/null"
1969 ;; This tests fails due to changes in Pytest; fixed
1970 ;; but not yet released upstream
1971 ;; (https://github.com/p1c2u/openapi-core/issues/158).
1972 "-k" "not test_string_format_invalid_value")))
1973 (native-inputs (list python-django
1974 python-falcon
1975 python-flask
1976 python-mock
1977 python-poetry-core
1978 python-pypa-build
1979 python-pytest
1980 python-responses))
1981 (propagated-inputs
1982 (list python-attrs
1983 python-dictpath
1984 python-isodate
1985 python-jsonschema
1986 python-lazy-object-proxy
1987 python-more-itertools
1988 python-openapi-schema-validator
1989 python-openapi-spec-validator
1990 python-parse
1991 python-six
1992 python-werkzeug))
1993 (home-page "https://github.com/p1c2u/openapi-core")
1994 (synopsis "OpenAPI core library")
1995 (description "Openapi-core is a Python library that adds client-side and
1996server-side support for the OpenAPI Specification v3. It has features such
1997as:
1998@itemize
1999@item Validation of requests and responses
2000@item Schema casting and unmarshalling
2001@item Media type and parameters deserialization
2002@item Security providers (API keys, Cookie, Basic and Bearer HTTP
2003authentications)
2004@item Custom deserializers and formats
2005@item Integration with libraries and frameworks.
2006@end itemize")
2007 (license license:bsd-3)))
2008
2009(define-public python-openid
2010 (package
2011 (name "python-openid")
2012 (version "3.2.0")
2013 (source
2014 (origin
2015 (method url-fetch)
2016 (uri (pypi-uri "python3-openid" version))
2017 (sha256
2018 (base32
2019 "1bxf9a3ny1js422j962zfzl4a9dhj192pvai05whn7j0iy9gdyrk"))))
2020 (build-system python-build-system)
2021 (arguments
2022 `(#:phases
2023 (modify-phases %standard-phases
2024 (replace 'check
2025 (lambda* (#:key tests? #:allow-other-keys)
2026 (when tests?
2027 (invoke "coverage" "run" "-m"
2028 "unittest" "openid.test.test_suite")))))))
2029 (propagated-inputs
2030 (list python-defusedxml))
2031 (native-inputs
2032 (list python-coverage python-psycopg2 python-django))
2033 (home-page "https://github.com/necaris/python3-openid")
2034 (synopsis "OpenID support for servers and consumers")
2035 (description "This library provides OpenID authentication for Python, both
2036for clients and servers.")
2037 (license license:asl2.0)))
2038
2039(define-public python-cssutils
2040 (package
2041 (name "python-cssutils")
2042 (version "2.6.0")
2043 (source
2044 (origin
2045 (method url-fetch)
2046 (uri (pypi-uri "cssutils" version))
2047 (sha256
2048 (base32
2049 "13l1y0xr3fgbl95w3pinb5av5dqk2ip39pih6vgrz47c3hyd5p7p"))))
2050 (build-system pyproject-build-system)
2051 (arguments
2052 (list
2053 #:phases
2054 #~(modify-phases %standard-phases
2055 (replace 'check
2056 (lambda _
2057 (invoke "pytest" "-vv" "-k"
2058 ;; disable tests requiring network
2059 (string-append "not test_parseUrl "
2060 "and not encutils "
2061 "and not website.logging")))))))
2062 (native-inputs
2063 (list python-pytest python-jaraco-test))
2064 (home-page "https://github.com/jaraco/cssutils")
2065 (synopsis
2066 "CSS Cascading Style Sheets library for Python")
2067 (description
2068 "Cssutils is a Python package for parsing and building CSS
2069Cascading Style Sheets. Currently it provides a DOM only and no rendering
2070options.")
2071 (license license:lgpl3+)))
2072
2073(define-public python-css-parser
2074 (package
2075 (inherit python-cssutils)
2076 (name "python-css-parser")
2077 (version "1.0.7")
2078 (source
2079 (origin
2080 (method url-fetch)
2081 (uri (pypi-uri "css-parser" version ".tar.gz"))
2082 (sha256
2083 (base32 "1ldv9s3an4pgk7b5x6z07rw9b5fdrasdldnf22829pb26b39dq15"))))
2084 (home-page "https://github.com/ebook-utils/css-parser")
2085 (synopsis "Fork of cssutils modified for parsing ebooks")
2086 (description
2087 "Css-parser is a Python package for parsing and building CSS
2088Cascading Style Sheets. Currently it provides a DOM only and no rendering
2089options.
2090
2091It's a fork of cssutils 1.0.2, updated and modified for parsing ebooks, due to
2092cssutils not receiving updates as of 1.0.2.")
2093 (license license:lgpl3+)))
2094
2095(define-public python-cssselect
2096 (package
2097 (name "python-cssselect")
2098 (version "1.2.0")
2099 (source (origin
2100 ;; The PyPI release does not contain tests.
2101 (method git-fetch)
2102 (uri (git-reference
2103 (url "https://github.com/scrapy/cssselect")
2104 (commit (string-append "v" version))))
2105 (file-name (git-file-name name version))
2106 (sha256
2107 (base32
2108 "1x4nrvb1p1byi1whmspik7lbh303akdlh762dayfxam3hycsh5kk"))))
2109 (build-system pyproject-build-system)
2110 (native-inputs
2111 (list python-lxml python-pytest))
2112 (home-page "https://github.com/scrapy/cssselect")
2113 (synopsis "CSS3 selector parser and translator to XPath 1.0")
2114 (description
2115 "Cssselect ia a Python module that parses CSS3 Selectors and translates
2116them to XPath 1.0 expressions. Such expressions can be used in lxml or
2117another XPath engine to find the matching elements in an XML or HTML document.")
2118 (license license:bsd-3)))
2119
2120(define-public python-databricks-cli
2121 (package
2122 (name "python-databricks-cli")
2123 (version "0.17.0")
2124 (home-page "https://github.com/databricks/databricks-cli")
2125 (source (origin
2126 (method git-fetch)
2127 (uri (git-reference (url home-page) (commit version)))
2128 (file-name (git-file-name name version))
2129 (sha256
2130 (base32
2131 "1qwbxnx64kw7lrzlyx3hfbnjxpc19cqvvj0gcrkqpyjsgd08vja0"))))
2132 (build-system python-build-system)
2133 (arguments
2134 '(#:phases (modify-phases %standard-phases
2135 (replace 'check
2136 (lambda _
2137 (invoke "pytest" "tests" "-vv"))))))
2138 (native-inputs
2139 ;; For tests.
2140 (list python-decorator
2141 python-mock
2142 python-pytest
2143 python-requests-mock))
2144 (propagated-inputs
2145 (list python-click
2146 python-oauthlib
2147 python-pyjwt
2148 python-requests
2149 python-six
2150 python-tabulate))
2151 (synopsis "Command line interface for Databricks")
2152 (description
2153 "The Databricks Command Line Interface is a tool which provides an easy
2154to use interface to the Databricks platform. The CLI is built on top of the
2155Databricks REST APIs.")
2156 (license license:asl2.0)))
2157
2158(define-public python-openid-cla
2159 (package
2160 (name "python-openid-cla")
2161 (version "1.2")
2162 (source
2163 (origin
2164 (method url-fetch)
2165 (uri (pypi-uri "python-openid-cla" version))
2166 (sha256
2167 (base32
2168 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
2169 (build-system python-build-system)
2170 (arguments '(#:tests? #f)) ; No tests.
2171 (propagated-inputs (list python-openid python-six))
2172 (home-page "https://github.com/puiterwijk/python-openid-cla/")
2173 (synopsis "Implementation of the OpenID CLA extension for python-openid")
2174 (description "@code{openid-cla} is an implementation of the OpenID
2175contributor license agreement extension for python-openid.")
2176 (license license:bsd-3)))
2177
2178(define-public python-openid-teams
2179 (package
2180 (name "python-openid-teams")
2181 (version "1.1")
2182 (source
2183 (origin
2184 (method url-fetch)
2185 (uri (pypi-uri "python-openid-teams" version))
2186 (sha256
2187 (base32
2188 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
2189 (build-system python-build-system)
2190 (arguments '(#:tests? #f)) ; No tests.
2191 (propagated-inputs (list python-openid python-six))
2192 (home-page "https://github.com/puiterwijk/python-openid-teams/")
2193 (synopsis "Implementation of the OpenID teams extension for python-openid")
2194 (description
2195 "@code{openid-teams} is an implementation of the OpenID
2196teams extension for python-openid.")
2197 (license license:bsd-3)))
2198
2199(define-public python-priority
2200 (package
2201 (name "python-priority")
2202 (version "1.3.0")
2203 (source
2204 (origin
2205 (method url-fetch)
2206 (uri (pypi-uri "priority" version))
2207 (sha256
2208 (base32 "1gpzn9k9zgks0iw5wdmad9b4dry8haiz2sbp6gycpjkzdld9dhbb"))))
2209 (build-system python-build-system)
2210 (arguments
2211 `(#:phases
2212 (modify-phases %standard-phases
2213 (replace 'check
2214 (lambda* (#:key inputs outputs #:allow-other-keys)
2215 (add-installed-pythonpath inputs outputs)
2216 (invoke "pytest" "-vv" "test" "-k"
2217 ;; This test exceeded the Hypothesis deadline.
2218 "not test_period_of_repetition"))))))
2219 (native-inputs
2220 (list python-hypothesis python-pytest python-pytest-cov
2221 python-pytest-xdist))
2222 (home-page "https://python-hyper.org/projects/priority/en/latest/")
2223 (synopsis "Pure-Python implementation of the HTTP/2 priority tree")
2224 (description
2225 "Priority is a pure-Python implementation of the priority logic for HTTP/2,
2226set out in RFC 7540 Section 5.3 (Stream Priority).")
2227 (license license:expat)))
2228
2229(define-public python-wsproto
2230 (package
2231 (name "python-wsproto")
2232 (version "1.2.0")
2233 (source
2234 (origin
2235 (method url-fetch)
2236 (uri (pypi-uri "wsproto" version))
2237 (sha256
2238 (base32 "0rahm1j9danv1l6i6as80acwv16ycihxkhrvwjiqh9drxhk5ymmd"))))
2239 (build-system pyproject-build-system)
2240 (native-inputs
2241 (list python-pytest))
2242 (propagated-inputs
2243 (list python-h11))
2244 (home-page "https://github.com/python-hyper/wsproto/")
2245 (synopsis "WebSockets state-machine based protocol implementation")
2246 (description
2247 "@code{wsproto} is a pure-Python implementation of a WebSocket protocol
2248stack. It's written from the ground up to be embeddable in whatever program you
2249choose to use, ensuring that you can communicate via WebSockets, as defined in
2250RFC6455, regardless of your programming paradigm.")
2251 (license license:expat)))
2252
2253(define-public hypercorn
2254 (package
2255 (name "hypercorn")
2256 (version "0.14.4")
2257 (source (origin
2258 (method git-fetch) ;PyPI does not have tests
2259 (uri (git-reference
2260 (url "https://github.com/pgjones/hypercorn")
2261 (commit version)))
2262 (file-name (git-file-name name version))
2263 (sha256
2264 (base32
2265 "0zyf5b8959sd12ycmqzvsb8746i3gn76rz55gxvix5cwj672m7yx"))))
2266 (build-system pyproject-build-system)
2267 ;; Propagate because Hypercorn also exposes functionality over a module.
2268 (propagated-inputs
2269 (list python-h11
2270 python-h2
2271 python-priority
2272 python-toml
2273 python-typing-extensions
2274 python-wsproto))
2275 (native-inputs
2276 (list python-hypothesis
2277 python-mock
2278 python-poetry-core
2279 python-pytest
2280 python-pytest-asyncio
2281 python-pytest-cov
2282 python-pytest-trio
2283 python-trio))
2284 (home-page "https://gitlab.com/pgjones/hypercorn/")
2285 (synopsis "ASGI Server based on Hyper libraries")
2286 (description
2287 "Hypercorn is an ASGI web server based on the sans-io hyper, h11, h2, and
2288wsproto libraries and inspired by Gunicorn. It supports HTTP/1, HTTP/2,
2289WebSockets (over HTTP/1 and HTTP/2), ASGI/2, and ASGI/3 specifications. It
2290can utilise asyncio, uvloop, or trio worker types.")
2291 (license license:expat)))
2292
2293(define-public python-hypercorn
2294 (deprecated-package "python-hypercorn" hypercorn))
2295
2296(define-public python-querystring-parser
2297 (package
2298 (name "python-querystring-parser")
2299 (version "1.2.4")
2300 (source (origin
2301 (method url-fetch)
2302 (uri (pypi-uri "querystring_parser" version))
2303 (sha256
2304 (base32
2305 "0qlar8a0wa003hm2z6wcpb625r6vjj0a70rsni9h8lz0zwfcwkv4"))))
2306 (build-system python-build-system)
2307 (arguments
2308 `(#:phases (modify-phases %standard-phases
2309 (replace 'check
2310 (lambda _
2311 ;; XXX FIXME: This test is broken with Python 3.7:
2312 ;; https://github.com/bernii/querystring-parser/issues/35
2313 (substitute* "querystring_parser/tests.py"
2314 (("self\\.assertEqual\\(self\\.knownValuesNormalized, result\\)")
2315 "True"))
2316 (invoke "python" "querystring_parser/tests.py"))))))
2317 (propagated-inputs
2318 (list python-six))
2319 (home-page "https://github.com/bernii/querystring-parser")
2320 (synopsis "QueryString parser that correctly handles nested dictionaries")
2321 (description
2322 "This package provides a query string parser for Python and Django
2323projects that correctly creates nested dictionaries from sent form/querystring
2324data.")
2325 (license license:expat)))
2326
2327(define-public python-tornado
2328 (package
2329 (name "python-tornado")
2330 (version "5.1.1")
2331 (source
2332 (origin
2333 (method url-fetch)
2334 (uri (pypi-uri "tornado" version))
2335 (sha256
2336 (base32
2337 "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
2338 (build-system python-build-system)
2339 (arguments
2340 (list
2341 #:phases
2342 '(modify-phases %standard-phases
2343 (add-after 'unpack 'fix-collections
2344 (lambda _
2345 (substitute* "tornado/httputil.py"
2346 (("collections.MutableMapping")
2347 "collections.abc.MutableMapping"))))
2348 (replace 'check
2349 (lambda* (#:key tests? #:allow-other-keys)
2350 (when tests?
2351 (substitute* "tornado/test/runtests.py"
2352 (("\"error\", category=DeprecationWarning")
2353 "\"ignore\", category=DeprecationWarning")
2354 ;; Disable tests that use SSL.
2355 (("'tornado.test.simple_httpclient_test',") "")
2356 (("'tornado.test.iostream_test',") "")
2357 (("'tornado.test.httpserver_test',") "")
2358 ;; Some timeouts are triggered in these two modules
2359 (("'tornado.test.queues_test',") "")
2360 (("'tornado.test.locks_test',") ""))
2361 ;; Skip all network tests
2362 (setenv "NO_NETWORK" "1")
2363 ;; Skip timing-relevant tests
2364 (setenv "TRAVIS" "1")
2365 (invoke "python" "-m" "tornado.test.runtests"
2366 "--verbose=yes")))))))
2367 (native-inputs
2368 (list python-certifi))
2369 (home-page "https://www.tornadoweb.org/")
2370 (synopsis "Python web framework and asynchronous networking library")
2371 (description
2372 "Tornado is a Python web framework and asynchronous networking library,
2373originally developed at FriendFeed. By using non-blocking network I/O,
2374Tornado can scale to tens of thousands of open connections, making it ideal
2375for long polling, WebSockets, and other applications that require a long-lived
2376connection to each user.")
2377 (license license:asl2.0)))
2378
2379(define-public python-tornado-6
2380 (package
2381 (name "python-tornado")
2382 (version "6.2")
2383 (source
2384 (origin
2385 (method url-fetch)
2386 (uri (pypi-uri "tornado" version))
2387 (sha256
2388 (base32
2389 "04rwzjfqa31ajz8vvkfcsp1539m8n960msnppxkcckp8plch8qwv"))))
2390 (build-system python-build-system)
2391 (arguments
2392 '(#:phases
2393 (modify-phases %standard-phases
2394 (replace 'check
2395 (lambda* (#:key tests? #:allow-other-keys)
2396 (when tests?
2397 (setenv "ASYNC_TEST_TIMEOUT" "25") ; Like in tox.ini.
2398 (invoke "python" "-m" "tornado.test.runtests")))))))
2399 (native-inputs
2400 (list python-certifi))
2401 (home-page "https://www.tornadoweb.org/")
2402 (synopsis "Python web framework and asynchronous networking library")
2403 (description
2404 "Tornado is a Python web framework and asynchronous networking library,
2405originally developed at FriendFeed. By using non-blocking network I/O,
2406Tornado can scale to tens of thousands of open connections, making it ideal
2407for long polling, WebSockets, and other applications that require a long-lived
2408connection to each user.")
2409 (license license:asl2.0)))
2410
2411(define-public python-tornado-http-auth
2412 (package
2413 (name "python-tornado-http-auth")
2414 (version "1.1.1")
2415 (source
2416 (origin
2417 (method url-fetch)
2418 (uri (pypi-uri "tornado-http-auth" version))
2419 (sha256
2420 (base32 "0hyc5f0a09i5yb99pk4bxpg6w9ichbrb5cv7hc9hff7rxd8w0v0x"))))
2421 (build-system python-build-system)
2422 (propagated-inputs
2423 (list python-tornado))
2424 (home-page "https://github.com/gvalkov/tornado-http-auth")
2425 (synopsis "Digest and basic authentication module for Tornado")
2426 (description
2427 "Provides support for adding authentication to services using the Tornado
2428web framework, either via the basic or digest authentication schemes.")
2429 (license license:asl2.0)))
2430
2431(define-public python-terminado
2432 (package
2433 (name "python-terminado")
2434 (version "0.10.0")
2435 (source
2436 (origin
2437 (method url-fetch)
2438 (uri (pypi-uri "terminado" version))
2439 (sha256
2440 (base32
2441 "1smvra3sc9sg64w49kfn5yhagshq3x55839748ck5dvxvk4hgza6"))))
2442 (build-system python-build-system)
2443 (propagated-inputs
2444 (list python-tornado-6 python-ptyprocess))
2445 (native-inputs
2446 (list python-pytest))
2447 (arguments
2448 `(#:phases
2449 (modify-phases %standard-phases
2450 (replace 'check
2451 (lambda _ (invoke "pytest" "-vv"))))))
2452 (home-page "https://github.com/jupyter/terminado")
2453 (synopsis "Terminals served to term.js using Tornado websockets")
2454 (description "This package provides a Tornado websocket backend for the
2455term.js Javascript terminal emulator library.")
2456 (license license:bsd-2)))
2457
2458(define-public python-wsgi-intercept
2459 (package
2460 (name "python-wsgi-intercept")
2461 (version "1.2.2")
2462 (source (origin
2463 (method url-fetch)
2464 (uri (pypi-uri "wsgi_intercept" version))
2465 (sha256
2466 (base32
2467 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
2468 (build-system python-build-system)
2469 (propagated-inputs
2470 (list python-six))
2471 (native-inputs
2472 (list python-pytest python-httplib2 python-requests python-urllib3))
2473 (synopsis "Puts a WSGI application in place of a real URI for testing")
2474 (description "Wsgi_intercept installs a WSGI application in place of a real
2475URI for testing. Testing a WSGI application normally involves starting a
2476server at a local host and port, then pointing your test code to that address.
2477Instead, this library lets you intercept calls to any specific host/port
2478combination and redirect them into a WSGI application importable by your test
2479program. Thus, you can avoid spawning multiple processes or threads to test
2480your Web app.")
2481 (home-page "https://github.com/cdent/wsgi-intercept")
2482 (license license:expat)))
2483
2484(define-public python-webob
2485 (package
2486 (name "python-webob")
2487 (version "1.8.6")
2488 (source
2489 (origin
2490 (method url-fetch)
2491 (uri (pypi-uri "WebOb" version))
2492 (sha256
2493 (base32
2494 "026i3z99nr3px75isa9mbnky5i7rffiv4d124h5kxfjjsxz92fma"))))
2495 (build-system python-build-system)
2496 (native-inputs
2497 (list python-nose))
2498 (home-page "https://webob.org/")
2499 (synopsis "WSGI request and response object")
2500 (description
2501 "WebOb provides wrappers around the WSGI request environment, and an
2502object to help create WSGI responses.")
2503 (license license:expat)))
2504
2505(define-public python-zope-event
2506 (package
2507 (name "python-zope-event")
2508 (version "4.4")
2509 (source
2510 (origin
2511 (method url-fetch)
2512 (uri (pypi-uri "zope.event" version))
2513 (sha256
2514 (base32
2515 "1ksbc726av9xacml6jhcfyn828hlhb9xlddpx6fcvnlvmpmpvhk9"))))
2516 (build-system python-build-system)
2517 (home-page "https://pypi.org/project/zope.event/")
2518 (synopsis "Event publishing system for Python")
2519 (description "Zope.event provides an event publishing API, intended for
2520use by applications which are unaware of any subscribers to their events. It
2521is a simple event-dispatching system on which more sophisticated event
2522dispatching systems can be built.")
2523 (license license:zpl2.1)))
2524
2525(define-public python-zope-interface
2526 (package
2527 (name "python-zope-interface")
2528 (version "5.1.0")
2529 (source
2530 (origin
2531 (method url-fetch)
2532 (uri (pypi-uri "zope.interface" version))
2533 (sha256
2534 (base32
2535 "03nrl6b8cb600dnnh46y149awvrm0gxyqgwq5hdw3lvys8mw9r20"))))
2536 (build-system python-build-system)
2537 (arguments '(#:tests? #f)) ; test suite can't find python-zope-testing
2538 (native-inputs
2539 (list python-coverage python-nose python-zope-event
2540 python-zope-testing))
2541 (home-page "https://github.com/zopefoundation/zope.interface")
2542 (synopsis "Python implementation of the \"design by contract\"
2543methodology")
2544 (description "Zope.interface provides an implementation of \"object
2545interfaces\" for Python. Interfaces are a mechanism for labeling objects as
2546conforming to a given API or contract.")
2547 (license license:zpl2.1)))
2548
2549(define-public python-zope-exceptions
2550 (package
2551 (name "python-zope-exceptions")
2552 (version "4.6")
2553 (source
2554 (origin
2555 (method url-fetch)
2556 (uri (pypi-uri "zope.exceptions" version))
2557 (sha256
2558 (base32
2559 "1kc3hql2i35ys5alkj9csiaz2s9bx0rff585vnrrgvavqsj297b1"))))
2560 (build-system python-build-system)
2561 (arguments
2562 '(#:phases
2563 (modify-phases %standard-phases
2564 (replace 'check
2565 (lambda* (#:key tests? #:allow-other-keys)
2566 (if tests?
2567 (invoke "zope-testrunner" "--test-path=src")
2568 (format #t "test suite not run~%")))))))
2569 (native-inputs
2570 `(("python-zope-testrunner" ,python-zope-testrunner-bootstrap)))
2571 (propagated-inputs
2572 (list python-zope-interface))
2573 (home-page "https://pypi.org/project/zope.exceptions/")
2574 (synopsis "Zope exceptions")
2575 (description "Zope.exceptions provides general-purpose exception types
2576that have uses outside of the Zope framework.")
2577 (license license:zpl2.1)))
2578
2579(define (python-zope-bootstrap-package orig)
2580 (package
2581 (inherit orig)
2582 (name (string-append (package-name orig) "-bootstrap"))
2583 (arguments
2584 (if (null? (package-arguments orig))
2585 `(#:tests? #f
2586 #:phases (modify-phases %standard-phases
2587 (delete 'sanity-check)))
2588 (substitute-keyword-arguments (package-arguments orig)
2589 ((#:tests? _ #f) #f)
2590 ((#:phases phases '%standard-phases)
2591 `(modify-phases ,phases
2592 (delete 'sanity-check))))))
2593 (propagated-inputs `())
2594 (native-inputs `())
2595 (properties `((hidden? . #t)))))
2596
2597(define-public python-zope-exceptions-bootstrap
2598 (python-zope-bootstrap-package python-zope-exceptions))
2599
2600(define-public python-zope-testing
2601 (package
2602 (name "python-zope-testing")
2603 (version "4.7")
2604 (source
2605 (origin
2606 (method url-fetch)
2607 (uri (pypi-uri "zope.testing" version))
2608 (sha256
2609 (base32
2610 "1sh3c3i0m8n8fnhqiry0bk3rr356i56ry7calmn57s1pvv8yhsyn"))))
2611 (build-system python-build-system)
2612 (home-page "https://pypi.org/project/zope.testing/")
2613 (synopsis "Zope testing helpers")
2614 (description "Zope.testing provides a number of testing utilities for HTML
2615forms, HTTP servers, regular expressions, and more.")
2616 (license license:zpl2.1)))
2617
2618(define-public python-zope-testrunner
2619 (package
2620 (name "python-zope-testrunner")
2621 (version "5.2")
2622 (source
2623 (origin
2624 (method url-fetch)
2625 (uri (pypi-uri "zope.testrunner" version))
2626 (sha256
2627 (base32
2628 "0jyyf1dcz156q95x2y7yw2v420q2xn3cff0c5aci7hmdmcbn0gc7"))))
2629 (build-system python-build-system)
2630 (arguments
2631 '(#:tests? #f ;FIXME: Tests can't find zope.interface.
2632 #:phases
2633 (modify-phases %standard-phases
2634 (add-after 'unpack 'remove-problematic-test
2635 (lambda _
2636 ;; This test contains invalid syntax, which breaks bytecode
2637 ;; compilation. For simplicity just remove it.
2638 (delete-file
2639 "src/zope/testrunner/tests/testrunner-ex/sample2/badsyntax.py"))))))
2640 (native-inputs
2641 (list python-zope-testing))
2642 (propagated-inputs
2643 (list python-six python-zope-exceptions python-zope-interface))
2644 (home-page "https://pypi.org/project/zope.testrunner/")
2645 (synopsis "Zope testrunner script")
2646 (description "Zope.testrunner provides a script for running Python
2647tests.")
2648 (license license:zpl2.1)))
2649
2650(define-public python-zope-testrunner-bootstrap
2651 (package
2652 (inherit (python-zope-bootstrap-package python-zope-testrunner))
2653 (propagated-inputs
2654 `(("python-six" ,python-six)
2655 ("python-zope-exceptions" ,python-zope-exceptions-bootstrap)))
2656 (properties `((hidden? . #t)))))
2657
2658(define-public python-zope-i18nmessageid
2659 (package
2660 (name "python-zope-i18nmessageid")
2661 (version "5.0.1")
2662 (source
2663 (origin
2664 (method url-fetch)
2665 (uri (pypi-uri "zope.i18nmessageid" version))
2666 (sha256
2667 (base32
2668 "0ndhn4w1qgwkfbwf9vm2bgq418z5g0wmfsgl0d9nz62cd0mi8d4m"))))
2669 (build-system python-build-system)
2670 (native-inputs
2671 (list python-coverage python-zope-testrunner))
2672 (propagated-inputs
2673 (list python-six))
2674 (home-page "https://pypi.org/project/zope.i18nmessageid/")
2675 (synopsis "Message identifiers for internationalization")
2676 (description "Zope.i18nmessageid provides facilities for declaring
2677internationalized messages within program source text.")
2678 (license license:zpl2.1)))
2679
2680(define-public python-zope-schema
2681 (package
2682 (name "python-zope-schema")
2683 (version "7.0.1")
2684 (source
2685 (origin
2686 (method url-fetch)
2687 (uri (pypi-uri "zope.schema" version))
2688 (sha256
2689 (base32
2690 "1fgvx7nim9plxnyiq6vmah1dji7ba5290fws1i0lwk9m0g5xpm7a"))))
2691 (build-system python-build-system)
2692 (arguments
2693 `(#:phases
2694 (modify-phases %standard-phases
2695 (replace 'check
2696 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
2697 (add-installed-pythonpath inputs outputs)
2698 (if tests?
2699 (invoke "zope-testrunner" "--test-path=src")
2700 #t))))))
2701 (propagated-inputs
2702 (list python-zope-event python-zope-interface))
2703 (native-inputs
2704 (list python-zope-i18nmessageid python-zope-testing
2705 python-zope-testrunner))
2706 (home-page "https://pypi.org/project/zope.schema/")
2707 (synopsis "Zope data schemas")
2708 (description "Zope.scheme provides extensions to zope.interface for
2709defining data schemas.")
2710 (license license:zpl2.1)))
2711
2712(define-public python-zope-sqlalchemy
2713 (package
2714 (name "python-zope-sqlalchemy")
2715 (version "1.6")
2716 (source (origin
2717 (method url-fetch)
2718 (uri (pypi-uri "zope.sqlalchemy" version))
2719 (sha256
2720 (base32
2721 "1azm2awl2ra10xl6wps3yvy14jk2rpzvsyfsb9cncm97aydbwlww"))))
2722 (build-system python-build-system)
2723 (propagated-inputs
2724 (list python-sqlalchemy
2725 python-transaction
2726 python-zope-interface))
2727 (native-inputs (list python-zope-testing))
2728 (home-page "https://github.com/zopefoundation/zope.sqlalchemy")
2729 (synopsis "Minimal SQLAlchemy transaction integration for Zope")
2730 (description "The aim of this package is to unify the plethora of existing
2731packages integrating SQLAlchemy with Zope's transaction management. As such,
2732it only provides a data manager and makes no attempt to define a @i{zopeish}
2733way to configure engines.")
2734 (license license:zpl2.1)))
2735
2736(define-public python-zope-configuration
2737 (package
2738 (name "python-zope-configuration")
2739 (version "4.4.0")
2740 (source (origin
2741 (method url-fetch)
2742 (uri (pypi-uri "zope.configuration" version))
2743 (sha256
2744 (base32
2745 "0g6vrl7y27z9cj5xyrww9xlzk4npj55mgmlrcd9d2nj08jn2pw79"))))
2746 (build-system python-build-system)
2747 (native-inputs
2748 (list python-manuel python-zope-testing python-zope-testrunner))
2749 (propagated-inputs
2750 (list python-zope-i18nmessageid python-zope-interface
2751 python-zope-schema))
2752 (home-page "https://pypi.org/project/zope.configuration/")
2753 (synopsis "Zope Configuration Markup Language")
2754 (description "Zope.configuration implements ZCML, the Zope Configuration
2755Markup Language.")
2756 (license license:zpl2.1)))
2757
2758(define-public python-zope-configuration-bootstrap
2759 (python-zope-bootstrap-package python-zope-configuration))
2760
2761(define-public python-zope-copy
2762 (package
2763 (name "python-zope-copy")
2764 (version "4.2")
2765 (source
2766 (origin
2767 (method url-fetch)
2768 (uri (pypi-uri "zope.copy" version))
2769 (sha256
2770 (base32
2771 "06m75434krl57n6p73c2qj55k5i3fixg887j8ss01ih6zw4rvfs7"))))
2772 (build-system python-build-system)
2773 (arguments
2774 '(#:phases
2775 (modify-phases %standard-phases
2776 (replace 'check
2777 (lambda _
2778 (invoke "zope-testrunner" "--test-path=src" "\\[]"))))))
2779 (propagated-inputs
2780 (list python-zope-interface))
2781 (native-inputs
2782 `(("python-zope-component" ,python-zope-component-bootstrap)
2783 ("python-zope-location" ,python-zope-location-bootstrap)
2784 ("python-zope-testing" ,python-zope-testing)
2785 ("python-zope-testrunner" ,python-zope-testrunner)))
2786 (home-page "https://github.com/zopefoundation/zope.copy")
2787 (synopsis "Pluggable object copying mechanism")
2788 (description
2789 "This package provides a pluggable mechanism for copying persistent objects.")
2790 (license license:zpl2.1)))
2791
2792(define-public python-zope-proxy
2793 (package
2794 (name "python-zope-proxy")
2795 (version "4.3.5")
2796 (source
2797 (origin
2798 (method url-fetch)
2799 (uri (pypi-uri "zope.proxy" version))
2800 (sha256
2801 (base32
2802 "14h7nyfbl5vpfk0rbviy4ygdfx0yx5kncvg6jpbdb0dhwna0ssm6"))))
2803 (build-system python-build-system)
2804 (native-inputs
2805 (list python-zope-security-bootstrap python-zope-testrunner))
2806 (propagated-inputs
2807 (list python-zope-interface))
2808 (home-page "https://pypi.org/project/zope.proxy/")
2809 (synopsis "Generic, transparent proxies")
2810 (description "Zope.proxy provides generic, transparent proxies for Python.
2811Proxies are special objects which serve as mostly-transparent wrappers around
2812another object, intervening in the apparent behavior of the wrapped object
2813only when necessary to apply the policy (e.g., access checking, location
2814brokering, etc.) for which the proxy is responsible.")
2815 (license license:zpl2.1)))
2816
2817(define-public python-zope-proxy-bootstrap
2818 (python-zope-bootstrap-package python-zope-proxy))
2819
2820(define-public python-zope-hookable
2821 (package
2822 (name "python-zope-hookable")
2823 (version "5.0.1")
2824 (source
2825 (origin
2826 (method url-fetch)
2827 (uri (pypi-uri "zope.hookable" version))
2828 (sha256
2829 (base32
2830 "0hc82lfr7bk53nvbxvjkibkarngyrzgfk2i6bg8wshl0ly0pdl19"))))
2831 (build-system python-build-system)
2832 (native-inputs
2833 (list python-coverage python-zope-testing))
2834 (home-page "https://github.com/zopefoundation/zope.hookable")
2835 (synopsis "Zope hookable")
2836 (description "This package supports the efficient creation of hookable
2837objects, which are callable objects that are meant to be optionally replaced.
2838The idea is that you create a function that does some default thing and make i
2839hookable. Later, someone can modify what it does by calling its sethook method
2840and changing its implementation. All users of the function, including those
2841that imported it, will see the change.")
2842 (license license:zpl2.1)))
2843
2844(define-public python-zope-location
2845 (package
2846 (name "python-zope-location")
2847 (version "4.2")
2848 (source
2849 (origin
2850 (method url-fetch)
2851 (uri (pypi-uri "zope.location" version))
2852 (sha256
2853 (base32
2854 "1b40pzl8v00d583d3gsxv1qjdw2dhghlgkbgxl3m07d5r3izj857"))))
2855 (build-system python-build-system)
2856 (arguments
2857 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2858 (native-inputs
2859 (list python-zope-testrunner))
2860 (propagated-inputs
2861 (list python-zope-interface python-zope-proxy python-zope-schema))
2862 (home-page "https://pypi.org/project/zope.location/")
2863 (synopsis "Zope location library")
2864 (description "Zope.location implements the concept of \"locations\" in
2865Zope3, which are are special objects that have a structural location.")
2866 (license license:zpl2.1)))
2867
2868(define-public python-zope-location-bootstrap
2869 (python-zope-bootstrap-package python-zope-location))
2870
2871(define-public python-zope-security
2872 (package
2873 (name "python-zope-security")
2874 (version "5.1.1")
2875 (source
2876 (origin
2877 (method url-fetch)
2878 (uri (pypi-uri "zope.security" version))
2879 (sha256
2880 (base32
2881 "11lfw67cigscfax9c5j63xcvz2qcj724zx5fcdqyc94am2glim0h"))))
2882 (build-system python-build-system)
2883 (propagated-inputs
2884 (list python-zope-component
2885 python-zope-i18nmessageid
2886 python-zope-interface
2887 python-zope-location
2888 python-zope-proxy
2889 python-zope-schema))
2890 (native-inputs
2891 (list python-btrees
2892 python-zope-component-bootstrap
2893 python-zope-configuration-bootstrap
2894 python-zope-location-bootstrap
2895 python-zope-testing
2896 python-zope-testrunner))
2897 (home-page "https://pypi.org/project/zope.security/")
2898 (synopsis "Zope security framework")
2899 (description "Zope.security provides a generic mechanism to implement
2900security policies on Python objects.")
2901 (license license:zpl2.1)))
2902
2903(define-public python-zope-security-bootstrap
2904 (package
2905 (inherit (python-zope-bootstrap-package python-zope-security))
2906 (propagated-inputs
2907 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
2908 ("python-zope-interface" ,python-zope-interface)
2909 ("python-zope-proxy" ,python-zope-proxy-bootstrap)
2910 ("python-zope-schema" ,python-zope-schema)))))
2911
2912(define-public python-zope-component
2913 (package
2914 (name "python-zope-component")
2915 (version "4.6.2")
2916 (source
2917 (origin
2918 (method url-fetch)
2919 (uri (pypi-uri "zope.component" version))
2920 (sha256
2921 (base32
2922 "14iwp95hh6q5dj4k9h1iw75cbp89bs27nany4dinyglb44c8jqli"))))
2923 (build-system python-build-system)
2924 (arguments
2925 '(#:phases
2926 (modify-phases %standard-phases
2927 (replace 'check
2928 (lambda* (#:key tests? #:allow-other-keys)
2929 (if tests?
2930 (invoke "python" "setup.py" "test")
2931 (format #t "test suite not run~%")))))))
2932 (native-inputs
2933 `(("python-persistent" ,python-persistent)
2934 ("python-zope-configuration" ,python-zope-configuration-bootstrap)
2935 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
2936 ("python-zope-location" ,python-zope-location-bootstrap)
2937 ("python-zope-proxy" ,python-zope-proxy-bootstrap)
2938 ("python-zope-security" ,python-zope-security-bootstrap)
2939 ("python-zope-testing" ,python-zope-testing)
2940 ("python-zope-testrunner" ,python-zope-testrunner)))
2941 (propagated-inputs
2942 (list python-zope-deferredimport python-zope-deprecation
2943 python-zope-event python-zope-hookable python-zope-interface))
2944 (home-page "https://github.com/zopefoundation/zope.component")
2945 (synopsis "Zope Component Architecture")
2946 (description "Zope.component represents the core of the Zope Component
2947Architecture. Together with the zope.interface package, it provides
2948facilities for defining, registering and looking up components.")
2949 (license license:zpl2.1)))
2950
2951(define-public python-zope-component-bootstrap
2952 (python-zope-bootstrap-package python-zope-component))
2953
2954(define-public python-zope-deferredimport
2955 (package
2956 (name "python-zope-deferredimport")
2957 (version "4.3.1")
2958 (source
2959 (origin
2960 (method url-fetch)
2961 (uri (pypi-uri "zope.deferredimport" version))
2962 (sha256
2963 (base32
2964 "1q89v54dwniiqypjbwywwdfjdr4kdkqlyqsgrpplgvsygdg39cjp"))))
2965 (build-system python-build-system)
2966 (propagated-inputs
2967 (list python-zope-proxy))
2968 (native-inputs
2969 (list python-zope-testrunner))
2970 (home-page "https://github.com/zopefoundation/zope.deferredimport")
2971 (synopsis "Defer imports until used by code")
2972 (description
2973 "Often, especially for package modules, you want to import names for
2974convenience, but not actually perform the imports until necessary. The
2975@code{zope.deferredimport} package provided facilities for defining names in
2976modules that will be imported from somewhere else when used. You can also cause
2977deprecation warnings to be issued when a variable is used.")
2978 (license license:zpl2.1)))
2979
2980(define-public python-ndg-httpsclient
2981 (package
2982 (name "python-ndg-httpsclient")
2983 (version "0.5.1")
2984 (source (origin
2985 (method url-fetch)
2986 (uri (pypi-uri "ndg_httpsclient" version))
2987 (sha256
2988 (base32
2989 "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
2990 (build-system python-build-system)
2991 (arguments
2992 '(;; The tests appear to require networking.
2993 #:tests? #f))
2994 (propagated-inputs
2995 (list python-pyasn1 python-pyopenssl))
2996 (synopsis "HTTPS support for Python's httplib and urllib2")
2997 (description "This is a HTTPS client implementation for httplib and urllib2
2998based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
2999over the default provided with Python and, importantly, enables full
3000verification of the SSL peer.")
3001 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3002 (license license:bsd-3)))
3003
3004(define-public python-websocket-client
3005 (package
3006 (name "python-websocket-client")
3007 (version "1.2.3")
3008 (source
3009 (origin
3010 (method url-fetch)
3011 (uri (pypi-uri "websocket-client" version))
3012 (sha256
3013 (base32 "1xba9z6b211pandrlk2l5p8wj6gn7yfkpq1sxfbqjl6c19n8258k"))))
3014 (build-system python-build-system)
3015 (arguments
3016 `(#:phases
3017 (modify-phases %standard-phases
3018 (add-after 'unpack 'skip-network-test
3019 (lambda _
3020 ;; This test requires networking.
3021 (substitute* "websocket/tests/test_http.py"
3022 (("def testConnect") "def _testConnect"))))
3023 (replace 'check
3024 (lambda* (#:key tests? #:allow-other-keys)
3025 (when tests?
3026 (invoke "pytest" "-vv" "websocket/tests")))))))
3027 (native-inputs
3028 (list python-pysocks python-pytest python-websockets))
3029 (home-page "https://github.com/websocket-client/websocket-client")
3030 (synopsis "WebSocket client for Python")
3031 (description "The Websocket-client module provides the low level APIs for
3032WebSocket usage in Python programs.")
3033 (license license:lgpl2.1+)))
3034
3035(define-public python-websocket-client-0.59
3036 (package
3037 (inherit python-websocket-client)
3038 (version "0.59.0")
3039 (source
3040 (origin
3041 (method url-fetch)
3042 (uri (pypi-uri "websocket-client" version))
3043 (sha256
3044 (base32 "0p0cz2mdissq7iw1n7jrmsfir0jfmgs1dvnpnrx477ffx9hbsxnk"))))))
3045
3046(define-public python-purl
3047 (package
3048 (name "python-purl")
3049 (version "1.5")
3050 (source
3051 (origin
3052 (method url-fetch)
3053 (uri (pypi-uri "purl" version))
3054 (sha256
3055 (base32
3056 "15ibnz1xrh5msmn04j0nr00sz4n7jwx6cwd6zlx99kkz3vpin53m"))))
3057 (build-system python-build-system)
3058 (propagated-inputs (list python-six))
3059 (home-page
3060 "https://github.com/codeinthehole/purl")
3061 (synopsis
3062 "Python package for URL manipulation")
3063 (description
3064 "Purl is a Python package for handling URLs.")
3065 (license license:expat)))
3066
3067(define-public python-apiron
3068 (package
3069 (name "python-apiron")
3070 (version "5.1.0")
3071 (source
3072 (origin
3073 (method url-fetch)
3074 (uri (pypi-uri "apiron" version))
3075 (sha256
3076 (base32 "1qwbqn47sf0aqznj1snbv37v8ijx476qqkjf5l9pac7xjkxsr8qk"))))
3077 (build-system python-build-system)
3078 (arguments
3079 `(#:phases
3080 (modify-phases %standard-phases
3081 (replace 'check
3082 (lambda* (#:key inputs outputs #:allow-other-keys)
3083 (add-installed-pythonpath inputs outputs)
3084 (invoke "pytest" "-vv" "--cov" "-k"
3085 ;; This test tries to connect to the internet.
3086 "not test_call"))))))
3087 (propagated-inputs
3088 (list python-requests))
3089 (native-inputs
3090 (list python-pytest python-pytest-cov))
3091 (home-page "https://github.com/ithaka/apiron")
3092 (synopsis "Python wrapper for interacting with RESTful APIs")
3093 (description
3094 "@code{apiron} provides a declarative, structured configuration of
3095services and endpoints with a unified interface for interacting with RESTful
3096APIs.")
3097 (license license:expat)))
3098
3099(define-public python-beren
3100 (package
3101 (name "python-beren")
3102 (version "0.7.0")
3103 (source
3104 (origin
3105 (method url-fetch)
3106 (uri (pypi-uri "beren" version))
3107 (sha256
3108 (base32 "1v3mdwfqsyza892zvs124ym9w1bkng1j56b7l4dwfjir3723xcgf"))))
3109 (build-system python-build-system)
3110 (arguments
3111 ;; The test tries to open a connection to a remote server.
3112 `(#:tests? #f))
3113 (propagated-inputs
3114 (list python-apiron))
3115 (home-page "https://github.com/teffalump/beren")
3116 (synopsis "REST client for Orthanc DICOM servers")
3117 (description
3118 "@code{beren} provides a REST client for Orthanc, a DICOM server.")
3119 (license license:gpl3+)))
3120
3121(define-public python-requests
3122 (package
3123 (name "python-requests")
3124 (version "2.28.1")
3125 (source (origin
3126 (method url-fetch)
3127 (uri (pypi-uri "requests" version))
3128 (sha256
3129 (base32
3130 "10vrr7bijzrypvms3g2sgz8vya7f9ymmcv423ikampgy0aqrjmbw"))))
3131 (build-system python-build-system)
3132 (propagated-inputs
3133 (list python-certifi
3134 python-charset-normalizer
3135 python-idna
3136 python-urllib3))
3137 (arguments
3138 ;; FIXME: Some tests require network access.
3139 '(#:tests? #f))
3140 (home-page "http://python-requests.org/")
3141 (synopsis "Python HTTP library")
3142 (description
3143 "Requests is a Python HTTP client library. It aims to be easier to use
3144than Python’s urllib2 library.")
3145 (license license:asl2.0)))
3146
3147(define-public python-requests-kerberos
3148 (package
3149 (name "python-requests-kerberos")
3150 (version "0.14.0")
3151 (source (origin
3152 (method url-fetch)
3153 (uri (pypi-uri "requests-kerberos" version))
3154 (sha256
3155 (base32
3156 "1lbgjs779cjxhz07lfl9dbyp3qfh8a3ir2393042wfg518jd3afd"))))
3157 (build-system python-build-system)
3158 (propagated-inputs (list python-cryptography python-pyspnego
3159 python-requests))
3160 (home-page "https://github.com/requests/requests-kerberos")
3161 (synopsis "Kerberos authentication handler for python-requests")
3162 (description "This package provides a Kerberos authentication handler for
3163python-requests.")
3164 (license license:isc)))
3165
3166(define-public python-requests-unixsocket
3167 (package
3168 (name "python-requests-unixsocket")
3169 (version "0.2.0")
3170 (source
3171 (origin
3172 (method url-fetch)
3173 (uri (pypi-uri "requests-unixsocket" version))
3174 (sha256
3175 (base32
3176 "1sn12y4fw1qki5gxy9wg45gmdrxhrndwfndfjxhpiky3mwh1lp4y"))))
3177 (build-system python-build-system)
3178 (arguments
3179 '(#:phases
3180 (modify-phases %standard-phases
3181 (add-after 'unpack 'relax-requirements
3182 (lambda _
3183 (substitute* "test-requirements.txt"
3184 (("(.*)==(.*)" _ name) (string-append name "\n")))))
3185 (replace 'check
3186 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
3187 ;; Avoid a deprecation error.
3188 (substitute* "pytest.ini"
3189 (("--pep8") ""))
3190 (when tests?
3191 (add-installed-pythonpath inputs outputs)
3192 (invoke "pytest" "-vv")))))))
3193 (propagated-inputs
3194 (list python-pbr python-requests python-urllib3))
3195 (native-inputs
3196 (list python-apipkg
3197 python-appdirs
3198 python-execnet
3199 python-packaging
3200 python-pep8
3201 python-py
3202 python-pyparsing
3203 python-pytest
3204 python-pytest-cache
3205 python-pytest-pep8
3206 python-six
3207 python-waitress))
3208 (home-page "https://github.com/msabramo/requests-unixsocket")
3209 (synopsis "Talk HTTP via a UNIX domain socket")
3210 (description
3211 "This Python package lets you use the @code{requests} library to talk
3212HTTP via a UNIX domain socket.")
3213 (license license:asl2.0)))
3214
3215(define-public python-requests_ntlm
3216 (package
3217 (name "python-requests_ntlm")
3218 (version "1.1.0")
3219 (source
3220 (origin
3221 (method url-fetch)
3222 (uri (pypi-uri "requests_ntlm" version))
3223 (sha256
3224 (base32
3225 "0wgbqzaq9w7bas16b7brdb75f91bh3275fb459093bk1ihpck2ci"))))
3226 (build-system python-build-system)
3227 (propagated-inputs
3228 (list python-cryptography python-ntlm-auth python-requests))
3229 (home-page "https://github.com/requests/requests-ntlm")
3230 (synopsis
3231 "NTLM authentication support for Requests")
3232 (description
3233 "This package allows for HTTP NTLM authentication using the requests
3234library.")
3235 (license license:isc)))
3236
3237(define-public python-requests-mock
3238 (package
3239 (name "python-requests-mock")
3240 (version "1.8.0")
3241 (source
3242 (origin
3243 (method url-fetch)
3244 (uri (pypi-uri "requests-mock" version))
3245 (sha256
3246 (base32
3247 "09nj8fmyj7xz2mgwyvbw0fl9zybmx2d3qd2hf529vvjc9s24d3z6"))))
3248 (build-system python-build-system)
3249 (propagated-inputs
3250 (list python-requests python-six))
3251 (native-inputs
3252 (list python-pbr
3253 python-discover
3254 python-docutils
3255 python-fixtures
3256 python-mock
3257 python-purl
3258 python-pytest
3259 python-sphinx
3260 python-testrepository))
3261 (home-page "https://requests-mock.readthedocs.org/")
3262 (synopsis "Mock out responses from the requests package")
3263 (description
3264 "This module provides a building block to stub out the HTTP requests
3265portions of your testing code.")
3266 (license license:asl2.0)))
3267
3268(define-public python-requests-toolbelt
3269 (package
3270 (name "python-requests-toolbelt")
3271 (version "0.9.1")
3272 (source (origin
3273 (method url-fetch)
3274 (uri (pypi-uri "requests-toolbelt" version))
3275 (sha256
3276 (base32
3277 "1h3gm88dcjbd7gm229a7x5qkkhnsqsjz0m0l2xyavm2ab3a8k04n"))))
3278 (build-system python-build-system)
3279 (arguments
3280 '(#:phases (modify-phases %standard-phases
3281 (add-after 'unpack 'delete-problematic-tests
3282 (lambda _
3283 ;; Fails because of expired certificate.
3284 (delete-file "tests/test_x509_adapter.py")
3285 ;; Fails due to networking (socket.gaierror: [Errno -2]
3286 ;; Name or service not known).
3287 (delete-file "tests/test_multipart_encoder.py"))))))
3288 (native-inputs
3289 (list python-betamax python-mock python-pytest))
3290 (propagated-inputs
3291 (list python-requests))
3292 (synopsis "Extensions to python-requests")
3293 (description "This is a toolbelt of useful classes and functions to be used
3294with python-requests.")
3295 (home-page "https://github.com/requests/toolbelt/")
3296 (license license:asl2.0)))
3297
3298(define-public python-requests-ftp
3299 (package
3300 (name "python-requests-ftp")
3301 (version "0.3.1")
3302 (source
3303 (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "requests-ftp" version))
3306 (sha256
3307 (base32
3308 "0yh5v21v36dsjsgv4y9dx4mmz35741l5jf6pbq9w19d8rfsww13m"))))
3309 (build-system python-build-system)
3310 (propagated-inputs
3311 (list python-requests))
3312 (home-page
3313 "https://github.com/Lukasa/requests-ftp")
3314 (synopsis "FTP Transport Adapter for Requests")
3315 (description
3316 "Requests-FTP is an implementation of a simple FTP transport
3317adapter for use with the Requests library.")
3318 (license license:asl2.0)))
3319
3320(define-public python-aioftp
3321 (package
3322 (name "python-aioftp")
3323 (version "0.21.4")
3324 (source (origin
3325 (method url-fetch)
3326 (uri (pypi-uri "aioftp" version))
3327 (sha256
3328 (base32
3329 "1f8vql2j2b3ykqyh5bxzsp8x5f2if2c1ya232ld3hz3cc7a2dfr8"))))
3330 (build-system python-build-system)
3331 (arguments
3332 (list #:phases #~(modify-phases %standard-phases
3333 (replace 'check
3334 (lambda* (#:key tests? #:allow-other-keys)
3335 (when tests?
3336 (invoke "pytest" "-vvv")))))))
3337 (native-inputs (list python-async-timeout python-pytest
3338 python-pytest-asyncio python-pytest-cov
3339 python-trustme))
3340 (propagated-inputs (list python-siosocks))
3341 (home-page "https://aioftp.readthedocs.io/")
3342 (synopsis "FTP client/server for asyncio in Python")
3343 (description
3344 "FTP client and server for asyncio (Python 3) Library implementing FTP
3345protocol, both client and server for Python asyncio module.
3346
3347 Supported commands as client: USER, PASS, ACCT, PWD, CWD, CDUP, MKD, RMD,
3348 MLSD, MLST, RNFR, RNTO, DELE, STOR, APPE, RETR, TYPE, PASV, ABOR, QUIT,
3349 REST, LIST (as fallback).
3350
3351 Supported commands as server: USER, PASS, QUIT, PWD, CWD, CDUP, MKD, RMD,
3352 MLSD, LIST (non-standard), MLST, RNFR, RNTO, DELE, STOR, RETR,
3353 TYPE (\"I\" and \"A\"), PASV, ABOR, APPE, REST.")
3354 (license license:asl2.0)))
3355
3356(define-public python-msal
3357 (package
3358 (name "python-msal")
3359 (version "1.22.0")
3360 (home-page
3361 "https://github.com/AzureAD/microsoft-authentication-library-for-python")
3362 (source (origin
3363 (method git-fetch)
3364 ;; Pypi does not have tests.
3365 (uri (git-reference (url home-page) (commit version)))
3366 (file-name (git-file-name name version))
3367 (sha256
3368 (base32
3369 "1pgpf8fa0mdga69hr6i66mq2a2vyn8dlcf4fdzqmbgw2il9b37q6"))))
3370 (build-system python-build-system)
3371 (arguments
3372 ;; Tests (all?) rely on network access and only some can be disabled by
3373 ;; setting the environment variable TRAVIS_TAG.
3374 (list #:tests? #f))
3375 (native-inputs (list python-mock))
3376 (propagated-inputs (list python-cryptography python-pyjwt python-requests))
3377 (synopsis "Microsoft Authentication Library (MSAL) for Python")
3378 (description
3379 "The Microsoft Authentication Library for Python enables applications to
3380integrate with the Microsoft identity platform. It allows you to sign in
3381users or apps with Microsoft identities (Azure AD, Microsoft Accounts and
3382Azure AD B2C accounts) and obtain tokens to call Microsoft APIs such as
3383Microsoft Graph or your own APIs registered with the Microsoft identity
3384platform. It is built using industry standard OAuth2 and OpenID Connect
3385protocols.")
3386 (license license:expat)))
3387
3388(define-public oauth2ms
3389 (let ((commit "a1ef0cabfdea57e9309095954b90134604e21c08")
3390 (revision "0"))
3391 (package
3392 (name "oauth2ms")
3393 (version (git-version "0.0.0" revision commit))
3394 (source (origin
3395 (method git-fetch)
3396 (uri (git-reference
3397 (url "https://github.com/harishkrupo/oauth2ms")
3398 (commit commit)))
3399 (file-name (git-file-name name version))
3400 (sha256
3401 (base32
3402 "0dqi6n4npdrvb42r672n4sl1jl8z5lsk554fwiiihpj0faa9dx64"))))
3403 (build-system copy-build-system)
3404 (arguments
3405 (list #:install-plan #~`(("oauth2ms" "bin/oauth2ms")
3406 ("." #$(string-append "share/doc/" name "-"
3407 version "/")
3408 #:include-regexp ("\\.org$")))
3409 #:phases #~(modify-phases %standard-phases
3410 (add-after 'install 'wrap-pythonpath
3411 (lambda* (#:key inputs outputs #:allow-other-keys)
3412 (let ((path (getenv "GUIX_PYTHONPATH")))
3413 (wrap-program (string-append #$output
3414 "/bin/oauth2ms")
3415 `("GUIX_PYTHONPATH" ":" prefix
3416 (,path)))))))))
3417 (inputs (list bash-minimal python python-gnupg python-msal python-pyxdg))
3418 (home-page "https://github.com/harishkrupo/oauth2ms")
3419 (synopsis "XOAUTH2 compatible Microsoft Office 365 token fetcher")
3420 (description
3421 "Oauth2ms can be used to fetch OAuth 2.0 tokens from the Microsoft Identity
3422endpoint. Additionally, it can encode the token in the XOAUTH2 format to be
3423used as authentication in IMAP mail servers.")
3424 (license license:asl2.0))))
3425
3426(define-public python-oauthlib
3427 (package
3428 (name "python-oauthlib")
3429 (version "3.1.0")
3430 (source (origin
3431 (method url-fetch)
3432 (uri (pypi-uri "oauthlib" version))
3433 (sha256
3434 (base32
3435 "12gqnabwck30gdlpwm6af3s28qm9p2yc7b1w8s4fk9ncbz1irr5y"))))
3436 (build-system python-build-system)
3437 (arguments
3438 `(#:phases (modify-phases %standard-phases
3439 (replace 'check
3440 (lambda _
3441 (invoke "pytest" "-vv"))))))
3442 (native-inputs
3443 (list python-pytest python-pytest-cov python-mock))
3444 (propagated-inputs
3445 (list python-cryptography python-pyjwt python-blinker))
3446 (home-page "https://github.com/oauthlib/oauthlib")
3447 (synopsis "OAuth implementation for Python")
3448 (description
3449 "Oauthlib is a generic, spec-compliant, thorough implementation of the
3450OAuth request-signing logic.")
3451 (license license:bsd-3)))
3452
3453(define-public python-rauth
3454 (package
3455 (name "python-rauth")
3456 (version "0.7.3")
3457 (source
3458 (origin
3459 (method url-fetch)
3460 (uri (pypi-uri "rauth" version))
3461 (sha256
3462 (base32
3463 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
3464 (build-system python-build-system)
3465 (arguments
3466 `(#:test-target "check"))
3467 (propagated-inputs
3468 (list python-requests))
3469 (home-page "https://github.com/litl/rauth")
3470 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
3471 (description
3472 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
3473provides service wrappers for convenient connection initialization and
3474authenticated session objects providing things like keep-alive.")
3475 (license license:expat)))
3476
3477(define-public python-unalix
3478 (package
3479 (name "python-unalix")
3480 (version "0.9")
3481 (source
3482 (origin
3483 ;; There's only a wheel on PyPI.
3484 (method git-fetch)
3485 (uri (git-reference
3486 (url "https://github.com/AmanoTeam/Unalix")
3487 (commit (string-append "v" version))))
3488 (file-name (git-file-name name version))
3489 (sha256
3490 (base32 "0h8wc1axv26h753a8brc6dccqndx005c2bhr09gwg5c1hj9zsfml"))))
3491 (build-system python-build-system)
3492 (native-inputs (list python-pytest))
3493 (arguments
3494 '(#:phases
3495 (modify-phases %standard-phases
3496 (replace 'check
3497 (lambda* (#:key tests? #:allow-other-keys)
3498 (when tests?
3499 (invoke "pytest")))))))
3500 (home-page "https://pypi.org/project/Unalix/")
3501 (synopsis "Python library for removing tracking fields from URLs")
3502 (description "Unalix is a library written in Python implementing the
3503specification used by the @url{https://github.com/ClearURLs/Addon, ClearURLs}
3504addon for removing tracking fields from URLs.")
3505 (license license:lgpl3+)))
3506
3507(define-public python-urllib3
3508 (package
3509 (name "python-urllib3")
3510 (version "1.26.15")
3511 (source
3512 (origin
3513 (method url-fetch)
3514 (uri (pypi-uri "urllib3" version))
3515 (sha256
3516 (base32
3517 "01dkqv0rsjqyw4wrp6yj8h3bcnl7c678qkj845596vs7p4bqff4a"))))
3518 (build-system python-build-system)
3519 (arguments `(#:tests? #f))
3520 (propagated-inputs
3521 (append
3522 ;; These 5 inputs are used to build urrlib3[secure]
3523 (list python-certifi)
3524 (if (member (%current-system)
3525 (package-transitive-supported-systems python-cryptography))
3526 (list python-cryptography)
3527 '())
3528 (list python-idna)
3529 (if (member (%current-system)
3530 (package-transitive-supported-systems python-pyopenssl))
3531 (list python-pyopenssl)
3532 '())
3533 (list python-pysocks)))
3534 (home-page "https://urllib3.readthedocs.io/")
3535 (synopsis "HTTP library with thread-safe connection pooling")
3536 (description
3537 "Urllib3 supports features left out of urllib and urllib2 libraries. It
3538can reuse the same socket connection for multiple requests, it can POST files,
3539supports url redirection and retries, and also gzip and deflate decoding.")
3540 (license license:expat)))
3541
3542(define-public awscli
3543 (package
3544 ;; Note: updating awscli typically requires updating botocore as well.
3545 (name "awscli")
3546 (version "1.22.90")
3547 (source
3548 (origin
3549 (method url-fetch)
3550 (uri (pypi-uri name version))
3551 (sha256
3552 (base32
3553 "0ky4ax4xh7s8w1l0hwc7w9ii8afvh9nib3kz09qhiqdinxzrlv54"))))
3554 (build-system python-build-system)
3555 (arguments
3556 ;; FIXME: The 'pypi' release does not contain tests.
3557 '(#:tests? #f
3558 #:phases
3559 (modify-phases %standard-phases
3560 (add-after 'unpack 'use-recent-pyyaml
3561 (lambda _
3562 (substitute* '("awscli.egg-info/requires.txt"
3563 "setup.cfg"
3564 "setup.py")
3565 (("<5.5") "<=6"))))
3566 (add-after 'unpack 'fix-reference-to-groff
3567 (lambda* (#:key inputs #:allow-other-keys)
3568 (substitute* "awscli/help.py"
3569 (("if not self._exists_on_path\\('groff'\\):") "")
3570 (("raise ExecutableNotFoundError\\('groff'\\)") "")
3571 (("cmdline = \\['groff'")
3572 (string-append "cmdline = ['"
3573 (search-input-file inputs "bin/groff")
3574 "'"))))))))
3575 (inputs
3576 (list groff
3577 python-colorama-for-awscli
3578 python-botocore
3579 python-s3transfer
3580 python-docutils-0.15
3581 python-pyyaml
3582 python-rsa))
3583 (home-page "https://aws.amazon.com/cli/")
3584 (synopsis "Command line client for AWS")
3585 (description "AWS CLI provides a unified command line interface to the
3586Amazon Web Services (AWS) API.")
3587 (license license:asl2.0)))
3588
3589(define-public awscli-2
3590 (package
3591 (inherit awscli)
3592 (name "awscli")
3593 (version "2.2.0")
3594 (source
3595 (origin
3596 (method url-fetch)
3597 (uri (pypi-uri (string-append name "v2") version))
3598 (sha256
3599 (base32
3600 "0g1icsy2l4n540gnhliypy830dfp08hpfc3rk12dlxgc9v3ra4wl"))))
3601 (arguments
3602 ;; FIXME: The 'pypi' release does not contain tests.
3603 '(#:tests? #f))
3604 (inputs
3605 (list python-importlib-resources
3606 python-executor))))
3607
3608
3609(define-public python-wsgiproxy2
3610 (package
3611 (name "python-wsgiproxy2")
3612 (version "0.4.6")
3613 (source
3614 (origin
3615 (method url-fetch)
3616 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
3617 (sha256
3618 (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
3619 (build-system python-build-system)
3620 (native-inputs
3621 (list python-webtest))
3622 (propagated-inputs
3623 (list python-requests python-six python-urllib3 python-webob))
3624 (home-page "https://github.com/gawel/WSGIProxy2/")
3625 (synopsis "WSGI Proxy with various http client backends")
3626 (description "WSGI turns HTTP requests into WSGI function calls.
3627WSGIProxy turns WSGI function calls into HTTP requests.
3628It also includes code to sign requests and pass private data,
3629and to spawn subprocesses to handle requests.")
3630 (license license:expat)))
3631
3632(define-public python-pastedeploy
3633 (package
3634 (name "python-pastedeploy")
3635 (version "2.1.1")
3636 (source
3637 (origin
3638 (method url-fetch)
3639 (uri (pypi-uri "PasteDeploy" version))
3640 (sha256
3641 (base32 "05s88qdjdwd9d9qs13fap7nqgxs7qs5qfzzjbrc5va13k2mxdskd"))))
3642 (build-system python-build-system)
3643 (arguments
3644 '(#:test-target "pytest"))
3645 (native-inputs
3646 (list python-pytest python-pytest-runner))
3647 (home-page "https://pylonsproject.org/")
3648 (synopsis
3649 "Load, configure, and compose WSGI applications and servers")
3650 (description
3651 "This tool provides code to load WSGI applications and servers from URIs;
3652these URIs can refer to Python Eggs for INI-style configuration files. Paste
3653Script provides commands to serve applications based on this configuration
3654file.")
3655 (license license:expat)))
3656
3657(define-public python-webtest
3658 (package
3659 (name "python-webtest")
3660 (version "2.0.35")
3661 (source
3662 (origin
3663 (method url-fetch)
3664 (uri (pypi-uri "WebTest" version))
3665 (sha256
3666 (base32 "11xhgdj251zkvz5w30fvspii08ki2vrpr1im9sph1wmlnasnihda"))))
3667 (build-system python-build-system)
3668 (arguments
3669 ;; Tests require python-pyquery, which creates a circular dependency.
3670 `(#:tests? #f))
3671 (propagated-inputs
3672 (list python-waitress python-webob python-six python-beautifulsoup4))
3673 (home-page "https://docs.pylonsproject.org/projects/webtest/")
3674 (synopsis "Helper to test WSGI applications")
3675 (description "Webtest allows you to test your Python web applications
3676without starting an HTTP server. It supports anything that supports the
3677minimum of WSGI.")
3678 (license license:expat)))
3679
3680(define-public python-flask
3681 (package
3682 (name "python-flask")
3683 (version "2.1.1")
3684 (source (origin
3685 (method url-fetch)
3686 (uri (pypi-uri "Flask" version))
3687 (sha256
3688 (base32
3689 "1j0rjly2yhbm566lq2s8543fs7fz86f77abps539djcfalzbvjd8"))))
3690 (build-system python-build-system)
3691 (arguments
3692 '(#:phases
3693 (modify-phases %standard-phases
3694 (replace 'check
3695 (lambda* (#:key tests? #:allow-other-keys)
3696 (when tests?
3697 (invoke "pytest" "-vv" "tests")))))))
3698 (native-inputs
3699 (list python-pytest))
3700 (propagated-inputs
3701 (list python-asgiref ;async extra
3702 python-click
3703 python-importlib-metadata
3704 python-itsdangerous
3705 python-jinja2
3706 python-werkzeug))
3707 (home-page "https://palletsprojects.com/p/flask/")
3708 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
3709 (description "Flask is a micro web framework based on the Werkzeug toolkit
3710and Jinja2 template engine. It is called a micro framework because it does not
3711presume or force a developer to use a particular tool or library.")
3712 (license license:bsd-3)))
3713
3714(define-public python-flask-compress
3715 (package
3716 (name "python-flask-compress")
3717 (version "1.13")
3718 (source (origin
3719 (method url-fetch)
3720 (uri (pypi-uri "Flask-Compress" version))
3721 (sha256
3722 (base32
3723 "178jzz6jxlxllcjqamzh5q7ahfh90m5cl1il9vmjs3xhz65z35pf"))))
3724 (build-system pyproject-build-system)
3725 (propagated-inputs (list python-brotli python-flask))
3726 (native-inputs (list python-setuptools-scm))
3727 (home-page "https://github.com/colour-science/flask-compress")
3728 (synopsis "Compress responses in a Flask app")
3729 (description
3730 "This package lets you compress Flask application responses and static
3731files with gzip, deflate or brotli. Flask-Compress both adds the various
3732headers required for a compressed response and compresses the response data.")
3733 (license license:expat)))
3734
3735(define-public python-flask-seasurf
3736 (package
3737 (name "python-flask-seasurf")
3738 (version "1.1.1")
3739 (source (origin
3740 (method url-fetch)
3741 (uri (pypi-uri "Flask-SeaSurf" version))
3742 (sha256
3743 (base32
3744 "1aaib4n27q0f2alp87mhv3f79vg7qckp71rphbd0mb39qw470lsl"))))
3745 (build-system pyproject-build-system)
3746 (arguments
3747 (list #:tests? #false)) ;there are none
3748 (propagated-inputs (list python-flask))
3749 (home-page "https://github.com/maxcountryman/flask-seasurf/")
3750 (synopsis "CSRF extension for Flask")
3751 (description "SeaSurf is a Flask extension for preventing cross-site
3752request forgery (CSRF). CSRF attacks are problematic because the mechanism
3753they use is relatively easy to exploit. This extension attempts to aid you in
3754securing your application from such attacks. This extension is based on the
3755Django middleware.")
3756 (license license:bsd-3)))
3757
3758(define-public python-flask-wtf
3759 (package
3760 (name "python-flask-wtf")
3761 (version "1.0.1")
3762 (source
3763 (origin
3764 (method url-fetch)
3765 (uri (pypi-uri "Flask-WTF" version))
3766 (sha256
3767 (base32
3768 "1jd614662r6ifh4svs8zfwm4k8bal5z3n6pq607bas8gxrpmrzil"))))
3769 (build-system python-build-system)
3770 (arguments
3771 '(#:phases
3772 (modify-phases %standard-phases
3773 (replace 'check
3774 (lambda _
3775 (invoke "pytest" "-vv"))))))
3776 (propagated-inputs
3777 (list python-flask python-itsdangerous python-wtforms))
3778 (native-inputs
3779 (list python-pytest))
3780 (home-page "https://github.com/lepture/flask-wtf")
3781 (synopsis "Simple integration of Flask and WTForms")
3782 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
3783upload, and reCAPTCHA.")
3784 (license license:bsd-3)))
3785
3786(define-public python-flask-multistatic
3787 (package
3788 (name "python-flask-multistatic")
3789 (version "1.0")
3790 (source
3791 (origin
3792 (method url-fetch)
3793 (uri (pypi-uri "flask-multistatic" version))
3794 (sha256
3795 (base32
3796 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
3797 (build-system python-build-system)
3798 (propagated-inputs
3799 (list python-flask))
3800 (home-page "https://pagure.io/flask-multistatic")
3801 (synopsis "Flask plugin to allow overriding static files")
3802 (description "@code{flask-multistatic} is a flask plugin that adds support
3803for overriding static files.")
3804 (license license:gpl3+)))
3805
3806(define-public python-cookies
3807 (package
3808 (name "python-cookies")
3809 (version "2.2.1")
3810 (source (origin
3811 (method url-fetch)
3812 (uri (pypi-uri "cookies" version))
3813 (sha256
3814 (base32
3815 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
3816 (build-system python-build-system)
3817 (arguments
3818 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
3819 #:tests? #f))
3820 (native-inputs
3821 (list python-pytest))
3822 (synopsis "HTTP cookie parser and renderer")
3823 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
3824Python.")
3825 (home-page "https://gitlab.com/sashahart/cookies")
3826 (license license:expat)))
3827
3828(define-public python-responses
3829 (package
3830 (name "python-responses")
3831 (version "0.22.0")
3832 (source (origin
3833 (method url-fetch)
3834 (uri (pypi-uri "responses" version))
3835 (sha256
3836 (base32
3837 "0bhhffwl0zqin4xc89nc97ynzr7l3j4b8rjqk9w9flnj2cmcnsir"))))
3838 (build-system python-build-system)
3839 (arguments
3840 '(#:phases
3841 (modify-phases %standard-phases
3842 (replace 'check
3843 (lambda* (#:key tests? #:allow-other-keys)
3844 (when tests?
3845 (invoke "pytest" "-v")))))))
3846 (native-inputs
3847 (list python-pytest
3848 python-pytest-asyncio
3849 python-pytest-httpserver))
3850 (propagated-inputs
3851 (list python-requests
3852 python-toml
3853 python-types-toml
3854 python-typing-extensions
3855 python-urllib3))
3856 (home-page "https://github.com/getsentry/responses")
3857 (synopsis "Utility for mocking out the `requests` Python library")
3858 (description "A utility library for mocking out the `requests` Python
3859library.")
3860 (license license:asl2.0)))
3861
3862(define-public python-grequests
3863 (package
3864 (name "python-grequests")
3865 (version "0.3.0")
3866 (source
3867 (origin
3868 (method url-fetch)
3869 (uri (pypi-uri "grequests" version))
3870 (sha256
3871 (base32
3872 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
3873 (build-system python-build-system)
3874 (propagated-inputs
3875 (list python-gevent python-requests))
3876 (native-inputs
3877 (list python-nose python-zope-interface python-zope-event))
3878 (home-page "https://github.com/kennethreitz/grequests")
3879 (synopsis "Python library for asynchronous HTTP requests")
3880 (description "GRequests is a Python library that allows you to use
3881@code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
3882 (license license:bsd-2)))
3883
3884(define-public python-gwebsockets
3885 (package
3886 (name "python-gwebsockets")
3887 (version "0.7")
3888 (source (origin
3889 (method url-fetch)
3890 (uri (pypi-uri "gwebsockets" version))
3891 (sha256
3892 (base32
3893 "0kgq7wssz0mrhxdafkfc9prj0qjv9z0lyivyqvjvjnnypg54di7m"))))
3894 (build-system python-build-system)
3895 (propagated-inputs
3896 (list python-pygobject))
3897 (home-page "https://github.com/sugarlabs/gwebsockets")
3898 (synopsis "GLib based websockets server")
3899 (description "This package provides a websocket server written in Python.
3900It uses GIO for network communication and hence it easily integrates with the
3901GLib mainloop.")
3902 (license license:asl2.0)))
3903
3904(define-public python-dpkt
3905 (package
3906 (name "python-dpkt")
3907 (version "1.9.4")
3908 (source
3909 (origin
3910 (method url-fetch)
3911 (uri (pypi-uri "dpkt" version))
3912 (sha256
3913 (base32
3914 "1d28r8pmhzjjd6hrn1xcddinfhwv8lcl1s59ygmqa8kfmz5pkrgl"))))
3915 (build-system python-build-system)
3916 (home-page "https://github.com/kbandla/dpkt")
3917 (synopsis "Packet generator and parser for TCP/IP protocols")
3918 (description "The dpkt module is a fast, simple packet generator and parser
3919for the basic TCP/IP protocols.")
3920 (license license:bsd-3)))
3921
3922(define-public python-geventhttpclient
3923 (package
3924 (name "python-geventhttpclient")
3925 (version "2.0.9")
3926 (source (origin
3927 (method url-fetch)
3928 (uri (pypi-uri "geventhttpclient" version))
3929 (sha256
3930 (base32
3931 "04qmcc7qpnif70ph61339dcld4g107fkhpa0gdmbs8z98v9kkg4a"))
3932 (modules '((guix build utils)))
3933 (snippet
3934 '(begin
3935 ;; Delete pre-compiled files.
3936 (for-each delete-file (find-files "src/geventhttpclient"
3937 ".*\\.pyc"))))))
3938 (build-system python-build-system)
3939 (arguments
3940 '(#:phases
3941 (modify-phases %standard-phases
3942 (add-after 'unpack 'delete-network-tests
3943 (lambda _
3944 (delete-file "src/geventhttpclient/tests/test_client.py")))
3945 (add-after 'unpack 'fix-compatibility-issue
3946 ;; See: https://github.com/gwik/geventhttpclient/issues/137.
3947 (lambda _
3948 (substitute* "src/geventhttpclient/tests/test_ssl.py"
3949 ((".*sock.last_seen_sni = None.*")
3950 ""))))
3951 (replace 'check
3952 (lambda* (#:key tests? #:allow-other-keys)
3953 (when tests?
3954 (invoke "pytest" "src/geventhttpclient/tests" "-v"
3955 ;; Append the test modules to sys.path to avoid
3956 ;; namespace conflict which breaks SSL tests.
3957 "--import-mode=append")))))))
3958 (native-inputs (list python-dpkt python-pytest))
3959 (propagated-inputs (list python-brotli python-certifi python-gevent
3960 python-six python-urllib3))
3961 (home-page "https://github.com/geventhttpclient/geventhttpclient")
3962 (synopsis "HTTP client library for gevent")
3963 (description "@code{python-geventhttpclient} is a high performance,
3964concurrent HTTP client library for python using @code{gevent}.")
3965 (license license:expat)))
3966
3967(define-public python-requests-oauthlib
3968 (package
3969 (name "python-requests-oauthlib")
3970 (version "1.2.0")
3971 (source
3972 (origin
3973 (method url-fetch)
3974 (uri (pypi-uri "requests-oauthlib" version))
3975 (sha256
3976 (base32
3977 "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
3978 (build-system python-build-system)
3979 (arguments
3980 `(#:phases
3981 (modify-phases %standard-phases
3982 ;; removes tests that require network access
3983 (add-before 'check 'pre-check
3984 (lambda _
3985 (delete-file "tests/test_core.py")
3986 #t)))))
3987 (native-inputs
3988 (list python-pyjwt python-requests-mock python-mock))
3989 (propagated-inputs
3990 (list python-oauthlib python-requests))
3991 (home-page
3992 "https://github.com/requests/requests-oauthlib")
3993 (synopsis
3994 "OAuthlib authentication support for Requests")
3995 (description
3996 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
3997provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
3998 (license license:isc)))
3999
4000(define-public python-url
4001 (package
4002 (name "python-url")
4003 (version "0.2.0")
4004 (source (origin
4005 (method url-fetch)
4006 (uri (pypi-uri "url" version))
4007 (sha256
4008 (base32
4009 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
4010 (build-system python-build-system)
4011 (propagated-inputs
4012 (list python-publicsuffix))
4013 (native-inputs
4014 (list python-coverage python-nose))
4015 (arguments
4016 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
4017 (home-page "https://github.com/seomoz/url-py")
4018 (synopsis "URL Parsing")
4019 (description "Library for parsing urls.")
4020 (license license:expat)))
4021
4022(define-public python-cachecontrol
4023 (package
4024 (name "python-cachecontrol")
4025 (version "0.12.10")
4026 (source
4027 (origin
4028 (method git-fetch)
4029 ;; Pypi does not have tests.
4030 (uri (git-reference
4031 (url "https://github.com/ionrock/cachecontrol")
4032 (commit (string-append "v" version))))
4033 (file-name (git-file-name name version))
4034 (sha256
4035 (base32
4036 "0fviacb13h72l5c77p35lgr6kvlidfdb9xsicg3v6lblmp9cn2ws"))))
4037 (build-system python-build-system)
4038 (arguments
4039 ;; Versions > 0.11.6 depend on CherryPy for testing.
4040 ;; It's too much work to package CherryPy for now.
4041 `(#:tests? #f))
4042 (propagated-inputs
4043 (list python-requests python-msgpack python-lockfile))
4044 (home-page "https://github.com/ionrock/cachecontrol")
4045 (synopsis "The httplib2 caching algorithms for use with requests")
4046 (description "CacheControl is a port of the caching algorithms in
4047@code{httplib2} for use with @code{requests} session objects.")
4048 (license license:asl2.0)))
4049
4050(define-public python-cachecontrol-0.11
4051 (package
4052 (inherit python-cachecontrol)
4053 (name "python-cachecontrol")
4054 (version "0.11.7")
4055 (source
4056 (origin
4057 (method url-fetch)
4058 (uri (pypi-uri "CacheControl" version))
4059 (sha256
4060 (base32
4061 "07jsfhlbcwgqg6ayz8nznzaqg5rmxqblbzxz1qvg5wc44pcjjy4g"))))))
4062
4063(define-public python-betamax
4064 (package
4065 (name "python-betamax")
4066 (version "0.8.1")
4067 (source
4068 (origin
4069 (method url-fetch)
4070 (uri (pypi-uri "betamax" version))
4071 (sha256
4072 (base32
4073 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
4074 (build-system python-build-system)
4075 (arguments
4076 '(;; Many tests fail because they require networking.
4077 #:tests? #f))
4078 (propagated-inputs
4079 (list python-requests))
4080 (home-page "https://github.com/sigmavirus24/betamax")
4081 (synopsis "Record HTTP interactions with python-requests")
4082 (description "Betamax will record your test suite's HTTP interactions and
4083replay them during future tests. It is designed to work with python-requests.")
4084 (license license:expat)))
4085
4086(define-public python-betamax-matchers
4087 (package
4088 (name "python-betamax-matchers")
4089 (version "0.4.0")
4090 (source
4091 (origin
4092 (method url-fetch)
4093 (uri (pypi-uri "betamax-matchers" version))
4094 (sha256
4095 (base32
4096 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
4097 (build-system python-build-system)
4098 (propagated-inputs
4099 (list python-betamax python-requests-toolbelt))
4100 (home-page "https://github.com/sigmavirus24/betamax_matchers")
4101 (synopsis "VCR imitation for python-requests")
4102 (description "@code{betamax-matchers} provides a set of Matchers for
4103Betamax.")
4104 (license license:asl2.0)))
4105
4106(define-public python-betamax-serializers
4107 (package
4108 (name "python-betamax-serializers")
4109 (version "0.2.1")
4110 (source
4111 (origin
4112 (method url-fetch)
4113 (uri (pypi-uri "betamax-serializers" version))
4114 (sha256
4115 (base32 "0ja9isbjmzzhxdj69s0kdsvw8nkp073w6an6a4liy5vk3fdl2p1l"))))
4116 (build-system python-build-system)
4117 (propagated-inputs
4118 (list python-betamax python-pyyaml))
4119 (synopsis "Set of third-party serializers for Betamax")
4120 (description "Betamax-Serializers are an experimental set of Serializers for
4121Betamax that may possibly end up in the main package.")
4122 (home-page "https://gitlab.com/betamax/serializers")
4123 (license license:asl2.0)))
4124
4125(define-public python-s3transfer
4126 (package
4127 (name "python-s3transfer")
4128 (version "0.5.0")
4129 (source (origin
4130 (method url-fetch)
4131 (uri (pypi-uri "s3transfer" version))
4132 (sha256
4133 (base32
4134 "0k6sc956yrrv9b4laa0r79jhxajpyxr21jcd1ka8m1n53lz85vah"))))
4135 (build-system python-build-system)
4136 (arguments
4137 `(#:phases
4138 (modify-phases %standard-phases
4139 (replace 'check
4140 (lambda* (#:key tests? #:allow-other-keys)
4141 (when tests?
4142 ;; Some of the 'integration' tests require network access or
4143 ;; login credentials.
4144 (invoke "nosetests" "--exclude=integration")))))))
4145 (native-inputs
4146 (list python-docutils python-mock python-nose))
4147 (propagated-inputs
4148 (list python-botocore python-urllib3))
4149 (synopsis "Amazon S3 Transfer Manager")
4150 (description "S3transfer is a Python library for managing Amazon S3
4151transfers.")
4152 (home-page "https://github.com/boto/s3transfer")
4153 (license license:asl2.0)))
4154
4155(define-public python-flask-jwt
4156 (package
4157 (name "python-flask-jwt")
4158 (version "0.3.2")
4159 (source (origin
4160 (method url-fetch)
4161 (uri (pypi-uri "Flask-JWT" version))
4162 (sha256
4163 (base32
4164 "1bfh7cr0sf65rn4h1q67472y6ml9s8c4k0xxfhrwvwg0plpngh29"))))
4165 (build-system pyproject-build-system)
4166 (arguments
4167 (list
4168 #:phases
4169 '(modify-phases %standard-phases
4170 (add-after 'unpack 'compatibility
4171 (lambda _
4172 (substitute* "setup.cfg"
4173 (("\\[pytest\\]") "[tool:pytest]"))
4174 (substitute* "requirements.txt"
4175 (("PyJWT>=1.4.0,<1.5.0") "PyJWT>=2.0.0"))
4176 (substitute* '("tests/test_jwt.py"
4177 "flask_jwt/__init__.py")
4178 (("access_token.decode\\('utf-8'\\)") "access_token")))))))
4179 (propagated-inputs (list python-flask python-pyjwt))
4180 (native-inputs (list python-pytest))
4181 (home-page "https://github.com/mattupstate/flask-jwt")
4182 (synopsis "JWT token authentication for Flask apps")
4183 (description "This package implements JWT token authentication for Flask
4184apps.")
4185 (license license:expat)))
4186
4187(define-public python-flask-restful
4188 (package
4189 (name "python-flask-restful")
4190 (version "0.3.9")
4191 (source
4192 (origin
4193 (method url-fetch)
4194 (uri (pypi-uri "Flask-RESTful" version))
4195 (sha256
4196 (base32
4197 "0gm5dz088v3d2k1dkcp9b3nnqpkk0fp2jly870hijj2xhc5nbv6c"))))
4198 (build-system pyproject-build-system)
4199 (arguments
4200 ;; This test fails because '/' is not 'http://localhost/'.
4201 (list #:test-flags '(list "-k" "not test_redirect")))
4202 (propagated-inputs
4203 (list python-aniso8601 python-flask python-pytz))
4204 (native-inputs
4205 (list python-blinker
4206 python-mock
4207 python-pytest))
4208 (home-page "https://www.github.com/flask-restful/flask-restful/")
4209 (synopsis "Flask module for creating REST APIs")
4210 (description
4211 "This package contains a Flask module for creating REST APIs.")
4212 (license license:bsd-3)))
4213
4214(define-public python-flask-basicauth
4215 (package
4216 (name "python-flask-basicauth")
4217 (version "0.2.0")
4218 (source
4219 (origin
4220 (method url-fetch)
4221 (uri (pypi-uri "Flask-BasicAuth" version))
4222 (sha256
4223 (base32
4224 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
4225 (build-system python-build-system)
4226 (arguments
4227 `(#:phases (modify-phases %standard-phases
4228 (add-after 'unpack 'fix-imports
4229 (lambda _
4230 (substitute* '("docs/index.rst"
4231 "docs/conf.py"
4232 "flask_basicauth.py"
4233 "test_basicauth.py")
4234 (("flask\\.ext\\.basicauth")
4235 "flask_basicauth"))
4236 #t)))))
4237 (propagated-inputs
4238 (list python-flask))
4239 (home-page "https://github.com/jpvanhal/flask-basicauth")
4240 (synopsis "HTTP basic access authentication for Flask")
4241 (description
4242 "This package provides HTTP basic access authentication for Flask.")
4243 (license license:bsd-3)))
4244
4245(define-public python-flask-htpasswd
4246 (package
4247 (name "python-flask-htpasswd")
4248 (version "0.3.1")
4249 (source
4250 (origin
4251 (method url-fetch)
4252 (uri (pypi-uri "flask-htpasswd" version))
4253 (sha256
4254 (base32
4255 "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
4256 (build-system python-build-system)
4257 (propagated-inputs
4258 (list python-flask python-itsdangerous python-passlib python-tox))
4259 (home-page "https://github.com/carsongee/flask-htpasswd")
4260 (synopsis "Basic authentication via htpasswd files in Flask applications")
4261 (description "This package provides Basic authentication via
4262@file{htpasswd} files and access_token authentication in Flask
4263applications.")
4264 (license license:bsd-3)))
4265
4266(define-public python-flask-sqlalchemy
4267 (package
4268 (name "python-flask-sqlalchemy")
4269 (version "2.5.1")
4270 (source (origin
4271 (method url-fetch)
4272 (uri (pypi-uri "Flask-SQLAlchemy" version))
4273 (sha256
4274 (base32
4275 "04jrx4sjrz1b20j38qk4qin975xwz30krzq59rfv3b3w7ss49nib"))))
4276 (build-system python-build-system)
4277 (propagated-inputs
4278 (list python-flask python-sqlalchemy))
4279 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
4280 (synopsis "Module adding SQLAlchemy support to your Flask application")
4281 (description
4282 "This package adds SQLAlchemy support to your Flask application.")
4283 (license license:bsd-3)))
4284
4285(define-public python-flask-restful-swagger
4286 (package
4287 (name "python-flask-restful-swagger")
4288 (version "0.20.1")
4289 (source
4290 (origin
4291 (method url-fetch)
4292 (uri (pypi-uri "flask-restful-swagger" version))
4293 (sha256
4294 (base32
4295 "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
4296 (build-system python-build-system)
4297 (arguments '(#:tests? #f)) ;no tests
4298 (propagated-inputs
4299 (list python-flask-restful))
4300 (home-page "https://github.com/rantav/flask-restful-swagger")
4301 (synopsis "Extract Swagger specs from Flask-Restful projects")
4302 (description "This package lets you extract Swagger API documentation
4303specs from your Flask-Restful projects.")
4304 (license license:expat)))
4305
4306(define-public python-htmlmin
4307 (package
4308 (name "python-htmlmin")
4309 (version "0.1.12")
4310 (source
4311 (origin
4312 (method url-fetch)
4313 (uri (pypi-uri "htmlmin" version))
4314 (sha256
4315 (base32
4316 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
4317 (arguments
4318 `(#:tests? #f)) ; no tests
4319 (build-system python-build-system)
4320 (home-page "https://htmlmin.readthedocs.org/en/latest/")
4321 (synopsis "HTML minifier")
4322 (description "@code{htmlmin} is an HTML minifier that just works.
4323It comes with safe defaults and easily configurable options.")
4324 (license license:bsd-3)))
4325
4326(define-public python-flask-htmlmin
4327 (package
4328 (name "python-flask-htmlmin")
4329 (version "1.2")
4330 (source
4331 (origin
4332 (method url-fetch)
4333 (uri (pypi-uri "Flask-HTMLmin" version))
4334 (sha256
4335 (base32
4336 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
4337 (propagated-inputs
4338 (list python-flask python-htmlmin))
4339 (build-system python-build-system)
4340 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
4341 (synopsis "HTML response minifier for Flask")
4342 (description
4343 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
4344 (license license:bsd-3)))
4345
4346(define-public python-jsmin
4347 (package
4348 (name "python-jsmin")
4349 (version "3.0.1")
4350 (source
4351 (origin
4352 (method url-fetch)
4353 (uri (pypi-uri "jsmin" version))
4354 (sha256
4355 (base32
4356 "1z1brjsvni0260bypldkl8a05sgp0qk18x560zl44igr3q99m5f0"))))
4357 (build-system python-build-system)
4358 (home-page "https://github.com/tikitu/jsmin/")
4359 (synopsis "Python JavaScript minifier")
4360 (description
4361 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
4362on the command line.")
4363 (license license:expat)))
4364
4365(define-public python-flask-login
4366 (package
4367 (name "python-flask-login")
4368 (version "0.6.0")
4369 (source
4370 (origin
4371 (method git-fetch)
4372 (uri (git-reference
4373 (url "https://github.com/maxcountryman/flask-login")
4374 (commit version)))
4375 (file-name (git-file-name name version))
4376 (sha256
4377 (base32 "12yw01ccgjn9c88cbkrd6k1ykjxd8fxip2b1isvxjirphnlqhn9g"))))
4378 (build-system python-build-system)
4379 (arguments
4380 (list #:phases
4381 #~(modify-phases %standard-phases
4382 (replace 'check
4383 (lambda* (#:key tests? #:allow-other-keys)
4384 (when tests?
4385 (invoke "pytest" "-vv" "-c" "/dev/null")))))))
4386 (propagated-inputs
4387 (list python-flask))
4388 (native-inputs
4389 ;; For tests.
4390 (list python-blinker
4391 python-mock
4392 python-pytest
4393 python-semantic-version
4394 python-werkzeug))
4395 (home-page "https://github.com/maxcountryman/flask-login")
4396 (synopsis "User session management for Flask")
4397 (description
4398 "@code{Flask-Login} provides user session management for Flask. It
4399handles the common tasks of logging in, logging out, and remembering your
4400users' sessions over extended periods of time.")
4401 (license license:expat)))
4402
4403(define-public python-oauth2client
4404 (package
4405 (name "python-oauth2client")
4406 (version "4.0.0")
4407 (source
4408 (origin
4409 (method url-fetch)
4410 (uri (pypi-uri "oauth2client" version))
4411 (sha256
4412 (base32
4413 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
4414 (build-system python-build-system)
4415 (arguments
4416 `(#:tests? #f))
4417 (propagated-inputs
4418 (list python-httplib2
4419 python-pyasn1
4420 python-pyasn1-modules
4421 python-pyparsing
4422 python-rsa
4423 python-six))
4424 (home-page "https://github.com/google/oauth2client/")
4425 (synopsis "OAuth 2.0 client library")
4426 (description "@code{python-oauth2client} provides an OAuth 2.0 client
4427library for Python")
4428 (license license:asl2.0)))
4429
4430(define-public python-flask-oidc
4431 (package
4432 (name "python-flask-oidc")
4433 (version "1.4.0")
4434 (source
4435 (origin
4436 (method url-fetch)
4437 (uri (pypi-uri "flask-oidc" version))
4438 (sha256
4439 (base32
4440 "0klgwpn2iy5y7011xh2c8zkryxdwkpxh7qjs3hp5cynl748ia4hc"))))
4441 (build-system python-build-system)
4442 (arguments
4443 (list #:phases
4444 #~(modify-phases %standard-phases
4445 (replace 'check
4446 (lambda* (#:key tests? #:allow-other-keys)
4447 (when tests?
4448 (invoke "nosetests")))))))
4449 (propagated-inputs
4450 (list python-flask python-itsdangerous python-oauth2client
4451 python-six))
4452 (native-inputs
4453 (list python-nose python-mock))
4454 (home-page "https://github.com/puiterwijk/flask-oidc")
4455 (synopsis "OpenID Connect extension for Flask")
4456 (description "@code{python-flask-oidc} provides an OpenID Connect extension
4457for Flask.")
4458 (license license:bsd-2)))
4459
4460(define-public python-webassets
4461 (package
4462 (name "python-webassets")
4463 (version "2.0")
4464 (source
4465 (origin
4466 (method url-fetch)
4467 (uri (pypi-uri "webassets" version))
4468 (sha256
4469 (base32
4470 "1kc1042jydgk54xpgcp0r1ib4gys91nhy285jzfcxj3pfqrk4w8n"))))
4471 (build-system python-build-system)
4472 (arguments
4473 '(#:phases (modify-phases %standard-phases
4474 (add-before 'check 'adjust-tests
4475 (lambda _
4476 ;; Fix for Python 3.9 compatibility.
4477 (substitute* "tests/test_script.py"
4478 (("self\\.t\\.isAlive")
4479 "self.t.is_alive"))
4480 ;; This test requires 'postcss' and 'babel' which are
4481 ;; not yet available in Guix.
4482 (delete-file "tests/test_filters.py")))
4483 (replace 'check
4484 (lambda _
4485 (invoke "pytest" "-vv"))))))
4486 (native-inputs
4487 (list python-jinja2 python-mock python-nose python-pytest))
4488 (home-page "https://github.com/miracle2k/webassets")
4489 (synopsis "Media asset management")
4490 (description "Merges, minifies and compresses Javascript and CSS files,
4491supporting a variety of different filters, including YUI, jsmin, jspacker or
4492CSS tidy. Also supports URL rewriting in CSS files.")
4493 (license license:bsd-2)))
4494
4495(define-public python-cssmin
4496 (package
4497 (name "python-cssmin")
4498 (version "0.2.0")
4499 (source
4500 (origin
4501 (method url-fetch)
4502 (uri (pypi-uri "cssmin" version))
4503 (sha256
4504 (base32
4505 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
4506 (build-system python-build-system)
4507 (home-page "https://github.com/zacharyvoase/cssmin")
4508 (synopsis "Python port of the YUI CSS Compressor")
4509 (description "Python port of the YUI CSS Compressor.")
4510 (license (list license:expat license:bsd-3))))
4511
4512(define-public python-elasticsearch
4513 (package
4514 (name "python-elasticsearch")
4515 (version "7.13.4")
4516 (source
4517 (origin
4518 (method url-fetch)
4519 (uri (pypi-uri "elasticsearch" version))
4520 (sha256
4521 (base32
4522 "1q38w9nh2j2yi82d8rhzb57597l4lq5zx7xzfg45xf7ffrgsipaj"))))
4523 (build-system python-build-system)
4524 (propagated-inputs
4525 (list python-certifi python-urllib3))
4526 (arguments
4527 ;; tests require the test_elasticsearch module but it is not distributed.
4528 `(#:tests? #f))
4529 (home-page "https://github.com/elastic/elasticsearch-py")
4530 (synopsis "Low-level client for Elasticsearch")
4531 (description "Official low-level client for Elasticsearch. Its goal is to
4532provide common ground for all Elasticsearch-related code in Python; because of
4533this it tries to be opinion-free and very extendable.")
4534 (license license:expat)))
4535
4536(define-public python-engineio
4537 (package
4538 (name "python-engineio")
4539 (version "4.0.1")
4540 (source
4541 (origin
4542 (method url-fetch)
4543 (uri (pypi-uri "python-engineio" version))
4544 (sha256
4545 (base32
4546 "0xqkjjxbxakz9fd7v94rkr2r5r9nrkap2c3gf3abbd0j6ld5qmxv"))))
4547 (build-system python-build-system)
4548 (propagated-inputs
4549 (list python-aiohttp python-requests python-websocket-client))
4550 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
4551 (home-page "https://github.com/miguelgrinberg/python-engineio/")
4552 (synopsis "Engine.IO server")
4553 (description "Python implementation of the Engine.IO realtime client and
4554server.")
4555 (license license:expat)))
4556
4557(define-public python-flask-migrate
4558 (package
4559 (name "python-flask-migrate")
4560 (version "3.1.0")
4561 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
4562 (source (origin
4563 (method git-fetch)
4564 (uri (git-reference (url home-page)
4565 (commit (string-append "v" version))))
4566 (file-name (git-file-name name version))
4567 (sha256
4568 (base32
4569 "0zj7qpknvlhrh4fsp5sx4fwyx3sp41ynclka992zympm3xym9zyq"))))
4570 (build-system python-build-system)
4571 (propagated-inputs
4572 (list python-flask python-alembic python-flask-sqlalchemy))
4573 (synopsis "SQLAlchemy database migrations for Flask programs using
4574Alembic")
4575 (description "This package contains SQLAlchemy database migration tools
4576for Flask programs that are using @code{python-alembic}.")
4577 (license license:expat)))
4578
4579(define-public python-genshi
4580 (package
4581 (name "python-genshi")
4582 (version "0.7.7")
4583 (source
4584 (origin
4585 (method git-fetch)
4586 (uri (git-reference
4587 (url "https://github.com/edgewall/genshi")
4588 (commit version)))
4589 (file-name (git-file-name name version))
4590 (sha256
4591 (base32 "06q14mn5n56rdnqvsbbjixygilblgg85fzw029n96qf6f1rvldiq"))))
4592 (propagated-inputs
4593 (list python-six))
4594 (build-system python-build-system)
4595 (home-page "https://genshi.edgewall.org/")
4596 (synopsis "Toolkit for generation of output for the web")
4597 (description "Genshi is a Python library that provides an integrated set
4598of components for parsing, generating, and processing HTML, XML or other
4599textual content for output generation on the web.")
4600 (license license:bsd-3)))
4601
4602(define-public python-flask-principal
4603 (package
4604 (name "python-flask-principal")
4605 (version "0.4.0")
4606 (source
4607 (origin
4608 (method url-fetch)
4609 (uri (pypi-uri "Flask-Principal" version))
4610 (sha256
4611 (base32
4612 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
4613 (build-system python-build-system)
4614 (propagated-inputs
4615 (list python-blinker))
4616 (native-inputs
4617 (list python-flask python-nose))
4618 (home-page "https://pythonhosted.org/Flask-Principal/")
4619 (synopsis "Identity management for Flask")
4620 (description "@code{flask_principal} is a identity management library for
4621Flask. It supports managing both authentication and authorization data in a
4622thread-local variable.")
4623 (license license:expat)))
4624
4625(define-public python-flask-httpauth
4626 (package
4627 (name "python-flask-httpauth")
4628 (version "3.2.3")
4629 (source
4630 (origin
4631 (method url-fetch)
4632 (uri (pypi-uri "Flask-HTTPAuth" version))
4633 (sha256
4634 (base32
4635 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
4636 (build-system python-build-system)
4637 (native-inputs
4638 (list python-flask))
4639 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
4640 (synopsis "Basic and Digest HTTP authentication for Flask routes")
4641 (description "@code{flask_httpauth} provides Basic and Digest HTTP
4642authentication for Flask routes.")
4643 (license license:expat)))
4644
4645(define-public python-uritemplate
4646 (package
4647 (name "python-uritemplate")
4648 (version "4.1.1")
4649 (source
4650 (origin
4651 (method url-fetch)
4652 (uri (pypi-uri "uritemplate" version))
4653 (sha256
4654 (base32
4655 "1w14a775d92mx9pdhb5zimifpfr2lfcn0vfdpjagcy9vbkyfsij3"))))
4656 (build-system python-build-system)
4657 (home-page "https://uritemplate.readthedocs.org")
4658 (synopsis "Library to deal with URI Templates")
4659 (description "@code{uritemplate} provides Python library to deal with URI
4660Templates.")
4661 ;; The software is made available under the terms of *either* of the
4662 ;; licenses found in LICENSE.APACHE or LICENSE.BSD. Contributions
4663 ;; are made under *both* licenses (excerpt from the LICENSE file).
4664 (license (list license:bsd-2 license:asl2.0))))
4665
4666(define-public python-uritemplate-3
4667 (package
4668 (inherit python-uritemplate)
4669 (name "python-uritemplate")
4670 (version "3.0.1")
4671 (source (origin
4672 (method url-fetch)
4673 (uri (pypi-uri "uritemplate" version))
4674 (sha256
4675 (base32 "1bkwmgr0ia9gcn4bszs2xlvml79f0bi2s4a87xg22ky9rq8avy2s"))))))
4676
4677(define-public python-publicsuffix
4678 (package
4679 (name "python-publicsuffix")
4680 (version "1.1.0")
4681 (source (origin
4682 (method url-fetch)
4683 (uri (pypi-uri "publicsuffix" version))
4684 (sha256
4685 (base32
4686 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
4687 (build-system python-build-system)
4688 (arguments
4689 `(#:tests? #f)) ; tests use the internet
4690 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
4691 (synopsis "Get suffix for a domain name")
4692 (description "Get a public suffix for a domain name using the Public Suffix
4693List.")
4694 (license license:expat)))
4695
4696(define-public python-publicsuffix2
4697 (package
4698 (name "python-publicsuffix2")
4699 (version "2.20191221")
4700 (source
4701 (origin
4702 (method url-fetch)
4703 (uri (pypi-uri "publicsuffix2" version))
4704 (sha256
4705 (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
4706 (build-system python-build-system)
4707 (arguments
4708 '(#:phases
4709 (modify-phases %standard-phases
4710 (add-after 'unpack 'ignore-maintainer-inputs
4711 (lambda _
4712 ;; Comment out a demand for python-requests, which is used only by
4713 ;; the unused ‘update_psl’ helper command.
4714 (substitute* "setup.py"
4715 (("'requests " match)
4716 (format #f "# ~a" match)))
4717 #t)))
4718 #:tests? #f)) ; the test suite requires network access
4719 (home-page "https://github.com/pombredanne/python-publicsuffix2")
4720 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
4721 (description "Get a public suffix for a domain name using the Public Suffix
4722List. Forked from and using the same API as the publicsuffix package.")
4723 (license (list license:expat license:mpl2.0))))
4724
4725(define-public python-werkzeug
4726 (package
4727 (name "python-werkzeug")
4728 (version "2.0.2")
4729 (source
4730 (origin
4731 (method url-fetch)
4732 (uri (pypi-uri "Werkzeug" version))
4733 (sha256
4734 (base32
4735 "16nvv9dh37ssf5pkny9yj2li0n6wyzsygh8a9i86r3gfipybcaxa"))))
4736 (build-system python-build-system)
4737 (arguments
4738 '(#:phases
4739 (modify-phases %standard-phases
4740 (replace 'check
4741 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
4742 (when tests?
4743 (add-installed-pythonpath inputs outputs)
4744 (invoke "python" "-m" "pytest"
4745 ;; Test tries to use the network.
4746 "-k not test_reloader_sys_path")))))))
4747 (propagated-inputs
4748 (list python-requests))
4749 (native-inputs
4750 (list python-pytest python-pytest-timeout python-pytest-xprocess))
4751 (home-page "https://palletsprojects.com/p/werkzeug/")
4752 (synopsis "Utilities for WSGI applications")
4753 (description "One of the most advanced WSGI utility modules. It includes a
4754powerful debugger, full-featured request and response objects, HTTP utilities to
4755handle entity tags, cache control headers, HTTP dates, cookie handling, file
4756uploads, a powerful URL routing system and a bunch of community-contributed
4757addon modules.")
4758 (license license:x11)))
4759
4760(define-public python-werkzeug-1.0
4761 (package
4762 (inherit python-werkzeug)
4763 (version "1.0.1")
4764 (source (origin
4765 (method url-fetch)
4766 (uri (pypi-uri "Werkzeug" version))
4767 (sha256
4768 (base32
4769 "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c"))
4770 (patches (search-patches "python-werkzeug-tests.patch"))))
4771 (arguments
4772 '(#:phases
4773 (modify-phases %standard-phases
4774 (delete 'check)
4775 (add-after 'install 'check
4776 (lambda* (#:key inputs outputs #:allow-other-keys)
4777 (add-installed-pythonpath inputs outputs)
4778 (invoke "python" "-m" "pytest"))))))
4779 (propagated-inputs
4780 (list python-requests))
4781 (native-inputs
4782 (list python-pytest python-pytest-timeout))))
4783
4784(define-public python-bottle
4785 (package
4786 (name "python-bottle")
4787 (version "0.12.23")
4788 (source
4789 (origin
4790 (method url-fetch)
4791 (uri (pypi-uri "bottle" version))
4792 (sha256
4793 (base32 "0rs1w293gp5bhxip2cci8mfkhld6n5qcznvlna3nxclz76mf6gb8"))))
4794 (build-system python-build-system)
4795 (arguments
4796 `(#:phases
4797 (modify-phases %standard-phases
4798 (replace 'check
4799 (lambda* (#:key tests? #:allow-other-keys)
4800 (when tests?
4801 (with-directory-excursion "test"
4802 (invoke "pytest" "-vvv"))))))))
4803 (native-inputs (list python-pytest))
4804 (home-page "https://bottlepy.org/")
4805 (synopsis "WSGI framework for small web-applications")
4806 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
4807 (license license:expat)))
4808
4809(define-public python-wtforms
4810 (package
4811 (name "python-wtforms")
4812 (version "2.3.3")
4813 (source
4814 (origin
4815 (method url-fetch)
4816 (uri (pypi-uri "WTForms" version))
4817 (sha256
4818 (base32
4819 "17427m7p9nn9byzva697dkykykwcp2br3bxvi8vciywlmkh5s6c1"))))
4820 (build-system python-build-system)
4821 (arguments
4822 `(#:phases
4823 (modify-phases %standard-phases
4824 (add-after 'unpack 'delete-bundled-test
4825 (lambda _
4826 ;; Delete test copied from a third party package that fails
4827 ;; with newer SQLAlchemy. This can be removed for 3.0.
4828 ;; See <https://github.com/wtforms/wtforms/issues/696>.
4829 (delete-file "tests/ext_sqlalchemy.py")))
4830 (replace 'check
4831 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4832 (when tests?
4833 (add-installed-pythonpath inputs outputs)
4834 (invoke "python" "setup.py" "compile_catalog")
4835 (invoke "python" "tests/runtests.py")))))))
4836 (native-inputs
4837 (list python-dateutil python-sqlalchemy))
4838 (propagated-inputs
4839 (list python-babel python-email-validator python-markupsafe))
4840 (home-page "http://wtforms.simplecodes.com/")
4841 (synopsis
4842 "Form validation and rendering library for Python web development")
4843 (description
4844 "WTForms is a flexible forms validation and rendering library
4845for Python web development. It is very similar to the web form API
4846available in Django, but is a standalone package.")
4847 (license license:bsd-3)))
4848
4849(define-public python-paste
4850 (package
4851 (name "python-paste")
4852 (version "3.5.2")
4853 (source
4854 (origin
4855 (method url-fetch)
4856 (uri (pypi-uri "Paste" version))
4857 (sha256
4858 (base32
4859 "1xjakxrdvy4kgfy170gb9bl8zp9hqjjwh1h1vlik1pxw606399ym"))
4860 (patches (search-patches "python-paste-remove-timing-test.patch"))
4861 (modules '((guix build utils)))
4862 (snippet
4863 '(begin
4864 ;; This test calls out to the internet.
4865 (delete-file "tests/test_proxy.py") #t))))
4866 (build-system pyproject-build-system)
4867 (native-inputs
4868 (list python-pytest python-nose))
4869 (propagated-inputs
4870 (list python-six))
4871 (home-page "https://pythonpaste.readthedocs.io/")
4872 (synopsis
4873 "Python web development tools, focusing on WSGI")
4874 (description
4875 "Paste provides a variety of web development tools and middleware which
4876can be nested together to build web applications. Paste's design closely
4877follows ideas flowing from WSGI (Web Standard Gateway Interface).")
4878 (license license:expat)))
4879
4880(define-public python-pastescript
4881 (package
4882 (name "python-pastescript")
4883 (version "2.0.2")
4884 (source
4885 (origin
4886 (method url-fetch)
4887 (uri (pypi-uri "PasteScript" version))
4888 (sha256
4889 (base32
4890 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
4891 (build-system python-build-system)
4892 (native-inputs
4893 (list python-nose))
4894 (propagated-inputs
4895 (list python-paste python-pastedeploy))
4896 (home-page (string-append "https://web.archive.org/web/20161025192515/"
4897 "http://pythonpaste.org/script/"))
4898 (arguments
4899 '(;; Unfortunately, this requires the latest unittest2,
4900 ;; but that requires traceback2 which requires linecache2 which requires
4901 ;; unittest2. So we're skipping tests for now.
4902 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
4903 ;; so in theory we could get around this situation somehow.)
4904 #:tests? #f))
4905 (synopsis
4906 "Pluggable command line tool for serving web applications and more")
4907 (description
4908 "PasteScript is a plugin-friendly command line tool which provides a
4909variety of features, from launching web applications to bootstrapping project
4910layouts.")
4911 (license license:expat)))
4912
4913(define-public python-urlgrabber
4914 (package
4915 (name "python-urlgrabber")
4916 (version "4.1.0")
4917 (source
4918 (origin
4919 (method url-fetch)
4920 (uri (pypi-uri "urlgrabber" version))
4921 (sha256
4922 (base32 "0fg16zlw49cw7pjq9dhpc5vd35d5zz1mlki55m464qxfmfpzhnh7"))))
4923 (build-system python-build-system)
4924 (arguments
4925 `(#:phases
4926 (modify-phases %standard-phases
4927 (replace 'check
4928 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4929 (when tests?
4930 (add-installed-pythonpath inputs outputs)
4931 (invoke "python" "test/runtests.py")))))))
4932 (propagated-inputs
4933 (list python-pycurl python-setuptools python-six))
4934 (home-page "http://urlgrabber.baseurl.org/") ; no HTTPS
4935 (synopsis "High-level cross protocol url-grabber")
4936 (description
4937 "@code{urlgrabber} is a library that unifies access to files available on
4938the web, FTP or locally. It supports HTTP, FTP and file:// protocols, it
4939supports features like HTTP keep-alive, reget, throttling and more.")
4940 (license license:lgpl2.1+)))
4941
4942(define-public python-pycares
4943 (package
4944 (name "python-pycares")
4945 (version "4.3.0")
4946 (source
4947 (origin
4948 (method url-fetch)
4949 (uri (pypi-uri "pycares" version))
4950 (sha256
4951 (base32
4952 "0i8d0433wmm7wi8i2l2hjiyhmy35b9s888qrk6fqx5xcdmpnjhn5"))))
4953 (build-system python-build-system)
4954 (arguments `(#:tests? #f)) ;tests require internet access
4955 (propagated-inputs (list python-cffi))
4956 (home-page "https://github.com/saghul/pycares")
4957 (synopsis "Python interface for @code{c-ares}")
4958 (description "@code{pycares} is a Python module which provides an
4959interface to @code{c-ares}, a C library that performs DNS requests and
4960name resolutions asynchronously.")
4961 (license license:expat)))
4962
4963(define-public python-yarl
4964 (package
4965 (name "python-yarl")
4966 (version "1.6.3")
4967 (source
4968 (origin
4969 (method url-fetch)
4970 (uri (pypi-uri "yarl" version))
4971 (sha256
4972 (base32
4973 "045z4ssg8g5h0qhz8hnx74hswgkndaldqq1xi5l1n5s0j996d44a"))
4974 (modules '((guix build utils)))
4975 (snippet
4976 #~(begin
4977 (delete-file "yarl/_quoting_c.c")))))
4978 (build-system python-build-system)
4979 (arguments
4980 (list #:tests? #f ; test suite can't find yarl._quoting_c
4981 #:phases
4982 #~(modify-phases %standard-phases
4983 (add-after 'unpack 'cythonize-code
4984 (lambda _
4985 (invoke "cython" "yarl/_quoting_c.pyx")))
4986 (replace 'check
4987 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
4988 (when tests?
4989 (substitute* "setup.cfg"
4990 (("--cov=yarl") ""))
4991 (add-installed-pythonpath inputs outputs)
4992 (invoke "python" "-m" "pytest")))))))
4993 (native-inputs
4994 (list python-cython python-pytest python-pytest-runner))
4995 (propagated-inputs
4996 (list python-idna python-multidict))
4997 (home-page "https://github.com/aio-libs/yarl/")
4998 (synopsis "Yet another URL library")
4999 (description "@code{yarl} module provides handy @code{URL} class
5000for URL parsing and changing.")
5001 (license license:asl2.0)))
5002
5003(define-public python-canvasapi
5004 (package
5005 (name "python-canvasapi")
5006 (version "3.2.0")
5007 (source (origin
5008 (method git-fetch)
5009 (uri (git-reference
5010 (url "https://github.com/ucfopen/canvasapi")
5011 (commit (string-append "v" version))))
5012 (file-name (git-file-name name version))
5013 (sha256
5014 (base32
5015 "1vbd3ndhmxi8scxgxs6sc7r0rdaliqd80384n06nyb3haqz25inm"))))
5016 (build-system pyproject-build-system)
5017 (propagated-inputs (list python-arrow python-pytz python-requests))
5018 (native-inputs (list python-requests-mock))
5019 (home-page "https://github.com/ucfopen/canvasapi")
5020 (synopsis "API wrapper for the Canvas LMS")
5021 (description
5022 "CanvasAPI is a Python library for accessing Instructure’s Canvas LMS API.
5023The library enables developers to programmatically manage Canvas courses,
5024users, gradebooks, and more.")
5025 (license license:expat)))
5026
5027(define-public python-google
5028 (package
5029 (name "python-google")
5030 (version "3.0.0")
5031 (source (origin
5032 (method url-fetch)
5033 (uri (pypi-uri "google" version))
5034 (sha256
5035 (base32
5036 "1gncv3l11za0mpxvmpaf5n5j3jzp282rz62yml4ha4z55q930d8l"))))
5037 (build-system python-build-system)
5038 (arguments
5039 `(#:tests? #f)) ; There are no tests.
5040 (propagated-inputs
5041 (list python-beautifulsoup4))
5042 (home-page "https://breakingcode.wordpress.com/")
5043 (synopsis "Python bindings to the Google search engine")
5044 (description "This package provides Python bindings for using the
5045Google search engine. Its module is called @code{googlesearch}.")
5046 (license license:bsd-3)))
5047
5048(define-public python-google-api-client
5049 (package
5050 (name "python-google-api-client")
5051 (version "1.12.8")
5052 (source
5053 (origin
5054 (method url-fetch)
5055 (uri (pypi-uri "google-api-python-client" version))
5056 (sha256
5057 (base32
5058 "1fq89wifa9ymby655is246w5d54ixybffj5vz7lwzhpf8926ifgk"))))
5059 (build-system python-build-system)
5060 (arguments
5061 `(#:tests? #f)) ; tests require internet access
5062 (propagated-inputs
5063 (list python-google-api-core-1
5064 python-google-auth-1
5065 python-google-auth-httplib2
5066 python-httplib2
5067 python-six
5068 python-uritemplate-3))
5069 (home-page "https://github.com/google/google-api-python-client")
5070 (synopsis "Core Python library for accessing Google APIs")
5071 (description "Python client library for Google's discovery based APIs")
5072 (license license:asl2.0)))
5073
5074(define-public python-google-auth-httplib2
5075 (package
5076 (name "python-google-auth-httplib2")
5077 (version "0.1.0")
5078 (source (origin
5079 (method url-fetch)
5080 (uri (pypi-uri "google-auth-httplib2" version))
5081 (sha256
5082 (base32 "1b1hrhah01hx6bj3rb83iybrdwqv0bbdy63py39srv1bcgykjz50"))))
5083 (build-system python-build-system)
5084 (propagated-inputs
5085 (list python-google-auth python-httplib2 python-six))
5086 (native-inputs
5087 (list python-flask python-mock python-pytest python-pytest-localserver))
5088 (home-page
5089 "https://github.com/GoogleCloudPlatform/google-auth-library-python-httplib2")
5090 (synopsis "Google Authentication Library: httplib2 transport")
5091 (description "This package provides a Google Authentication Library plugin
5092for httplib2 transport.")
5093 (license license:asl2.0)))
5094
5095(define-public whoogle-search
5096 (package
5097 (name "whoogle-search")
5098 (version "0.8.2")
5099 (source (origin
5100 (method url-fetch)
5101 (uri (pypi-uri "whoogle-search" version))
5102 (sha256
5103 (base32
5104 "1r6ymainwc3b8aar90b74mpnx3rsfscgzh0llwvsb03fbhiypw5g"))))
5105 (build-system pyproject-build-system)
5106 (arguments
5107 (list
5108 ;; The tests need network access
5109 #:tests? #f))
5110 (propagated-inputs
5111 (list python-attrs
5112 python-beautifulsoup4
5113 python-cachelib
5114 python-certifi
5115 python-cffi
5116 python-brotli
5117 python-chardet
5118 python-click
5119 python-cryptography
5120 python-cssutils
5121 python-defusedxml
5122 python-flask
5123 python-flask-session
5124 python-idna
5125 python-itsdangerous
5126 python-jinja2
5127 python-markupsafe
5128 python-more-itertools
5129 python-packaging
5130 python-pluggy
5131 python-py
5132 python-pycodestyle
5133 python-pycparser
5134 python-pyopenssl
5135 python-pyparsing
5136 python-pysocks
5137 python-dateutil
5138 python-requests
5139 python-soupsieve
5140 python-stem
5141 python-urllib3
5142 python-waitress
5143 python-wcwidth
5144 python-werkzeug
5145 python-dotenv))
5146 (home-page "https://github.com/benbusby/whoogle-search")
5147 (synopsis "Self-hosted, ad-free, privacy-respecting metasearch engine")
5148 (description
5149 "Get Google results, but without any ads, javascript, AMP links,
5150cookies, or IP address tracking. Quick and simple to implement as a primary
5151search engine replacement on both desktop and mobile.")
5152 (license license:expat)))
5153
5154(define-public python-hawkauthlib
5155 (package
5156 (name "python-hawkauthlib")
5157 (version "2.0.0")
5158 (source
5159 (origin
5160 (method url-fetch)
5161 (uri (pypi-uri "hawkauthlib" version))
5162 (sha256
5163 (base32
5164 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
5165 (build-system python-build-system)
5166 (propagated-inputs
5167 (list python-requests python-webob))
5168 (home-page "https://github.com/mozilla-services/hawkauthlib")
5169 (synopsis "Hawk Access Authentication protocol")
5170 (description
5171 "This is a low-level Python library for implementing Hawk Access Authentication,
5172a simple HTTP request-signing scheme.")
5173 (license license:mpl2.0)))
5174
5175(define-public python-pybrowserid
5176 (package
5177 (name "python-pybrowserid")
5178 (version "0.14.0")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri (pypi-uri "PyBrowserID" version))
5183 (sha256
5184 (base32
5185 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
5186 (build-system python-build-system)
5187 (propagated-inputs
5188 (list python-requests))
5189 (native-inputs
5190 (list python-mock))
5191 (home-page "https://github.com/mozilla/PyBrowserID")
5192 (synopsis "Python library for the BrowserID protocol")
5193 (description
5194 "This is a Python client library for the BrowserID protocol that
5195underlies Mozilla Persona.")
5196 (license license:mpl2.0)))
5197
5198(define-public python-pyfxa
5199 (package
5200 (name "python-pyfxa")
5201 (version "0.6.0")
5202 (source
5203 (origin
5204 (method url-fetch)
5205 (uri (pypi-uri "PyFxA" version))
5206 (sha256
5207 (base32
5208 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
5209 (build-system python-build-system)
5210 (arguments '(#:tests? #f)) ; 17 tests require network access
5211 (propagated-inputs
5212 (list python-cryptography python-hawkauthlib python-pybrowserid
5213 python-requests python-six))
5214 (native-inputs
5215 (list python-grequests python-mock python-responses python-unittest2))
5216 (home-page "https://github.com/mozilla/PyFxA")
5217 (synopsis "Firefox Accounts client library for Python")
5218 (description
5219 "This is a Python library for interacting with the Firefox Accounts
5220ecosystem.")
5221 (license license:mpl2.0)))
5222
5223(define-public python-hyperlink
5224 (package
5225 (name "python-hyperlink")
5226 (version "19.0.0")
5227 (source
5228 (origin
5229 (method url-fetch)
5230 (uri (pypi-uri "hyperlink" version))
5231 (sha256
5232 (base32
5233 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
5234 (build-system python-build-system)
5235 (propagated-inputs
5236 (list python-idna))
5237 (home-page "https://github.com/python-hyper/hyperlink")
5238 (synopsis "Python module to create immutable URLs according to spec")
5239 (description "This package provides a Python module to create immutable, and
5240correct URLs for Python according to RFCs 3986 and 3987.")
5241 (license license:expat)))
5242
5243(define-public python-treq
5244 (package
5245 (name "python-treq")
5246 (version "18.6.0")
5247 (source
5248 (origin
5249 (method url-fetch)
5250 (uri (pypi-uri "treq" version))
5251 (sha256
5252 (base32
5253 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
5254 (build-system python-build-system)
5255 (propagated-inputs
5256 (list python-attrs
5257 python-idna
5258 python-incremental
5259 python-requests
5260 python-service-identity
5261 python-twisted))
5262 (home-page "https://github.com/twisted/treq")
5263 (synopsis "Requests-like API built on top of twisted.web's Agent")
5264 (description "This package provides an HTTP library inspired by
5265@code{requests}} but written on top of Twisted's @code{Agents}. It offers a
5266high level API for making HTTP requests when using Twisted.")
5267 (license license:expat)))
5268
5269(define-public python-autobahn
5270 (package
5271 (name "python-autobahn")
5272 (version "19.2.1")
5273 (source
5274 (origin
5275 (method url-fetch)
5276 (uri (pypi-uri "autobahn" version))
5277 (sha256
5278 (base32
5279 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
5280 (build-system python-build-system)
5281 (arguments
5282 ;; The tests fail to run:
5283 ;; https://github.com/crossbario/autobahn-python/issues/1117
5284 `(#:tests? #f))
5285 (propagated-inputs
5286 (list python-cffi python-twisted python-txaio))
5287 (home-page "https://crossbar.io/autobahn/")
5288 (synopsis "Web Application Messaging Protocol implementation")
5289 (description "This package provides an implementation of the @dfn{Web Application
5290Messaging Protocol} (WAMP). WAMP connects components in distributed
5291applications using Publish and Subscribe (PubSub) and routed Remote Procedure
5292Calls (rRPC). It is ideal for distributed, multi-client and server applications
5293such as IoT applications or multi-user database-driven business applications.")
5294 (license license:expat)))
5295
5296(define-public python-ws4py
5297 (package
5298 (name "python-ws4py")
5299 (version "0.5.1")
5300 (source
5301 (origin
5302 (method url-fetch)
5303 (uri (pypi-uri "ws4py" version))
5304 (sha256
5305 (base32
5306 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
5307 (build-system python-build-system)
5308 (arguments
5309 `(#:phases
5310 (modify-phases %standard-phases
5311 (add-after 'unpack 'python3.7-compatibility
5312 (lambda _
5313 (substitute* '("ws4py/server/tulipserver.py"
5314 "ws4py/async_websocket.py")
5315 (("asyncio.async")
5316 "asyncio.ensure_future"))
5317 #t))
5318 ;; We don't have a package for cherrypy.
5319 (add-after 'unpack 'remove-cherrypy-support
5320 (lambda _
5321 (delete-file "ws4py/server/cherrypyserver.py")
5322 #t)))))
5323 (propagated-inputs
5324 (list python-gevent python-tornado))
5325 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
5326 (synopsis "WebSocket client and server library")
5327 (description
5328 "This package provides a WebSocket client and server library for
5329Python.")
5330 (license license:bsd-3)))
5331
5332(define-public python-slugify
5333 (package
5334 (name "python-slugify")
5335 (version "5.0.2")
5336 (source
5337 (origin
5338 (method url-fetch)
5339 (uri (pypi-uri "python-slugify" version))
5340 (sha256
5341 (base32 "1aww2ncglyii4jkbfjxqhinivawf9zmwifcj32d69gpwp6h86czi"))))
5342 (propagated-inputs
5343 (list python-unidecode python-text-unidecode))
5344 (arguments
5345 `(#:phases
5346 (modify-phases %standard-phases
5347 (replace 'check
5348 (lambda* (#:key tests? #:allow-other-keys)
5349 (when tests?
5350 (invoke "python" "test.py")))))))
5351 (build-system python-build-system)
5352 (home-page "https://github.com/un33k/python-slugify")
5353 (synopsis "Python Slugify application that handles Unicode")
5354 (description "This package provides a @command{slufigy} command and
5355library to create slugs from unicode strings while keeping it DRY.")
5356 (license license:expat)))
5357
5358(define-public python-branca
5359 (package
5360 (name "python-branca")
5361 (version "0.3.1")
5362 (source
5363 (origin
5364 (method url-fetch)
5365 (uri (pypi-uri "branca" version))
5366 (sha256
5367 (base32
5368 "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
5369 (build-system python-build-system)
5370 (propagated-inputs
5371 (list python-jinja2 python-six))
5372 (native-inputs
5373 (list python-pytest))
5374 (home-page "https://github.com/python-visualization/branca")
5375 (synopsis "Generate complex HTML+JS pages with Python")
5376 (description "Generate complex HTML+JS pages with Python")
5377 (license license:expat)))
5378
5379(define-public python-tinycss
5380 (package
5381 (name "python-tinycss")
5382 (version "0.4")
5383 (source
5384 (origin
5385 (method url-fetch)
5386 (uri (pypi-uri "tinycss" version))
5387 (sha256
5388 (base32 "0vkifr595h28ymkjhrswwf0bm23lhznh5f44xyp7x7jy1ssnyc0j"))))
5389 (build-system python-build-system)
5390 (arguments
5391 `(#:phases
5392 (modify-phases %standard-phases
5393 (add-after 'unpack 'disable-flake8-isort
5394 ;; Flake8 and isort tests fail.
5395 (lambda _
5396 (substitute* "setup.cfg" ((" --flake8 --isort") ""))
5397 #t))
5398 (replace 'check
5399 (lambda _
5400 ;; Disable failing test.
5401 (invoke "python" "-m" "pytest" "-k"
5402 "not test_speedups"))))))
5403 (native-inputs
5404 (list python-pytest-cov python-pytest-flake8 python-pytest-isort
5405 python-pytest-runner))
5406 (home-page "https://tinycss.readthedocs.io/")
5407 (synopsis "Complete yet simple CSS parser for Python")
5408 (description
5409 "@code{tinycss} is a complete yet simple CSS parser for Python. It
5410supports the full syntax and error handling for CSS 2.1 as well as some CSS 3
5411modules:
5412
5413@itemize
5414@item CSS Color 3
5415@item CSS Fonts 3
5416@item CSS Paged Media 3
5417@end itemize")
5418 (license license:bsd-3)))
5419
5420(define-public python-tinycss2
5421 (package
5422 (name "python-tinycss2")
5423 (version "1.1.0")
5424 (source
5425 (origin
5426 (method git-fetch)
5427 (uri (git-reference
5428 (url "https://github.com/Kozea/tinycss2")
5429 (commit (string-append "v" version))
5430 (recursive? #true)))
5431 (file-name (git-file-name name version))
5432 (sha256
5433 (base32 "0zyc48vbmczpqj7f3f0d7zb3bz29fyj50dg0m6bbwbr5i88kq3sq"))))
5434 (build-system pyproject-build-system)
5435 (propagated-inputs
5436 (list python-webencodings))
5437 (native-inputs
5438 (list python-flit python-pytest python-pytest-cov
5439 python-pytest-flake8 python-pytest-isort))
5440 (home-page "https://tinycss2.readthedocs.io/")
5441 (synopsis "Low-level CSS parser for Python")
5442 (description "@code{tinycss2} can parse strings, return Python objects
5443representing tokens and blocks, and generate CSS strings corresponding to
5444these objects.
5445
5446Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
5447grammar of CSS but doesn’t know specific rules, properties or values supported
5448in various CSS modules.")
5449 (license license:bsd-3)))
5450
5451(define-public python-cssselect2
5452 (package
5453 (name "python-cssselect2")
5454 (version "0.4.1")
5455 (source
5456 (origin
5457 (method url-fetch)
5458 (uri (pypi-uri "cssselect2" version))
5459 (sha256
5460 (base32 "1j2fcr217rsvkipsg6zjq03rl64rxnvb5hqqpx0dv58fhspvkywk"))))
5461 (build-system python-build-system)
5462 (arguments
5463 `(#:phases
5464 (modify-phases %standard-phases
5465 (add-after 'unpack 'disable-linters
5466 ;; Their check fails; none of our business.
5467 (lambda _
5468 (substitute* '("setup.py" "pyproject.toml")
5469 (("'pytest-flake8',") "")
5470 (("'pytest-isort',") "")
5471 (("--flake8") "")
5472 (("--isort") ""))))
5473 (replace 'check
5474 (lambda* (#:key tests? #:allow-other-keys)
5475 (when tests?
5476 (lambda _ (invoke "pytest"))))))))
5477 (propagated-inputs
5478 (list python-tinycss2))
5479 (native-inputs
5480 (list python-pytest-cov python-pytest-runner))
5481 (home-page "https://cssselect2.readthedocs.io/")
5482 (synopsis "CSS selectors for Python ElementTree")
5483 (description "@code{cssselect2} is a straightforward implementation of
5484CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
5485ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
5486
5487Unlike the Python package @code{cssselect}, it does not translate selectors to
5488XPath and therefore does not have all the correctness corner cases that are
5489hard or impossible to fix in cssselect.")
5490 (license license:bsd-3)))
5491
5492(define-public python-uvloop
5493 (package
5494 (name "python-uvloop")
5495 (version "0.16.0")
5496 (source
5497 (origin
5498 (method url-fetch)
5499 (uri (pypi-uri "uvloop" version))
5500 (sha256
5501 (base32 "0a0jzwrhkszknh14alflrp1db6dyjp7ph730f9yc5lb7gc6c4jzp"))
5502 (modules '((guix build utils)))
5503 (snippet
5504 '(begin (delete-file-recursively "vendor")
5505 (delete-file "uvloop/loop.c")))))
5506 (build-system python-build-system)
5507 (arguments
5508 `(#:phases
5509 (modify-phases %standard-phases
5510 (add-after 'unpack 'preparations
5511 (lambda _
5512 ;; Use packaged libuv.
5513 (substitute* "setup.py" (("self.use_system_libuv = False")
5514 "self.use_system_libuv = True"))
5515 ;; Replace hardcoded shell command.
5516 (substitute* "uvloop/loop.pyx"
5517 (("b'/bin/sh'") (string-append "b'" (which "sh") "'")))
5518 #t))
5519 (replace 'check
5520 (lambda* (#:key tests? #:allow-other-keys)
5521 (when tests?
5522 ;; Remove Python module, which conflicts with the installed version,
5523 ;; but lacks the built C module.
5524 (delete-file-recursively "uvloop")
5525 ;; The tests are prone to get stuck. Use pytest-timeout’s --timeout
5526 ;; flag to get a meaningful idea about where.
5527 (invoke "pytest" "-vv" "--timeout=300"
5528 "--timeout-method=thread"
5529 "-k" (string-append
5530 ;; Timeout, because SIGINT cannot be sent to child.
5531 "not test_signals_sigint_pycode_continue "
5532 "and not test_signals_sigint_pycode_stop "
5533 "and not test_signals_sigint_uvcode "
5534 "and not test_signals_sigint_uvcode_two_loop_runs "
5535 ;; This test is racy and prone to get stuck on
5536 ;; various platforms, possibly a aiohttp issue:
5537 ;; https://github.com/MagicStack/uvloop/issues/412
5538 "and not test_remote_shutdown_receives_trailing_data "
5539 ;; It looks like pytest is preventing
5540 ;; custom stdout/stderr redirection,
5541 ;; even with -s.
5542 "and not test_process_streams_redirect "))))))))
5543 (native-inputs
5544 (list python-aiohttp
5545 python-cython
5546 python-psutil
5547 python-pyopenssl
5548 python-pytest
5549 python-pytest-timeout))
5550 (inputs
5551 (list libuv))
5552 (home-page "https://github.com/MagicStack/uvloop")
5553 (synopsis "Fast implementation of asyncio event loop on top of libuv")
5554 (description
5555 "@code{uvloop} is a fast, drop-in replacement of the built-in asyncio
5556event loop. It is implemented in Cython and uses libuv under the hood.")
5557 (license license:expat)))
5558
5559(define-public gunicorn
5560 (package
5561 (name "gunicorn")
5562 (version "20.1.0")
5563 (source
5564 (origin
5565 (method url-fetch)
5566 (uri (pypi-uri "gunicorn" version))
5567 (sha256
5568 (base32
5569 "1s7670qw36x90bgmazmgib170i5gnpyb2ypxzlla7y0mpasniag0"))))
5570 (outputs '("out" "doc"))
5571 (build-system python-build-system)
5572 (arguments
5573 `(#:phases
5574 (modify-phases %standard-phases
5575 (add-after 'build 'build-doc
5576 (lambda _
5577 (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
5578 (delete-file "docs/build/texinfo/Makefile")
5579 (delete-file "docs/build/texinfo/Gunicorn.texi")))
5580 (replace 'check
5581 (lambda* (#:key tests? #:allow-other-keys)
5582 (if tests?
5583 (begin
5584 (invoke "pytest" "-vv"
5585 ;; Disable the geventlet tests because eventlet uses
5586 ;; dnspython, which does not work in the build
5587 ;; container due to lack of /etc/resolv.conf, etc.
5588 "--ignore=tests/workers/test_geventlet.py"))
5589 (format #t "test suite not run~%"))))
5590 (add-after 'install 'install-doc
5591 (lambda* (#:key outputs #:allow-other-keys)
5592 (let* ((doc (string-append (assoc-ref outputs "doc")
5593 "/share/doc/" ,name "-" ,version))
5594 (html (string-append doc "/html"))
5595 (info (string-append doc "/info"))
5596 (examples (string-append doc "/examples")))
5597 (mkdir-p html)
5598 (mkdir-p info)
5599 (mkdir-p examples)
5600 (copy-recursively "docs/build/html" html)
5601 (copy-recursively "docs/build/texinfo" info)
5602 (copy-recursively "examples" examples)
5603 (for-each (lambda (file)
5604 (copy-file file (string-append doc "/" file)))
5605 '("README.rst" "NOTICE" "LICENSE" "THANKS")))))
5606 ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see
5607 ;; <https://bugs.gnu.org/25235>), leading to an inflated closure
5608 ;; size. Override it to only add the essential entries.
5609 (replace 'wrap
5610 (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
5611 (let* ((out (assoc-ref outputs "out"))
5612 (python (assoc-ref (or native-inputs inputs) "python"))
5613 (sitedir (string-append "/lib/python"
5614 (python-version python)
5615 "/site-packages")))
5616 (wrap-program (string-append out "/bin/gunicorn")
5617 `("PYTHONPATH" ":" prefix
5618 ,(map (lambda (output)
5619 (string-append output sitedir))
5620 (list python out))))))))))
5621 (native-inputs
5622 (list binutils ;; for ctypes.util.find_library()
5623 python-aiohttp
5624 python-gevent
5625 python-pytest
5626 python-pytest-cov
5627 python-sphinx
5628 texinfo))
5629 (home-page "https://gunicorn.org/")
5630 (synopsis "Python WSGI HTTP Server for UNIX")
5631 (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
5632Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
5633Unicorn project. The Gunicorn server is broadly compatible with
5634various web frameworks, simply implemented, light on server resources,
5635and fairly speedy.")
5636 (license license:expat)))
5637
5638;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
5639;; its tests
5640(define-public gunicorn-bootstrap
5641 (package
5642 (inherit gunicorn)
5643 (name "gunicorn")
5644 (arguments `(#:tests? #f))
5645 (properties '((hidden? . #t)))
5646 (native-inputs `())))
5647
5648(define-public python-httptools
5649 (package
5650 (name "python-httptools")
5651 (version "0.1.1")
5652 (source
5653 (origin
5654 ;; PyPI tarball comes with a vendored http-parser and no tests.
5655 (method git-fetch)
5656 (uri (git-reference
5657 (url "https://github.com/MagicStack/httptools")
5658 (commit (string-append "v" version))))
5659 (file-name (git-file-name name version))
5660 (sha256
5661 (base32 "0g08128x2ixsiwrzskxc6c8ymgzs39wbzr5mhy0mjk30q9pqqv77"))))
5662 (build-system python-build-system)
5663 (arguments
5664 '(#:phases
5665 (modify-phases %standard-phases
5666 (add-after 'unpack 'preparations
5667 (lambda _
5668 ;; Skip a failing test (AssertionError). Bug report:
5669 ;; https://github.com/MagicStack/httptools/issues/10.
5670 (substitute* "tests/test_parser.py"
5671 ((" def test_parser_response_1")
5672 (string-append
5673 " @unittest.skip(\"Disabled.\")\n"
5674 " def test_parser_response_1")))
5675 ;; Use packaged http-parser.
5676 (substitute* "setup.py" (("self.use_system_http_parser = False")
5677 "self.use_system_http_parser = True"))
5678 ;; This path is hardcoded. Hardcode our own.
5679 (substitute* "httptools/parser/cparser.pxd"
5680 (("../../vendor/http-parser")
5681 (string-append (assoc-ref %build-inputs "http-parser")
5682 "/include")))
5683 ;; Don't force Cython version.
5684 (substitute* "setup.py" (("Cython==") "Cython>="))
5685 #t)))))
5686 (native-inputs
5687 (list python-cython python-pytest))
5688 (inputs
5689 (list http-parser))
5690 (home-page "https://github.com/MagicStack/httptools")
5691 (synopsis "Collection of framework independent HTTP protocol utils")
5692 (description
5693 "@code{httptools} is a Python binding for the nodejs HTTP parser.")
5694 (license license:expat)))
5695
5696(define-public python-uvicorn
5697 (package
5698 (name "python-uvicorn")
5699 (version "0.17.6")
5700 (source
5701 (origin
5702 ;; PyPI tarball has no tests.
5703 (method git-fetch)
5704 (uri (git-reference
5705 (url "https://github.com/encode/uvicorn")
5706 (commit version)))
5707 (file-name (git-file-name name version))
5708 (sha256
5709 (base32 "0npwls02nhna2lyw2nksxij16l9agf12c9f42pvxb5yrpi9l16c8"))))
5710 (build-system python-build-system)
5711 (arguments
5712 `(#:phases
5713 (modify-phases %standard-phases
5714 (replace 'check
5715 (lambda* (#:key tests? #:allow-other-keys)
5716 (when tests?
5717 (invoke "pytest" "-vv" "-o" "asyncio_mode=auto"
5718 "-k"
5719 (string-append
5720 ;; These error or fail due to networking.
5721 "not test_keepalive "
5722 "and not test_bind_unix_socket_works_with_"
5723 "reload_or_workers "))))))))
5724 (native-inputs
5725 (list python-httpx-bootstrap
5726 python-pytest
5727 python-pytest-asyncio
5728 python-pytest-mock
5729 python-requests
5730 python-trustme
5731 python-wsproto))
5732 (propagated-inputs
5733 (list python-asgiref
5734 python-click
5735 python-dotenv
5736 python-h11
5737 python-httptools
5738 python-pyyaml
5739 python-uvloop
5740 python-watchgod
5741 python-websockets))
5742 (home-page "https://github.com/encode/uvicorn")
5743 (synopsis "Fast ASGI server implementation")
5744 (description
5745 "@code{uvicorn} is a fast ASGI server implementation, using @code{uvloop}
5746and @code{httptools}. It currently supports HTTP/1.1 and WebSockets. Support
5747for HTTP/2 is planned.")
5748 (license license:bsd-3)))
5749
5750(define-public python-translation-finder
5751 (package
5752 (name "python-translation-finder")
5753 (version "1.7")
5754 (source
5755 (origin
5756 (method url-fetch)
5757 (uri (pypi-uri "translation-finder" version))
5758 (sha256
5759 (base32
5760 "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
5761 (build-system python-build-system)
5762 (arguments
5763 `(#:phases
5764 (modify-phases %standard-phases
5765 (add-before 'build 'remove-failing-test
5766 (lambda _
5767 (delete-file "translation_finder/test_api.py")
5768 #t)))))
5769 (propagated-inputs
5770 (list python-chardet python-pathlib2 python-ruamel.yaml python-six))
5771 (native-inputs
5772 (list python-codecov python-codacy-coverage python-pytest-cov
5773 python-pytest-runner python-twine))
5774 (home-page "https://weblate.org/")
5775 (synopsis "Translation file finder for Weblate")
5776 (description "This package provides a function to find translation file in
5777the source code of a project. It supports many translation file formats and
5778is part of the Weblate translation platform.")
5779 (license license:gpl3+)))
5780
5781(define-public python-gitlab
5782 (package
5783 (name "python-gitlab")
5784 (version "3.2.0")
5785 (source (origin
5786 (method url-fetch)
5787 (uri (pypi-uri "python-gitlab" version))
5788 (sha256
5789 (base32
5790 "1gi4lp2g4k99zqcx2bgqx940bpmpbc1w9qkl5gy33hpy148yhvlg"))))
5791 (build-system python-build-system)
5792 (arguments
5793 `(#:tests? #f)) ;tests require network access
5794 (propagated-inputs (list python-requests python-requests-toolbelt))
5795 (home-page "https://github.com/python-gitlab/python-gitlab")
5796 (synopsis "Interact with GitLab API")
5797 (description "This package provides an extended library for interacting
5798with GitLab instances through their API.")
5799 (license license:lgpl3+)))
5800
5801(define-public python-path-and-address
5802 (package
5803 (name "python-path-and-address")
5804 (version "2.0.1")
5805 (source
5806 (origin
5807 ;; The source distributed on PyPI doesn't include tests.
5808 (method git-fetch)
5809 (uri (git-reference
5810 (url "https://github.com/joeyespo/path-and-address")
5811 (commit (string-append "v" version))))
5812 (file-name (git-file-name name version))
5813 (sha256
5814 (base32
5815 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
5816 (build-system python-build-system)
5817 (arguments
5818 `(#:phases
5819 (modify-phases %standard-phases
5820 (replace 'check
5821 (lambda* (#:key inputs outputs #:allow-other-keys)
5822 (add-installed-pythonpath inputs outputs)
5823 (invoke "py.test"))))))
5824 (native-inputs
5825 (list python-pytest))
5826 (home-page "https://github.com/joeyespo/path-and-address")
5827 (synopsis "Functions for command-line server tools used by humans")
5828 (description "Path-and-address resolves ambiguities of command-line
5829interfaces, inferring which argument is the path, and which is the address.")
5830 (license license:expat)))
5831
5832(define-public grip
5833 (package
5834 (name "grip")
5835 (version "4.6.1")
5836 (source (origin
5837 (method git-fetch)
5838 (uri (git-reference
5839 (url "https://github.com/joeyespo/grip")
5840 (commit (string-append "v" version))))
5841 (file-name (git-file-name name version))
5842 (sha256
5843 (base32
5844 "0vhimd99zw7s1fihwr6yfij6ywahv9gdrfcf5qljvzh75mvzcwh8"))))
5845 (build-system python-build-system)
5846 (propagated-inputs (list python-docopt
5847 python-flask
5848 python-markdown
5849 python-path-and-address
5850 python-pygments
5851 python-requests))
5852 (native-inputs (list python-pytest python-responses))
5853 (arguments
5854 (list #:phases
5855 #~(modify-phases %standard-phases
5856 (replace 'check
5857 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5858 (when tests?
5859 (add-installed-pythonpath inputs outputs)
5860 (setenv "PATH"
5861 (string-append (getenv "PATH") ":"
5862 #$output "/bin"))
5863 (invoke "py.test" "-m" "not assumption")))))))
5864 (home-page "https://github.com/joeyespo/grip")
5865 (synopsis "Preview Markdown files using the GitHub API")
5866 (description
5867 "Grip is a command-line server application written in Python
5868that uses the GitHub Markdown API to render a local Markdown file. The styles
5869and rendering come directly from GitHub, so you'll know exactly how it will
5870appear. Changes you make to the file will be instantly reflected in the browser
5871without requiring a page refresh.")
5872 (license license:expat)))
5873
5874(define-public python-port-for
5875 (package
5876 (name "python-port-for")
5877 (version "0.4")
5878 (source
5879 (origin
5880 (method url-fetch)
5881 (uri (pypi-uri "port-for" version))
5882 (sha256
5883 (base32
5884 "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
5885 (build-system python-build-system)
5886 (arguments
5887 `(#:phases
5888 (modify-phases %standard-phases
5889 (add-after 'unpack 'use-urllib3
5890 (lambda _
5891 (substitute* "port_for/_download_ranges.py"
5892 (("urllib2") "urllib3")))))))
5893 (propagated-inputs
5894 (list python-urllib3))
5895 (native-inputs
5896 (list python-mock))
5897 (home-page "https://github.com/kmike/port-for/")
5898 (synopsis "TCP localhost port finder and association manager")
5899 (description
5900 "This package provides a utility that helps with local TCP ports
5901management. It can find an unused TCP localhost port and remember the
5902association.")
5903 (license license:expat)))
5904
5905(define-public python-livereload
5906 (package
5907 (name "python-livereload")
5908 (version "2.6.3")
5909 (source
5910 (origin
5911 (method url-fetch)
5912 (uri (pypi-uri "livereload" version))
5913 (sha256
5914 (base32
5915 "0scqjnhg3ap81v36ghp0pik774dnfdkwqsx5j1jfbzarbs32yvvp"))))
5916 (build-system python-build-system)
5917 (propagated-inputs
5918 (list python-six python-tornado))
5919 (home-page "https://github.com/lepture/python-livereload")
5920 (synopsis "Python LiveReload")
5921 (description
5922 "Python LiveReload provides a command line utility, @command{livereload},
5923for starting a web server in a directory. It can trigger arbitrary commands
5924and serve updated contents upon changes to the directory.")
5925 (license license:bsd-3)))
5926
5927(define-public python-vf-1
5928 (package
5929 (name "python-vf-1")
5930 (version "0.0.11")
5931 (source
5932 (origin
5933 (method url-fetch)
5934 (uri (pypi-uri "VF-1" version))
5935 (sha256
5936 (base32
5937 "0xlqsaxsiayk1sd07kpz8abbcnab582y29a1y4882fq6j4gma5xi"))))
5938 (build-system python-build-system)
5939 (home-page "https://github.com/solderpunk/VF-1")
5940 (synopsis "Command line gopher client")
5941 (description "@code{VF-1} is a command line gopher client with
5942@acronym{TLS, Transport Layer Security} support.")
5943 (license license:bsd-2)))
5944
5945(define-public python-httpcore
5946 (package
5947 (name "python-httpcore")
5948 (version "0.17.0")
5949 (source
5950 (origin
5951 ;; PyPI tarball does not contain tests.
5952 (method git-fetch)
5953 (uri (git-reference
5954 (url "https://github.com/encode/httpcore")
5955 (commit version)))
5956 (file-name (git-file-name name version))
5957 (sha256
5958 (base32 "0qf2w6sgn51jd41a4k230jincrk6rchgc0k1bclxhyyzv44q4q8c"))))
5959 (build-system pyproject-build-system)
5960 (arguments
5961 (list
5962 #:test-flags
5963 '(list "--override-ini=asyncio_mode=auto"
5964 "-k"
5965 (string-join '("not test_ssl_request"
5966 ;; PytestUnraisableExceptionWarning
5967 "test_authenticated_socks5_request"
5968 "test_socks5_request"
5969 "test_socks5_request_connect_failed"
5970 "test_socks5_request_failed_to_provide_auth"
5971 "test_socks5_request_incorrect_auth"
5972 ;; marked with @pytest.mark.asyncio but it is not an async function
5973 "test_connection_pool_concurrency"
5974 "test_connection_pool_concurrency_same_domain_keepalive"
5975 "test_response_async_read"
5976 "test_response_async_streaming"
5977 ;; SSL connection has been closed
5978 "test_extra_info")
5979 " and not "))))
5980 (native-inputs
5981 (list python-pytest
5982 python-pytest-asyncio
5983 python-pytest-cov
5984 python-pytest-httpbin
5985 python-pytest-trio
5986 python-uvicorn
5987 python-trustme))
5988 (propagated-inputs
5989 (list python-anyio
5990 python-certifi
5991 python-h11
5992 python-h2
5993 python-sniffio
5994 python-socksio
5995 python-trio
5996 python-trio-typing))
5997 (home-page "https://github.com/encode/httpcore")
5998 (synopsis "Minimal, low-level HTTP client")
5999 (description
6000 "HTTP Core provides a minimal and low-level HTTP client, which does one
6001thing only: send HTTP requests.
6002
6003Some things HTTP Core does do:
6004
6005@itemize
6006@item Sending HTTP requests.
6007@item Provides both sync and async interfaces.
6008@item Supports HTTP/1.1 and HTTP/2.
6009@item Async backend support for asyncio and trio.
6010@item Automatic connection pooling.
6011@item HTTP(S) proxy support.
6012@end itemize")
6013 (license license:bsd-3)))
6014
6015;;; Variant used to break a cycle between python-httpx and python-uvicorn.
6016(define-public python-httpcore-bootstrap
6017 (hidden-package
6018 (package/inherit python-httpcore
6019 (name "python-httpcore-bootstrap")
6020 (arguments (list #:tests? #f))
6021 (native-inputs '()))))
6022
6023(define-public python-httpx
6024 (package
6025 (name "python-httpx")
6026 (version "0.24.0")
6027 (source
6028 (origin
6029 ;; PyPI tarball does not contain tests.
6030 (method git-fetch)
6031 (uri (git-reference
6032 (url "https://github.com/encode/httpx")
6033 (commit version)))
6034 (file-name (git-file-name name version))
6035 (sha256
6036 (base32 "1b35ywrbdk8kcsfvr39gvfp7bvx00scqfigi8b19a1czhacsmc3q"))))
6037 (build-system pyproject-build-system)
6038 (arguments
6039 (list
6040 #:test-flags
6041 '(list "-vv" "-o" "asyncio_mode=auto"
6042 "-k"
6043 ;; These tests try to open an outgoing connection.
6044 (string-append
6045 "not test_connect_timeout"
6046 " and not test_that_send_cause_async_client_to_be_not_closed"
6047 " and not test_that_async_client_caused_warning_when_being_deleted"
6048 " and not test_that_send_cause_client_to_be_not_closed"
6049 " and not test_async_proxy_close"
6050 " and not test_sync_proxy_close"
6051 ;; This test is apparently incompatible with
6052 ;; python-click 8, fails with " AttributeError:
6053 ;; 'function' object has no attribute 'name'".
6054 " and not test_main"))))
6055 (native-inputs
6056 (list python-cryptography
6057 python-hatchling
6058 python-hatch-fancy-pypi-readme
6059 python-pytest
6060 python-pytest-asyncio
6061 python-pytest-trio
6062 python-trio
6063 python-trio-typing
6064 python-trustme
6065 python-uvicorn))
6066 (propagated-inputs
6067 (list python-charset-normalizer
6068 python-brotli
6069 python-certifi
6070 python-chardet
6071 python-httpcore
6072 python-idna
6073 python-rfc3986
6074 python-sniffio))
6075 (home-page "https://www.python-httpx.org/")
6076 (synopsis "HTTP client for Python")
6077 (description
6078 "HTTPX is a fully featured HTTP client for Python 3, which provides sync
6079and async APIs, and support for both HTTP/1.1 and HTTP/2.
6080
6081HTTPX builds on the well-established usability of requests, and gives you:
6082
6083@itemize
6084@item A broadly requests-compatible API.
6085@item Standard synchronous interface, but with async support if you need it.
6086@item HTTP/1.1 and HTTP/2 support.
6087@item Ability to make requests directly to WSGI applications or ASGI applications.
6088@item Strict timeouts everywhere.
6089@item Fully type annotated.
6090@item 99% test coverage.
6091@end itemize
6092
6093Plus all the standard features of requests:
6094
6095@itemize
6096@item International Domains and URLs
6097@item Keep-Alive & Connection Pooling
6098@item Sessions with Cookie Persistence
6099@item Browser-style SSL Verification
6100@item Basic/Digest Authentication
6101@item Elegant Key/Value Cookies
6102@item Automatic Decompression
6103@item Automatic Content Decoding
6104@item Unicode Response Bodies
6105@item Multipart File Uploads
6106@item HTTP(S) Proxy Support
6107@item Connection Timeouts
6108@item Streaming Downloads
6109@item .netrc Support
6110@item Chunked Requests
6111@end itemize")
6112 (license license:bsd-3)))
6113
6114;;; Variant used to break a cycle with python-uvicorn.
6115(define-public python-httpx-bootstrap
6116 (hidden-package
6117 (package/inherit python-httpx
6118 (name "python-httpx-bootstrap")
6119 (arguments (list #:tests? #f))
6120 (native-inputs
6121 (list python-hatchling
6122 python-hatch-fancy-pypi-readme))
6123 (propagated-inputs
6124 (modify-inputs (package-propagated-inputs python-httpx)
6125 (replace "python-httpcore" python-httpcore-bootstrap))))))
6126
6127(define-public python-wsgiprox
6128 (package
6129 (name "python-wsgiprox")
6130 (version "1.5.2")
6131 (source
6132 (origin
6133 (method url-fetch)
6134 (uri (pypi-uri "wsgiprox" version))
6135 (sha256
6136 (base32
6137 "11fsm199pvwbmqx2lccznvws65aam1rqqv0w79gal8hispwgd5rs"))))
6138 (build-system python-build-system)
6139 (arguments
6140 ;; The test suite hangs (see:
6141 ;; https://github.com/webrecorder/wsgiprox/issues/6).
6142 `(#:tests? #f
6143 #:phases
6144 (modify-phases %standard-phases
6145 (add-after 'unpack 'fix-pytest-argument
6146 (lambda _
6147 ;; See: https://github.com/webrecorder/wsgiprox/issues/7.
6148 (substitute* "setup.py"
6149 (("--doctest-module")
6150 "--doctest-modules")))))))
6151 (propagated-inputs
6152 (list python-certauth python-gevent python-websocket-client))
6153 (native-inputs
6154 (list python-mock python-pytest-cov python-waitress))
6155 (home-page "https://github.com/webrecorder/wsgiprox")
6156 (synopsis "HTTP/S proxy with WebSockets over WSGI")
6157 (description "@code{wsgiprox} is a Python WSGI (Web Server Gateway
6158Interface) middle-ware for adding HTTP and HTTPS proxy support to a WSGI
6159application. The library accepts HTTP and HTTPS proxy connections, and routes
6160them to a designated prefix.")
6161 (license license:asl2.0)))
6162
6163(define-public python-warcio
6164 ;; The PyPI release is missing some test support files (see:
6165 ;; https://github.com/webrecorder/warcio/issues/132).
6166 (let ((revision "0")
6167 (commit "aa702cb321621b233c6e5d2a4780151282a778be"))
6168 (package
6169 (name "python-warcio")
6170 (version (git-version "1.7.4" revision commit))
6171 (source
6172 (origin
6173 (method git-fetch)
6174 (uri (git-reference
6175 (url "https://github.com/webrecorder/warcio")
6176 (commit commit)))
6177 (file-name (git-file-name name version))
6178 (sha256
6179 (base32
6180 "11afr6zy3r6rda81010iq496dazg4xid0izg3smg6ighpmvsnzf2"))))
6181 (build-system python-build-system)
6182 (arguments
6183 (list
6184 #:phases
6185 #~(modify-phases %standard-phases
6186 (replace 'check
6187 (lambda* (#:key tests? #:allow-other-keys)
6188 (when tests?
6189 (invoke "pytest" "-vv"
6190 ;; These tests fail due to networking requirements.
6191 "-k" (format #f "not ~a"
6192 (string-join
6193 '("test_post_chunked"
6194 "test_remote"
6195 "test_capture_http_proxy"
6196 "test_capture_https_proxy"
6197 "test_capture_https_proxy_same_session")
6198 " and not ")))))))))
6199 (native-inputs
6200 ;; These inputs are required for the test suite.
6201 (list python-httpbin python-pytest-cov python-requests
6202 python-wsgiprox))
6203 (home-page "https://github.com/webrecorder/warcio")
6204 (synopsis "Streaming web archival archive (WARC) library")
6205 (description "warcio is a Python library to read and write the WARC format
6206commonly used in Web archives. It is designed for fast, low-level access to
6207web archival content, oriented around a stream of WARC records rather than
6208files.")
6209 (license license:asl2.0))))
6210
6211(define-public python-websockets
6212 (package
6213 (name "python-websockets")
6214 (version "10.3")
6215 (source
6216 (origin
6217 (method git-fetch)
6218 (uri (git-reference
6219 (url "https://github.com/aaugustin/websockets")
6220 (commit version)))
6221 (file-name (git-file-name name version))
6222 (sha256
6223 (base32
6224 "1vk7g5z977mi89hamwiqawpmibwvv9ghrf3pqva1waxmyc7gyjb5"))))
6225 (build-system python-build-system)
6226 (arguments
6227 (list #:phases
6228 #~(modify-phases %standard-phases
6229 (add-before 'check 'extend-test-timeout
6230 (lambda _
6231 (setenv "WEBSOCKETS_TESTS_TIMEOUT_FACTOR" "10"))))))
6232 (home-page "https://github.com/aaugustin/websockets")
6233 (synopsis
6234 "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
6235 (description
6236 "@code{websockets} is a library for building WebSocket servers and clients
6237in Python with a focus on correctness and simplicity.
6238
6239Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
6240it provides an elegant coroutine-based API.")
6241 (license license:bsd-3)))
6242
6243(define-public python-selenium
6244 (package
6245 (name "python-selenium")
6246 (version "3.141.0")
6247 (source
6248 (origin
6249 (method url-fetch)
6250 (uri (pypi-uri "selenium" version))
6251 (sha256
6252 (base32
6253 "039hf9knvl4s3hp21bzwsp1g5ri9gxsh504dp48lc6nr1av35byy"))))
6254 (build-system python-build-system)
6255 (propagated-inputs
6256 (list python-urllib3))
6257 (home-page
6258 "https://github.com/SeleniumHQ/selenium/")
6259 (synopsis "Python bindings for Selenium")
6260 (description "Selenium enables web browser automation.
6261Selenium specifically provides infrastructure for the W3C WebDriver specification
6262— a platform and language-neutral coding interface compatible with all
6263major web browsers.")
6264 (license license:asl2.0)))
6265
6266(define-public python-rapidjson
6267 (package
6268 (name "python-rapidjson")
6269 (version "1.10")
6270 (source
6271 (origin
6272 (method url-fetch)
6273 (uri (pypi-uri "python-rapidjson" version))
6274 (sha256
6275 (base32
6276 "0h1m9m4a5rlf5hw6ak7z3qbgdhmqarzxw9d140mcf7mrxpswpzmc"))
6277 (modules '((guix build utils)))
6278 (snippet
6279 '(delete-file-recursively "rapidjson"))))
6280 (build-system pyproject-build-system)
6281 (arguments
6282 (list
6283 #:test-flags '(list "tests")
6284 #:phases
6285 #~(modify-phases %standard-phases
6286 ;; We cannot seem to use #:configure-flags with the
6287 ;; pyproject-build-system to override rj_include_dir.
6288 (add-after 'unpack 'override-rapidjson-sources
6289 (lambda _
6290 (substitute* "setup.py"
6291 (("^rj_include_dir =.*")
6292 (string-append "rj_include_dir = '"
6293 #$(this-package-native-input "rapidjson")
6294 "/include/rapidjson" "'"))
6295 (("if not os.path.isdir.*") "if False:")))))))
6296 (native-inputs
6297 (list rapidjson python-pytest python-pytz))
6298 (home-page "https://github.com/python-rapidjson/python-rapidjson")
6299 (synopsis "Python wrapper around rapidjson")
6300 (description "This package provides a python wrapper around rapidjson.")
6301 (license license:expat)))
6302
6303(define-public python-venusian
6304 (package
6305 (name "python-venusian")
6306 (version "3.0.0")
6307 (source
6308 (origin
6309 (method url-fetch)
6310 (uri (pypi-uri "venusian" version))
6311 (sha256
6312 (base32 "0f7f67dkgxxcjfhpdd5frb9pszkf04lyzzpn5069q0xi89r2p17n"))))
6313 (build-system python-build-system)
6314 (native-inputs
6315 `(("python-pytest" ,python-pytest)
6316 ("python-runner" ,python-pytest-runner)
6317 ("python-pytest-cov" ,python-pytest-cov)))
6318 (arguments '(#:test-target "pytest"))
6319 (home-page "https://docs.pylonsproject.org/projects/venusian")
6320 (synopsis "Library for deferring decorator actions")
6321 (description
6322 "Venusian is a library which allows framework authors to defer decorator
6323actions. Instead of taking actions when a function (or class) decorator is
6324executed at import time, you can defer the action usually taken by the
6325decorator until a separate scan phase.")
6326 (license license:repoze)))
6327
6328(define-public python-zope-deprecation
6329 (package
6330 (name "python-zope-deprecation")
6331 (version "4.4.0")
6332 (source (origin
6333 (method url-fetch)
6334 (uri (pypi-uri "zope.deprecation" version))
6335 (sha256
6336 (base32
6337 "1pz2cv7gv9y1r3m0bdv7ks1alagmrn5msm5spwdzkb2by0w36i8d"))))
6338 (build-system python-build-system)
6339 (native-inputs `())
6340 (propagated-inputs `())
6341 (home-page "https://zopedeprecation.readthedocs.io/")
6342 (synopsis "Function for marking deprecations")
6343 (description "The @code{zope.deprecation} module provides a function for
6344marking modules, classes, functions, methods and properties as deprecated,
6345displaying warnings when usaged in application code.")
6346 (license license:zpl2.1)))
6347
6348(define-public python-translationstring
6349 (package
6350 (name "python-translationstring")
6351 (version "1.3")
6352 (source (origin
6353 (method url-fetch)
6354 (uri (pypi-uri "translationstring" version))
6355 (sha256
6356 (base32
6357 "0bdpcnd9pv0131dl08h4zbcwmgc45lyvq3pa224xwan5b3x4rr2f"))))
6358 (build-system python-build-system)
6359 (home-page "https://docs.pylonsproject.org/projects/translationstring")
6360 (synopsis "Internationalization tooling for the Pylons project")
6361 (description "This package provides a library used by various Pylons
6362project packages for internationalization (i18n) duties related to
6363translation.")
6364 (license license:repoze)))
6365
6366(define-public python-plaster
6367 (package
6368 (name "python-plaster")
6369 (version "1.0")
6370 (source (origin
6371 (method url-fetch)
6372 (uri (pypi-uri "plaster" version))
6373 (sha256
6374 (base32
6375 "1hy8k0nv2mxq94y5aysk6hjk9ryb4bsd13g83m60hcyzxz3wflc3"))))
6376 (build-system python-build-system)
6377 (native-inputs
6378 (list python-pytest))
6379 (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
6380 (synopsis "Configuration loader for multiple config file formats")
6381 (description
6382 "Plaster is a loader interface around multiple config file formats. It
6383exists to define a common API for applications to use when they wish to load
6384configuration. The library itself does not aim to handle anything except a
6385basic API that applications may use to find and load configuration settings.
6386Any specific constraints should be implemented in a pluggable loader which can
6387be registered via an entrypoint.")
6388 (license license:repoze)))
6389
6390(define-public python-plaster-pastedeploy
6391 (package
6392 (name "python-plaster-pastedeploy")
6393 (version "0.7")
6394 (source (origin
6395 (method url-fetch)
6396 (uri (pypi-uri "plaster_pastedeploy" version))
6397 (sha256
6398 (base32
6399 "1zg7gcsvc1kzay1ry5p699rg2qavfsxqwl17mqxzr0gzw6j9679r"))))
6400 (build-system python-build-system)
6401 (native-inputs
6402 (list python-pytest))
6403 (propagated-inputs
6404 (list python-plaster python-pastedeploy))
6405 (home-page "https://github.com/Pylons/plaster_pastedeploy")
6406 (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
6407 (description
6408 "This plugin for @code{python-plaster} adds support for PasteDeploy
6409syntax, it provides a plaster @code{Loader} object that can parse ini files
6410according to the standard set by PasteDeploy")
6411 (license license:expat)))
6412
6413(define-public python-hupper
6414 (package
6415 (name "python-hupper")
6416 (version "1.10.3")
6417 (source (origin
6418 (method url-fetch)
6419 (uri (pypi-uri "hupper" version))
6420 (sha256
6421 (base32
6422 "1nbc648d110jx6ziji980cdmzsd14p8fqrcarsdvr1vm5jvm2vyd"))))
6423 (build-system python-build-system)
6424 (arguments '(#:test-target "pytest"))
6425 (native-inputs
6426 (list python-pytest python-pytest-runner python-watchdog python-mock
6427 python-pytest-cov))
6428 (propagated-inputs
6429 (list python-pytz))
6430 (home-page "https://readthedocs.org/projects/hupper")
6431 (synopsis "Integrated process monitor tracking changes to imported Python files")
6432 (description
6433 "Hupper is an integrated process monitor that will track changes to any
6434imported Python files in sys.modules as well as custom paths. When files are
6435changed the process is restarted.")
6436 (license license:expat)))
6437
6438(define-public python-pyowm
6439 (package
6440 (name "python-pyowm")
6441 (version "3.2.0")
6442 (source
6443 (origin
6444 (method url-fetch)
6445 (uri (pypi-uri "pyowm" version))
6446 (sha256
6447 (base32 "1pm8w6phr4m3xayndfndid366vhf1fpvdgjsp2zicxarmgc0pm53"))))
6448 (build-system python-build-system)
6449 (propagated-inputs (list python-geojson python-pysocks python-requests))
6450 (home-page "https://github.com/csparpa/pyowm")
6451 (synopsis "Python wrapper around OpenWeatherMap web APIs")
6452 (description
6453 "This package provides a Python wrapper around OpenWeatherMap web APIs.")
6454 (license license:expat)))
6455
6456(define-public python-pyramid
6457 (package
6458 (name "python-pyramid")
6459 (version "1.10.4")
6460 (source (origin
6461 (method url-fetch)
6462 (uri (pypi-uri "pyramid" version))
6463 (sha256
6464 (base32
6465 "0rkxs1ajycg2zh1c94xlmls56mx5m161sn8112skj0amza6cn36q"))))
6466 (build-system python-build-system)
6467 (propagated-inputs
6468 (list python-hupper
6469 python-plaster-pastedeploy
6470 python-translationstring
6471 python-venusian
6472 python-webob
6473 python-zope-deprecation
6474 python-zope-interface
6475 python-webtest
6476 python-zope-component
6477 python-plaster))
6478 (home-page "https://trypyramid.com/")
6479 (synopsis "Python web-framework suitable for small and large sites")
6480 (description
6481 "Pyramid makes it easy to write web applications. From minimal
6482request/response web apps to larger, grown applications.")
6483 (license license:repoze)))
6484
6485(define-public python-random-user-agent
6486 (package
6487 (name "python-random-user-agent")
6488 (version "1.0.1")
6489 (source
6490 (origin
6491 (method url-fetch)
6492 (uri (pypi-uri "random_user_agent" version))
6493 (sha256
6494 (base32
6495 "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
6496 (build-system python-build-system)
6497 (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
6498 (synopsis "List of user agents")
6499 (description
6500 "This package provides a list of user agents, from a collection of more
6501than 326,000 known user-agents. Users can pick a random one, or select one
6502based on filters.")
6503 (license license:expat)))
6504
6505(define-public python-flask-restx
6506 (package
6507 (name "python-flask-restx")
6508 (version "0.5.1")
6509 (source
6510 ;; We fetch from the Git repo because there are no tests in the PyPI
6511 ;; archive.
6512 (origin
6513 (method git-fetch)
6514 (uri (git-reference
6515 (url "https://github.com/python-restx/flask-restx")
6516 (commit version)))
6517 (file-name (git-file-name name version))
6518 (sha256
6519 (base32 "18vrmknyxw6adn62pz3kr9kvazfgjgl4pgimdf8527fyyiwcqy15"))))
6520 (build-system python-build-system)
6521 (propagated-inputs
6522 (list python-aniso8601 python-flask python-jsonschema python-pytz))
6523 (native-inputs
6524 (list python-blinker
6525 python-faker
6526 python-pytest
6527 python-pytest-benchmark
6528 python-pytest-flask
6529 python-pytest-mock))
6530 (arguments
6531 `(#:phases
6532 (modify-phases %standard-phases
6533 (replace 'check
6534 (lambda _
6535 (invoke "pytest" "--benchmark-skip" "-k"
6536 ;; Those tests need internet access
6537 (string-join
6538 '("not test_check and not test_valid_value_check \
6539and not test_override_app_level"
6540 "not test_redirect") " and ")))))))
6541 (home-page "https://github.com/python-restx/flask-restx")
6542 (synopsis
6543 "Framework for fast, easy and documented API development with Flask")
6544 (description
6545 "Flask-RESTX is an extension for Flask that adds support for quickly building
6546REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
6547 with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
6548decorators and tools to describe your API and expose its documentation properly using
6549Swagger.")
6550 (license license:bsd-3)))
6551
6552(define-public python-flask-restplus
6553 (deprecated-package "python-flask-restplus" python-flask-restx))
6554
6555(define-public python-flask-socketio
6556 (package
6557 (name "python-flask-socketio")
6558 (version "5.0.1")
6559 (source
6560 (origin
6561 (method url-fetch)
6562 (uri (pypi-uri "Flask-SocketIO" version))
6563 (sha256
6564 (base32
6565 "09r2gpj2nbn72v2zaf6xsvlazln77pgqzp2pg2021nja47sijhsw"))))
6566 (build-system python-build-system)
6567 (propagated-inputs
6568 (list python-flask python-socketio))
6569 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
6570 (home-page "https://github.com/miguelgrinberg/Flask-SocketIO/")
6571 (synopsis "Socket.IO integration for Flask applications")
6572 (description "Socket.IO integration for Flask applications")
6573 (license license:expat)))
6574
6575(define-public python-manuel
6576 (package
6577 (name "python-manuel")
6578 (version "1.10.1")
6579 (source
6580 (origin
6581 (method url-fetch)
6582 (uri (pypi-uri "manuel" version))
6583 (sha256
6584 (base32
6585 "1bdzay7j70fly5fy6wbdi8fbrxjrrlxnxnw226rwry1c8a351rpy"))))
6586 (build-system python-build-system)
6587 (propagated-inputs
6588 (list python-six))
6589 (native-inputs
6590 (list python-zope-testing))
6591 (home-page "https://pypi.org/project/manuel/")
6592 (synopsis "Build tested documentation")
6593 (description
6594 "Manuel lets you mix and match traditional doctests with custom test syntax.")
6595 (license license:asl2.0)))
6596
6597(define-public python-pecan
6598 (package
6599 (name "python-pecan")
6600 (version "1.4.1")
6601 (source
6602 (origin
6603 (method git-fetch) ;no tests in pypi release
6604 (uri (git-reference
6605 (url "https://github.com/pecan/pecan")
6606 (commit version)))
6607 (file-name (git-file-name name version))
6608 (sha256
6609 (base32
6610 "10lz0cqafx3j24m52vv9ph0bxrzyx6wv2dgz7g9kfm60lhaskqkh"))))
6611 (build-system python-build-system)
6612 (arguments
6613 (list
6614 #:phases
6615 #~(modify-phases %standard-phases
6616 (add-after 'unpack 'relax-requirements
6617 (lambda _
6618 (substitute* "test-requirements.txt"
6619 ;; Drop extraneous virtualenv requirement.
6620 ((".*virtualenv.*") ""))))
6621 (replace 'check
6622 (lambda* (#:key tests? #:allow-other-keys)
6623 (when tests?
6624 (invoke "pytest" "-vv" "pecan")))))))
6625 (native-inputs
6626 (list gunicorn
6627 python-genshi
6628 python-jinja2
6629 python-pytest
6630 python-sqlalchemy
6631 uwsgi))
6632 (propagated-inputs
6633 (list python-logutils
6634 python-mako
6635 python-six
6636 python-webob
6637 python-webtest))
6638 (home-page "http://github.com/pecan/pecan")
6639 (synopsis "WSGI object-dispatching web framework")
6640 (description "This package provides a WSGI object-dispatching web
6641framework, designed to be lean and fast, with few dependencies.")
6642 (license license:bsd-3)))
6643
6644(define-public python-persistent
6645 (package
6646 (name "python-persistent")
6647 (version "4.6.4")
6648 (source
6649 (origin
6650 (method url-fetch)
6651 (uri (pypi-uri "persistent" version))
6652 (sha256
6653 (base32
6654 "0imm9ji03lhkpcfmhid7x5209ix8g2rlgki9ik1qxks4b8sm8gzq"))))
6655 (build-system python-build-system)
6656 (propagated-inputs
6657 (list python-cffi python-zope-interface))
6658 (native-inputs
6659 (list python-manuel python-zope-testrunner))
6660 (home-page "https://github.com/zopefoundation/persistent/")
6661 (synopsis "Translucent persistent objects")
6662 (description "This package contains a generic persistence implementation for
6663Python. It forms the core protocol for making objects interact
6664\"transparently\" with a database such as the ZODB.")
6665 (license license:zpl2.1)))
6666
6667(define-public python-btrees
6668 (package
6669 (name "python-btrees")
6670 (version "4.7.2")
6671 (source
6672 (origin
6673 (method url-fetch)
6674 (uri (pypi-uri "BTrees" version))
6675 (sha256
6676 (base32
6677 "0iiq0g9k1g6qgqq84q9h6639vlvzznk1rgdm0rfcnnqkbkmsbr3w"))))
6678 (build-system python-build-system)
6679 (propagated-inputs
6680 (list python-persistent python-zope-interface))
6681 (native-inputs
6682 (list python-persistent python-transaction python-zope-testrunner))
6683 (home-page "https://github.com/zopefoundation/BTrees")
6684 (synopsis "Scalable persistent object containers")
6685 (description
6686 "This package contains a set of persistent object containers built around a
6687modified BTree data structure. The trees are optimized for use inside ZODB's
6688\"optimistic concurrency\" paradigm, and include explicit resolution of
6689conflicts detected by that mechanism.")
6690 (license license:zpl2.1)))
6691
6692(define-public python-transaction
6693 (package
6694 (name "python-transaction")
6695 (version "3.0.0")
6696 (source
6697 (origin
6698 (method url-fetch)
6699 (uri (pypi-uri "transaction" version))
6700 (sha256
6701 (base32
6702 "0bdaks31bgfh78wnj3sij24bfysmqk25crsis6amz8kzrc0d82iv"))))
6703 (build-system python-build-system)
6704 (propagated-inputs
6705 (list python-zope-interface))
6706 (native-inputs
6707 (list python-coverage python-mock python-nose))
6708 (home-page "https://github.com/zopefoundation/transaction")
6709 (synopsis "Transaction management for Python")
6710 (description "This package contains a generic transaction implementation
6711for Python. It is mainly used by the ZODB.")
6712 (license license:zpl2.1)))
6713
6714(define-public python-robot-detection
6715 (package
6716 (name "python-robot-detection")
6717 (version "0.4")
6718 (source
6719 (origin
6720 (method url-fetch)
6721 (uri (pypi-uri "robot-detection" version))
6722 (sha256
6723 (base32
6724 "1xd2jm3yn31bnk1kqzggils2rxj26ylxsfz3ap7bhr3ilhnbg3rx"))))
6725 (build-system python-build-system)
6726 (arguments '(#:tests? #f)) ; Tests not shipped in pypi release.
6727 (propagated-inputs (list python-six))
6728 (home-page "https://github.com/rory/robot-detection")
6729 (synopsis "Detect web crawlers")
6730 (description
6731 "@code{robot_detection} is a python module to detect if a given HTTP User
6732Agent is a web crawler. It uses the list of registered robots from
6733@url{http://www.robotstxt.org}.")
6734 (license license:gpl3+)))
6735
6736(define-public python-pysolr
6737 (package
6738 (name "python-pysolr")
6739 (version "3.9.0")
6740 (source
6741 (origin
6742 (method url-fetch)
6743 (uri (pypi-uri "pysolr" version))
6744 (sha256
6745 (base32
6746 "1rj5jmscvxjwcmlfi6hmkj44l4x6n3ln5p7d8d18j566hzmmzw3f"))))
6747 (build-system python-build-system)
6748 (arguments
6749 '(#:tests? #f)) ; Tests require network access.
6750 (propagated-inputs
6751 (list python-requests))
6752 (native-inputs
6753 (list python-setuptools-scm))
6754 (home-page "https://github.com/django-haystack/pysolr/")
6755 (synopsis "Lightweight python wrapper for Apache Solr")
6756 (description
6757 "This module provides an interface that queries the Apache Solr server
6758using a pure Python implementation.")
6759 (license license:bsd-3)))
6760
6761(define-public python-pyjsparser
6762 (package
6763 (name "python-pyjsparser")
6764 (version "2.7.1")
6765 (source
6766 (origin
6767 (method url-fetch)
6768 (uri (pypi-uri "pyjsparser" version))
6769 (sha256
6770 (base32 "0ycmf9fsvwliqmm1n6sfz7x71y7i2kbfgn39d8lsbiccfxmxlq5y"))))
6771 (build-system python-build-system)
6772 (home-page "https://github.com/PiotrDabkowski/pyjsparser")
6773 (synopsis "Fast JavaScript parser")
6774 (description "This package provides a fast JavaScript parser (based on
6775esprima.js)")
6776 (license license:expat)))
6777
6778(define-public python-js2py
6779 (package
6780 (name "python-js2py")
6781 (version "0.71")
6782 (source
6783 (origin
6784 (method url-fetch)
6785 (uri (pypi-uri "Js2Py" version))
6786 (sha256
6787 (base32 "1kkzkys6dfcbdv51vqxr9cmak350ab4mmykb8dysx60lvl4i06x4"))))
6788 (build-system python-build-system)
6789 (arguments '(#:tests? #false)) ; none included
6790 (propagated-inputs
6791 (list python-pyjsparser python-six python-tzlocal))
6792 (home-page "https://github.com/PiotrDabkowski/Js2Py")
6793 (synopsis "JavaScript to Python translator")
6794 (description
6795 "This package provides a JavaScript to Python translator and a JavaScript
6796interpreter written in pure Python.")
6797 (license license:expat)))
6798
6799(define-public python-http-ece
6800 (package
6801 (name "python-http-ece")
6802 (version "1.1.0")
6803 (source
6804 (origin
6805 (method git-fetch)
6806 (uri (git-reference
6807 (url "https://github.com/web-push-libs/encrypted-content-encoding")
6808 (commit (string-append "v" version))))
6809 (file-name (git-file-name name version))
6810 (sha256
6811 (base32
6812 "0bp4cc0xc123i72h80ax3qz3ixfwx3j7pw343kc7i6kdvfi8klx7"))))
6813 (build-system python-build-system)
6814 (arguments
6815 `(#:phases
6816 (modify-phases %standard-phases
6817 (add-after 'unpack 'change-directory
6818 (lambda _ (chdir "python") #t)))))
6819 (propagated-inputs
6820 (list python-cryptography))
6821 (native-inputs
6822 (list python-coverage python-flake8 python-mock python-nose))
6823 (home-page "https://github.com/web-push-libs/encrypted-content-encoding")
6824 (synopsis "Encrypted Content Encoding for HTTP")
6825 (description
6826 "This package provices a simple implementation of Encrypted Content
6827Encoding for HTTP.")
6828 (license license:expat)))
6829
6830(define-public python-cloudscraper
6831 (package
6832 (name "python-cloudscraper")
6833 (version "1.2.60")
6834 (source
6835 (origin
6836 (method git-fetch)
6837 (uri (git-reference
6838 (url "https://github.com/VeNoMouS/cloudscraper")
6839 (commit version)))
6840 (file-name (git-file-name name version))
6841 (sha256
6842 (base32 "00cmxgwdm0x1j4a4ipwvpzih735hdzidljbijk1b3laj3dgvnvsm"))
6843 (modules '((guix build utils)))
6844 (snippet
6845 '(with-directory-excursion "cloudscraper"
6846 (for-each delete-file
6847 '("captcha/9kw.py"
6848 "captcha/anticaptcha.py"))
6849 (substitute* "__init__.py"
6850 ;; Perhaps it's a joke, but don't promote proprietary software.
6851 (("([Th]is feature is not available) in the .*'" _ prefix)
6852 (string-append prefix ".'")))))))
6853 (build-system python-build-system)
6854 (arguments
6855 `(#:phases
6856 (modify-phases %standard-phases
6857 ;; XXX: Dependencies, that have not yet been packaged
6858 ;; and cause an import error when included.
6859 (add-after 'unpack 'drop-unsupported-sources
6860 (lambda _
6861 (with-directory-excursion "cloudscraper"
6862 (for-each delete-file
6863 '("interpreters/v8.py")))))
6864 (add-after 'unpack 'fix-references
6865 (lambda _
6866 (substitute* "cloudscraper/interpreters/nodejs.py"
6867 (("'node'")
6868 (string-append "'" (which "node") "'")))))
6869 (replace 'check
6870 (lambda* (#:key tests? #:allow-other-keys)
6871 (when tests?
6872 (invoke "pytest" "-vv"
6873 "-k" "not test_getCookieString_challenge_js_challenge1_16_05_2020")))))))
6874 (inputs
6875 (list node))
6876 (propagated-inputs
6877 (list python-js2py
6878 python-polling2
6879 python-requests
6880 python-requests-toolbelt
6881 python-responses
6882 python-pyparsing))
6883 (native-inputs
6884 (list python-pytest))
6885 (home-page "https://github.com/venomous/cloudscraper")
6886 (synopsis "Cloudflare anti-bot bypass")
6887 (description
6888 "This module acts as a webbrowser solving Cloudflare's Javascript
6889challenges.")
6890 (license license:expat)))
6891
6892(define-public python-imap-tools
6893 (package
6894 (name "python-imap-tools")
6895 (version "0.29.0")
6896 (source
6897 (origin
6898 (method url-fetch)
6899 (uri (pypi-uri "imap_tools" version))
6900 (sha256
6901 (base32
6902 "0x122jwpc74wwyw2rsv2fvh6p12y31019ndfr9717jzjkj2d3lhb"))))
6903 (build-system python-build-system)
6904 (arguments '(#:tests? #f)) ; tests require internet access
6905 (home-page "https://github.com/ikvk/imap_tools")
6906 (synopsis "Work with email and mailbox by IMAP")
6907 (description
6908 "This Python library provides tools to deal with email and mailboxes
6909over IMAP:
6910
6911@itemize
6912@item Parsed email message attributes
6913@item Query builder for searching emails
6914@item Work with emails in folders (copy, delete, flag, move, seen)
6915@item Work with mailbox folders (list, set, get, create, exists, rename, delete, status)
6916@end itemize")
6917 (license license:asl2.0)))
6918
6919(define-public python-giturlparse
6920 (package
6921 (name "python-giturlparse")
6922 (version "0.10.0")
6923 (source
6924 (origin
6925 (method url-fetch)
6926 (uri (pypi-uri "giturlparse" version))
6927 (sha256
6928 (base32 "0dxk7sqy8ibaqdl6jzxd0ac1p7shzp4p9f3lhkd7qw9h3llsp595"))))
6929 (build-system python-build-system)
6930 (home-page "https://github.com/nephila/giturlparse")
6931 (synopsis "Git URL parsing module")
6932 (description "This package provides a git URL parsing module which supports
6933parsing and rewriting of remote git URLs from various hosting providers.")
6934 (license license:asl2.0)))
6935
6936(define-public python-hstspreload
6937 (package
6938 (name "python-hstspreload")
6939 (version "2020.10.20")
6940 (source
6941 (origin
6942 (method url-fetch)
6943 (uri (pypi-uri "hstspreload" version))
6944 (sha256
6945 (base32
6946 "1qah80p2xlib1rhivvdj9v5y3girxrj7dwp1mnh8mwaj5wy32y8a"))))
6947 (build-system python-build-system)
6948 (home-page
6949 "https://github.com/sethmlarson/hstspreload")
6950 (synopsis
6951 "Chromium HSTS Preload list as a Python package")
6952 (description
6953 "@code{python-hstspreload} contains Chromium HSTS Preload list
6954as a Python package.")
6955 (license license:bsd-3)))
6956
6957(define-public python-sanic-routing
6958 (package
6959 (name "python-sanic-routing")
6960 (version "0.7.2")
6961 (source
6962 (origin
6963 (method url-fetch)
6964 (uri (pypi-uri "sanic-routing" version))
6965 (sha256
6966 (base32 "0k9paln0jd4sc2bklp977c82n29pk12wiv726siplkh57y5yi70k"))))
6967 (build-system python-build-system)
6968 (arguments
6969 ;; PyPi sources does not contain tests, recursive dependency on
6970 ;; python-sanic.
6971 (list #:tests? #f))
6972 (home-page "https://github.com/sanic-org/sanic-routing/")
6973 (synopsis "Routing component for Sanic")
6974 (description "Internal package for @code{python-sanic}, which provides
6975the @code{BasicRouter}.")
6976 (license license:expat)))
6977
6978(define-public python-sanic-testing
6979 (package
6980 (name "python-sanic-testing")
6981 (version "22.3.0")
6982 (source
6983 (origin
6984 (method url-fetch)
6985 (uri (pypi-uri "sanic-testing" version))
6986 (sha256
6987 (base32 "1vkgi9d3xyik507j4jy9s74mkl81hgx3c2d5y3aa1av9h6wjjivp"))))
6988 (build-system python-build-system)
6989 (arguments
6990 ;; PyPi sources does not contain tests, recursive dependency on
6991 ;; python-sanic.
6992 (list #:tests? #f
6993 #:phases
6994 #~(modify-phases %standard-phases
6995 (add-after 'unpack 'loosen-requirements
6996 (lambda _
6997 ;; Don't place an upper boundary on httpx version.
6998 ;; https://github.com/sanic-org/sanic-testing/pull/39
6999 (substitute* "setup.py"
7000 (("httpx>=0\\.18,<0\\.23")
7001 "httpx>=0.18")))))))
7002 (propagated-inputs (list python-httpx python-sanic-bootstrap
7003 python-websockets))
7004 (home-page "https://github.com/sanic-org/sanic-testing/")
7005 (synopsis "Test clients for Sanic")
7006 (description "Internal package for @code{python-sanic}, which is
7007meant to be the core testing utility and clients for testing Sanic
7008applications.")
7009 (license license:expat)))
7010
7011(define-public python-sanic
7012 (package
7013 (name "python-sanic")
7014 ;; We provide the latest LTS version of python-sanic.
7015 (version "21.12.1")
7016 (source
7017 (origin
7018 (method url-fetch)
7019 (uri (pypi-uri "sanic" version))
7020 (sha256
7021 (base32
7022 "0b8mcd1q9qkwcv2qz8nlyaacs0bp7a1l31sdq2m8hhkxykzfq5bg"))))
7023 (build-system python-build-system)
7024 (arguments
7025 (list
7026 #:phases
7027 #~(modify-phases %standard-phases
7028 (replace 'check
7029 (lambda* (#:key tests? #:allow-other-keys)
7030 (when tests?
7031 (invoke "pytest" "-vv" "./tests" "-k"
7032 (string-append
7033 ;; PyPi sources lack examples module.
7034 "not test_gunicorn_"
7035 ;; Does not expect brotli and reordered headers.
7036 " and not test_raw_headers"
7037 ;; These look like buggy testcases.
7038 " and not test_zero_downtime"
7039 " and not test_non_default_uvloop_config_raises_warning"
7040 " and not test_listeners_triggered"
7041 " and not test_keep_alive_connection_context"
7042 " and not test_keep_alive_client_timeout"
7043 ;; Unclear why they fail since core-updates merge.
7044 " and not test_missing_sni"
7045 " and not test_no_matching_cert"
7046 " and not test_wildcards"))))))))
7047 (propagated-inputs
7048 (list python-aiofiles
7049 python-httptools
7050 python-multidict
7051 python-sanic-routing
7052 python-ujson
7053 python-uvloop
7054 python-websockets))
7055 (native-inputs
7056 (list gunicorn
7057 python-bandit
7058 python-beautifulsoup4
7059 python-chardet
7060 python-isort
7061 python-pytest
7062 python-pytest-benchmark
7063 python-pytest-sanic
7064 python-pytest-sugar
7065 python-pytest-asyncio
7066 python-sanic-testing
7067 python-uvicorn))
7068 (home-page
7069 "https://github.com/sanic-org/sanic/")
7070 (synopsis
7071 "Async Python web server/framework")
7072 (description
7073 "Sanic is a Python web server and web framework
7074that's written to go fast. It allows the usage of the
7075@code{async/await} syntax added in Python 3.5, which makes
7076your code non-blocking and speedy.")
7077 (license license:expat)))
7078
7079(define-public python-sanic-bootstrap
7080 (package
7081 (inherit python-sanic)
7082 (name "python-sanic-bootstrap")
7083 (arguments (list #:tests? #f))
7084 (native-inputs '())))
7085
7086(define-public python-socketio
7087 (package
7088 (name "python-socketio")
7089 (version "5.1.0")
7090 (source
7091 (origin
7092 (method url-fetch)
7093 (uri (pypi-uri "python-socketio" version))
7094 (sha256
7095 (base32
7096 "14vhpxdn54lz54mhcqlgcks0ssbws9gd1y7ii16a2g3gpfdc531k"))))
7097 (build-system python-build-system)
7098 (propagated-inputs
7099 (list python-aiohttp
7100 python-bidict
7101 python-engineio
7102 python-requests
7103 python-websocket-client
7104 python-websockets))
7105 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
7106 (home-page "https://github.com/miguelgrinberg/python-socketio/")
7107 (synopsis "Python Socket.IO server")
7108 (description
7109 "Python implementation of the Socket.IO realtime client and server.")
7110 (license license:expat)))
7111
7112(define-public python-socks
7113 (package
7114 (name "python-socks")
7115 (version "2.0.3")
7116 (source
7117 (origin
7118 (method url-fetch)
7119 (uri (pypi-uri "python-socks" version))
7120 (sha256
7121 (base32
7122 "12msk06c0glljcrx1byd78xgv05lxw81vknqwhn8ccs7an7cmag3"))))
7123 (build-system python-build-system)
7124 (arguments
7125 `(#:tests? #f ; tests not included
7126 #:phases
7127 (modify-phases %standard-phases
7128 (replace 'check
7129 (lambda* (#:key tests? #:allow-other-keys)
7130 (when tests?
7131 (invoke "pytest" "tests/" "-s")))))))
7132 (propagated-inputs
7133 (list python-async-timeout python-curio python-trio))
7134 (native-inputs
7135 (list python-pytest))
7136 (home-page "https://github.com/romis2012/python-socks")
7137 (synopsis
7138 "Core proxy (SOCKS4, SOCKS5, HTTP tunneling) functionality for Python")
7139 (description
7140 "Socks is a library providing core proxy (SOCKS4, SOCKS5, HTTP tunneling)
7141 functionality.")
7142 (license license:asl2.0)))
7143
7144(define-public python-socksio
7145 (package
7146 (name "python-socksio")
7147 (version "1.0.0")
7148 (source
7149 (origin
7150 (method url-fetch)
7151 (uri (pypi-uri "socksio" version))
7152 (sha256
7153 (base32 "1b64j45w35jzhjhnq44bnyad9ydh1iyyd7a6j2c8phxmllyyp2zq"))))
7154 (build-system python-build-system)
7155 (home-page "https://github.com/sethmlarson/socksio")
7156 (synopsis "Sans-I/O implementation of SOCKS4, SOCKS4A, and SOCKS5")
7157 (description "The @code{socksio} Python module is a client-side sans-I/O
7158SOCKS proxy implementation. It supports SOCKS4, SOCKS4A, and SOCKS5.
7159@code{socksio} is a sans-I/O library similar to @code{h11} or @code{h2}; this
7160means the library itself does not handle the actual sending of the bytes
7161through the network, it only deals with the implementation details of the
7162SOCKS protocols. It can be paired with any I/O library.")
7163 (license license:expat)))
7164
7165(define-public python-siosocks
7166 (package
7167 (name "python-siosocks")
7168 (version "0.3.0")
7169 (source (origin
7170 (method url-fetch)
7171 (uri (pypi-uri "siosocks" version))
7172 (sha256
7173 (base32
7174 "0qqxy8wl5mrmlkblzjq9nsg0cbm5jwgj409mhnhq6gd1ypvbndms"))))
7175 (build-system python-build-system)
7176 (arguments
7177 (list #:phases #~(modify-phases %standard-phases
7178 (replace 'check
7179 (lambda* (#:key tests? #:allow-other-keys)
7180 (when tests?
7181 (invoke "pytest" "-vvv")))))))
7182 (native-inputs (list python-pytest python-pytest-asyncio python-pytest-cov
7183 python-pytest-trio))
7184 (propagated-inputs (list python-trio))
7185 (home-page "https://github.com/pohmelie/siosocks")
7186 (synopsis "SOCKSv4 & SOCKSv5 TCP proxy protocol implementation in Python")
7187 (description
7188 "This package provides a Python module and framework for sans-io socks proxy
7189client/server with couple io backends.
7190
7191Features:
7192@itemize
7193@item Only TCP connect (no BIND, no UDP)
7194@item Both client and server
7195@item SOCKS versions: 4, 4a, 5
7196@item SOCKSv5 auth: no auth, username/password
7197@item Couple io backends: @code{asyncio}, @code{trio}, @code{socketserver}
7198@item One-shot socks server (@code{python -m siosocks})
7199@end itemize")
7200 (license license:expat)))
7201
7202(define-public python-msrest
7203 (package
7204 (name "python-msrest")
7205 (version "0.6.21")
7206 (source
7207 (origin
7208 (method url-fetch)
7209 (uri (pypi-uri "msrest" version))
7210 (sha256
7211 (base32 "1n389m3hcsyjskzimq4j71nyw9pjkrp0n5wg1q2c4bfwpv3inrkj"))))
7212 (build-system python-build-system)
7213 (arguments
7214 `(#:phases
7215 (modify-phases %standard-phases
7216 (replace 'check
7217 (lambda* (#:key tests? #:allow-other-keys)
7218 (when tests?
7219 (invoke "pytest"
7220 "-k"
7221 ;; These attempt to connect to bing.com.
7222 (string-append
7223 "not test_basic_aiohttp"
7224 " and not test_basic_async_requests"
7225 " and not test_conf_async_requests"
7226 " and not test_conf_async_trio_requests"
7227 " and not test_basic_aiohttp"
7228 " and not test_basic_async_requests"
7229 " and not test_conf_async_requests"
7230 " and not test_conf_async_trio_requests"))))))))
7231 (propagated-inputs
7232 (list python-aiohttp
7233 python-certifi
7234 python-isodate
7235 python-requests
7236 python-requests-oauthlib))
7237 (native-inputs
7238 (list python-httpretty
7239 python-pytest
7240 python-pytest-aiohttp
7241 python-pytest-asyncio
7242 python-pytest-trio))
7243 (home-page "https://github.com/Azure/msrest-for-python")
7244 (synopsis "AutoRest swagger generator Python client runtime")
7245 (description "This package provides the runtime library @code{msrest} for
7246AutoRest-generated Python clients.")
7247 (license license:expat)))
7248
7249(define-public python-azure-nspkg
7250 (package
7251 (name "python-azure-nspkg")
7252 (version "3.0.2")
7253 (source
7254 (origin
7255 (method url-fetch)
7256 (uri (pypi-uri "azure-nspkg" version ".zip"))
7257 (sha256
7258 (base32
7259 "1l4xwdh0fcnvrv0mzig4g2kgqkfbsy64zjm1ggc6grk3mykcxlz7"))))
7260 (build-system python-build-system)
7261 (native-inputs (list unzip))
7262 (home-page "https://github.com/Azure/azure-sdk-for-python")
7263 (synopsis "Azure namespace internals")
7264 (description
7265 "This package is an internal Azure namespace package.")
7266 (license license:expat)))
7267
7268(define-public python-azure-storage-nspkg
7269 (package
7270 (name "python-azure-storage-nspkg")
7271 (version "3.1.0")
7272 (source
7273 (origin
7274 (method url-fetch)
7275 (uri (pypi-uri "azure-storage-nspkg" version))
7276 (sha256
7277 (base32
7278 "049qcmgshz7dj9yaqma0fwcgbxwddgwyfcw4gmv45xfmaa3bwfvg"))))
7279 (build-system python-build-system)
7280 (propagated-inputs
7281 (list python-azure-nspkg))
7282 (home-page "https://github.com/Azure/azure-storage-python")
7283 (synopsis "Microsoft Azure Storage Namespace package")
7284 (description
7285 "This project provides a client library in Python that makes it easy to
7286communicate with Microsoft Azure Storage services.")
7287 (license license:expat)))
7288
7289(define-public python-azure-common
7290 (package
7291 (name "python-azure-common")
7292 (version "1.1.28")
7293 (source
7294 (origin
7295 (method url-fetch)
7296 (uri (pypi-uri "azure-common" version ".zip"))
7297 (sha256
7298 (base32 "18q4cy1xl2zly3rk7a1sc14w932x59r8c9j4d8dnlsz32hrcvh2a"))))
7299 (build-system python-build-system)
7300 (propagated-inputs (list python-azure-nspkg))
7301 (native-inputs (list unzip))
7302 (home-page "https://github.com/Azure/azure-sdk-for-python")
7303 (synopsis "Microsoft Azure Client library for Python")
7304 (description "This package provides the Microsoft Azure Client library for
7305Python.")
7306 (license license:expat)))
7307
7308(define-public python-azure-core
7309 (package
7310 (name "python-azure-core")
7311 (version "1.24.0")
7312 (source
7313 (origin
7314 (method url-fetch)
7315 (uri (pypi-uri "azure-core" version ".zip"))
7316 (sha256
7317 (base32 "1r8bpn3zz02mj00qbaks5qq49wqd3mznkm90bchd1mxa3w21nnrl"))))
7318 (build-system python-build-system)
7319 (arguments
7320 `(#:phases
7321 (modify-phases %standard-phases
7322 (replace 'check
7323 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7324 (when tests?
7325 ;; This fails because devtools_testutils doesn't exist.
7326 (delete-file "tests/test_connection_string_parsing.py")
7327 ;; Needs network.
7328 (for-each delete-file
7329 '("tests/async_tests/test_streaming_async.py"
7330 "tests/test_streaming.py"))
7331 (add-installed-pythonpath inputs outputs)
7332 (setenv "PYTHONPATH"
7333 (string-append (getcwd) "/tests/testserver_tests/coretestserver:"
7334 (getenv "GUIX_PYTHONPATH")))
7335 (invoke "pytest"
7336 ;; Most of these need network access.
7337 "-m" "not asyncio and not live_test_only"
7338 "-k"
7339 ;; These need network access.
7340 (string-append
7341 "not test_example_raw_response_hook"
7342 " and not test_example_headers_policy"
7343 " and not test_example_request_id_policy"
7344 " and not test_example_user_agent_policy"
7345 " and not test_example_requests"
7346 " and not test_example_pipeline"
7347 " and not test_example_pipeline_client"
7348 " and not test_example_redirect_policy"
7349 " and not test_example_no_redirects"
7350 " and not test_example_retry_policy"
7351 " and not test_example_no_retries"
7352 " and not test_decompress_plain_no_header"
7353 " and not test_compress_plain_no_header"
7354 " and not test_decompress_compressed_no_header"))))))))
7355 (propagated-inputs
7356 (list python-aiohttp
7357 python-requests
7358 python-six
7359 python-trio
7360 python-typing-extensions))
7361 (native-inputs
7362 (list python-flask
7363 python-msrest
7364 python-pytest
7365 python-pytest-aiohttp
7366 python-pytest-asyncio
7367 python-pytest-trio
7368 unzip))
7369 (home-page "https://github.com/Azure/azure-sdk-for-python")
7370 (synopsis "Microsoft Azure Core library for Python")
7371 (description "This package provides the Microsoft Azure Core library for
7372Python.")
7373 (license license:expat)))
7374
7375(define-public python-azure-storage-blob
7376 (package
7377 (name "python-azure-storage-blob")
7378 (version "12.12.0")
7379 (source
7380 (origin
7381 (method url-fetch)
7382 (uri (pypi-uri "azure-storage-blob" version ".zip"))
7383 (sha256
7384 (base32 "1xv23ph822qywjxs81say9xi5dzmvxcii6sww6d1hvd83iyz1npn"))))
7385 (build-system python-build-system)
7386 (propagated-inputs
7387 (list python-azure-core python-cryptography python-msrest))
7388 (native-inputs (list unzip))
7389 (home-page "https://github.com/Azure/azure-sdk-for-python/")
7390 (synopsis "Microsoft Azure Blob Storage client library for Python")
7391 (description "This package provides the Microsoft Azure Blob Storage
7392Client Library for Python.")
7393 (license license:expat)))
7394
7395(define-public python-google-crc32c
7396 (package
7397 (name "python-google-crc32c")
7398 (version "1.3.0")
7399 (source
7400 (origin
7401 (method url-fetch)
7402 (uri (pypi-uri "google-crc32c" version))
7403 (sha256
7404 (base32 "1ps4qaccij6cixs91772y9f9r1n702yfzy4qqmds6x5h7qkycv97"))))
7405 (build-system python-build-system)
7406 (native-inputs (list python-pytest))
7407 (home-page "https://github.com/googleapis/python-crc32c")
7408 (synopsis "Python wrapper of Google CRC32C")
7409 (description
7410 "This package provides a Python wrapper of the C library implementation
7411of the CRC32C hashing algorithm.")
7412 (license license:asl2.0)))
7413
7414(define-public python-google-auth
7415 (package
7416 (name "python-google-auth")
7417 (version "2.17.3")
7418 (source
7419 (origin
7420 (method url-fetch)
7421 (uri (pypi-uri "google-auth" version))
7422 (sha256
7423 (base32 "1z2f0vj374rscvlivhvf9xxjlg4lng4mgpqnygfhy4wbqlmiwcff"))))
7424 (build-system python-build-system)
7425 (arguments
7426 `(#:phases
7427 (modify-phases %standard-phases
7428 (replace 'check
7429 (lambda* (#:key tests? #:allow-other-keys)
7430 (when tests?
7431 (invoke "pytest")))))))
7432 (propagated-inputs
7433 (list python-cachetools
7434 python-cryptography
7435 python-pyasn1-modules
7436 python-rsa
7437 python-six))
7438 (native-inputs
7439 (list python-flask
7440 python-freezegun
7441 python-mock
7442 python-oauth2client
7443 python-pyopenssl
7444 python-pytest
7445 python-pytest-localserver
7446 python-pyu2f
7447 python-requests
7448 python-responses))
7449 (home-page "https://github.com/googleapis/google-auth-library-python")
7450 (synopsis "Google Authentication Library")
7451 (description "This library simplifies using Google's various
7452server-to-server authentication mechanisms to access Google APIs.")
7453 (license license:asl2.0)))
7454
7455(define-public python-google-auth-1
7456 (package
7457 (inherit python-google-auth)
7458 (name "python-google-auth")
7459 (version "1.35.0")
7460 (source
7461 (origin
7462 (method url-fetch)
7463 (uri (pypi-uri "google-auth" version))
7464 (sha256
7465 (base32 "13nqj6hikvbdmbs1vb78c88ym0pd03m09ch00biqw64c0blkn0xp"))))
7466 (arguments
7467 `(#:phases
7468 (modify-phases %standard-phases
7469 (replace 'check
7470 (lambda* (#:key tests? #:allow-other-keys)
7471 (when tests?
7472 (invoke "pytest")))))))
7473 (propagated-inputs
7474 (list python-cachetools
7475 python-pyasn1-modules
7476 python-rsa
7477 python-six
7478 ;; For the extras
7479 python-pyopenssl
7480 python-pyu2f))
7481 (native-inputs
7482 (list python-flask
7483 python-freezegun
7484 python-oauth2client
7485 python-pytest
7486 python-pytest-localserver
7487 python-requests
7488 python-responses
7489 python-urllib3))))
7490
7491(define-public python-google-resumable-media
7492 (package
7493 (name "python-google-resumable-media")
7494 (version "2.3.2")
7495 (source
7496 (origin
7497 (method url-fetch)
7498 (uri (pypi-uri "google-resumable-media" version))
7499 (sha256
7500 (base32 "04qm6rd4mpbbym8ci5xrb6fymc3mmm8x2z9f43q5iwbr3s5lx4h6"))))
7501 (build-system python-build-system)
7502 (arguments
7503 `(#:phases
7504 (modify-phases %standard-phases
7505 (replace 'check
7506 (lambda* (#:key tests? #:allow-other-keys)
7507 (when tests?
7508 ;; The system tests fail to find test_utils.retry.
7509 (delete-file-recursively "tests/system/")
7510 (invoke "pytest")))))))
7511 (propagated-inputs (list python-google-crc32c))
7512 (native-inputs
7513 (list python-google-auth
7514 python-mock
7515 python-pytest
7516 python-requests
7517 python-test-utils))
7518 (home-page "https://github.com/googleapis/google-resumable-media-python")
7519 (synopsis "Utilities for Google Media Downloads and Resumable Uploads")
7520 (description "This package provides utilities for Google Media Downloads
7521and Resumable Uploads.")
7522 (license license:asl2.0)))
7523
7524(define-public python-googleapis-common-protos
7525 (package
7526 (name "python-googleapis-common-protos")
7527 (version "1.56.4")
7528 (source
7529 (origin
7530 (method url-fetch)
7531 (uri (pypi-uri "googleapis-common-protos" version))
7532 (sha256
7533 (base32 "05s4dszqd5pjwjh4bdic40v1v447k0a3dynsrgypqf3rfb276n62"))))
7534 (build-system python-build-system)
7535 (arguments
7536 `(#:phases
7537 (modify-phases %standard-phases
7538 (replace 'check
7539 (lambda* (#:key tests? #:allow-other-keys)
7540 (when tests?
7541 (invoke "pytest")))))))
7542 (propagated-inputs (list python-protobuf))
7543 (native-inputs
7544 (list python-pytest))
7545 (home-page "https://github.com/googleapis/python-api-common-protos")
7546 (synopsis "Common protobufs used in Google APIs")
7547 (description "This package contains Python classes generated from the
7548common protos in the @code{googleapis/api-common-protos} repository.")
7549 (license license:asl2.0)))
7550
7551(define-public python-google-api-core
7552 (package
7553 (name "python-google-api-core")
7554 (version "2.7.3")
7555 (source
7556 (origin
7557 (method url-fetch)
7558 (uri (pypi-uri "google-api-core" version))
7559 (sha256
7560 (base32 "0ydwvg9gzp75cd11s62db5w3jhj643yrw095rv95psfb0h3pz58p"))))
7561 (build-system python-build-system)
7562 (arguments
7563 `(#:phases
7564 (modify-phases %standard-phases
7565 (replace 'check
7566 (lambda* (#:key tests? #:allow-other-keys)
7567 (when tests?
7568 ;; These don't work because it doesn't find AsyncMock even when
7569 ;; we add it to the inputs.
7570 (for-each delete-file
7571 '("tests/asyncio/test_page_iterator_async.py"
7572 "tests/asyncio/test_retry_async.py"))
7573 (invoke "pytest")))))))
7574 (propagated-inputs
7575 (list python-google-auth
7576 python-googleapis-common-protos
7577 python-protobuf
7578 python-proto-plus
7579 python-requests))
7580 (native-inputs
7581 (list python-mock
7582 python-pytest
7583 python-pytest-asyncio))
7584 (home-page "https://github.com/googleapis/python-api-core")
7585 (synopsis "Google API client core library")
7586 (description "This library defines common helpers used by all Google API
7587clients.")
7588 (license license:asl2.0)))
7589
7590(define-public python-google-api-core-1
7591 (package
7592 (inherit python-google-api-core)
7593 (name "python-google-api-core")
7594 (version "1.32.0")
7595 (source
7596 (origin
7597 (method url-fetch)
7598 (uri (pypi-uri "google-api-core" version))
7599 (sha256
7600 (base32 "0709va9sisll7axkv6ii2x5s0ls38rqp1jnvs6nkpmg7z163q70h"))))
7601 (arguments
7602 `(#:phases
7603 (modify-phases %standard-phases
7604 (replace 'check
7605 (lambda* (#:key tests? #:allow-other-keys)
7606 (when tests?
7607 (for-each
7608 delete-file
7609 '(;; The test suite can't find AsyncMock.
7610 "tests/asyncio/test_page_iterator_async.py"
7611 "tests/asyncio/test_retry_async.py"
7612 ;; Skip the tests depending on grpc.
7613 "tests/asyncio/test_operation_async.py"
7614 "tests/asyncio/test_grpc_helpers_async.py"
7615 "tests/asyncio/operations_v1/test_operations_async_client.py"
7616 "tests/unit/test_bidi.py"
7617 "tests/unit/test_exceptions.py"
7618 "tests/unit/test_grpc_helpers.py"
7619 "tests/unit/test_operation.py"
7620 "tests/unit/operations_v1/test_operations_client.py"))
7621 (delete-file-recursively "tests/asyncio/gapic")
7622 (delete-file-recursively "tests/unit/gapic")
7623 (invoke "pytest" "-k" "not test_constructor_defaults")))))))
7624 (propagated-inputs
7625 (list python-google-auth-1
7626 python-googleapis-common-protos
7627 python-packaging
7628 python-protobuf
7629 python-proto-plus
7630 python-pytz
7631 python-requests))
7632 (native-inputs
7633 (list python-pytest
7634 python-pytest-asyncio))))
7635
7636(define-public python-google-cloud-core
7637 (package
7638 (name "python-google-cloud-core")
7639 (version "2.3.0")
7640 (source
7641 (origin
7642 (method url-fetch)
7643 (uri (pypi-uri "google-cloud-core" version))
7644 (sha256
7645 (base32 "0sa66kidgr32dfq9ngha9l362xnqvnqqmssn5my1gd3lc6g65apx"))))
7646 (build-system python-build-system)
7647 (arguments
7648 `(#:phases
7649 (modify-phases %standard-phases
7650 (replace 'check
7651 (lambda* (#:key tests? #:allow-other-keys)
7652 (when tests?
7653 (invoke "pytest")))))))
7654 (propagated-inputs (list python-google-api-core python-google-auth))
7655 (native-inputs
7656 (list python-grpcio python-pytest))
7657 (home-page "https://github.com/googleapis/python-cloud-core")
7658 (synopsis "Google Cloud API client core library")
7659 (description "This library defines common helpers (e.g. base @code{Client}
7660classes) used by all of the @code{google-cloud-*} packages.")
7661 (license license:asl2.0)))
7662
7663(define-public python-google-cloud-storage
7664 (package
7665 (name "python-google-cloud-storage")
7666 (version "2.3.0")
7667 (source
7668 (origin
7669 (method url-fetch)
7670 (uri (pypi-uri "google-cloud-storage" version))
7671 (sha256
7672 (base32 "0nwg9ic29s70kpvi71gmjv1y4w5a3vc9gj6d16f8w8hpbvgb1jzl"))))
7673 (build-system python-build-system)
7674 (arguments
7675 `(#:phases
7676 (modify-phases %standard-phases
7677 (replace 'check
7678 (lambda* (#:key tests? #:allow-other-keys)
7679 (when tests?
7680 (for-each delete-file-recursively
7681 (list
7682 ;; The system tests fail to find test_utils.retry.
7683 "tests/system/"
7684 ;; Needs docker.
7685 "tests/conformance/"))
7686 (invoke "pytest")))))))
7687 (native-inputs
7688 (list python-mock python-pytest python-test-utils))
7689 (propagated-inputs
7690 (list python-google-api-core
7691 python-google-auth
7692 python-google-cloud-core
7693 python-google-resumable-media
7694 python-protobuf
7695 python-requests))
7696 (home-page "https://github.com/googleapis/python-storage")
7697 (synopsis "Google Cloud Storage API client library")
7698 (description "Google Cloud Storage allows you to store data on Google
7699infrastructure, and it can be used to distribute large data objects to users
7700via direct download. This package provides a Google Cloud Storage API client
7701library for Python.")
7702 (license license:asl2.0)))
7703
7704(define-public python-smart-open
7705 (package
7706 (name "python-smart-open")
7707 (version "6.0.0")
7708 (source
7709 (origin
7710 (method url-fetch)
7711 (uri (pypi-uri "smart_open" version))
7712 (sha256
7713 (base32 "1c12ilanx9hgpcc5chjkaqnx1hx14iazyindy7syvjhbdywhc0fn"))))
7714 (build-system python-build-system)
7715 (arguments
7716 `(#:tests? #false ;none included
7717 #:phases
7718 (modify-phases %standard-phases
7719 (replace 'check
7720 (lambda* (#:key tests? #:allow-other-keys)
7721 (when tests?
7722 (invoke "pytest")))))))
7723 (propagated-inputs
7724 (list python-azure-common
7725 python-azure-core
7726 python-azure-storage-blob
7727 python-boto3
7728 python-google-cloud-storage
7729 python-requests))
7730 (native-inputs
7731 (list python-flask
7732 python-flask-cors
7733 python-graphql-core
7734 python-moto
7735 python-paramiko
7736 python-pathlib2
7737 python-pytest
7738 python-pytest-rerunfailures
7739 python-responses))
7740 (home-page "https://github.com/piskvorky/smart_open")
7741 (synopsis "Utilities for streaming large files")
7742 (description
7743 "This package provides utilities for streaming large files (S3, HDFS,
7744GCS, Azure Blob Storage, gzip, bz2, etc.)")
7745 (license license:expat)))
7746
7747(define-public python-w3lib
7748 (package
7749 (name "python-w3lib")
7750 (version "2.1.2")
7751 (source
7752 (origin
7753 (method url-fetch)
7754 (uri (pypi-uri "w3lib" version))
7755 (sha256
7756 (base32
7757 "1cd4b3w5g3pfccsg79kjj27fwi216ip927rjq7isp8pfjzlp8nzd"))))
7758 (build-system pyproject-build-system)
7759 (native-inputs
7760 (list python-pytest))
7761 (home-page "https://github.com/scrapy/w3lib")
7762 (synopsis "Python library of web-related functions")
7763 (description
7764 "This is a Python library of web-related functions, such as: remove
7765comments, or tags from HTML snippets, extract base url from HTML snippets,
7766translate entities on HTML strings, among other things.")
7767 (license license:bsd-3)))
7768
7769(define-public python-webcolors
7770 (package
7771 (name "python-webcolors")
7772 (version "1.11.1")
7773 (source
7774 (origin
7775 (method url-fetch)
7776 (uri (pypi-uri "webcolors" version))
7777 (sha256
7778 (base32 "1rkda75h2p65zx6r84c9mjavn4xpviqvqrklvdvcklapd5in1wvn"))))
7779 (build-system python-build-system)
7780 (arguments
7781 `(#:phases
7782 (modify-phases %standard-phases
7783 (replace 'check
7784 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
7785 (when tests?
7786 (add-installed-pythonpath inputs outputs)
7787 (invoke "pytest")))))))
7788 (native-inputs
7789 (list python-pytest))
7790 (home-page "https://github.com/ubernostrum/webcolors")
7791 (synopsis "HTML/CSS color definitions library")
7792 (description "@code{python-webcolors} is a module for working with
7793HTML/CSS color definitions. Normalizing and converting between the following
7794formats is supported.
7795@itemize
7796@item Specification-defined color names
7797@item Six-digit hexadecimal
7798@item Three-digit hexadecimal
7799@item Integer rgb() triplet
7800@item Percentage rgb() triplet
7801@end itemize
7802Only the RGB colorspace is supported. Conversion to/from the HSL colorspace
7803can be handled by the @code{colorsys} module in the Python standard library.")
7804 (license license:bsd-3)))
7805
7806(define-public python-woob
7807 (package
7808 (name "python-woob")
7809 (version "3.0")
7810 (source
7811 (origin
7812 (method url-fetch)
7813 (uri (pypi-uri "woob" version))
7814 (sha256
7815 (base32 "09hpxy5zhn2b8li0xjf3zd7s46lawb0315p5mdcsci3bj3s4v1j7"))))
7816 (build-system python-build-system)
7817 ;; A small number of tests for optional applications fails due to missing
7818 ;; inputs.
7819 (arguments `(#:tests? #f))
7820 (propagated-inputs
7821 (list python-babel
7822 python-colorama
7823 python-cssselect
7824 python-dateutil
7825 python-feedparser
7826 python-html2text
7827 python-lxml
7828 python-pillow
7829 python-prettytable
7830 python-pyqt
7831 python-pyyaml
7832 python-requests
7833 python-six
7834 python-unidecode))
7835 (native-inputs
7836 (list python-coverage python-flake8 python-nose python-selenium
7837 python-xunitparser))
7838 (home-page "https://woob.tech/")
7839 (synopsis "Woob, Web Outside Of Browsers")
7840 (description "Woob is a collection of applications able to interact with
7841websites, without requiring the user to open them in a browser. It also
7842provides well-defined APIs to talk to websites lacking one.")
7843 (license license:lgpl3+)))
7844
7845(define-public python-flask-combo-jsonapi
7846 (package
7847 (name "python-flask-combo-jsonapi")
7848 (version "1.1.0")
7849 (source
7850 (origin
7851 (method git-fetch)
7852 (uri (git-reference
7853 (url "https://github.com/AdCombo/flask-combo-jsonapi")
7854 (commit version)))
7855 (file-name (git-file-name name version))
7856 (sha256
7857 (base32 "07fhcjiyif80z1vyh35za29sqx1mmqh568jrbrrs675j4a797sj1"))))
7858 (build-system python-build-system)
7859 (arguments
7860 '(#:phases
7861 (modify-phases %standard-phases
7862 (add-after 'unpack 'loosen-requirements
7863 (lambda _
7864 ;; Don't pin specific versions of dependencies.
7865 (substitute* "requirements.txt"
7866 (("^sqlalchemy[=<>].*") "sqlalchemy\n")
7867 (("^marshmallow[=<>].*") "marshmallow\n")
7868 (("^Flask[=<>].*") "Flask\n"))))
7869 (replace 'check
7870 (lambda _
7871 (invoke "pytest" "-vv" "-k"
7872 ;; The following test fails for unknown reasons (see:
7873 ;; https://github.com/AdCombo/flask-combo-jsonapi/issues/66).
7874 "not test_get_list_with_simple_filter_\
7875relationship_custom_qs_api"))))))
7876 (propagated-inputs
7877 (list python-flask
7878 python-marshmallow
7879 python-marshmallow-jsonapi
7880 python-simplejson
7881 python-sqlalchemy
7882 python-apispec
7883 python-simplejson
7884 python-six))
7885 (native-inputs
7886 (list python-coverage
7887 python-coveralls
7888 python-pytest
7889 python-pytest-runner))
7890 (home-page "https://github.com/AdCombo/flask-combo-jsonapi")
7891 (synopsis "Flask extension to quickly create JSON:API 1.0 REST Web APIs")
7892 (description
7893 "Flask-COMBO-JSONAPI is a Python Flask extension for building REST Web APIs
7894compliant with the @uref{https://jsonapi.org, JSON:API 1.0} specification.
7895
7896It tries to combine the power of Flask-Restless with the flexibility of
7897Flask-RESTful to quickly build APIs that fit the complexity of existing
7898real-life projects with legacy data and diverse storage providers.")
7899 (license license:expat)))
7900
7901(define-public python-mwparserfromhell
7902 (package
7903 (name "python-mwparserfromhell")
7904 (version "0.6.3")
7905 (source
7906 (origin
7907 (method url-fetch)
7908 (uri (pypi-uri "mwparserfromhell" version))
7909 (sha256
7910 (base32 "0zh9zaqbac18s7mivqk8am9xw97lfkgcj9hhxj0d4208pkqpkmqs"))))
7911 (build-system python-build-system)
7912 (native-inputs
7913 (list python-pytest python-pytest-runner))
7914 (home-page "https://github.com/earwig/mwparserfromhell")
7915 (synopsis "Python parser for MediaWiki wikicode")
7916 (description
7917 "The MediaWiki Parser From Hell is a python library package that provides
7918a parser for MediaWiki.
7919
7920It exposes parses as normal string objects with additional methods giving
7921access to the special Wikicode features it contains (hyperlinks, tags,
7922templates…). The parser doesn't interpolate strings at all, it remains at a
7923purely formal level.
7924
7925Full documentation may be found at
7926@uref{https://mwparserfromhell.readthedocs.io, ReadTheDocs}")
7927 (license license:expat)))
7928
7929(define-public python-tweepy
7930 (package
7931 (name "python-tweepy")
7932 (version "4.4.0")
7933 (source
7934 (origin
7935 (method git-fetch)
7936 (uri
7937 (git-reference
7938 (url "https://github.com/tweepy/tweepy")
7939 (commit (string-append "v" version))))
7940 (file-name (git-file-name name version))
7941 (sha256
7942 (base32
7943 "0jl3j20iqvzqqw5q5ldval5wrc2pdx94zff3b6b87j51yjx3qjhr"))))
7944 (build-system python-build-system)
7945 (arguments
7946 `(#:phases
7947 (modify-phases %standard-phases
7948 (replace 'check
7949 (lambda* (#:key tests? #:allow-other-keys)
7950 (when tests?
7951 (invoke "python" "-m" "unittest" "discover" "tests")))))))
7952 (propagated-inputs
7953 (list python-aiohttp python-requests python-requests-oauthlib))
7954 (native-inputs
7955 (list python-vcrpy))
7956 (home-page "https://www.tweepy.org/")
7957 (synopsis "Twitter library for Python")
7958 (description "This package provides @code{Tweepy}, an easy-to-use Python
7959library for accessing the Twitter API.")
7960 (license license:expat)))
7961
7962(define-public python-quart
7963 (package
7964 (name "python-quart")
7965 (version "0.17.0")
7966 (source
7967 (origin
7968 (method url-fetch)
7969 (uri (pypi-uri "Quart" version))
7970 (sha256
7971 (base32 "0h4n2dwzmqifya1razp9s7ppr4ra23ljac9v7sl039rzp3c17wic"))))
7972 (build-system python-build-system)
7973 (propagated-inputs
7974 (list hypercorn
7975 python-aiofiles
7976 python-blinker
7977 python-click
7978 python-itsdangerous
7979 python-jinja2
7980 python-markupsafe
7981 python-toml
7982 python-werkzeug))
7983 (home-page "https://gitlab.com/pgjones/quart/")
7984 (synopsis "Python ASGI web microframework with the same API as Flask")
7985 (description
7986 "This package provides a Python ASGI web microframework with the same API
7987as Flask.")
7988 (license license:expat)))
7989
7990(define-public python-ajsonrpc
7991 (package
7992 (name "python-ajsonrpc")
7993 (version "1.2.0")
7994 (source
7995 (origin
7996 (method url-fetch)
7997 (uri (pypi-uri "ajsonrpc" version))
7998 (sha256
7999 (base32 "17x1a4r4l428mhwn53abki9gzdzq3halyr4lj48fw3dzy0caq6vr"))))
8000 (build-system python-build-system)
8001 (propagated-inputs
8002 (list python-quart
8003 python-sanic
8004 python-tornado))
8005 (home-page "https://github.com/pavlov99/ajsonrpc")
8006 (synopsis "Async JSON-RPC 2.0 protocol and server")
8007 (description
8008 "This package provides a Python JSON-RPC 2.0 protocol and server powered
8009by asyncio.")
8010 (license license:expat)))
8011
8012(define-public python-protego
8013 (package
8014 (name "python-protego")
8015 (version "0.2.1")
8016 (source
8017 (origin
8018 (method url-fetch)
8019 (uri (pypi-uri "Protego" version))
8020 (sha256
8021 (base32 "1wigcjyhz8zbk562zhgfbkm733dcn65j1swzvki79dys0i1nsrnz"))))
8022 (build-system python-build-system)
8023 (arguments
8024 `(#:phases
8025 (modify-phases %standard-phases
8026 (replace 'check
8027 (lambda* (#:key tests? #:allow-other-keys)
8028 (when tests?
8029 (invoke "pytest")))))))
8030 (propagated-inputs (list python-six))
8031 (native-inputs (list python-pytest))
8032 (home-page "https://github.com/scrapy/protego")
8033 (synopsis
8034 "Pure-Python robots.txt parser with support for modern conventions")
8035 (description
8036 "Pure-Python robots.txt parser with support for modern conventions.")
8037 (license license:bsd-3)))
8038
8039(define-public python-parsel
8040 (package
8041 (name "python-parsel")
8042 (version "1.8.1")
8043 (source
8044 (origin
8045 (method url-fetch)
8046 (uri (pypi-uri "parsel" version))
8047 (sha256
8048 (base32 "0f8yh30y3961a7kqwcnp4j3s7044ilakykiavc0skwdkr5l8xwmg"))))
8049 (build-system pyproject-build-system)
8050 (propagated-inputs
8051 (list python-cssselect
8052 python-jmespath
8053 python-lxml
8054 python-typing-extensions
8055 python-w3lib))
8056 (native-inputs
8057 (list python-psutil python-pytest))
8058 (home-page "https://github.com/scrapy/parsel")
8059 (synopsis "Extract data from HTML and XML using XPath and CSS selectors")
8060 (description "Parsel is a library to extract and remove data from
8061HTML and XML using XPath and CSS selectors, optionally combined with
8062regular expressions.")
8063 (license license:bsd-3)))
8064
8065(define-public python-scrapy
8066 (package
8067 (name "python-scrapy")
8068 (version "2.10.1")
8069 (source
8070 (origin
8071 (method url-fetch)
8072 (uri (pypi-uri "Scrapy" version))
8073 (sha256
8074 (base32 "03yil4hjn14amx5jnvjfahmm78qqax2664z30xxn0dxmzdspimli"))))
8075 (build-system pyproject-build-system)
8076 (arguments
8077 (list #:test-flags
8078 ;; Tests fail with DNS lookup or need a display.
8079 #~(list "-k" (string-append
8080 "not " (string-join
8081 (list "test_SCRAPY_CHECK_set"
8082 "test_check_all_default_contracts"
8083 "test_check_cb_kwargs_contract"
8084 "test_check_returns_items_contract"
8085 "test_check_returns_requests_contract"
8086 "test_check_scrapes_contract"
8087 "test_pformat"
8088 "test_pformat_old_windows"
8089 "test_pformat_windows")
8090 " and not ")))))
8091 (propagated-inputs
8092 (list python-botocore ; Optional: For S3FeedStorage class.
8093 python-cryptography
8094 python-cssselect
8095 python-itemadapter
8096 python-itemloaders
8097 python-lxml
8098 python-parsel
8099 python-protego
8100 python-pydispatcher
8101 python-pyopenssl
8102 python-queuelib
8103 python-service-identity
8104 python-setuptools
8105 python-tldextract
8106 python-twisted
8107 python-w3lib
8108 python-zope-interface))
8109 (native-inputs
8110 (list python-pytest
8111 python-pytest-xdist
8112 python-pyftpdlib
8113 python-sybil
8114 python-testfixtures
8115 python-uvloop))
8116 (home-page "https://scrapy.org")
8117 (synopsis "High-level Web crawling and Web scraping framework")
8118 (description "Scrapy is a fast high-level web crawling and web
8119scraping framework, used to crawl websites and extract structured data
8120from their pages. It can be used for a wide range of purposes, from data
8121mining to monitoring and automated testing.")
8122 (license license:bsd-3)))
8123
8124(define-public python-jstyleson
8125 (package
8126 (name "python-jstyleson")
8127 (version "0.0.2")
8128 (source
8129 (origin
8130 (method url-fetch)
8131 (uri (pypi-uri "jstyleson" version))
8132 (sha256
8133 (base32 "13ihw6jqwkg3ai4xb83kw39pvh73b2wg6ld3wvj5jaasn7rh6038"))))
8134 (build-system python-build-system)
8135 (arguments (list #:tests? #f)) ;no tests in pypi release
8136 (home-page "https://github.com/linjackson78/jstyleson")
8137 (synopsis "JSON parser supporting js-style comments")
8138 (description "@code{jstyleson} is a Python library to parse JSON.
8139Contrary to the standard Python @code{json} library, it understands js-style
8140comments. Trailing comma is also supported.")
8141 (license license:expat)))
8142
8143(define-public python-html-text
8144 (package
8145 (name "python-html-text")
8146 (version "0.5.2")
8147 (source
8148 (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "html_text" version))
8151 (sha256
8152 (base32 "1v9x171l3bmyayc1144nrkn9410lp4lhlrrjii54j7b5f2xipmmg"))))
8153 (build-system python-build-system)
8154 (native-inputs (list python-pytest))
8155 (propagated-inputs (list python-lxml))
8156 (home-page "https://github.com/TeamHG-Memex/html-text")
8157 (synopsis "Extract text from HTML")
8158 (description "HTML to Text is a Python library for extract text from HTML.
8159Contrary to other solution such as LXML or Beautiful Soup, the text extracted
8160with @code{html_text} does not contain elements such as JavaScript or inline
8161styles not normally visible to users. It also normalizes white space
8162characters in a smarter, more visually pleasing style.")
8163 (license license:expat)))
8164
8165(define-public python-mf2py
8166 (package
8167 (name "python-mf2py")
8168 (version "1.1.2")
8169 (source (origin
8170 (method git-fetch)
8171 (uri (git-reference
8172 (url "https://github.com/microformats/mf2py")
8173 (commit version)))
8174 (file-name (git-file-name name version))
8175 (sha256
8176 (base32
8177 "00pzfc5sl6ywlcr6f2k37n3f2bb7w488p2k95ixzjwx6w3yh747n"))))
8178 (build-system python-build-system)
8179 (arguments
8180 (list
8181 #:phases
8182 #~(modify-phases %standard-phases
8183 (replace 'check
8184 (lambda* (#:key tests? #:allow-other-keys)
8185 (when tests?
8186 (invoke "pytest" "-vv" "test")))))))
8187 (native-inputs (list python-mock python-pytest))
8188 (propagated-inputs
8189 (list python-beautifulsoup4 python-html5lib python-requests))
8190 (home-page "https://github.com/microformats/mf2py")
8191 (synopsis "Python Microformats2 parser")
8192 (description "This Python library provides a Microformats2 parser
8193implementing the full Microformats2 (mf2) specification, including backward
8194compatibility with Microformats1 (mf1).")
8195 (license license:expat)))
8196
8197(define-public python-extruct
8198 (package
8199 (name "python-extruct")
8200 (version "0.13.0")
8201 (source (origin
8202 (method git-fetch) ;for tests
8203 (uri (git-reference
8204 (url "https://github.com/scrapinghub/extruct")
8205 (commit (string-append "v" version))))
8206 (file-name (git-file-name name version))
8207 (sha256
8208 (base32
8209 "075zldf3dqcc429z1vk2ngbmv034bnlyk6arh3rh30jbsvz9pzl5"))))
8210 (build-system python-build-system)
8211 (arguments
8212 (list
8213 #:phases
8214 #~(modify-phases %standard-phases
8215 (replace 'check
8216 (lambda* (#:key tests? #:allow-other-keys)
8217 (when tests?
8218 (invoke "pytest" "-vv" "tests")))))))
8219 (native-inputs (list python-pytest))
8220 (propagated-inputs
8221 (list python-html-text
8222 python-jstyleson
8223 python-lxml
8224 python-mf2py
8225 python-pyrdfa3
8226 python-rdflib
8227 python-rdflib-jsonld
8228 python-w3lib))
8229 (home-page "https://github.com/scrapinghub/extruct")
8230 (synopsis "Extract embedded metadata from HTML markup")
8231 (description "@code{extruct} is a Python library for extracting embedded
8232metadata from HTML markup. Currently, extruct supports:
8233@itemize
8234@item W3C's HTML Microdata
8235@item embedded JSON-LD
8236@item Microformat via mf2py
8237@item Facebook's Open Graph
8238@item (experimental) RDFa via rdflib
8239@item Dublin Core Metadata (DC-HTML-2003)
8240@end itemize")
8241 (license license:bsd-3)))
8242
8243(define-public python-wadllib
8244 (package
8245 (name "python-wadllib")
8246 (version "1.3.6")
8247 (source
8248 (origin
8249 (method url-fetch)
8250 (uri (pypi-uri "wadllib" version))
8251 (sha256
8252 (base32 "1z65crvdsjxh9nahz1g6q021ijmv85ixmq88l96d61qh5imavndc"))))
8253 (build-system python-build-system)
8254 (propagated-inputs (list python-lazr-uri))
8255 (home-page "https://launchpad.net/wadllib")
8256 (synopsis "Web Application Description Language (WADL) navigation library")
8257 (description "The @code{wadllib} Python library allows navigating HTTP
8258resources using Web Application Description Language (WADL) files as guides.")
8259 (license license:lgpl3)))
8260
8261(define-public python-zeep
8262 (package
8263 (name "python-zeep")
8264 (version "4.1.0")
8265 (source
8266 (origin
8267 (method url-fetch)
8268 (uri (pypi-uri "zeep" version))
8269 (patches
8270 (search-patches "python-zeep-Fix-pytest_httpx-test-cases.patch"))
8271 (sha256
8272 (base32 "1ranr4hkjd2kbbhxa3is1qlgkankj3sml5gla6bqs0kbvpmg4rsq"))))
8273 (build-system python-build-system)
8274 (arguments
8275 `(#:phases
8276 (modify-phases %standard-phases
8277 (replace 'check
8278 (lambda* (#:key tests? #:allow-other-keys)
8279 (when tests?
8280 (setenv "HOME" (getcwd)) ; one test requires write access
8281 (invoke "pytest" "-vv")))))))
8282 (propagated-inputs
8283 (list python-attrs
8284 python-cached-property
8285 python-isodate
8286 python-lxml
8287 python-platformdirs
8288 python-pytz
8289 python-requests
8290 python-requests-file
8291 python-requests-toolbelt))
8292 (native-inputs
8293 (list python-aiohttp
8294 python-aioresponses
8295 python-freezegun
8296 python-mock
8297 python-pretend
8298 python-pytest
8299 python-pytest-asyncio
8300 python-pytest-cov
8301 python-pytest-httpx
8302 python-requests-mock))
8303 (home-page "https://docs.python-zeep.org/en/stable/")
8304 (synopsis "Python SOAP client based on lxml / requests")
8305 (description "Zeep is a Python SOAP client. Highlights:
8306
8307@itemize
8308@item Build on top of @code{lxml} and @code{requests}.
8309@item Support for Soap 1.1, Soap 1.2 and HTTP bindings.
8310@item Support for WS-Addressing headers.
8311@item Support for WSSE (UserNameToken / x.509 signing).
8312@item Support for @code{asyncio} via @code{httpx}.
8313@item Experimental support for XOP messages.
8314@end itemize")
8315 (license license:expat)))
8316
8317(define-public python-pysimplesoap
8318 (package
8319 (name "python-pysimplesoap")
8320 (version "1.16.2")
8321 (source (origin
8322 (method url-fetch)
8323 (uri (pypi-uri "PySimpleSOAP" version))
8324 (sha256
8325 (base32
8326 "1qb7dn8m1cjwzql7vqj9i1hsscb7nyhimmlp45jrpzxds38g9fxi"))))
8327 (build-system python-build-system)
8328 (arguments
8329 (list #:tests? #f)) ;tests fail due to attempted web access
8330 (home-page "https://github.com/pysimplesoap/pysimplesoap")
8331 (synopsis "Simple and lightweight SOAP library for Python")
8332 (description
8333 "This package provides a simple and lightweight Python SOAP library for
8334client and server webservices interfaces, aimed to be as small and easy as
8335possible, supporting most common functionality.")
8336 (license license:lgpl3+)))
8337
8338(define-public python-http-client
8339 (package
8340 (name "python-http-client")
8341 (version "3.3.7")
8342 (home-page "https://github.com/sendgrid/python-http-client")
8343 (source (origin
8344 (method git-fetch)
8345 (uri (git-reference
8346 (url home-page)
8347 (commit version)))
8348 (file-name (git-file-name name version))
8349 (sha256
8350 (base32
8351 "0z0ziw3f4zw5fj4spiwhhs2x8qs3i5999ry2p6a5sc8b1lkkj2zi"))
8352 (snippet #~(begin
8353 (use-modules (guix build utils))
8354 (delete-file "tests/profile.py")))))
8355 (build-system python-build-system)
8356 (synopsis "HTTP REST client for Python")
8357 (description
8358 "This package provides access to any RESTful or RESTful-like API.")
8359 (license license:expat)))
8360
8361(define-public python-sendgrid
8362 (package
8363 (name "python-sendgrid")
8364 (version "6.9.7")
8365 (home-page "https://github.com/sendgrid/sendgrid-python/")
8366 (source (origin
8367 (method git-fetch)
8368 (uri (git-reference
8369 (url home-page)
8370 (commit version)))
8371 (file-name (git-file-name name version))
8372 (sha256
8373 (base32
8374 "0kvp4gm3bpcsj2mkv05pgvlcv1jlsfhcljcv61wz5kq9d273h7rg"))))
8375 (build-system python-build-system)
8376 (arguments
8377 (list #:tests? #f)) ;241/340 tests fail due to attempted web access
8378 (propagated-inputs (list python-http-client python-starkbank-ecdsa))
8379 (synopsis "SendGrid API library for Python")
8380 (description
8381 "The @code{sendgrid} Python library allows access to the
8382SendGrid Web API v3. Version 3+ of the library provides full support for all
8383SendGrid Web API v3 endpoints, including the new v3 /mail/send.")
8384 (license license:expat)))
8385
8386(define-public python-starlette
8387 (package
8388 (name "python-starlette")
8389 (version "0.25.0")
8390 (source (origin
8391 (method git-fetch)
8392 (uri (git-reference
8393 (url "https://github.com/encode/starlette")
8394 (commit version)))
8395 (file-name (git-file-name name version))
8396 (sha256
8397 (base32
8398 "1mkkj15lphgycnp51dnrfxbyrx3dicjdcpsqvwc7yw55zyih6h5k"))))
8399 (build-system pyproject-build-system)
8400 (propagated-inputs (list python-anyio
8401 python-typing-extensions
8402 ;; [all] extra dependencies:
8403 python-itsdangerous
8404 python-jinja2
8405 python-multipart
8406 python-pyyaml
8407 python-requests))
8408 (native-inputs (list python-hatchling
8409 python-httpx
8410 python-pytest
8411 python-typing-extensions))
8412 (home-page "https://github.com/encode/starlette")
8413 (synopsis "Little ASGI library")
8414 (description
8415 "Starlette is a lightweight ASGI (Asynchronous Server Gateway
8416Interface) framework/toolkit for building async web services in Python.")
8417 (license license:bsd-3)))
8418
8419(define-public python-starlette-for-fastapi-0.88
8420 (package
8421 (inherit python-starlette)
8422 (name "python-starlette")
8423 (version "0.22.0")
8424 (source (origin
8425 (method git-fetch)
8426 (uri (git-reference
8427 (url "https://github.com/encode/starlette")
8428 (commit version)))
8429 (file-name (git-file-name name version))
8430 (sha256
8431 (base32
8432 "0ybhcw80vj44p5b61kbm0jmw4lndm0dqsysi33rysnh20csqn8dz"))))
8433 (arguments
8434 (list
8435 #:test-flags
8436 ;; XXX: unclear why these tests fail with a decoding error.
8437 '(list "-k" "not test_gzip_ignored_for_responses_with_encoding_set")))))
8438
8439;; A newer version exists, but python-pytorch-lightning requires <2.0.
8440(define-public python-starsessions-for-pytorch-lightning
8441 (package
8442 (name "python-starsessions")
8443 (version "1.3.0")
8444 (source (origin
8445 (method git-fetch)
8446 (uri (git-reference
8447 (url "https://github.com/alex-oleshkevich/starsessions")
8448 (commit (string-append "v" version))))
8449 (file-name (git-file-name name version))
8450 (sha256
8451 (base32
8452 "00dkdhp22vfmcn0w4y7f2ii8m1xj5i7409x58g3l8lvk6v5ng2nf"))))
8453 (build-system pyproject-build-system)
8454 (arguments
8455 (list
8456 #:test-flags
8457 ;; These tests require a running redis server
8458 '(list "--ignore=tests/backends/test_redis.py"
8459 ;; XXX: this failure indicates a real compatibility problem, but
8460 ;; it seems restricted to the tests only.
8461 ;; AttributeError: 'Cookies' object has no attribute
8462 ;; 'clear_session_cookies'
8463 "-k" "not test_session_clears_on_tab_close")
8464 #:phases
8465 '(modify-phases %standard-phases
8466 (add-after 'unpack 'compatibilitiy
8467 (lambda _
8468 ;; aioredis has been renamed
8469 (substitute* "starsessions/backends/redis.py"
8470 (("aioredis") "redis")))))))
8471 (propagated-inputs
8472 (list python-redis
8473 python-itsdangerous
8474 python-starlette-for-fastapi-0.88))
8475 (native-inputs
8476 (list python-black
8477 python-flake8
8478 python-httpx
8479 python-mypy
8480 python-poetry-core
8481 python-pytest
8482 python-pytest-asyncio
8483 python-requests))
8484 (home-page "https://github.com/alex-oleshkevich/starsessions")
8485 (synopsis "Pluggable session support for Starlette and FastAPI")
8486 (description
8487 "This package adds pluggable session backends and ships default
8488@code{InMemoryBackend} and @code{CookieBackend} implementations for Starlette
8489and FastAPI.")
8490 (license license:expat)))
8491
8492(define-public python-fastapi
8493 (package
8494 (name "python-fastapi")
8495 (version "0.92.0")
8496 (source (origin
8497 (method url-fetch)
8498 (uri (pypi-uri "fastapi" version))
8499 (sha256
8500 (base32
8501 "1pm4p5i9h732f0qag85yd9ngjz8x9bhs3fyk2j861cn8s9dhyfh2"))))
8502 (build-system pyproject-build-system)
8503 (arguments
8504 (list
8505 #:test-flags
8506 ;; The test_create_user tests fail with a 400 error: "Email already registered".
8507 '(list "--ignore=docs_src/sql_databases/sql_app_py310/tests/test_sql_app.py"
8508 "--ignore=docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py")))
8509 (propagated-inputs (list python-email-validator
8510 python-httpx
8511 python-itsdangerous
8512 python-jinja2
8513 python-multipart
8514 python-orjson
8515 python-starlette
8516 python-pydantic
8517 python-pyyaml
8518 python-uvicorn
8519 python-ujson))
8520 (native-inputs (list python-databases
8521 python-flask
8522 python-hatchling
8523 python-isort
8524 python-jose
8525 python-mypy
8526 python-passlib
8527 python-peewee
8528 python-pytest
8529 python-sqlalchemy
8530 python-types-orjson
8531 python-types-ujson))
8532 (home-page "https://github.com/tiangolo/fastapi")
8533 (synopsis "Web framework based on type hints")
8534 (description "FastAPI provides a web API framework based on pydantic and
8535starlette.")
8536 (license license:expat)))
8537
8538(define-public python-fastapi-for-pytorch-lightning
8539 (package
8540 (inherit python-fastapi)
8541 (name "python-fastapi")
8542 (version "0.88.0")
8543 (source (origin
8544 (method url-fetch)
8545 (uri (pypi-uri "fastapi" version))
8546 (sha256
8547 (base32
8548 "00pznprvjvrkiqcvn0ksz1pq5n2cgmxhk0gc0mb7q3ha302g6nwi"))))
8549 (propagated-inputs
8550 (modify-inputs (package-propagated-inputs python-fastapi)
8551 (replace "python-starlette" python-starlette-for-fastapi-0.88)))))
8552
8553(define-public python-fastapi-csrf-protect
8554 (package
8555 (name "python-fastapi-csrf-protect")
8556 (version "0.3.1")
8557 (source (origin
8558 (method git-fetch)
8559 (uri (git-reference
8560 (url "https://github.com/aekasitt/fastapi-csrf-protect")
8561 ;; This commit corresponds to version 0.3.1
8562 (commit "536acd651d0d3f9862a0b753ba64dd2d187f8655")))
8563 (file-name (git-file-name name version))
8564 (sha256
8565 (base32
8566 "1zlwa0fplmcihylyvakskwkbkl2cq291fmys5x6wrpfdbjrqbgbj"))))
8567 (build-system pyproject-build-system)
8568 (propagated-inputs
8569 (list python-fastapi python-itsdangerous
8570 python-pydantic))
8571 (native-inputs
8572 (list python-poetry-core
8573 python-pytest))
8574 (home-page "https://github.com/aekasitt/fastapi-csrf-protect")
8575 (synopsis "Cross-Site Request Forgery (XSRF) protection")
8576 (description
8577 "This package provides a stateless implementation of @dfn{Cross-Site
8578Request Forgery} (XSRF) Protection by using the Double Submit Cookie mitigation
8579pattern.")
8580 (license license:expat)))
8581
8582(define-public python-pyactiveresource
8583 (package
8584 (name "python-pyactiveresource")
8585 (version "2.2.2")
8586 (source (origin
8587 (method url-fetch)
8588 (uri (pypi-uri "pyactiveresource" version))
8589 (sha256
8590 (base32
8591 "1n7xvzh1j8fxal0gx9bgg1ayrp3q9mb1a2vb12d6s86wa93880rg"))))
8592 (build-system python-build-system)
8593 (native-inputs (list python-dateutil python-pyyaml))
8594 (propagated-inputs (list python-six))
8595 (home-page "https://github.com/Shopify/pyactiveresource/")
8596 (synopsis "ActiveResource for Python")
8597 (description "This package provides a Python port of the ActiveResource
8598project.
8599
8600Active Resource attempts to provide a coherent wrapper object-relational
8601mapping for REST web services. It follows the same philosophy as Active
8602Record, in that one of its prime aims is to reduce the amount of code needed
8603to map to these resources. This is made possible by relying on a number of
8604code- and protocol-based conventions that make it easy for Active Resource to
8605infer complex relations and structures.")
8606 (license license:expat)))
8607
8608(define-public python-shopifyapi
8609 (package
8610 (name "python-shopifyapi")
8611 (version "12.0.0")
8612 (source (origin
8613 (method url-fetch)
8614 (uri (pypi-uri "ShopifyAPI" version))
8615 (sha256
8616 (base32
8617 "03np9mkycqbw5l5vk0srmq353q3vmbycbbarzv0cg3z703p81gnb"))))
8618 (build-system python-build-system)
8619 (native-inputs (list python-mock))
8620 (propagated-inputs (list python-pyactiveresource python-pyjwt
8621 python-pyyaml python-six))
8622 (home-page "https://github.com/Shopify/shopify_python_api")
8623 (synopsis "Shopify API for Python")
8624 (description "This package provides the Shopify API for Python.
8625
8626The ShopifyAPI library allows Python developers to programmatically access the
8627admin section of stores using an ActiveResource-like interface similar the
8628ruby Shopify API gem. The library makes HTTP requests to Shopify in order to
8629list, create, update, or delete resources (e.g. Order, Product, Collection).")
8630 (license license:expat)))
8631
8632(define-public python-whatthepatch
8633 (package
8634 (name "python-whatthepatch")
8635 (version "1.0.2")
8636 (source (origin
8637 (method url-fetch)
8638 (uri (pypi-uri "whatthepatch" version))
8639 (sha256
8640 (base32
8641 "17zspm5sxhvggkdhwq4s0fzf4mkc825xshn734g2j2iy2xcylh65"))))
8642 (build-system python-build-system)
8643 (home-page "https://github.com/cscorley/whatthepatch")
8644 (synopsis "Patch parsing and application")
8645 (description
8646 "This package provides a library to parse and apply patches.")
8647 (license license:expat)))
8648
8649(define-public python-grid5000
8650 (package
8651 (name "python-grid5000")
8652 (version "1.2.3")
8653 (source (origin
8654 (method git-fetch)
8655 (uri (git-reference
8656 (url "https://gitlab.inria.fr/msimonin/python-grid5000")
8657 (commit (string-append "v" version))))
8658 (file-name (git-file-name name version))
8659 (sha256
8660 "097pm8b68ihk29xz9zv29b1x0bhgjb4lfj8zxk2grbsh7wr9dipg")))
8661 (build-system python-build-system)
8662 (native-inputs (list python-wheel))
8663 (propagated-inputs (list python-requests python-ipython python-pyyaml))
8664 (arguments
8665 (list #:tests? #f)) ; No tests.
8666 (home-page "https://pypi.org/project/python-grid5000/")
8667 (synopsis "Grid5000 python client")
8668 (description
8669 "python-grid5000 is a python package wrapping the Grid5000 REST API.
8670You can use it as a library in your python project or you can explore the
8671Grid5000 resources interactively using the embedded shell.")
8672 (license license:gpl3+)))
8673
8674(define-public python-enoslib
8675 (package
8676 (name "python-enoslib")
8677 (version "8.0.1")
8678 (source (origin
8679 (method git-fetch)
8680 (uri (git-reference
8681 (url "https://gitlab.inria.fr/discovery/enoslib")
8682 (commit (string-append "v" version))))
8683 (file-name (git-file-name name version))
8684 (sha256
8685 "0vs6b0bnlv95mzv0rjbxqwrhzkgjkn91gqipgwdf7y4ffpz8nybg")))
8686 (build-system python-build-system)
8687 (native-inputs (list python-wheel python-pytest python-ddt
8688 python-freezegun))
8689 (propagated-inputs (list ansible
8690 python-cryptography
8691 python-grid5000
8692 python-jsonschema
8693 python-netaddr
8694 python-packaging
8695 python-requests
8696 python-rich
8697 python-sshtunnel
8698 python-pytz))
8699 (arguments
8700 '(#:phases (modify-phases %standard-phases
8701 (replace 'check
8702 (lambda* (#:key tests? #:allow-other-keys)
8703 (when tests?
8704 ;; Otherwise Ansible fails to create its config directory.
8705 (setenv "HOME" "/tmp")
8706 ;; Ignoring the tests requiring an extra dependency (iotlabcli)
8707 (invoke "pytest" "enoslib/tests/unit"
8708 "--ignore"
8709 "enoslib/tests/unit/infra/test_utils.py"
8710 "--ignore-glob"
8711 "enoslib/tests/unit/infra/enos_iotlab/*"))))
8712 ;; Disable the sanity check, which fails with the following error:
8713 ;;
8714 ;; ContextualVersionConflict(rich 12.4.1
8715 ;; (/gnu/store/...-python-rich-12.4.1/lib/python3.9/site-packages),
8716 ;; Requirement.parse('rich[jupyter]~=12.0.0'), {'enoslib'})
8717 ;;
8718 ;; The optional jupyter dependency of rich isn't critical for
8719 ;; EnOSlib to work
8720 (delete 'sanity-check))))
8721
8722 (home-page "https://discovery.gitlabpages.inria.fr/enoslib/index.html")
8723 (synopsis "Deploy distributed testbeds on a variety of platforms")
8724 (description
8725 "EnOSlib is a library to build experimental frameworks on various
8726scientific testbeds. It lets you deploy networks of machines on actual
8727hardware on Grid'5000 or via OpenStack, to Vagrant, Chameleon, and more.")
8728 (license license:gpl3+)))