Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / python-web.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
5 ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
6 ;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <andreas@enge.fr>
7 ;;; Copyright © 2016, 2017, 2020 Marius Bakke <mbakke@fastmail.com>
8 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
10 ;;; Copyright © 2016, 2017, 2020 Julien Lepiller <julien@lepiller.eu>
11 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
12 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
13 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
14 ;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
15 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
16 ;;; Copyright © 2016, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
17 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
18 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
19 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
20 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
21 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
22 ;;; Copyright © 2016 David Craven <david@craven.ch>
23 ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
24 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
25 ;;; Copyright © 2017 Mark Meyer <mark@ofosos.org>
26 ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
27 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
28 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
29 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
30 ;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
31 ;;; Copyright © 2019 Brendan Tildesley <mail@brendan.scot>
32 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
33 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
34 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
35 ;;; Copyright © 2020 Evan Straw <evan.straw99@gmail.com>
36 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
37 ;;; Copyright © 2020 Holger Peters <holger.peters@posteo.de>
38 ;;; Copyright © 2020 Noisytoot <noisytoot@gmail.com>
39 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
40 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
41 ;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
42 ;;;
43 ;;; This file is part of GNU Guix.
44 ;;;
45 ;;; GNU Guix is free software; you can redistribute it and/or modify it
46 ;;; under the terms of the GNU General Public License as published by
47 ;;; the Free Software Foundation; either version 3 of the License, or (at
48 ;;; your option) any later version.
49 ;;;
50 ;;; GNU Guix is distributed in the hope that it will be useful, but
51 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
52 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53 ;;; GNU General Public License for more details.
54 ;;;
55 ;;; You should have received a copy of the GNU General Public License
56 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
57
58 (define-module (gnu packages python-web)
59 #:use-module (guix packages)
60 #:use-module (guix download)
61 #:use-module (guix git-download)
62 #:use-module (guix build-system python)
63 #:use-module (guix utils)
64 #:use-module (gnu packages)
65 #:use-module (gnu packages base)
66 #:use-module (gnu packages check)
67 #:use-module (gnu packages compression)
68 #:use-module (gnu packages curl)
69 #:use-module (gnu packages databases)
70 #:use-module (gnu packages django)
71 #:use-module (gnu packages groff)
72 #:use-module (gnu packages libevent)
73 #:use-module (gnu packages libffi)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages python)
76 #:use-module (gnu packages python-check)
77 #:use-module (gnu packages python-compression)
78 #:use-module (gnu packages python-crypto)
79 #:use-module (gnu packages python-xyz)
80 #:use-module (gnu packages serialization)
81 #:use-module (gnu packages sphinx)
82 #:use-module (gnu packages texinfo)
83 #:use-module (gnu packages tls)
84 #:use-module (gnu packages time)
85 #:use-module (gnu packages web)
86 #:use-module (gnu packages xml)
87 #:use-module ((guix licenses) #:prefix license:)
88 #:use-module (srfi srfi-1))
89
90 (define-public python-aiohttp
91 (package
92 (name "python-aiohttp")
93 (version "3.6.3")
94 (source
95 (origin
96 (method url-fetch)
97 (uri (pypi-uri "aiohttp" version))
98 (sha256
99 (base32 "0i9n7h8n06m2d8ryqyk4fv1si1m44ibq7blbfaxq46vx7jydg339"))
100 (patches (search-patches "python-aiohttp-3.6.2-no-warning-fail.patch"))))
101 (build-system python-build-system)
102 (arguments
103 '(#:phases
104 (modify-phases %standard-phases
105 (add-after 'unpack 'fix-tests
106 (lambda _
107 ;; disable brotli tests, because we’re not providing that optional library
108 (substitute* "tests/test_http_parser.py"
109 ((" async def test_feed_eof_no_err_brotli")
110 " @pytest.mark.xfail\n async def test_feed_eof_no_err_brotli"))
111 ;; make sure the timestamp of this file is > 1990, because a few
112 ;; tests like test_static_file_if_modified_since_past_date depend on it
113 (invoke "touch" "-d" "2020-01-01" "tests/data.unknown_mime_type")
114
115 ;; FIXME: These tests are failing due to deprecation warnings
116 ;; in Python 3.8. Remove this when updating to aiohttp >= 3.7.
117 ;; https://github.com/aio-libs/aiohttp/issues/4477
118 ;; https://github.com/aio-libs/aiohttp/issues/4525
119 (with-directory-excursion "tests"
120 (for-each delete-file '("test_client_session.py"
121 "test_multipart.py"
122 "test_web_middleware.py"
123 "test_web_protocol.py"
124 "test_web_urldispatcher.py")))
125 #t)))))
126 (propagated-inputs
127 `(("python-aiodns" ,python-aiodns)
128 ("python-async-timeout" ,python-async-timeout)
129 ("python-attrs" ,python-attrs)
130 ("python-chardet" ,python-chardet)
131 ("python-idna-ssl" ,python-idna-ssl)
132 ("python-multidict" ,python-multidict)
133 ("python-yarl" ,python-yarl)))
134 (native-inputs
135 `(("python-pytest-runner" ,python-pytest-runner)
136 ("python-pytest-xdit" ,python-pytest-xdist)
137 ("python-pytest-timeout" ,python-pytest-timeout)
138 ("python-pytest-forked" ,python-pytest-forked)
139 ("python-pytest-mock" ,python-pytest-mock)
140 ("gunicorn" ,gunicorn-bootstrap)
141 ("python-freezegun" ,python-freezegun)
142 ("python-async-generator" ,python-async-generator)))
143 (home-page "https://github.com/aio-libs/aiohttp/")
144 (synopsis "Async HTTP client/server framework (asyncio)")
145 (description "@code{aiohttp} is an asynchronous HTTP client/server
146 framework.
147
148 Its main features are:
149 @itemize
150 @item Supports both client and server side of HTTP protocol.
151 @item Supports both client and server Web-Sockets out-of-the-box without the
152 Callback Hell.
153 @item Web-server has middlewares and pluggable routing.
154 @end itemize")
155 (license license:asl2.0)))
156
157 (define-public python-aiohttp-socks
158 (package
159 (name "python-aiohttp-socks")
160 (version "0.2.2")
161 (source
162 (origin
163 (method url-fetch)
164 (uri (pypi-uri "aiohttp_socks" version))
165 (sha256
166 (base32
167 "0473702jk66xrgpm28wbdgpnak4v0dh2qmdjw7ky7hf3lwwqkggf"))))
168 (build-system python-build-system)
169 (propagated-inputs
170 `(("python-aiohttp" ,python-aiohttp)))
171 (home-page "https://github.com/romis2012/aiohttp-socks")
172 (synopsis "SOCKS proxy connector for aiohttp")
173 (description "This package provides a SOCKS proxy connector for
174 aiohttp. It supports SOCKS4(a) and SOCKS5.")
175 (license license:asl2.0)))
176
177 (define-public python-aiodns
178 (package
179 (name "python-aiodns")
180 (version "1.1.1")
181 (source
182 (origin
183 (method url-fetch)
184 (uri (pypi-uri "aiodns" version))
185 (sha256
186 (base32
187 "1snr5paql8dgvc676n8xq460wypjsb1xj53cf3px1s4wczf7lryq"))))
188 (build-system python-build-system)
189 (propagated-inputs
190 `(("python-pycares" ,python-pycares)))
191 (arguments
192 `(#:tests? #f)) ;tests require internet access
193 (home-page "https://github.com/saghul/aiodns")
194 (synopsis "Simple DNS resolver for asyncio")
195 (description "@code{aiodns} provides a simple way for doing
196 asynchronous DNS resolutions with a synchronous looking interface by
197 using @url{https://github.com/saghul/pycares,pycares}.")
198 (license license:expat)))
199
200 (define-public python-aiorpcx
201 (package
202 (name "python-aiorpcx")
203 (version "0.18.3")
204 (source
205 (origin
206 (method url-fetch)
207 (uri (pypi-uri "aiorpcX" version))
208 (sha256
209 (base32
210 "0k545hc7wl6sh1svydzbv6x7sx5pig2pqkl3yxs9riwmvzawx9xp"))))
211 (build-system python-build-system)
212 (propagated-inputs
213 `(("python-attrs" ,python-attrs)))
214 (home-page "https://github.com/kyuupichan/aiorpcX")
215 (synopsis "Generic asyncio RPC implementation")
216 (description
217 "The aiorpcX library is a generic asyncio implementation of RPC suitable
218 for an application that is a client, server or both.
219
220 The package includes a module with full coverage of JSON RPC versions 1.0 and
221 2.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
222 comes with a SOCKS proxy client.")
223 (license (list license:expat license:bsd-2))))
224
225 (define-public python-asgiref
226 (package
227 (name "python-asgiref")
228 (version "3.2.10")
229 (source (origin
230 (method url-fetch)
231 (uri (pypi-uri "asgiref" version))
232 (sha256
233 (base32
234 "06kg3hnnvh7qg0w9amkvk1hd6n6bs055r04b7if6ipa7w4g92lby"))))
235 (build-system python-build-system)
236 (arguments
237 '(#:phases (modify-phases %standard-phases
238 (replace 'check
239 (lambda _
240 (setenv "PYTHONPATH"
241 (string-append "./build/lib:"
242 (getenv "PYTHONPATH")))
243 (invoke "pytest" "-vv"))))))
244 (native-inputs
245 `(("python-pytest" ,python-pytest)
246 ("python-pytest-asyncio" ,python-pytest-asyncio)))
247 (home-page "https://github.com/django/asgiref/")
248 (synopsis "ASGI specs, helper code, and adapters")
249 (description
250 "ASGI is a standard for Python asynchronous web apps and servers to
251 communicate with each other, and positioned as an asynchronous successor to
252 WSGI. This package includes libraries for implementing ASGI servers.")
253 (license license:bsd-3)))
254
255 (define-public python-css-html-js-minify
256 (package
257 (name "python-css-html-js-minify")
258 (version "2.5.5")
259 (source (origin
260 (method url-fetch)
261 (uri (pypi-uri "css-html-js-minify" version ".zip"))
262 (sha256
263 (base32
264 "0v3l2dqdk2y4r6ax259gs4ij1zzm9yxg6491s6254vs9w3vi37sa"))))
265 (build-system python-build-system)
266 ;; XXX: The git repository has no tags, and the PyPI releases do not
267 ;; contain tests.
268 (arguments '(#:tests? #f))
269 (native-inputs `(("unzip" ,unzip)))
270 (home-page "https://github.com/juancarlospaco/css-html-js-minify")
271 (synopsis "CSS/HTML/JS minifier")
272 (description
273 "This package provides a single-file minifier for CSS, HTML, and JavaScript.")
274 ;; XXX: The README just says "GNU GPL and GNU LGPL and MIT". From
275 ;; <https://github.com/juancarlospaco/css-html-js-minify/issues/9> it
276 ;; looks like the user can choose a license.
277 (license (list license:gpl3+ license:lgpl3+ license:expat))))
278
279 (define-public python-falcon
280 (package
281 (name "python-falcon")
282 (version "2.0.0")
283 (source
284 (origin
285 (method url-fetch)
286 (uri (pypi-uri "falcon" version))
287 (sha256
288 (base32
289 "1z6mqfv574x6jiawf67ib52g4kk20c2x7xk7wrn1573b8v7r79gf"))
290 (modules '((guix build utils)))
291 (snippet
292 '(begin
293 (delete-file-recursively "falcon/vendor")
294 (substitute* "setup.py"
295 ((".*falcon\\.vendor\\.mimeparse.*") ""))
296 (substitute* '("falcon/media/handlers.py"
297 "falcon/request.py")
298 (("from falcon\\.vendor ") ""))
299 (substitute* "falcon.egg-info/SOURCES.txt"
300 (("falcon/vendor.*") ""))
301 #t))))
302 (build-system python-build-system)
303 (arguments
304 `(#:phases
305 (modify-phases %standard-phases
306 (replace 'check
307 (lambda* (#:key inputs outputs #:allow-other-keys)
308 ;; Skip orjson, which requires rust to build.
309 (substitute* "tests/test_media_handlers.py"
310 (("== 'CPython") "!= 'CPython"))
311 (add-installed-pythonpath inputs outputs)
312 (invoke "pytest" "--ignore" "falcon"))))))
313 (propagated-inputs
314 `(("python-mimeparse" ,python-mimeparse)))
315 (native-inputs
316 `(("python-cython" ,python-cython) ;for faster binaries
317 ("python-mujson" ,python-mujson)
318 ("python-msgpack" ,python-msgpack)
319 ("python-pytest" ,python-pytest)
320 ("python-pytest-runner" ,python-pytest-runner)
321 ("python-pyyaml" ,python-pyyaml)
322 ("python-rapidjson" ,python-rapidjson)
323 ("python-requests" ,python-requests)
324 ("python-testtools" ,python-testtools)
325 ("python-ujson" ,python-ujson)))
326 (home-page "https://falconframework.org")
327 (synopsis
328 "Web framework for building APIs and application backends")
329 (description
330 "Falcon is a web API framework for building microservices, application
331 backends and higher-level frameworks. Among its features are:
332 @itemize
333 @item Optimized and extensible code base
334 @item Routing via URI templates and REST-inspired resource
335 classes
336 @item Access to headers and bodies through request and response
337 classes
338 @item Request processing via middleware components and hooks
339 @item Idiomatic HTTP error responses
340 @item Straightforward exception handling
341 @item Unit testing support through WSGI helpers and mocks
342 @item Compatible with both CPython and PyPy
343 @item Cython support for better performance when used with CPython
344 @end itemize")
345 (properties `((python2-variant . ,(delay python2-falcon))))
346 (license license:asl2.0)))
347
348 (define-public python2-falcon
349 (let ((falcon (package-with-python2 (strip-python2-variant python-falcon))))
350 (package
351 (inherit falcon)
352 (native-inputs
353 (alist-delete "python-rapidjson" (package-native-inputs falcon))))))
354
355 (define-public python-falcon-cors
356 (package
357 (name "python-falcon-cors")
358 (version "1.1.7")
359 (source
360 (origin
361 (method url-fetch)
362 (uri (pypi-uri "falcon-cors" version))
363 (sha256
364 (base32
365 "12pym7hwsbd8b0c1azn95nas8gm3f1qpr6lpyx0958xm65ffr20p"))))
366 (build-system python-build-system)
367 (native-inputs
368 `(("python-falcon" ,python-falcon)))
369 (home-page
370 "https://github.com/lwcolton/falcon-cors")
371 (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
372 (description "This middleware provides @dfn{cross-origin resource
373 sharing} (CORS) support for Falcon. It allows applying a specially crafted
374 CORS object to the incoming requests, enabling the ability to serve resources
375 over a different origin than that of the web application.")
376 (license license:asl2.0)))
377
378 (define-public python2-falcon-cors
379 (package-with-python2 python-falcon-cors))
380
381 (define-public python-furl
382 (package
383 (name "python-furl")
384 (version "2.0.0")
385 (source
386 (origin
387 (method url-fetch)
388 (uri (pypi-uri "furl" version))
389 (sha256
390 (base32
391 "1v2lakx03d5w8954a39ki44xv5mllnq0a0avhxykv9hrzg0yvjpx"))))
392 (build-system python-build-system)
393 (propagated-inputs
394 `(("python-six" ,python-six)
395 ("python-orderedmultidict" ,python-orderedmultidict)))
396 (native-inputs
397 `(("python-flake8" ,python-flake8)))
398 (home-page "https://github.com/gruns/furl")
399 (synopsis "URL manipulation in Python")
400 (description "Furl provides an easy-to-use alternative to the
401 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
402 (license license:unlicense)))
403
404 (define-public python2-furl
405 (package-with-python2 python-furl))
406
407 (define-public python-httplib2
408 (package
409 (name "python-httplib2")
410 (version "0.9.2")
411 (source
412 (origin
413 (method url-fetch)
414 (uri (pypi-uri "httplib2" version))
415 (sha256
416 (base32
417 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
418 (build-system python-build-system)
419 (home-page "https://github.com/jcgregorio/httplib2")
420 (synopsis "Comprehensive HTTP client library")
421 (description
422 "A comprehensive HTTP client library supporting many features left out of
423 other HTTP libraries.")
424 (license license:expat)))
425
426 (define-public python2-httplib2
427 (package-with-python2 python-httplib2))
428
429 (define-public httpie
430 (package
431 (name "httpie")
432 (version "2.3.0")
433 (source
434 (origin
435 (method url-fetch)
436 (uri (pypi-uri "httpie" version))
437 (sha256
438 (base32
439 "15ngl3yc186gkgqdx8iav9bpj8gxjpzz26y32z92jwyhj4cmfh6m"))))
440 (build-system python-build-system)
441 (arguments
442 ;; The tests attempt to access external web servers, so we cannot run them.
443 '(#:tests? #f))
444 (propagated-inputs
445 `(("python-colorama" ,python-colorama)
446 ("python-pygments" ,python-pygments)
447 ("python-requests" ,python-requests)
448 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)))
449 (home-page "https://httpie.io")
450 (synopsis "cURL-like tool for humans")
451 (description
452 "A command line HTTP client with an intuitive UI, JSON support,
453 syntax highlighting, wget-like downloads, plugins, and more. It consists of
454 a single http command designed for painless debugging and interaction with
455 HTTP servers, RESTful APIs, and web services.")
456 ;; This was fixed in 1.0.3.
457 (properties `((lint-hidden-cve . ("CVE-2019-10751"))))
458 (license license:bsd-3)))
459
460 (define-public python-html2text
461 (package
462 (name "python-html2text")
463 (version "2019.8.11")
464 (source
465 (origin
466 (method url-fetch)
467 (uri (pypi-uri "html2text" version))
468 (sha256
469 (base32
470 "0ppgjplg06kmv9sj0x8p7acczcq2mcfgk1jdjwm4w5w40b0vj5pm"))))
471 (build-system python-build-system)
472 (arguments
473 '(#:phases
474 (modify-phases %standard-phases
475 (replace 'check
476 (lambda _
477 (invoke "pytest" "test/"))))))
478 (native-inputs
479 `(("python-pytest" ,python-pytest)))
480 (home-page "https://github.com/Alir3z4/html2text")
481 (synopsis "Convert HTML into plain text")
482 (description "html2text takes HTML and converts it into plain ASCII text
483 which is also valid markdown. html2text was originally written by Aaron
484 Swartz.")
485 (license license:gpl3+)))
486
487 (define-public python2-html2text
488 (package-with-python2 python-html2text))
489
490 (define-public python-mechanicalsoup
491 (package
492 (name "python-mechanicalsoup")
493 (version "0.11.0")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (pypi-uri "MechanicalSoup" version))
498 (sha256
499 (base32 "0k59wwk75q7nz6i6gynvzhagy02ql0bv7py3qqcwgjw7607yq4i7"))))
500 (build-system python-build-system)
501 (arguments
502 ;; TODO: Enable tests when python-flake8@3.5 hits master.
503 `(#:tests? #f))
504 (propagated-inputs
505 `(("python-beautifulsoup4" ,python-beautifulsoup4)
506 ("python-lxml" ,python-lxml)
507 ("python-requests" ,python-requests)
508 ("python-six" ,python-six)))
509 ;; (native-inputs
510 ;; ;; For tests.
511 ;; `(("python-pytest-flake8" ,python-pytest-flake8)
512 ;; ("python-pytest-httpbin" ,python-pytest-httpbin)
513 ;; ("python-pytest-mock" ,python-pytest-mock)
514 ;; ("python-pytest-runner" ,python-pytest-runner)
515 ;; ("python-requests-mock" ,python-requests-mock)))
516 (home-page "https://mechanicalsoup.readthedocs.io/")
517 (synopsis "Python library for automating website interaction")
518 (description
519 "MechanicalSoup is a Python library for automating interaction with
520 websites. It automatically stores and sends cookies, follows redirects, and can
521 follow links and submit forms. It doesn’t do JavaScript.")
522 (license license:expat)))
523
524 (define-public python2-mechanicalsoup
525 (package-with-python2 python-mechanicalsoup))
526
527 (define-public python-hyperframe
528 (package
529 (name "python-hyperframe")
530 (version "5.2.0")
531 (source
532 (origin
533 (method url-fetch)
534 (uri (pypi-uri "hyperframe" version))
535 (sha256
536 (base32 "07xlf44l1cw0ghxx46sbmkgzil8vqv8kxwy42ywikiy35izw3xd9"))))
537 (build-system python-build-system)
538 (arguments
539 `(#:phases
540 (modify-phases %standard-phases
541 (replace 'check
542 (lambda* (#:key inputs outputs #:allow-other-keys)
543 (add-installed-pythonpath inputs outputs)
544 (invoke "pytest" "-vv" "test"))))))
545 (native-inputs
546 `(("python-pytest" ,python-pytest)))
547 (home-page "https://github.com/python-hyper/hyperframe")
548 (synopsis "HTTP/2 framing layer for Python")
549 (description
550 "This library contains the HTTP/2 framing code used in the hyper project.
551 It provides a pure-Python codebase that is capable of decoding a binary stream
552 into HTTP/2 frames.")
553 (license license:expat)))
554
555 (define-public python-hpack
556 (package
557 (name "python-hpack")
558 (version "3.0.0")
559 (source
560 (origin
561 ;; PyPI tarball is missing some files necessary for the tests.
562 (method git-fetch)
563 (uri (git-reference
564 (url "https://github.com/python-hyper/hpack")
565 (commit (string-append "v" version))))
566 (file-name (git-file-name name version))
567 (sha256
568 (base32 "0w8hkz50a6lzkmgi41ryicm0mh9ca9cx29pm3s0xlpn0vs29xrmd"))))
569 (build-system python-build-system)
570 (arguments
571 `(#:phases
572 (modify-phases %standard-phases
573 (replace 'check
574 (lambda* (#:key inputs outputs #:allow-other-keys)
575 (add-installed-pythonpath inputs outputs)
576 (invoke "pytest" "-vv" "test" "-k"
577 ;; This test will be fixed in the next version. See:
578 ;; https://github.com/python-hyper/hpack/issues/168.
579 "not test_get_by_index_out_of_range"))))))
580 (native-inputs
581 `(("python-pytest" ,python-pytest)))
582 (home-page "https://hyper.rtfd.org")
583 (synopsis "Pure-Python HPACK header compression")
584 (description
585 "This module contains a pure-Python HTTP/2 header encoding (HPACK) logic
586 for use in Python programs that implement HTTP/2.")
587 (license license:expat)))
588
589 (define-public python-h11
590 (package
591 (name "python-h11")
592 (version "0.9.0")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (pypi-uri "h11" version))
597 (sha256
598 (base32 "1qfad70h59hya21vrzz8dqyyaiqhac0anl2dx3s3k80gpskvrm1k"))))
599 (build-system python-build-system)
600 (arguments
601 `(#:phases
602 (modify-phases %standard-phases
603 (replace 'check
604 (lambda _
605 (invoke "pytest" "-vv"))))))
606 (native-inputs
607 `(("python-pytest" ,python-pytest)))
608 (home-page "https://github.com/python-hyper/h11")
609 (synopsis "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1")
610 (description
611 "This is a little HTTP/1.1 library written from scratch in Python, heavily
612 inspired by hyper-h2. It's a bring-your-own-I/O library; h11 contains no IO
613 code whatsoever. This means you can hook h11 up to your favorite network API,
614 and that could be anything you want.")
615 (license license:expat)))
616
617 (define-public python-h2
618 (package
619 (name "python-h2")
620 (version "3.2.0")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (pypi-uri "h2" version))
625 (sha256
626 (base32 "051gg30aca26rdxsmr9svwqm06pdz9bv21ch4n0lgi7jsvml2pw7"))))
627 (build-system python-build-system)
628 (arguments
629 `(#:phases
630 (modify-phases %standard-phases
631 (replace 'check
632 (lambda* (#:key inputs outputs #:allow-other-keys)
633 (add-installed-pythonpath inputs outputs)
634 (invoke "pytest" "-vv" "test"))))))
635 (native-inputs
636 `(("python-pytest" ,python-pytest)))
637 (propagated-inputs
638 `(("python-hpack" ,python-hpack)
639 ("python-hyperframe" ,python-hyperframe)))
640 (home-page "https://github.com/python-hyper/hyper-h2")
641 (synopsis "HTTP/2 State-Machine based protocol implementation")
642 (description
643 "This module contains a pure-Python implementation of a HTTP/2 protocol
644 stack. It does not provide a parsing layer, a network layer, or any rules
645 about concurrency. Instead, it's a purely in-memory solution, defined in
646 terms of data actions and HTTP/2 frames. This is one building block of a full
647 Python HTTP implementation.")
648 (license license:expat)))
649
650 (define-public python-sockjs-tornado
651 (package
652 (name "python-sockjs-tornado")
653 (version "1.0.6")
654 (source
655 (origin
656 (method url-fetch)
657 (uri (pypi-uri "sockjs-tornado" version))
658 (sha256
659 (base32
660 "15dgv6hw6c7h3m310alw1h6p5443lrm9pyqhcv2smc13fz1v04pc"))))
661 (build-system python-build-system)
662 (arguments
663 `(;; There are no tests, and running the test phase requires missing
664 ;; dependencies
665 #:tests? #f))
666 (propagated-inputs
667 `(("python-tornado" ,python-tornado)))
668 (home-page "https://github.com/mrjoes/sockjs-tornado/")
669 (synopsis
670 "SockJS Python server implementation on top of the Tornado framework")
671 (description
672 "SockJS-tornado provides the server-side counterpart to a SockJS client
673 library, through the Tornado framework.
674
675 SockJS provides a low-latency, full-duplex, cross-domain communication channel
676 between a web browser and web server.")
677 (license license:expat)))
678
679 (define-public python2-sockjs-tornado
680 (package-with-python2 python-sockjs-tornado))
681
682 (define-public python-flask-babel
683 (package
684 (name "python-flask-babel")
685 (version "1.0.0")
686 (source
687 (origin
688 (method url-fetch)
689 (uri (pypi-uri "Flask-Babel" version))
690 (sha256
691 (base32
692 "0gmb165vkwv5v7dxsxa2i3zhafns0fh938m2zdcrv4d8z5l099yn"))))
693 (build-system python-build-system)
694 (arguments
695 '(#:phases (modify-phases %standard-phases
696 (replace 'check
697 (lambda _
698 (with-directory-excursion "tests"
699 (invoke "python" "tests.py")))))))
700 (propagated-inputs
701 `(("python-flask" ,python-flask)
702 ("python-babel" ,python-babel)
703 ("python-jinja2" ,python-jinja2)
704 ("python-pytz" ,python-pytz)))
705 (home-page "https://github.com/python-babel/flask-babel")
706 (synopsis "Add i18n/l10n support to Flask applications")
707 (description "This package implements internationalization and localization
708 support for Flask. This is based on the Python babel module as well as pytz -
709 both of which are installed automatically if you install this library.")
710 (license license:bsd-3)))
711
712 (define-public python2-flask-babel
713 (package-with-python2 python-flask-babel))
714
715 (define-public python-html5lib
716 (package
717 (name "python-html5lib")
718 (version "1.0.1")
719 (source
720 (origin
721 (method url-fetch)
722 (uri (pypi-uri "html5lib" version))
723 (sha256
724 (base32
725 "0dipzfrycv6j1jw82v9b7d8lzggx3x8xngx6l4xrqkxwvg7hvjv6"))))
726 (build-system python-build-system)
727 (propagated-inputs
728 `(("python-six" ,python-six)
729 ("python-webencodings" ,python-webencodings)))
730 (arguments
731 `(#:test-target "check"))
732 (home-page
733 "https://github.com/html5lib/html5lib-python")
734 (synopsis
735 "Python HTML parser based on the WHATWG HTML specification")
736 (description
737 "Html5lib is an HTML parser based on the WHATWG HTML specification
738 and written in Python.")
739 (license license:expat)))
740
741 (define-public python2-html5lib
742 (package-with-python2 python-html5lib))
743
744 ;; Needed for python-bleach, a dependency of python-notebook
745 (define-public python-html5lib-0.9
746 (package
747 (inherit python-html5lib)
748 (version "0.999")
749 (source
750 (origin
751 (method url-fetch)
752 (uri (pypi-uri "html5lib" version))
753 (sha256
754 (base32
755 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
756
757 (define-public python2-html5lib-0.9
758 (package-with-python2 python-html5lib-0.9))
759
760 (define-public python-html5-parser
761 (package
762 (name "python-html5-parser")
763 (version "0.4.9")
764 (source (origin
765 (method url-fetch)
766 (uri (pypi-uri "html5-parser" version))
767 (sha256
768 (base32
769 "13yl3vnf3sxl05m0nhpngnrz3g1jvyahd33lys3m3hfb91l8zzi5"))))
770 (build-system python-build-system)
771 (native-inputs
772 `(("pkg-config" ,pkg-config)))
773 (inputs
774 `(("libxml2" ,libxml2)))
775 (propagated-inputs
776 `(("python-lxml" ,python-lxml)
777 ("python-beautifulsoup4" ,python-beautifulsoup4)))
778 (home-page "https://html5-parser.readthedocs.io")
779 (synopsis "Fast C-based HTML5 parsing for Python")
780 (description "This package provides a fast implementation of the HTML5
781 parsing spec for Python. Parsing is done in C using a variant of the gumbo
782 parser. The gumbo parse tree is then transformed into an lxml tree, also in
783 C, yielding parse times that can be a thirtieth of the html5lib parse times.")
784 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
785 ;; indicate ASL2.0, including the LICENSE file for the whole project.
786 (license (list license:asl2.0 license:gpl3))))
787
788 (define-public python2-html5-parser
789 (package-with-python2 python-html5-parser))
790
791 (define-public python-pycurl
792 (package
793 (name "python-pycurl")
794 (version "7.43.0.5")
795 (source
796 (origin
797 (method url-fetch)
798 (uri (string-append "https://dl.bintray.com/pycurl/pycurl/pycurl-"
799 version ".tar.gz"))
800 (sha256
801 (base32 "1cwlb76vddqp2mxqvjbhf367caddzy82rhangddjjhjqaj8x4zgc"))))
802 (build-system python-build-system)
803 (arguments
804 ;; The tests attempt to access external web servers, so we cannot run
805 ;; them. Furthermore, they are skipped altogether when using Python 2.
806 '(#:tests? #f
807 #:phases (modify-phases %standard-phases
808 (add-before 'build 'configure-tls-backend
809 (lambda _
810 ;; XXX: PycURL fails to automatically determine which TLS
811 ;; backend to use when cURL is built with --disable-static.
812 ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
813 (setenv "PYCURL_SSL_LIBRARY" "gnutls")
814 #t)))))
815 (native-inputs
816 `(("python-nose" ,python-nose)
817 ("python-bottle" ,python-bottle)))
818 (inputs
819 `(("curl" ,curl)
820 ("gnutls" ,gnutls)))
821 (home-page "http://pycurl.io/")
822 (synopsis "Lightweight Python wrapper around libcurl")
823 (description "Pycurl is a lightweight wrapper around libcurl. It provides
824 high-speed transfers via libcurl and frequently outperforms alternatives.")
825
826 ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
827 ;; under the terms of LGPLv2.1+ or Expat.
828 (license (list license:lgpl2.1+ license:expat))))
829
830 (define-public python2-pycurl
831 (package-with-python2 python-pycurl))
832
833 (define-public python-webencodings
834 (package
835 (name "python-webencodings")
836 (version "0.5.1")
837 (source (origin
838 (method url-fetch)
839 (uri (pypi-uri "webencodings" version))
840 (sha256
841 (base32
842 "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
843 (build-system python-build-system)
844 (arguments
845 '(#:phases
846 (modify-phases %standard-phases
847 (replace 'check
848 (lambda _
849 (invoke "py.test" "-v" "webencodings/tests.py")
850 #t)))))
851 (native-inputs
852 `(("python-pytest" ,python-pytest)))
853 (home-page "https://github.com/SimonSapin/python-webencodings")
854 (synopsis "Character encoding aliases for legacy web content")
855 (description
856 "In order to be compatible with legacy web content when interpreting
857 something like @code{Content-Type: text/html; charset=latin1}, tools need
858 to use a particular set of aliases for encoding labels as well as some
859 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
860 the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
861 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
862 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
863 defines all such details so that implementations do not have to
864 reverse-engineer each other.
865
866 This module implements the Encoding standard and has encoding labels and
867 BOM detection, but the actual implementation for encoders and decoders
868 is Python’s.")
869 (license license:bsd-3)))
870
871 (define-public python2-webencodings
872 (package-with-python2 python-webencodings))
873
874 (define-public python-openid
875 (package
876 (name "python-openid")
877 (version "3.2.0")
878 (source
879 (origin
880 (method url-fetch)
881 (uri (pypi-uri "python3-openid" version))
882 (sha256
883 (base32
884 "1bxf9a3ny1js422j962zfzl4a9dhj192pvai05whn7j0iy9gdyrk"))))
885 (build-system python-build-system)
886 (arguments
887 `(#:phases
888 (modify-phases %standard-phases
889 (replace 'check
890 (lambda _
891 (invoke "coverage" "run" "-m"
892 "unittest" "openid.test.test_suite"))))))
893 (properties `((python2-variant . ,(delay python2-openid))))
894 (propagated-inputs
895 `(("python-defusedxml" ,python-defusedxml)))
896 (native-inputs
897 `(("python-coverage" ,python-coverage)
898 ("python-psycopg2" ,python-psycopg2)
899 ("python-django" ,python-django)))
900 (home-page "https://github.com/necaris/python3-openid")
901 (synopsis "OpenID support for servers and consumers")
902 (description "This library provides OpenID authentication for Python, both
903 for clients and servers.")
904 (license license:asl2.0)))
905
906 (define-public python2-openid
907 (package
908 (name "python2-openid")
909 (version "2.2.5")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "python-openid" version))
914 (sha256
915 (base32
916 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
917 (build-system python-build-system)
918 (arguments
919 ;; Python 3 support is in `python3-openid`, a separate package.
920 `(#:python ,python-2
921 ;; Tests aren't initialized correctly.
922 #:tests? #f))
923 (home-page "https://github.com/openid/python-openid")
924 (synopsis "OpenID support for servers and consumers")
925 (description "This library provides OpenID authentication for Python, both
926 for clients and servers.")
927 (license license:asl2.0)))
928
929 (define-public python-cssutils
930 (package
931 (name "python-cssutils")
932 (version "1.0.2")
933 (source
934 (origin
935 (method url-fetch)
936 (uri (pypi-uri "cssutils" version))
937 (sha256
938 (base32
939 "1bxchrbqzapwijap0yhlxdil1w9bmwvgx77aizlkhc2mcxjg1z52"))))
940 (build-system python-build-system)
941 (native-inputs
942 `(("unzip" ,unzip))) ; for unpacking the source
943 (arguments
944 `(#:tests? #f)) ; tests require python-pbr < 1.7.0
945 (home-page "http://cthedot.de/cssutils/")
946 (synopsis
947 "CSS Cascading Style Sheets library for Python")
948 (description
949 "Cssutils is a Python package for parsing and building CSS
950 Cascading Style Sheets. Currently it provides a DOM only and no rendering
951 options.")
952 (license license:lgpl3+)))
953
954 (define-public python2-cssutils
955 (package-with-python2 python-cssutils))
956
957 (define-public python-css-parser
958 (package
959 (inherit python-cssutils)
960 (name "python-css-parser")
961 (version "1.0.6")
962 (source
963 (origin
964 (method url-fetch)
965 (uri (pypi-uri "css-parser" version ".tar.gz"))
966 (sha256
967 (base32 "0bmg4kiiir6pj9x3sd12x4dz2c1xpp2bn5nn60fxnbk2lnl4im2f"))))
968 (home-page "https://github.com/ebook-utils/css-parser")
969 (synopsis "Fork of cssutils modified for parsing ebooks")
970 (description
971 "Css-parser is a Python package for parsing and building CSS
972 Cascading Style Sheets. Currently it provides a DOM only and no rendering
973 options.
974
975 It's a fork of cssutils 1.0.2, updated and modified for parsing ebooks, due to
976 cssutils not receiving updates as of 1.0.2.")
977 (license license:lgpl3+)))
978
979 (define-public python2-css-parser
980 (package-with-python2 python-css-parser))
981
982 (define-public python-cssselect
983 (package
984 (name "python-cssselect")
985 (version "1.1.0")
986 (source (origin
987 ;; The PyPI release does not contain tests.
988 (method git-fetch)
989 (uri (git-reference
990 (url "https://github.com/scrapy/cssselect")
991 (commit (string-append "v" version))))
992 (file-name (git-file-name name version))
993 (sha256
994 (base32
995 "0xslrnhbrmgakp4xg6k26qffay3kqffp3a2z2sk27c65rwxa79kc"))))
996 (build-system python-build-system)
997 (arguments
998 `(#:phases (modify-phases %standard-phases
999 (replace 'check
1000 (lambda _
1001 (invoke "pytest" "-vv"))))))
1002 (native-inputs
1003 `(("python-lxml" ,python-lxml)
1004 ("python-pytest" ,python-pytest)))
1005 (home-page "https://github.com/scrapy/cssselect")
1006 (synopsis "CSS3 selector parser and translator to XPath 1.0")
1007 (description
1008 "Cssselect ia a Python module that parses CSS3 Selectors and translates
1009 them to XPath 1.0 expressions. Such expressions can be used in lxml or
1010 another XPath engine to find the matching elements in an XML or HTML document.")
1011 (license license:bsd-3)))
1012
1013 (define-public python2-cssselect
1014 (package-with-python2 python-cssselect))
1015
1016 (define-public python-openid-cla
1017 (package
1018 (name "python-openid-cla")
1019 (version "1.2")
1020 (source
1021 (origin
1022 (method url-fetch)
1023 (uri (pypi-uri "python-openid-cla" version))
1024 (sha256
1025 (base32
1026 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
1027 (build-system python-build-system)
1028 (arguments '(#:tests? #f)) ; No tests.
1029 (home-page "https://github.com/puiterwijk/python-openid-cla/")
1030 (synopsis "Implementation of the OpenID CLA extension for python-openid")
1031 (description "@code{openid-cla} is an implementation of the OpenID
1032 contributor license agreement extension for python-openid.")
1033 (license license:bsd-3)))
1034
1035 (define-public python2-openid-cla
1036 (package-with-python2 python-openid-cla))
1037
1038 (define-public python-openid-teams
1039 (package
1040 (name "python-openid-teams")
1041 (version "1.1")
1042 (source
1043 (origin
1044 (method url-fetch)
1045 (uri (pypi-uri "python-openid-teams" version))
1046 (sha256
1047 (base32
1048 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
1049 (build-system python-build-system)
1050 (arguments '(#:tests? #f)) ; No tests.
1051 (home-page "https://github.com/puiterwijk/python-openid-teams/")
1052 (synopsis "Implementation of the OpenID teams extension for python-openid")
1053 (description
1054 "@code{openid-teams} is an implementation of the OpenID
1055 teams extension for python-openid.")
1056 (license license:bsd-3)))
1057
1058 (define-public python2-openid-teams
1059 (package-with-python2 python-openid-teams))
1060
1061 (define-public python-priority
1062 (package
1063 (name "python-priority")
1064 (version "1.3.0")
1065 (source
1066 (origin
1067 (method url-fetch)
1068 (uri (pypi-uri "priority" version))
1069 (sha256
1070 (base32 "1gpzn9k9zgks0iw5wdmad9b4dry8haiz2sbp6gycpjkzdld9dhbb"))))
1071 (build-system python-build-system)
1072 (arguments
1073 `(#:phases
1074 (modify-phases %standard-phases
1075 (replace 'check
1076 (lambda* (#:key inputs outputs #:allow-other-keys)
1077 (add-installed-pythonpath inputs outputs)
1078 (invoke "pytest" "-vv" "test" "-k"
1079 ;; This test exceeded the Hypothesis deadline.
1080 "not test_period_of_repetition"))))))
1081 (native-inputs
1082 `(("python-hypothesis" ,python-hypothesis)
1083 ("python-pytest" ,python-pytest)
1084 ("python-pytest-cov" ,python-pytest-cov)
1085 ("python-pytest-xdist" ,python-pytest-xdist)))
1086 (home-page "https://python-hyper.org/projects/priority/en/latest/")
1087 (synopsis "Pure-Python implementation of the HTTP/2 priority tree")
1088 (description
1089 "Priority is a pure-Python implementation of the priority logic for HTTP/2,
1090 set out in RFC 7540 Section 5.3 (Stream Priority).")
1091 (license license:expat)))
1092
1093 (define-public python-wsproto
1094 (package
1095 (name "python-wsproto")
1096 (version "0.15.0")
1097 (source
1098 (origin
1099 (method url-fetch)
1100 (uri (pypi-uri "wsproto" version))
1101 (sha256
1102 (base32 "17gsxlli4w8am1wwwl3k90hpdfa213ax40ycbbvb7hjx1v1rhiv1"))))
1103 (build-system python-build-system)
1104 (arguments
1105 `(#:phases
1106 (modify-phases %standard-phases
1107 (replace 'check
1108 (lambda* (#:key inputs outputs #:allow-other-keys)
1109 (add-installed-pythonpath inputs outputs)
1110 (invoke "pytest" "-vv" "test"))))))
1111 (native-inputs
1112 `(("python-pytest" ,python-pytest)))
1113 (propagated-inputs
1114 `(("python-h11" ,python-h11)))
1115 (home-page "https://github.com/python-hyper/wsproto/")
1116 (synopsis "WebSockets state-machine based protocol implementation")
1117 (description
1118 "@code{wsproto} is a pure-Python implementation of a WebSocket protocol
1119 stack. It's written from the ground up to be embeddable in whatever program you
1120 choose to use, ensuring that you can communicate via WebSockets, as defined in
1121 RFC6455, regardless of your programming paradigm.")
1122 (license license:expat)))
1123
1124 (define-public python-hypercorn
1125 (package
1126 (name "python-hypercorn")
1127 (version "0.10.2")
1128 (source
1129 (origin
1130 (method url-fetch)
1131 (uri (pypi-uri "Hypercorn" version))
1132 (sha256
1133 (base32 "15dgy47a18w2ls3hwykra1cyf7yzxmfjqnsqml482p12cxr2xwqr"))))
1134 (build-system python-build-system)
1135 (arguments
1136 `(#:phases
1137 (modify-phases %standard-phases
1138 (replace 'check
1139 (lambda* (#:key inputs outputs #:allow-other-keys)
1140 (add-installed-pythonpath inputs outputs)
1141 (invoke "pytest" "-vv"))))))
1142 (propagated-inputs
1143 `(("python-h11" ,python-h11)
1144 ("python-h2" ,python-h2)
1145 ("python-priority" ,python-priority)
1146 ("python-toml" ,python-toml)
1147 ("python-typing-extensions" ,python-typing-extensions)
1148 ("python-wsproto" ,python-wsproto)))
1149 (native-inputs
1150 `(("python-hypothesis" ,python-hypothesis)
1151 ("python-mock" ,python-mock)
1152 ("python-pytest" ,python-pytest)
1153 ("python-pytest-asyncio" ,python-pytest-asyncio)
1154 ("python-pytest-cov" ,python-pytest-cov)
1155 ("python-pytest-trio" ,python-pytest-trio)
1156 ("python-trio" ,python-trio)))
1157 (home-page "https://gitlab.com/pgjones/hypercorn/")
1158 (synopsis "ASGI Server based on Hyper libraries")
1159 (description
1160 "Hypercorn is an ASGI web server based on the sans-io hyper, h11, h2, and
1161 wsproto libraries and inspired by Gunicorn. It supports HTTP/1, HTTP/2,
1162 WebSockets (over HTTP/1 and HTTP/2), ASGI/2, and ASGI/3 specifications. It can
1163 utilise asyncio, uvloop, or trio worker types.")
1164 (license license:expat)))
1165
1166 (define-public python-tornado
1167 (package
1168 (name "python-tornado")
1169 (version "5.1.1")
1170 (source
1171 (origin
1172 (method url-fetch)
1173 (uri (pypi-uri "tornado" version))
1174 (sha256
1175 (base32
1176 "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
1177 (build-system python-build-system)
1178 (arguments
1179 '(;; FIXME: Two tests error out with:
1180 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
1181 ;; #:phases
1182 ;; (modify-phases %standard-phases
1183 ;; (replace 'check
1184 ;; (lambda _
1185 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
1186 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
1187 ;; (invoke "python" "-m" "tornado.test.runtests")
1188 ;; #t)))
1189 #:tests? #f))
1190 (native-inputs
1191 `(("python-certifi" ,python-certifi)))
1192 (home-page "https://www.tornadoweb.org/")
1193 (synopsis "Python web framework and asynchronous networking library")
1194 (description
1195 "Tornado is a Python web framework and asynchronous networking library,
1196 originally developed at FriendFeed. By using non-blocking network I/O,
1197 Tornado can scale to tens of thousands of open connections, making it ideal
1198 for long polling, WebSockets, and other applications that require a long-lived
1199 connection to each user.")
1200 (license license:asl2.0)
1201 (properties `((python2-variant . ,(delay python2-tornado))))))
1202
1203 (define-public python-tornado-6
1204 (package
1205 (name "python-tornado")
1206 (version "6.0.4")
1207 (source
1208 (origin
1209 (method url-fetch)
1210 (uri (pypi-uri "tornado" version))
1211 (sha256
1212 (base32
1213 "1p5n7sw4580pkybywg93p8ddqdj9lhhy72rzswfa801vlidx9qhg"))))
1214 (build-system python-build-system)
1215 (arguments
1216 '(#:phases
1217 (modify-phases %standard-phases
1218 (replace 'check
1219 (lambda _
1220 (invoke "python" "-m" "tornado.test.runtests")
1221 #t)))))
1222 (native-inputs
1223 `(("python-certifi" ,python-certifi)))
1224 (home-page "https://www.tornadoweb.org/")
1225 (synopsis "Python web framework and asynchronous networking library")
1226 (description
1227 "Tornado is a Python web framework and asynchronous networking library,
1228 originally developed at FriendFeed. By using non-blocking network I/O,
1229 Tornado can scale to tens of thousands of open connections, making it ideal
1230 for long polling, WebSockets, and other applications that require a long-lived
1231 connection to each user.")
1232 (license license:asl2.0)))
1233
1234 (define-public python2-tornado
1235 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
1236 (package (inherit tornado)
1237 (propagated-inputs
1238 `(("python2-backport-ssl-match-hostname"
1239 ,python2-backport-ssl-match-hostname)
1240 ("python2-backports-abc" ,python2-backports-abc)
1241 ("python2-singledispatch" ,python2-singledispatch)
1242 ,@(package-propagated-inputs tornado))))))
1243
1244 (define-public python-tornado-http-auth
1245 (package
1246 (name "python-tornado-http-auth")
1247 (version "1.1.1")
1248 (source
1249 (origin
1250 (method url-fetch)
1251 (uri (pypi-uri "tornado-http-auth" version))
1252 (sha256
1253 (base32 "0hyc5f0a09i5yb99pk4bxpg6w9ichbrb5cv7hc9hff7rxd8w0v0x"))))
1254 (build-system python-build-system)
1255 (propagated-inputs
1256 `(("python-tornado" ,python-tornado)))
1257 (home-page "https://github.com/gvalkov/tornado-http-auth")
1258 (synopsis "Digest and basic authentication module for Tornado")
1259 (description
1260 "Provides support for adding authentication to services using the Tornado
1261 web framework, either via the basic or digest authentication schemes.")
1262 (license license:asl2.0)))
1263
1264 (define-public python-terminado
1265 (package
1266 (name "python-terminado")
1267 (version "0.8.1")
1268 (source
1269 (origin
1270 (method url-fetch)
1271 (uri (pypi-uri "terminado" version))
1272 (sha256
1273 (base32
1274 "0yh69k6579g848rmjyllb5h75pkvgcy27r1l3yzgkf33wnnzkasm"))))
1275 (build-system python-build-system)
1276 (propagated-inputs
1277 `(("python-tornado" ,python-tornado)
1278 ("python-ptyprocess" ,python-ptyprocess)))
1279 (native-inputs
1280 `(("python-nose" ,python-nose)))
1281 (arguments
1282 `(#:phases
1283 (modify-phases %standard-phases
1284 (replace 'check
1285 (lambda _ (invoke "nosetests") #t)))))
1286 (home-page "https://github.com/takluyver/terminado")
1287 (synopsis "Terminals served to term.js using Tornado websockets")
1288 (description "This package provides a Tornado websocket backend for the
1289 term.js Javascript terminal emulator library.")
1290 (license license:bsd-2)
1291 (properties `((python2-variant . ,(delay python2-terminado))))))
1292
1293 (define-public python2-terminado
1294 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
1295 (package (inherit terminado)
1296 (propagated-inputs
1297 `(("python2-backport-ssl-match-hostname"
1298 ,python2-backport-ssl-match-hostname)
1299 ("python2-futures" ,python2-futures)
1300 ,@(package-propagated-inputs terminado))))))
1301
1302 (define-public python-wsgi-intercept
1303 (package
1304 (name "python-wsgi-intercept")
1305 (version "1.2.2")
1306 (source (origin
1307 (method url-fetch)
1308 (uri (pypi-uri "wsgi_intercept" version))
1309 (sha256
1310 (base32
1311 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
1312 (build-system python-build-system)
1313 (propagated-inputs
1314 `(("python-six" ,python-six)))
1315 (native-inputs
1316 `(("python-pytest" ,python-pytest)
1317 ("python-httplib2" ,python-httplib2)
1318 ("python-requests" ,python-requests)
1319 ("python-urllib3" ,python-urllib3)))
1320 (synopsis "Puts a WSGI application in place of a real URI for testing")
1321 (description "Wsgi_intercept installs a WSGI application in place of a real
1322 URI for testing. Testing a WSGI application normally involves starting a
1323 server at a local host and port, then pointing your test code to that address.
1324 Instead, this library lets you intercept calls to any specific host/port
1325 combination and redirect them into a WSGI application importable by your test
1326 program. Thus, you can avoid spawning multiple processes or threads to test
1327 your Web app.")
1328 (home-page "https://github.com/cdent/wsgi-intercept")
1329 (license license:expat)))
1330
1331 (define-public python-webob
1332 (package
1333 (name "python-webob")
1334 (version "1.8.6")
1335 (source
1336 (origin
1337 (method url-fetch)
1338 (uri (pypi-uri "WebOb" version))
1339 (sha256
1340 (base32
1341 "026i3z99nr3px75isa9mbnky5i7rffiv4d124h5kxfjjsxz92fma"))))
1342 (build-system python-build-system)
1343 (native-inputs
1344 `(("python-nose" ,python-nose)))
1345 (home-page "https://webob.org/")
1346 (synopsis "WSGI request and response object")
1347 (description
1348 "WebOb provides wrappers around the WSGI request environment, and an
1349 object to help create WSGI responses.")
1350 (license license:expat)))
1351
1352 (define-public python2-webob
1353 (package-with-python2 python-webob))
1354
1355 (define-public python-zope-event
1356 (package
1357 (name "python-zope-event")
1358 (version "4.4")
1359 (source
1360 (origin
1361 (method url-fetch)
1362 (uri (pypi-uri "zope.event" version))
1363 (sha256
1364 (base32
1365 "1ksbc726av9xacml6jhcfyn828hlhb9xlddpx6fcvnlvmpmpvhk9"))))
1366 (build-system python-build-system)
1367 (home-page "https://pypi.org/project/zope.event/")
1368 (synopsis "Event publishing system for Python")
1369 (description "Zope.event provides an event publishing API, intended for
1370 use by applications which are unaware of any subscribers to their events. It
1371 is a simple event-dispatching system on which more sophisticated event
1372 dispatching systems can be built.")
1373 (license license:zpl2.1)))
1374
1375 (define-public python2-zope-event
1376 (package-with-python2 python-zope-event))
1377
1378 (define-public python-zope-interface
1379 (package
1380 (name "python-zope-interface")
1381 (version "5.1.0")
1382 (source
1383 (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "zope.interface" version))
1386 (sha256
1387 (base32
1388 "03nrl6b8cb600dnnh46y149awvrm0gxyqgwq5hdw3lvys8mw9r20"))))
1389 (build-system python-build-system)
1390 (arguments '(#:tests? #f)) ; test suite can't find python-zope-testing
1391 (native-inputs
1392 `(("python-coverage" ,python-coverage)
1393 ("python-nose" ,python-nose)
1394 ("python-zope-event" ,python-zope-event)
1395 ("python-zope-testing" ,python-zope-testing)))
1396 (home-page "https://github.com/zopefoundation/zope.interface")
1397 (synopsis "Python implementation of the \"design by contract\"
1398 methodology")
1399 (description "Zope.interface provides an implementation of \"object
1400 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
1401 conforming to a given API or contract.")
1402 (license license:zpl2.1)))
1403
1404 (define-public python2-zope-interface
1405 (package-with-python2 python-zope-interface))
1406
1407 (define-public python-zope-exceptions
1408 (package
1409 (name "python-zope-exceptions")
1410 (version "4.4")
1411 (source
1412 (origin
1413 (method url-fetch)
1414 (uri (pypi-uri "zope.exceptions" version))
1415 (sha256
1416 (base32
1417 "1nkgfwawswmyc6i0b8g3ymvja4mb507m8yhid8s4rbxq3dmqhwhd"))))
1418 (build-system python-build-system)
1419 (arguments
1420 '(#:phases
1421 (modify-phases %standard-phases
1422 (replace 'check
1423 (lambda _
1424 (invoke "zope-testrunner" "--test-path=src"))))))
1425 (native-inputs
1426 `(("python-zope-testrunner" ,python-zope-testrunner-bootstrap)))
1427 (propagated-inputs
1428 `(("python-zope-interface" ,python-zope-interface)))
1429 (home-page "https://pypi.org/project/zope.exceptions/")
1430 (synopsis "Zope exceptions")
1431 (description "Zope.exceptions provides general-purpose exception types
1432 that have uses outside of the Zope framework.")
1433 (license license:zpl2.1)))
1434
1435 (define-public python-zope-exceptions-bootstrap
1436 (package
1437 (inherit python-zope-exceptions)
1438 (arguments `(#:tests? #f))
1439 (propagated-inputs `())
1440 (native-inputs `())
1441 (properties `((hidden? . #t)))))
1442
1443 (define-public python2-zope-exceptions
1444 (package-with-python2 python-zope-exceptions))
1445
1446 (define-public python-zope-testing
1447 (package
1448 (name "python-zope-testing")
1449 (version "4.7")
1450 (source
1451 (origin
1452 (method url-fetch)
1453 (uri (pypi-uri "zope.testing" version))
1454 (sha256
1455 (base32
1456 "1sh3c3i0m8n8fnhqiry0bk3rr356i56ry7calmn57s1pvv8yhsyn"))))
1457 (build-system python-build-system)
1458 (home-page "https://pypi.org/project/zope.testing/")
1459 (synopsis "Zope testing helpers")
1460 (description "Zope.testing provides a number of testing utilities for HTML
1461 forms, HTTP servers, regular expressions, and more.")
1462 (license license:zpl2.1)))
1463
1464 (define-public python2-zope-testing
1465 (package-with-python2 python-zope-testing))
1466
1467 (define-public python-zope-testrunner
1468 (package
1469 (name "python-zope-testrunner")
1470 (version "5.2")
1471 (source
1472 (origin
1473 (method url-fetch)
1474 (uri (pypi-uri "zope.testrunner" version))
1475 (sha256
1476 (base32
1477 "0jyyf1dcz156q95x2y7yw2v420q2xn3cff0c5aci7hmdmcbn0gc7"))))
1478 (build-system python-build-system)
1479 (arguments
1480 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1481 (native-inputs
1482 `(("python-zope-testing" ,python-zope-testing)))
1483 (propagated-inputs
1484 `(("python-six" ,python-six)
1485 ("python-zope-exceptions" ,python-zope-exceptions)
1486 ("python-zope-interface" ,python-zope-interface)))
1487 (home-page "https://pypi.org/project/zope.testrunner/")
1488 (synopsis "Zope testrunner script")
1489 (description "Zope.testrunner provides a script for running Python
1490 tests.")
1491 (license license:zpl2.1)))
1492
1493 (define-public python-zope-testrunner-bootstrap
1494 (package
1495 (inherit python-zope-testrunner)
1496 (arguments `(#:tests? #f))
1497 (propagated-inputs
1498 `(("python-six" ,python-six)
1499 ("python-zope-exceptions" ,python-zope-exceptions-bootstrap)))
1500 (properties `((hidden? . #t)))))
1501
1502 (define-public python2-zope-testrunner
1503 (package-with-python2 python-zope-testrunner))
1504
1505 (define-public python-zope-i18nmessageid
1506 (package
1507 (name "python-zope-i18nmessageid")
1508 (version "5.0.1")
1509 (source
1510 (origin
1511 (method url-fetch)
1512 (uri (pypi-uri "zope.i18nmessageid" version))
1513 (sha256
1514 (base32
1515 "0ndhn4w1qgwkfbwf9vm2bgq418z5g0wmfsgl0d9nz62cd0mi8d4m"))))
1516 (build-system python-build-system)
1517 (native-inputs
1518 `(("python-coverage" ,python-coverage)
1519 ("python-zope-testrunner" ,python-zope-testrunner)))
1520 (propagated-inputs
1521 `(("python-six" ,python-six)))
1522 (home-page "https://pypi.org/project/zope.i18nmessageid/")
1523 (synopsis "Message identifiers for internationalization")
1524 (description "Zope.i18nmessageid provides facilities for declaring
1525 internationalized messages within program source text.")
1526 (license license:zpl2.1)))
1527
1528 (define-public python2-zope-i18nmessageid
1529 (package-with-python2 python-zope-i18nmessageid))
1530
1531 (define-public python-zope-schema
1532 (package
1533 (name "python-zope-schema")
1534 (version "6.0.0")
1535 (source
1536 (origin
1537 (method url-fetch)
1538 (uri (pypi-uri "zope.schema" version))
1539 (sha256
1540 (base32
1541 "09jg47bxhfg1ahr1jxb5y0cbiszyk1j6fn1r1r7s6svjl3lbryr0"))))
1542 (build-system python-build-system)
1543 (arguments
1544 `(#:phases
1545 (modify-phases %standard-phases
1546 (replace 'check
1547 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1548 (add-installed-pythonpath inputs outputs)
1549 (if tests?
1550 (invoke "zope-testrunner" "--test-path=src")
1551 #t))))))
1552 (propagated-inputs
1553 `(("python-zope-event" ,python-zope-event)
1554 ("python-zope-interface" ,python-zope-interface)))
1555 (native-inputs
1556 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1557 ("python-zope-testing" ,python-zope-testing)
1558 ("python-zope-testrunner" ,python-zope-testrunner)))
1559 (home-page "https://pypi.org/project/zope.schema/")
1560 (synopsis "Zope data schemas")
1561 (description "Zope.scheme provides extensions to zope.interface for
1562 defining data schemas.")
1563 (license license:zpl2.1)))
1564
1565 (define-public python2-zope-schema
1566 (package-with-python2 python-zope-schema))
1567
1568 (define-public python-zope-configuration
1569 (package
1570 (name "python-zope-configuration")
1571 (version "4.4.0")
1572 (source (origin
1573 (method url-fetch)
1574 (uri (pypi-uri "zope.configuration" version))
1575 (sha256
1576 (base32
1577 "0g6vrl7y27z9cj5xyrww9xlzk4npj55mgmlrcd9d2nj08jn2pw79"))))
1578 (build-system python-build-system)
1579 (native-inputs
1580 `(("python-manuel" ,python-manuel)
1581 ("python-zope-testing" ,python-zope-testing)
1582 ("python-zope-testrunner" ,python-zope-testrunner)))
1583 (propagated-inputs
1584 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1585 ("python-zope-interface" ,python-zope-interface)
1586 ("python-zope-schema" ,python-zope-schema)))
1587 (home-page "https://pypi.org/project/zope.configuration/")
1588 (synopsis "Zope Configuration Markup Language")
1589 (description "Zope.configuration implements ZCML, the Zope Configuration
1590 Markup Language.")
1591 (license license:zpl2.1)))
1592
1593 (define-public python-zope-configuration-bootstrap
1594 (package
1595 (inherit python-zope-configuration)
1596 (arguments `(#:tests? #f))
1597 (native-inputs `())
1598 (properties `((hidden? . #t)))))
1599
1600 (define-public python2-zope-configuration
1601 (package-with-python2 python-zope-configuration))
1602
1603 (define-public python-zope-copy
1604 (package
1605 (name "python-zope-copy")
1606 (version "4.2")
1607 (source
1608 (origin
1609 (method url-fetch)
1610 (uri (pypi-uri "zope.copy" version))
1611 (sha256
1612 (base32
1613 "06m75434krl57n6p73c2qj55k5i3fixg887j8ss01ih6zw4rvfs7"))))
1614 (build-system python-build-system)
1615 (arguments
1616 '(#:phases
1617 (modify-phases %standard-phases
1618 (replace 'check
1619 (lambda _
1620 (invoke "zope-testrunner" "--test-path=src" "\\[]"))))))
1621 (propagated-inputs
1622 `(("python-zope-interface" ,python-zope-interface)))
1623 (native-inputs
1624 `(("python-zope-component" ,python-zope-component-bootstrap)
1625 ("python-zope-location" ,python-zope-location-bootstrap)
1626 ("python-zope-testing" ,python-zope-testing)
1627 ("python-zope-testrunner" ,python-zope-testrunner)))
1628 (home-page "https://github.com/zopefoundation/zope.copy")
1629 (synopsis "Pluggable object copying mechanism")
1630 (description
1631 "This package provides a pluggable mechanism for copying persistent objects.")
1632 (license license:zpl2.1)))
1633
1634 (define-public python-zope-proxy
1635 (package
1636 (name "python-zope-proxy")
1637 (version "4.3.5")
1638 (source
1639 (origin
1640 (method url-fetch)
1641 (uri (pypi-uri "zope.proxy" version))
1642 (sha256
1643 (base32
1644 "14h7nyfbl5vpfk0rbviy4ygdfx0yx5kncvg6jpbdb0dhwna0ssm6"))))
1645 (build-system python-build-system)
1646 (native-inputs
1647 `(("python-zope-security" ,python-zope-security-bootstrap)
1648 ("python-zope-testrunner" ,python-zope-testrunner)))
1649 (propagated-inputs
1650 `(("python-zope-interface" ,python-zope-interface)))
1651 (home-page "https://pypi.org/project/zope.proxy/")
1652 (synopsis "Generic, transparent proxies")
1653 (description "Zope.proxy provides generic, transparent proxies for Python.
1654 Proxies are special objects which serve as mostly-transparent wrappers around
1655 another object, intervening in the apparent behavior of the wrapped object
1656 only when necessary to apply the policy (e.g., access checking, location
1657 brokering, etc.) for which the proxy is responsible.")
1658 (license license:zpl2.1)))
1659
1660 (define-public python-zope-proxy-bootstrap
1661 (package
1662 (inherit python-zope-proxy)
1663 (arguments `(#:tests? #f))
1664 (native-inputs `())
1665 (properties `((hidden? . #t)))))
1666
1667 (define-public python2-zope-proxy
1668 (package-with-python2 python-zope-proxy))
1669
1670 (define-public python-zope-hookable
1671 (package
1672 (name "python-zope-hookable")
1673 (version "5.0.1")
1674 (source
1675 (origin
1676 (method url-fetch)
1677 (uri (pypi-uri "zope.hookable" version))
1678 (sha256
1679 (base32
1680 "0hc82lfr7bk53nvbxvjkibkarngyrzgfk2i6bg8wshl0ly0pdl19"))))
1681 (build-system python-build-system)
1682 (native-inputs
1683 `(("python-coverage" ,python-coverage)
1684 ("python-zope-testing" ,python-zope-testing)))
1685 (home-page "https://github.com/zopefoundation/zope.hookable")
1686 (synopsis "Zope hookable")
1687 (description "This package supports the efficient creation of hookable
1688 objects, which are callable objects that are meant to be optionally replaced.
1689 The idea is that you create a function that does some default thing and make i
1690 hookable. Later, someone can modify what it does by calling its sethook method
1691 and changing its implementation. All users of the function, including those
1692 that imported it, will see the change.")
1693 (license license:zpl2.1)))
1694
1695 (define-public python-zope-location
1696 (package
1697 (name "python-zope-location")
1698 (version "4.2")
1699 (source
1700 (origin
1701 (method url-fetch)
1702 (uri (pypi-uri "zope.location" version))
1703 (sha256
1704 (base32
1705 "1b40pzl8v00d583d3gsxv1qjdw2dhghlgkbgxl3m07d5r3izj857"))))
1706 (build-system python-build-system)
1707 (arguments
1708 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1709 (native-inputs
1710 `(("python-zope-testrunner" ,python-zope-testrunner)))
1711 (propagated-inputs
1712 `(("python-zope-interface" ,python-zope-interface)
1713 ("python-zope-proxy" ,python-zope-proxy)
1714 ("python-zope-schema" ,python-zope-schema)))
1715 (home-page "https://pypi.org/project/zope.location/")
1716 (synopsis "Zope location library")
1717 (description "Zope.location implements the concept of \"locations\" in
1718 Zope3, which are are special objects that have a structural location.")
1719 (license license:zpl2.1)))
1720
1721 (define-public python-zope-location-bootstrap
1722 (package
1723 (inherit python-zope-location)
1724 (arguments `(#:tests? #f))
1725 (native-inputs `())
1726 (properties `((hidden? . #t)))))
1727
1728 (define-public python2-zope-location
1729 (package-with-python2 python-zope-location))
1730
1731 (define-public python-zope-security
1732 (package
1733 (name "python-zope-security")
1734 (version "5.1.1")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri (pypi-uri "zope.security" version))
1739 (sha256
1740 (base32
1741 "11lfw67cigscfax9c5j63xcvz2qcj724zx5fcdqyc94am2glim0h"))))
1742 (build-system python-build-system)
1743 (propagated-inputs
1744 `(("python-zope-component" ,python-zope-component)
1745 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1746 ("python-zope-interface" ,python-zope-interface)
1747 ("python-zope-location" ,python-zope-location)
1748 ("python-zope-proxy" ,python-zope-proxy)
1749 ("python-zope-schema" ,python-zope-schema)))
1750 (native-inputs
1751 `(("python-btrees" ,python-btrees)
1752 ("python-zope-component" ,python-zope-component-bootstrap)
1753 ("python-zope-configuration" ,python-zope-configuration-bootstrap)
1754 ("python-zope-location" ,python-zope-location-bootstrap)
1755 ("python-zope-testing" ,python-zope-testing)
1756 ("python-zope-testrunner" ,python-zope-testrunner)))
1757 (home-page "https://pypi.org/project/zope.security/")
1758 (synopsis "Zope security framework")
1759 (description "Zope.security provides a generic mechanism to implement
1760 security policies on Python objects.")
1761 (license license:zpl2.1)))
1762
1763 (define-public python-zope-security-bootstrap
1764 (package
1765 (inherit python-zope-security)
1766 (arguments `(#:tests? #f))
1767 (propagated-inputs
1768 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1769 ("python-zope-interface" ,python-zope-interface)
1770 ("python-zope-proxy" ,python-zope-proxy-bootstrap)
1771 ("python-zope-schema" ,python-zope-schema)))
1772 (native-inputs `())
1773 (properties `((hidden? . #t)))))
1774
1775 (define-public python2-zope-security
1776 (package-with-python2 python-zope-security))
1777
1778 (define-public python-zope-component
1779 (package
1780 (name "python-zope-component")
1781 (version "4.6.2")
1782 (source
1783 (origin
1784 (method url-fetch)
1785 (uri (pypi-uri "zope.component" version))
1786 (sha256
1787 (base32
1788 "14iwp95hh6q5dj4k9h1iw75cbp89bs27nany4dinyglb44c8jqli"))))
1789 (build-system python-build-system)
1790 (arguments
1791 '(#:phases
1792 (modify-phases %standard-phases
1793 (replace 'check
1794 (lambda* (#:key inputs outputs #:allow-other-keys)
1795 (add-installed-pythonpath inputs outputs)
1796 (invoke "python" "setup.py" "test"))))))
1797 (native-inputs
1798 `(("python-persistent" ,python-persistent)
1799 ("python-zope-configuration" ,python-zope-configuration-bootstrap)
1800 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1801 ("python-zope-location" ,python-zope-location-bootstrap)
1802 ("python-zope-proxy" ,python-zope-proxy-bootstrap)
1803 ("python-zope-security" ,python-zope-security-bootstrap)
1804 ("python-zope-testing" ,python-zope-testing)
1805 ("python-zope-testrunner" ,python-zope-testrunner)))
1806 (propagated-inputs
1807 `(("python-zope-deferredimport" ,python-zope-deferredimport)
1808 ("python-zope-deprecation" ,python-zope-deprecation)
1809 ("python-zope-event" ,python-zope-event)
1810 ("python-zope-hookable" ,python-zope-hookable)
1811 ("python-zope-interface" ,python-zope-interface)))
1812 (home-page "https://github.com/zopefoundation/zope.component")
1813 (synopsis "Zope Component Architecture")
1814 (description "Zope.component represents the core of the Zope Component
1815 Architecture. Together with the zope.interface package, it provides
1816 facilities for defining, registering and looking up components.")
1817 (license license:zpl2.1)))
1818
1819 (define-public python-zope-component-bootstrap
1820 (package
1821 (inherit python-zope-component)
1822 (arguments `(#:tests? #f))
1823 (native-inputs `())
1824 (properties `((hidden? . #t)))))
1825
1826 (define-public python2-zope-component
1827 (package-with-python2 python-zope-component))
1828
1829 (define-public python-zope-deferredimport
1830 (package
1831 (name "python-zope-deferredimport")
1832 (version "4.3.1")
1833 (source
1834 (origin
1835 (method url-fetch)
1836 (uri (pypi-uri "zope.deferredimport" version))
1837 (sha256
1838 (base32
1839 "1q89v54dwniiqypjbwywwdfjdr4kdkqlyqsgrpplgvsygdg39cjp"))))
1840 (build-system python-build-system)
1841 (propagated-inputs
1842 `(("python-zope-proxy" ,python-zope-proxy)))
1843 (native-inputs
1844 `(("python-zope-testrunner" ,python-zope-testrunner)))
1845 (home-page "https://github.com/zopefoundation/zope.deferredimport")
1846 (synopsis "Defer imports until used by code")
1847 (description
1848 "Often, especially for package modules, you want to import names for
1849 convenience, but not actually perform the imports until necessary. The
1850 @code{zope.deferredimport} package provided facilities for defining names in
1851 modules that will be imported from somewhere else when used. You can also cause
1852 deprecation warnings to be issued when a variable is used.")
1853 (license license:zpl2.1)))
1854
1855 (define-public python-ndg-httpsclient
1856 (package
1857 (name "python-ndg-httpsclient")
1858 (version "0.5.1")
1859 (source (origin
1860 (method url-fetch)
1861 (uri (pypi-uri "ndg_httpsclient" version))
1862 (sha256
1863 (base32
1864 "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
1865 (build-system python-build-system)
1866 (arguments
1867 '(;; The tests appear to require networking.
1868 #:tests? #f))
1869 (propagated-inputs
1870 `(("python-pyopenssl" ,python-pyopenssl)))
1871 (synopsis "HTTPS support for Python's httplib and urllib2")
1872 (description "This is a HTTPS client implementation for httplib and urllib2
1873 based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
1874 over the default provided with Python and, importantly, enables full
1875 verification of the SSL peer.")
1876 (home-page "https://github.com/cedadev/ndg_httpsclient/")
1877 (license license:bsd-3)))
1878
1879 ;; python2-openssl requires special care, so package-with-python2 is
1880 ;; insufficient.
1881 (define-public python2-ndg-httpsclient
1882 (package (inherit python-ndg-httpsclient)
1883 (name "python2-ndg-httpsclient")
1884 (arguments
1885 (substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
1886 ((#:python _) python-2)))
1887 (propagated-inputs
1888 `(("python2-pyopenssl" ,python2-pyopenssl)))))
1889
1890 (define-public python-websocket-client
1891 (package
1892 (name "python-websocket-client")
1893 (version "0.54.0")
1894 (source
1895 (origin
1896 (method url-fetch)
1897 (uri (pypi-uri "websocket_client" version))
1898 (sha256
1899 (base32
1900 "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
1901 (build-system python-build-system)
1902 (propagated-inputs
1903 `(("python-six" ,python-six)))
1904 (home-page "https://github.com/liris/websocket-client")
1905 (synopsis "WebSocket client for Python")
1906 (description "The Websocket-client module provides the low level APIs for
1907 WebSocket usage in Python programs.")
1908 (properties `((python2-variant . ,(delay python2-websocket-client))))
1909 (license license:lgpl2.1+)))
1910
1911 (define-public python2-websocket-client
1912 (let ((base (package-with-python2
1913 (strip-python2-variant python-websocket-client))))
1914 (package
1915 (inherit base)
1916 (native-inputs
1917 `(("python2-backport-ssl-match-hostname"
1918 ,python2-backport-ssl-match-hostname)
1919 ,@(package-native-inputs base))))))
1920
1921 (define-public python-purl
1922 (package
1923 (name "python-purl")
1924 (version "1.5")
1925 (source
1926 (origin
1927 (method url-fetch)
1928 (uri (pypi-uri "purl" version))
1929 (sha256
1930 (base32
1931 "15ibnz1xrh5msmn04j0nr00sz4n7jwx6cwd6zlx99kkz3vpin53m"))))
1932 (build-system python-build-system)
1933 (propagated-inputs `(("python-six" ,python-six)))
1934 (home-page
1935 "https://github.com/codeinthehole/purl")
1936 (synopsis
1937 "Python package for URL manipulation")
1938 (description
1939 "Purl is a Python package for handling URLs.")
1940 (license license:expat)))
1941
1942 (define-public python-apiron
1943 (package
1944 (name "python-apiron")
1945 (version "5.1.0")
1946 (source
1947 (origin
1948 (method url-fetch)
1949 (uri (pypi-uri "apiron" version))
1950 (sha256
1951 (base32 "1qwbqn47sf0aqznj1snbv37v8ijx476qqkjf5l9pac7xjkxsr8qk"))))
1952 (build-system python-build-system)
1953 (arguments
1954 `(#:phases
1955 (modify-phases %standard-phases
1956 (replace 'check
1957 (lambda* (#:key inputs outputs #:allow-other-keys)
1958 (add-installed-pythonpath inputs outputs)
1959 (invoke "pytest" "-vv" "--cov" "-k"
1960 ;; This test tries to connect to the internet.
1961 "not test_call"))))))
1962 (propagated-inputs
1963 `(("python-requests" ,python-requests)))
1964 (native-inputs
1965 `(("python-pytest" ,python-pytest)
1966 ("python-pytest-cov" ,python-pytest-cov)))
1967 (home-page "https://github.com/ithaka/apiron")
1968 (synopsis "Python wrapper for interacting with RESTful APIs")
1969 (description
1970 "@code{apiron} provides a declarative, structured configuration of
1971 services and endpoints with a unified interface for interacting with RESTful
1972 APIs.")
1973 (license license:expat)))
1974
1975 (define-public python-beren
1976 (package
1977 (name "python-beren")
1978 (version "0.7.0")
1979 (source
1980 (origin
1981 (method url-fetch)
1982 (uri (pypi-uri "beren" version))
1983 (sha256
1984 (base32 "1v3mdwfqsyza892zvs124ym9w1bkng1j56b7l4dwfjir3723xcgf"))))
1985 (build-system python-build-system)
1986 (arguments
1987 ;; The test tries to open a connection to a remote server.
1988 `(#:tests? #f))
1989 (propagated-inputs
1990 `(("python-apiron" ,python-apiron)))
1991 (home-page "https://github.com/teffalump/beren")
1992 (synopsis "REST client for Orthanc DICOM servers")
1993 (description
1994 "@code{beren} provides a REST client for Orthanc, a DICOM server.")
1995 (license license:gpl3+)))
1996
1997 (define-public python-requests
1998 (package
1999 (name "python-requests")
2000 (version "2.24.0")
2001 (source (origin
2002 (method url-fetch)
2003 (uri (pypi-uri "requests" version))
2004 (sha256
2005 (base32
2006 "06r3017hz0hzxv42gpg73l8xvdjbzw7q904ljvp36b5p3l9rlmdk"))))
2007 (build-system python-build-system)
2008 (propagated-inputs
2009 `(("python-certifi" ,python-certifi)
2010 ("python-chardet" ,python-chardet)
2011 ("python-idna" ,python-idna)
2012 ("python-urllib3" ,python-urllib3)))
2013 (arguments
2014 ;; FIXME: Some tests require network access.
2015 '(#:tests? #f))
2016 (home-page "http://python-requests.org/")
2017 (synopsis "Python HTTP library")
2018 (description
2019 "Requests is a Python HTTP client library. It aims to be easier to use
2020 than Python’s urllib2 library.")
2021 (license license:asl2.0)))
2022
2023 ;; Some software requires an older version of Requests, notably Docker/Docker
2024 ;; Compose.
2025 (define-public python-requests-2.20
2026 (package (inherit python-requests)
2027 (version "2.20.1")
2028 (source (origin
2029 (method url-fetch)
2030 (uri (pypi-uri "requests" version))
2031 (sha256
2032 (base32
2033 "0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a"))))
2034 (propagated-inputs
2035 `(("python-urllib3" ,python-urllib3-1.24)
2036 ("python-idna" ,python-idna-2.7)
2037 ,@(package-propagated-inputs python-requests)))))
2038
2039 (define-public python2-requests
2040 (package-with-python2 python-requests))
2041
2042 (define-public python-requests_ntlm
2043 (package
2044 (name "python-requests_ntlm")
2045 (version "1.1.0")
2046 (source
2047 (origin
2048 (method url-fetch)
2049 (uri (pypi-uri "requests_ntlm" version))
2050 (sha256
2051 (base32
2052 "0wgbqzaq9w7bas16b7brdb75f91bh3275fb459093bk1ihpck2ci"))))
2053 (build-system python-build-system)
2054 (propagated-inputs
2055 `(("python-cryptography" ,python-cryptography)
2056 ("python-ntlm-auth" ,python-ntlm-auth)
2057 ("python-requests" ,python-requests)))
2058 (home-page "https://github.com/requests/requests-ntlm")
2059 (synopsis
2060 "NTLM authentication support for Requests")
2061 (description
2062 "This package allows for HTTP NTLM authentication using the requests
2063 library.")
2064 (license license:isc)))
2065
2066 (define-public python-requests-mock
2067 (package
2068 (name "python-requests-mock")
2069 (version "1.8.0")
2070 (source
2071 (origin
2072 (method url-fetch)
2073 (uri (pypi-uri "requests-mock" version))
2074 (sha256
2075 (base32
2076 "09nj8fmyj7xz2mgwyvbw0fl9zybmx2d3qd2hf529vvjc9s24d3z6"))))
2077 (build-system python-build-system)
2078 (propagated-inputs
2079 `(("python-requests" ,python-requests)
2080 ("python-six" ,python-six)))
2081 (native-inputs
2082 `(("python-pbr" ,python-pbr)
2083 ("python-discover" ,python-discover)
2084 ("python-docutils" ,python-docutils)
2085 ("python-fixtures" ,python-fixtures)
2086 ("python-mock" ,python-mock)
2087 ("python-purl" ,python-purl)
2088 ("python-pytest" ,python-pytest)
2089 ("python-sphinx" ,python-sphinx)
2090 ("python-testrepository" ,python-testrepository)))
2091 (home-page "https://requests-mock.readthedocs.org/")
2092 (synopsis "Mock out responses from the requests package")
2093 (description
2094 "This module provides a building block to stub out the HTTP requests
2095 portions of your testing code.")
2096 (properties `((python2-variant . ,(delay python2-requests-mock))))
2097 (license license:asl2.0)))
2098
2099 (define-public python2-requests-mock
2100 (package (inherit (package-with-python2
2101 (strip-python2-variant python-requests-mock)))
2102 (arguments
2103 `(#:python ,python-2
2104 ;; FIXME: 'subunit.run discover: error: no such option: --list'
2105 #:tests? #f))))
2106
2107 (define-public python-requests-toolbelt
2108 (package
2109 (name "python-requests-toolbelt")
2110 (version "0.8.0")
2111 (source (origin
2112 (method url-fetch)
2113 (uri (pypi-uri "requests-toolbelt" version))
2114 (sha256
2115 (base32
2116 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
2117 (build-system python-build-system)
2118 (native-inputs
2119 `(("python-betamax" ,python-betamax)
2120 ("python-mock" ,python-mock)
2121 ("python-pytest" ,python-pytest)))
2122 (propagated-inputs
2123 `(("python-requests" ,python-requests)))
2124 (synopsis "Extensions to python-requests")
2125 (description "This is a toolbelt of useful classes and functions to be used
2126 with python-requests.")
2127 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
2128 (license license:asl2.0)))
2129
2130 (define-public python2-requests-toolbelt
2131 (package-with-python2 python-requests-toolbelt))
2132
2133 (define-public python-requests-toolbelt-0.9.1
2134 (package
2135 (inherit python-requests-toolbelt)
2136 (version "0.9.1")
2137 (source (origin
2138 (method url-fetch)
2139 (uri (pypi-uri "requests-toolbelt" version))
2140 (sha256
2141 (base32
2142 "1h3gm88dcjbd7gm229a7x5qkkhnsqsjz0m0l2xyavm2ab3a8k04n"))))
2143 (arguments
2144 `(;; FIXME: Some tests require network access.
2145 #:tests? #f))))
2146
2147 (define-public python-requests-ftp
2148 (package
2149 (name "python-requests-ftp")
2150 (version "0.3.1")
2151 (source
2152 (origin
2153 (method url-fetch)
2154 (uri (pypi-uri "requests-ftp" version))
2155 (sha256
2156 (base32
2157 "0yh5v21v36dsjsgv4y9dx4mmz35741l5jf6pbq9w19d8rfsww13m"))))
2158 (build-system python-build-system)
2159 (propagated-inputs
2160 `(("python-requests" ,python-requests)))
2161 (home-page
2162 "https://github.com/Lukasa/requests-ftp")
2163 (synopsis "FTP Transport Adapter for Requests")
2164 (description
2165 "Requests-FTP is an implementation of a simple FTP transport
2166 adapter for use with the Requests library.")
2167 (license license:asl2.0)))
2168
2169 (define-public python-oauthlib
2170 (package
2171 (name "python-oauthlib")
2172 (version "3.1.0")
2173 (source (origin
2174 (method url-fetch)
2175 (uri (pypi-uri "oauthlib" version))
2176 (sha256
2177 (base32
2178 "12gqnabwck30gdlpwm6af3s28qm9p2yc7b1w8s4fk9ncbz1irr5y"))))
2179 (build-system python-build-system)
2180 (arguments
2181 `(#:phases (modify-phases %standard-phases
2182 (replace 'check
2183 (lambda _
2184 (invoke "pytest" "-vv"))))))
2185 (native-inputs
2186 `(("python-pytest" ,python-pytest)
2187 ("python-pytest-cov" ,python-pytest-cov)
2188 ("python-mock" ,python-mock)))
2189 (propagated-inputs
2190 `(("python-cryptography" ,python-cryptography)
2191 ("python-pyjwt" ,python-pyjwt)
2192 ("python-blinker" ,python-blinker)))
2193 (home-page "https://github.com/oauthlib/oauthlib")
2194 (synopsis "OAuth implementation for Python")
2195 (description
2196 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2197 OAuth request-signing logic.")
2198 (license license:bsd-3)))
2199
2200 (define-public python2-oauthlib
2201 (package-with-python2 python-oauthlib))
2202
2203 (define-public python-rauth
2204 (package
2205 (name "python-rauth")
2206 (version "0.7.3")
2207 (source
2208 (origin
2209 (method url-fetch)
2210 (uri (pypi-uri "rauth" version))
2211 (sha256
2212 (base32
2213 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
2214 (build-system python-build-system)
2215 (arguments
2216 `(#:test-target "check"))
2217 (propagated-inputs
2218 `(("python-requests" ,python-requests)))
2219 (home-page "https://github.com/litl/rauth")
2220 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
2221 (description
2222 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
2223 provides service wrappers for convenient connection initialization and
2224 authenticated session objects providing things like keep-alive.")
2225 (license license:expat)
2226 (properties `((python2-variant . ,(delay python2-rauth))))))
2227
2228 (define-public python2-rauth
2229 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
2230 (package
2231 (inherit base)
2232 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2233 ,@(package-native-inputs base))))))
2234
2235 (define-public python-urllib3
2236 (package
2237 (name "python-urllib3")
2238 (version "1.25.9")
2239 (source
2240 (origin
2241 (method url-fetch)
2242 (uri (pypi-uri "urllib3" version))
2243 (sha256
2244 (base32
2245 "09rmjqm5syhhc8fx3v06h3yv6cqy0b1081jg8wm5grpwpr72j61h"))))
2246 (build-system python-build-system)
2247 (arguments `(#:tests? #f))
2248 (propagated-inputs
2249 `(;; These 5 inputs are used to build urrlib3[secure]
2250 ("python-certifi" ,python-certifi)
2251 ("python-cryptography" ,python-cryptography)
2252 ("python-idna" ,python-idna)
2253 ("python-pyopenssl" ,python-pyopenssl)
2254 ("python-pysocks" ,python-pysocks)))
2255 (home-page "https://urllib3.readthedocs.io/")
2256 (synopsis "HTTP library with thread-safe connection pooling")
2257 (description
2258 "Urllib3 supports features left out of urllib and urllib2 libraries. It
2259 can reuse the same socket connection for multiple requests, it can POST files,
2260 supports url redirection and retries, and also gzip and deflate decoding.")
2261 (properties `((python2-variant . ,(delay python2-urllib3))))
2262 (license license:expat)))
2263
2264 ;; Some software requires an older version of urllib3, notably Docker.
2265 (define-public python-urllib3-1.24
2266 (package (inherit python-urllib3)
2267 (version "1.24.3")
2268 (source (origin
2269 (method url-fetch)
2270 (uri (pypi-uri "urllib3" version))
2271 (sha256
2272 (base32
2273 "1x0slqrv6kixkbcdnxbglvjliwhc1payavxjvk8fvbqjrnasd4r3"))))))
2274
2275
2276 (define-public python2-urllib3
2277 (let ((base (package-with-python2 (strip-python2-variant python-urllib3))))
2278 (package/inherit
2279 base
2280 (propagated-inputs
2281 `(("python-ipaddress" ,python2-ipaddress)
2282 ,@(package-propagated-inputs base))))))
2283
2284 (define-public awscli
2285 (package
2286 (name "awscli")
2287 (version "1.18.6")
2288 (source
2289 (origin
2290 (method url-fetch)
2291 (uri (pypi-uri name version))
2292 (sha256
2293 (base32
2294 "0p479mfs9r0m82a217pap8156ijwvhv6r3kqa4k267gd05wgvygm"))))
2295 (build-system python-build-system)
2296 (arguments
2297 ;; FIXME: The 'pypi' release does not contain tests.
2298 '(#:tests? #f
2299 #:phases
2300 (modify-phases %standard-phases
2301 (add-after 'unpack 'fix-reference-to-groff
2302 (lambda _
2303 (substitute* "awscli/help.py"
2304 (("if not self._exists_on_path\\('groff'\\):") "")
2305 (("raise ExecutableNotFoundError\\('groff'\\)") "")
2306 (("cmdline = \\['groff'")
2307 (string-append "cmdline = ['" (which "groff") "'")))
2308 #t)))))
2309 (propagated-inputs
2310 `(("python-colorama" ,python-colorama)
2311 ("python-botocore" ,python-botocore)
2312 ("python-s3transfer" ,python-s3transfer)
2313 ("python-docutils" ,python-docutils)
2314 ("python-pyyaml" ,python-pyyaml)
2315 ("python-rsa" ,python-rsa)))
2316 (native-inputs
2317 `(("groff" ,groff)))
2318 (home-page "https://aws.amazon.com/cli/")
2319 (synopsis "Command line client for AWS")
2320 (description "AWS CLI provides a unified command line interface to the
2321 Amazon Web Services (AWS) API.")
2322 (license license:asl2.0)))
2323
2324 (define-public python-wsgiproxy2
2325 (package
2326 (name "python-wsgiproxy2")
2327 (version "0.4.6")
2328 (source
2329 (origin
2330 (method url-fetch)
2331 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
2332 (sha256
2333 (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
2334 (build-system python-build-system)
2335 (native-inputs
2336 `(("python-webtest" ,python-webtest)))
2337 (propagated-inputs
2338 `(("python-requests" ,python-requests)
2339 ("python-six" ,python-six)
2340 ("python-urllib3" ,python-urllib3)
2341 ("python-webob" ,python-webob)))
2342 (home-page "https://github.com/gawel/WSGIProxy2/")
2343 (synopsis "WSGI Proxy with various http client backends")
2344 (description "WSGI turns HTTP requests into WSGI function calls.
2345 WSGIProxy turns WSGI function calls into HTTP requests.
2346 It also includes code to sign requests and pass private data,
2347 and to spawn subprocesses to handle requests.")
2348 (license license:expat)))
2349
2350 (define-public python2-wsgiproxy2
2351 (package-with-python2 python-wsgiproxy2))
2352
2353 (define-public python-pastedeploy
2354 (package
2355 (name "python-pastedeploy")
2356 (version "2.1.1")
2357 (source
2358 (origin
2359 (method url-fetch)
2360 (uri (pypi-uri "PasteDeploy" version))
2361 (sha256
2362 (base32 "05s88qdjdwd9d9qs13fap7nqgxs7qs5qfzzjbrc5va13k2mxdskd"))))
2363 (build-system python-build-system)
2364 (arguments
2365 '(#:test-target "pytest"))
2366 (native-inputs
2367 `(("python-pytest" ,python-pytest)
2368 ("python-pytest-runner" ,python-pytest-runner)))
2369 (home-page "https://pylonsproject.org/")
2370 (synopsis
2371 "Load, configure, and compose WSGI applications and servers")
2372 (description
2373 "This tool provides code to load WSGI applications and servers from URIs;
2374 these URIs can refer to Python Eggs for INI-style configuration files. Paste
2375 Script provides commands to serve applications based on this configuration
2376 file.")
2377 (license license:expat)))
2378
2379 (define-public python2-pastedeploy
2380 (package-with-python2 python-pastedeploy))
2381
2382 (define-public python-webtest
2383 (package
2384 (name "python-webtest")
2385 (version "2.0.33")
2386 (source
2387 (origin
2388 (method url-fetch)
2389 (uri (pypi-uri "WebTest" version))
2390 (sha256
2391 (base32
2392 "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21"))))
2393 (build-system python-build-system)
2394 (arguments
2395 ;; Tests require python-pyquery, which creates a circular dependency.
2396 `(#:tests? #f))
2397 (propagated-inputs
2398 `(("python-waitress" ,python-waitress)
2399 ("python-webob" ,python-webob)
2400 ("python-six" ,python-six)
2401 ("python-beautifulsoup4" ,python-beautifulsoup4)))
2402 (home-page "https://docs.pylonsproject.org/projects/webtest/")
2403 (synopsis "Helper to test WSGI applications")
2404 (description "Webtest allows you to test your Python web applications
2405 without starting an HTTP server. It supports anything that supports the
2406 minimum of WSGI.")
2407 (license license:expat)))
2408
2409 (define-public python2-webtest
2410 (package-with-python2 python-webtest))
2411
2412 (define-public python-flask
2413 (package
2414 (name "python-flask")
2415 (version "1.1.2")
2416 (source (origin
2417 (method url-fetch)
2418 (uri (pypi-uri "Flask" version))
2419 (sha256
2420 (base32
2421 "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf"))))
2422 (build-system python-build-system)
2423 (arguments
2424 '(#:phases
2425 (modify-phases %standard-phases
2426 (replace 'check
2427 (lambda _
2428 (setenv "PYTHONPATH" (string-append "./build/lib:"
2429 (getenv "PYTHONPATH")))
2430 (invoke "pytest" "-vv" "tests"))))))
2431 (native-inputs
2432 `(("python-pytest" ,python-pytest)))
2433 (propagated-inputs
2434 `(("python-itsdangerous" ,python-itsdangerous)
2435 ("python-jinja2" ,python-jinja2)
2436 ("python-click" ,python-click)
2437 ("python-werkzeug" ,python-werkzeug)))
2438 (home-page "https://www.palletsprojects.com/p/flask/")
2439 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
2440 (description "Flask is a micro web framework based on the Werkzeug toolkit
2441 and Jinja2 template engine. It is called a micro framework because it does not
2442 presume or force a developer to use a particular tool or library.")
2443 (license license:bsd-3)))
2444
2445 (define-public python2-flask
2446 (package-with-python2 python-flask))
2447
2448 (define-public python-flask-wtf
2449 (package
2450 (name "python-flask-wtf")
2451 (version "0.14.3")
2452 (source
2453 (origin
2454 (method url-fetch)
2455 (uri (pypi-uri "Flask-WTF" version))
2456 (sha256
2457 (base32
2458 "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"))))
2459 (build-system python-build-system)
2460 (arguments
2461 '(#:phases
2462 (modify-phases %standard-phases
2463 (replace 'check
2464 (lambda _
2465 (setenv "PYTHONPATH" (string-append "./build/lib:"
2466 (getenv "PYTHONPATH")))
2467 (invoke "pytest" "-vv"))))))
2468 (propagated-inputs
2469 `(("python-flask-babel" ,python-flask-babel)
2470 ("python-babel" ,python-babel)
2471 ("python-wtforms" ,python-wtforms)))
2472 (native-inputs
2473 `(("python-pytest" ,python-pytest)))
2474 (home-page "https://github.com/lepture/flask-wtf")
2475 (synopsis "Simple integration of Flask and WTForms")
2476 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
2477 upload, and reCAPTCHA.")
2478 (license license:bsd-3)))
2479
2480 (define-public python2-flask-wtf
2481 (package-with-python2 python-flask-wtf))
2482
2483 (define-public python-flask-multistatic
2484 (package
2485 (name "python-flask-multistatic")
2486 (version "1.0")
2487 (source
2488 (origin
2489 (method url-fetch)
2490 (uri (pypi-uri "flask-multistatic" version))
2491 (sha256
2492 (base32
2493 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
2494 (build-system python-build-system)
2495 (propagated-inputs
2496 `(("python-flask" ,python-flask)))
2497 (home-page "https://pagure.io/flask-multistatic")
2498 (synopsis "Flask plugin to allow overriding static files")
2499 (description "@code{flask-multistatic} is a flask plugin that adds support
2500 for overriding static files.")
2501 (license license:gpl3+)))
2502
2503 (define-public python2-flask-multistatic
2504 (package-with-python2 python-flask-multistatic))
2505
2506 (define-public python-cookies
2507 (package
2508 (name "python-cookies")
2509 (version "2.2.1")
2510 (source (origin
2511 (method url-fetch)
2512 (uri (pypi-uri "cookies" version))
2513 (sha256
2514 (base32
2515 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
2516 (build-system python-build-system)
2517 (arguments
2518 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
2519 #:tests? #f))
2520 (native-inputs
2521 `(("python-pytest" ,python-pytest)))
2522 (synopsis "HTTP cookie parser and renderer")
2523 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
2524 Python.")
2525 (home-page "https://gitlab.com/sashahart/cookies")
2526 (license license:expat)))
2527
2528 (define-public python2-cookies
2529 (package-with-python2 python-cookies))
2530
2531 (define-public python-responses
2532 (package
2533 (name "python-responses")
2534 (version "0.10.6")
2535 (source (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "responses" version))
2538 (sha256
2539 (base32
2540 "147pacwkkqy3qf3hr33fnl1xbzgw0zsm3qppvvy9qhq8h069qbah"))))
2541 (build-system python-build-system)
2542 (arguments
2543 `(;; Test suite is not distributed:
2544 ;; https://github.com/getsentry/responses/issues/38
2545 #:tests? #f))
2546 (native-inputs
2547 `(("python-mock" ,python-mock)))
2548 (propagated-inputs
2549 `(("python-requests" ,python-requests)
2550 ("python-cookies" ,python-cookies)
2551 ("python-six" ,python-six)))
2552 (home-page "https://github.com/getsentry/responses")
2553 (synopsis "Utility for mocking out the `requests` Python library")
2554 (description "A utility library for mocking out the `requests` Python
2555 library.")
2556 (license license:asl2.0)))
2557
2558 (define-public python2-responses
2559 (package-with-python2 python-responses))
2560
2561 (define-public python-grequests
2562 (package
2563 (name "python-grequests")
2564 (version "0.3.0")
2565 (source
2566 (origin
2567 (method url-fetch)
2568 (uri (pypi-uri "grequests" version))
2569 (sha256
2570 (base32
2571 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
2572 (build-system python-build-system)
2573 (propagated-inputs
2574 `(("python-gevent" ,python-gevent)
2575 ("python-requests" ,python-requests)))
2576 (native-inputs
2577 `(("python-nose" ,python-nose)
2578 ("python-zope.interface" ,python-zope-interface)
2579 ("python-zope.event" ,python-zope-event)))
2580 (home-page "https://github.com/kennethreitz/grequests")
2581 (synopsis "Python library for asynchronous HTTP requests")
2582 (description "GRequests is a Python library that allows you to use
2583 @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
2584 (license license:bsd-2)))
2585
2586 (define-public python-geventhttpclient
2587 (package
2588 (name "python-geventhttpclient")
2589 (version "1.3.1")
2590 (source (origin
2591 (method url-fetch)
2592 (uri (pypi-uri "geventhttpclient" version))
2593 (sha256
2594 (base32
2595 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
2596 (modules '((guix build utils)))
2597 (snippet
2598 '(begin
2599 ;; Delete pre-compiled files.
2600 (for-each delete-file (find-files "src/geventhttpclient"
2601 ".*\\.pyc"))
2602 #t))))
2603 (build-system python-build-system)
2604 (arguments
2605 '(#:phases
2606 (modify-phases %standard-phases
2607 (add-after 'unpack 'delete-network-tests
2608 (lambda _
2609 (delete-file "src/geventhttpclient/tests/test_client.py")
2610 #t))
2611 (replace 'check
2612 (lambda* (#:key inputs outputs #:allow-other-keys)
2613 (add-installed-pythonpath inputs outputs)
2614 (invoke "py.test" "src/geventhttpclient/tests" "-v"
2615 ;; Append the test modules to sys.path to avoid
2616 ;; namespace conflict which breaks SSL tests.
2617 "--import-mode=append"
2618 ;; XXX: Disable test fails with Python 3.8:
2619 ;; https://github.com/gwik/geventhttpclient/issues/119
2620 "-k" (string-append "not test_cookielib_compatibility"))
2621 #t)))))
2622 (native-inputs
2623 `(("python-pytest" ,python-pytest)))
2624 (propagated-inputs
2625 `(("python-certifi" ,python-certifi)
2626 ("python-gevent" ,python-gevent)
2627 ("python-six" ,python-six)))
2628 (home-page "https://github.com/gwik/geventhttpclient")
2629 (synopsis "HTTP client library for gevent")
2630 (description "@code{python-geventhttpclient} is a high performance,
2631 concurrent HTTP client library for python using @code{gevent}.")
2632 (license license:expat)))
2633
2634 (define-public python2-geventhttpclient
2635 (package-with-python2 python-geventhttpclient))
2636
2637 (define-public python-requests-oauthlib
2638 (package
2639 (name "python-requests-oauthlib")
2640 (version "1.2.0")
2641 (source
2642 (origin
2643 (method url-fetch)
2644 (uri (pypi-uri "requests-oauthlib" version))
2645 (sha256
2646 (base32
2647 "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
2648 (build-system python-build-system)
2649 (arguments
2650 `(#:phases
2651 (modify-phases %standard-phases
2652 ;; removes tests that require network access
2653 (add-before 'check 'pre-check
2654 (lambda _
2655 (delete-file "tests/test_core.py")
2656 #t)))))
2657 (native-inputs
2658 `(("python-pyjwt" ,python-pyjwt)
2659 ("python-requests-mock" ,python-requests-mock)
2660 ("python-mock" ,python-mock)))
2661 (propagated-inputs
2662 `(("python-oauthlib" ,python-oauthlib)
2663 ("python-requests" ,python-requests)))
2664 (home-page
2665 "https://github.com/requests/requests-oauthlib")
2666 (synopsis
2667 "OAuthlib authentication support for Requests")
2668 (description
2669 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
2670 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
2671 (license license:isc)))
2672
2673 (define-public python2-requests-oauthlib
2674 (package-with-python2 python-requests-oauthlib))
2675
2676 (define-public python-url
2677 (package
2678 (name "python-url")
2679 (version "0.2.0")
2680 (source (origin
2681 (method url-fetch)
2682 (uri (pypi-uri "url" version))
2683 (sha256
2684 (base32
2685 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
2686 (build-system python-build-system)
2687 (propagated-inputs
2688 `(("python-publicsuffix" ,python-publicsuffix)))
2689 (native-inputs
2690 `(("python-coverage" ,python-coverage)
2691 ("python-nose" ,python-nose)))
2692 (arguments
2693 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
2694 (home-page "https://github.com/seomoz/url-py")
2695 (synopsis "URL Parsing")
2696 (description "Library for parsing urls.")
2697 (license license:expat)
2698 (properties `((python2-variant . ,(delay python2-url))))))
2699
2700 (define-public python2-url
2701 (let ((base (package-with-python2 (strip-python2-variant python-url))))
2702 (package (inherit base)
2703 (propagated-inputs
2704 `(("python2-publicsuffix" ,python2-publicsuffix))))))
2705
2706 (define-public python-cachecontrol
2707 (package
2708 (name "python-cachecontrol")
2709 (version "0.12.5")
2710 (source
2711 (origin
2712 (method git-fetch)
2713 ;; Pypi does not have tests.
2714 (uri (git-reference
2715 (url "https://github.com/ionrock/cachecontrol")
2716 (commit (string-append "v" version))))
2717 (file-name (git-file-name name version))
2718 (sha256
2719 (base32
2720 "03lgc65sl04n0cgzmmgg99bk83f9i6k8yrmcd4hpl46q1pymn0kz"))))
2721 (build-system python-build-system)
2722 (arguments
2723 ;; Versions > 0.11.6 depend on CherryPy for testing.
2724 ;; It's too much work to package CherryPy for now.
2725 `(#:tests? #f))
2726 (propagated-inputs
2727 `(("python-requests" ,python-requests)
2728 ("python-msgpack" ,python-msgpack)
2729 ("python-lockfile" ,python-lockfile)))
2730 (home-page "https://github.com/ionrock/cachecontrol")
2731 (synopsis "The httplib2 caching algorithms for use with requests")
2732 (description "CacheControl is a port of the caching algorithms in
2733 @code{httplib2} for use with @code{requests} session objects.")
2734 (license license:asl2.0)))
2735
2736 (define-public python2-cachecontrol
2737 (package-with-python2 python-cachecontrol))
2738
2739 (define-public python-betamax
2740 (package
2741 (name "python-betamax")
2742 (version "0.8.1")
2743 (source
2744 (origin
2745 (method url-fetch)
2746 (uri (pypi-uri "betamax" version))
2747 (sha256
2748 (base32
2749 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
2750 (build-system python-build-system)
2751 (arguments
2752 '(;; Many tests fail because they require networking.
2753 #:tests? #f))
2754 (propagated-inputs
2755 `(("python-requests" ,python-requests)))
2756 (home-page "https://github.com/sigmavirus24/betamax")
2757 (synopsis "Record HTTP interactions with python-requests")
2758 (description "Betamax will record your test suite's HTTP interactions and
2759 replay them during future tests. It is designed to work with python-requests.")
2760 (license license:expat)))
2761
2762 (define-public python2-betamax
2763 (package-with-python2 python-betamax))
2764
2765 (define-public python-betamax-matchers
2766 (package
2767 (name "python-betamax-matchers")
2768 (version "0.4.0")
2769 (source
2770 (origin
2771 (method url-fetch)
2772 (uri (pypi-uri "betamax-matchers" version))
2773 (sha256
2774 (base32
2775 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
2776 (build-system python-build-system)
2777 (propagated-inputs
2778 `(("python-betamax" ,python-betamax)
2779 ("python-requests-toolbelt" ,python-requests-toolbelt)))
2780 (home-page "https://github.com/sigmavirus24/betamax_matchers")
2781 (synopsis "VCR imitation for python-requests")
2782 (description "@code{betamax-matchers} provides a set of Matchers for
2783 Betamax.")
2784 (license license:asl2.0)))
2785
2786 (define-public python2-betamax-matchers
2787 (package-with-python2 python-betamax-matchers))
2788
2789 (define-public python-s3transfer
2790 (package
2791 (name "python-s3transfer")
2792 (version "0.2.0")
2793 (source (origin
2794 (method url-fetch)
2795 (uri (pypi-uri "s3transfer" version))
2796 (sha256
2797 (base32
2798 "08fhj73b1ai52hrs2q3nggshq3pswn1gq8ch3m009cb2v2vmqggj"))))
2799 (build-system python-build-system)
2800 (arguments
2801 `(#:phases
2802 (modify-phases %standard-phases
2803 (add-after 'unpack 'patch
2804 (lambda _
2805 ;; There's a small issue with one test with Python 3.8, this
2806 ;; change has been suggested upstream:
2807 ;; https://github.com/boto/s3transfer/pull/164
2808 (substitute* "tests/unit/test_s3transfer.py"
2809 (("super\\(FailedDownloadParts, self\\)\\.submit\\(function\\)")
2810 "futures.Future()"))
2811 #t))
2812 (replace 'check
2813 (lambda _
2814 ;; Some of the 'integration' tests require network access or
2815 ;; login credentials.
2816 (invoke "nosetests" "--exclude=integration")
2817 #t)))))
2818 (native-inputs
2819 `(("python-docutils" ,python-docutils)
2820 ("python-mock" ,python-mock)
2821 ("python-nose" ,python-nose)))
2822 (propagated-inputs
2823 `(("python-botocore" ,python-botocore)
2824 ("python-urllib3" ,python-urllib3)))
2825 (synopsis "Amazon S3 Transfer Manager")
2826 (description "S3transfer is a Python library for managing Amazon S3
2827 transfers.")
2828 (home-page "https://github.com/boto/s3transfer")
2829 (license license:asl2.0)
2830 (properties `((python2-variant . ,(delay python2-s3transfer))))))
2831
2832 (define-public python2-s3transfer
2833 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
2834 (package
2835 (inherit base)
2836 (native-inputs
2837 `(("python2-futures" ,python2-futures)
2838 ,@(package-native-inputs base))))))
2839
2840 (define-public python-slimit
2841 (package
2842 (name "python-slimit")
2843 (version "0.8.1")
2844 (source
2845 (origin
2846 (method url-fetch)
2847 (uri (pypi-uri "slimit" version ".zip"))
2848 (sha256
2849 (base32
2850 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
2851 (build-system python-build-system)
2852 (native-inputs
2853 `(("unzip" ,unzip)))
2854 (propagated-inputs
2855 `(("python-ply" ,python-ply)))
2856 (home-page "https://slimit.readthedocs.io/")
2857 (synopsis "JavaScript minifier, parser and lexer written in Python")
2858 (description
2859 "SlimIt is a JavaScript minifier written in Python. It compiles
2860 JavaScript into more compact code so that it downloads and runs faster.
2861 SlimIt also provides a library that includes a JavaScript parser, lexer,
2862 pretty printer and a tree visitor.")
2863 (license license:expat)))
2864
2865 (define-public python-flask-restful
2866 (package
2867 (name "python-flask-restful")
2868 (version "0.3.8")
2869 (source
2870 (origin
2871 (method url-fetch)
2872 (uri (pypi-uri "Flask-RESTful" version))
2873 (patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
2874 (sha256
2875 (base32
2876 "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
2877 (build-system python-build-system)
2878 (propagated-inputs
2879 `(("python-aniso8601" ,python-aniso8601)
2880 ("python-flask" ,python-flask)
2881 ("python-pycrypto" ,python-pycrypto)
2882 ("python-pytz" ,python-pytz)))
2883 (native-inputs
2884 `(;; Optional dependency of Flask. Tests need it.
2885 ("python-blinker" ,python-blinker)
2886 ("python-mock" ,python-mock) ; For tests
2887 ("python-nose" ,python-nose))) ;for tests
2888 (home-page
2889 "https://www.github.com/flask-restful/flask-restful/")
2890 (synopsis
2891 "Flask module for creating REST APIs")
2892 (description
2893 "This package contains a Flask module for creating REST APIs.")
2894 (license license:bsd-3)))
2895
2896 (define-public python-flask-basicauth
2897 (package
2898 (name "python-flask-basicauth")
2899 (version "0.2.0")
2900 (source
2901 (origin
2902 (method url-fetch)
2903 (uri (pypi-uri "Flask-BasicAuth" version))
2904 (sha256
2905 (base32
2906 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
2907 (build-system python-build-system)
2908 (propagated-inputs
2909 `(("python-flask" ,python-flask)))
2910 (home-page
2911 "https://github.com/jpvanhal/flask-basicauth")
2912 (synopsis
2913 "HTTP basic access authentication for Flask")
2914 (description
2915 "This package provides HTTP basic access authentication for Flask.")
2916 (license license:bsd-3)))
2917
2918 (define-public python-flask-htpasswd
2919 (package
2920 (name "python-flask-htpasswd")
2921 (version "0.3.1")
2922 (source
2923 (origin
2924 (method url-fetch)
2925 (uri (pypi-uri "flask-htpasswd" version))
2926 (sha256
2927 (base32
2928 "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
2929 (build-system python-build-system)
2930 (propagated-inputs
2931 `(("python-flask" ,python-flask)
2932 ("python-itsdangerous" ,python-itsdangerous)
2933 ("python-passlib" ,python-passlib)
2934 ("python-tox" ,python-tox)))
2935 (home-page "https://github.com/carsongee/flask-htpasswd")
2936 (synopsis "Basic authentication via htpasswd files in Flask applications")
2937 (description "This package provides Basic authentication via
2938 @file{htpasswd} files and access_token authentication in Flask
2939 applications.")
2940 (license license:bsd-3)))
2941
2942 (define-public python-flask-sqlalchemy
2943 (package
2944 (name "python-flask-sqlalchemy")
2945 (version "2.4.4")
2946 (source (origin
2947 (method url-fetch)
2948 (uri (pypi-uri "Flask-SQLAlchemy" version))
2949 (sha256
2950 (base32
2951 "1rgsj49gnx361hnb3vn6c1h17497qh22yc3r70l1r6w0mw71bixz"))))
2952 (build-system python-build-system)
2953 (propagated-inputs
2954 `(("python-flask" ,python-flask)
2955 ("python-sqlalchemy" ,python-sqlalchemy)))
2956 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
2957 (synopsis "Module adding SQLAlchemy support to your Flask application")
2958 (description
2959 "This package adds SQLAlchemy support to your Flask application.")
2960 (license license:bsd-3)))
2961
2962 (define-public python-flask-restplus
2963 (package
2964 (name "python-flask-restplus")
2965 (version "0.9.2")
2966 (source
2967 (origin
2968 (method url-fetch)
2969 (uri (pypi-uri "flask-restplus" version))
2970 (sha256
2971 (base32
2972 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2973 (build-system python-build-system)
2974 (arguments
2975 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2976 ;; #:phases
2977 ;; (modify-phases %standard-phases
2978 ;; (replace 'check
2979 ;; (lambda _
2980 ;; (invoke "nosetests")
2981 ;; #t)))))
2982 (propagated-inputs
2983 `(("python-aniso8601" ,python-aniso8601)
2984 ("python-flask" ,python-flask)
2985 ("python-jsonschema" ,python-jsonschema)
2986 ("python-pytz" ,python-pytz)
2987 ("python-six" ,python-six)))
2988 (native-inputs
2989 `(("python-tzlocal" ,python-tzlocal)
2990 ("python-blinker" ,python-blinker)
2991 ("python-nose" ,python-nose)
2992 ("python-rednose" ,python-rednose)))
2993 (home-page "https://github.com/noirbizarre/flask-restplus")
2994 (synopsis "Framework for documented API development with Flask")
2995 (description "This package provides a framework for API development with
2996 the Flask web framework in Python. It is similar to package
2997 @code{python-flask-restful} but supports the @code{python-swagger}
2998 documentation builder.")
2999 (license license:expat)))
3000
3001 (define-public python-flask-restful-swagger
3002 (package
3003 (name "python-flask-restful-swagger")
3004 (version "0.20.1")
3005 (source
3006 (origin
3007 (method url-fetch)
3008 (uri (pypi-uri "flask-restful-swagger" version))
3009 (sha256
3010 (base32
3011 "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
3012 (build-system python-build-system)
3013 (arguments '(#:tests? #f)) ;no tests
3014 (propagated-inputs
3015 `(("python-flask-restful" ,python-flask-restful)))
3016 (home-page "https://github.com/rantav/flask-restful-swagger")
3017 (synopsis "Extract Swagger specs from Flask-Restful projects")
3018 (description "This package lets you extract Swagger API documentation
3019 specs from your Flask-Restful projects.")
3020 (license license:expat)))
3021
3022 (define-public python2-flask-restful-swagger
3023 (package-with-python2 python-flask-restful-swagger))
3024
3025 (define-public python-htmlmin
3026 (package
3027 (name "python-htmlmin")
3028 (version "0.1.12")
3029 (source
3030 (origin
3031 (method url-fetch)
3032 (uri (pypi-uri "htmlmin" version))
3033 (sha256
3034 (base32
3035 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
3036 (arguments
3037 `(#:tests? #f)) ; no tests
3038 (build-system python-build-system)
3039 (home-page "https://htmlmin.readthedocs.org/en/latest/")
3040 (synopsis "HTML minifier")
3041 (description "@code{htmlmin} is an HTML minifier that just works.
3042 It comes with safe defaults and easily configurable options.")
3043 (license license:bsd-3)))
3044
3045 (define-public python2-htmlmin
3046 (package-with-python2 python-htmlmin))
3047
3048 (define-public python-flask-htmlmin
3049 (package
3050 (name "python-flask-htmlmin")
3051 (version "1.2")
3052 (source
3053 (origin
3054 (method url-fetch)
3055 (uri (pypi-uri "Flask-HTMLmin" version))
3056 (sha256
3057 (base32
3058 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
3059 (propagated-inputs
3060 `(("python-flask" ,python-flask)
3061 ("python-htmlmin" ,python-htmlmin)))
3062 (build-system python-build-system)
3063 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
3064 (synopsis "HTML response minifier for Flask")
3065 (description
3066 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
3067 (license license:bsd-3)))
3068
3069 (define-public python2-flask-htmlmin
3070 (package-with-python2 python-flask-htmlmin))
3071
3072 (define-public python-jsmin
3073 (package
3074 (name "python-jsmin")
3075 (version "2.2.2")
3076 (source
3077 (origin
3078 (method url-fetch)
3079 (uri (pypi-uri "jsmin" version))
3080 (sha256
3081 (base32
3082 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
3083 (build-system python-build-system)
3084 (home-page "https://github.com/tikitu/jsmin/")
3085 (synopsis "Python JavaScript minifier")
3086 (description
3087 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
3088 on the command line.")
3089 (license license:expat)))
3090
3091 (define-public python-flask-login
3092 (package
3093 (name "python-flask-login")
3094 (version "0.5.0")
3095 (source
3096 (origin
3097 (method git-fetch)
3098 (uri (git-reference
3099 (url "https://github.com/maxcountryman/flask-login")
3100 (commit version)))
3101 (file-name (git-file-name name version))
3102 (sha256
3103 (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
3104 (build-system python-build-system)
3105 (propagated-inputs
3106 `(("python-flask" ,python-flask)))
3107 (native-inputs
3108 ;; For tests.
3109 `(("python-blinker" ,python-blinker)
3110 ("python-coverage" ,python-coverage)
3111 ("python-mock" ,python-mock)
3112 ("python-pycodestyle" ,python-pycodestyle)
3113 ("python-pyflakes" ,python-pyflakes)
3114 ("python-pytest" ,python-pytest)
3115 ("python-semantic-version" ,python-semantic-version)
3116 ("python-werkzeug" ,python-werkzeug)))
3117 (home-page "https://github.com/maxcountryman/flask-login")
3118 (synopsis "User session management for Flask")
3119 (description
3120 "@code{Flask-Login} provides user session management for Flask. It
3121 handles the common tasks of logging in, logging out, and remembering your
3122 users' sessions over extended periods of time.")
3123 (license license:expat)))
3124
3125 (define-public python2-flask-login
3126 (package-with-python2 python-flask-login))
3127
3128 (define-public python-oauth2client
3129 (package
3130 (name "python-oauth2client")
3131 (version "4.0.0")
3132 (source
3133 (origin
3134 (method url-fetch)
3135 (uri (pypi-uri "oauth2client" version))
3136 (sha256
3137 (base32
3138 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
3139 (build-system python-build-system)
3140 (arguments
3141 `(#:tests? #f))
3142 (propagated-inputs
3143 `(("python-httplib2" ,python-httplib2)
3144 ("python-pyasn1" ,python-pyasn1)
3145 ("python-pyasn1-modules" ,python-pyasn1-modules)
3146 ("python-rsa" ,python-rsa)
3147 ("python-six" ,python-six)))
3148 (home-page "https://github.com/google/oauth2client/")
3149 (synopsis "OAuth 2.0 client library")
3150 (description "@code{python-oauth2client} provides an OAuth 2.0 client
3151 library for Python")
3152 (license license:asl2.0)))
3153
3154 (define-public python2-oauth2client
3155 (package-with-python2 python-oauth2client))
3156
3157 (define-public python-flask-oidc
3158 (package
3159 (name "python-flask-oidc")
3160 (version "1.1.1")
3161 (source
3162 (origin
3163 (method url-fetch)
3164 (uri (pypi-uri "flask-oidc" version))
3165 (sha256
3166 (base32
3167 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
3168 (build-system python-build-system)
3169 (propagated-inputs
3170 `(("python-flask" ,python-flask)
3171 ("python-itsdangerous" ,python-itsdangerous)
3172 ("python-oauth2client" ,python-oauth2client)
3173 ("python-six" ,python-six)))
3174 (native-inputs
3175 `(("python-nose" ,python-nose)
3176 ("python-mock" ,python-mock)))
3177 (home-page "https://github.com/puiterwijk/flask-oidc")
3178 (synopsis "OpenID Connect extension for Flask")
3179 (description "@code{python-flask-oidc} provides an OpenID Connect extension
3180 for Flask.")
3181 (license license:bsd-2)))
3182
3183 (define-public python-webassets
3184 (package
3185 (name "python-webassets")
3186 (version "2.0")
3187 (source
3188 (origin
3189 (method url-fetch)
3190 (uri (pypi-uri "webassets" version))
3191 (sha256
3192 (base32
3193 "1kc1042jydgk54xpgcp0r1ib4gys91nhy285jzfcxj3pfqrk4w8n"))))
3194 (build-system python-build-system)
3195 (arguments
3196 '(#:phases (modify-phases %standard-phases
3197 (add-before 'check 'disable-some-tests
3198 (lambda _
3199 ;; This test requires 'postcss' and 'babel' which are
3200 ;; not yet available in Guix.
3201 (delete-file "tests/test_filters.py")
3202 #t))
3203 (replace 'check
3204 (lambda _
3205 (setenv "PYTHONPATH"
3206 (string-append "./build/lib:"
3207 (getenv "PYTHONPATH")))
3208 (invoke "pytest" "-vv"))))))
3209 (native-inputs
3210 `(("python-jinja2" ,python-jinja2)
3211 ("python-mock" ,python-mock)
3212 ("python-nose" ,python-nose)
3213 ("python-pytest" ,python-pytest)))
3214 (home-page "https://github.com/miracle2k/webassets")
3215 (synopsis "Media asset management")
3216 (description "Merges, minifies and compresses Javascript and CSS files,
3217 supporting a variety of different filters, including YUI, jsmin, jspacker or
3218 CSS tidy. Also supports URL rewriting in CSS files.")
3219 (license license:bsd-2)))
3220
3221 (define-public python-cssmin
3222 (package
3223 (name "python-cssmin")
3224 (version "0.2.0")
3225 (source
3226 (origin
3227 (method url-fetch)
3228 (uri (pypi-uri "cssmin" version))
3229 (sha256
3230 (base32
3231 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
3232 (build-system python-build-system)
3233 (home-page "https://github.com/zacharyvoase/cssmin")
3234 (synopsis "Python port of the YUI CSS Compressor")
3235 (description "Python port of the YUI CSS Compressor.")
3236 (license (list license:expat license:bsd-3))))
3237
3238 (define-public python2-cssmin
3239 (package-with-python2 python-cssmin))
3240
3241 (define-public python-elasticsearch
3242 (package
3243 (name "python-elasticsearch")
3244 (version "7.1.0")
3245 (source
3246 (origin
3247 (method url-fetch)
3248 (uri (pypi-uri "elasticsearch" version))
3249 (sha256
3250 (base32
3251 "0rnjvlhw4v3vg14l519qliy1s1zpmx3827q0xfviwvk42rr7hh01"))))
3252 (build-system python-build-system)
3253 (native-inputs
3254 `(("python-mock" ,python-mock)
3255 ("python-nosexcover" ,python-nosexcover)
3256 ("python-pyaml" ,python-pyaml)
3257 ("python-requests" ,python-requests)))
3258 (propagated-inputs
3259 `(("urllib3" ,python-urllib3)))
3260 (arguments
3261 ;; tests require the test_elasticsearch module but it is not distributed.
3262 `(#:tests? #f))
3263 (home-page "https://github.com/elastic/elasticsearch-py")
3264 (synopsis "Low-level client for Elasticsearch")
3265 (description "Official low-level client for Elasticsearch. Its goal is to
3266 provide common ground for all Elasticsearch-related code in Python; because of
3267 this it tries to be opinion-free and very extendable.")
3268 (license license:expat)))
3269
3270 (define-public python2-elasticsearch
3271 (package-with-python2 python-elasticsearch))
3272
3273 (define-public python-flask-script
3274 (package
3275 (name "python-flask-script")
3276 (version "2.0.6")
3277 (source
3278 (origin
3279 (method url-fetch)
3280 (uri (pypi-uri "Flask-Script" version))
3281 (sha256
3282 (base32
3283 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
3284 (build-system python-build-system)
3285 (arguments
3286 `(#:phases
3287 (modify-phases %standard-phases
3288 (add-after 'unpack 'patch-tests
3289 (lambda _
3290 (substitute* "tests.py"
3291 (("flask\\.ext\\.script") "flask_script"))
3292 #t)))))
3293 (propagated-inputs
3294 `(("python-flask" ,python-flask)
3295 ("python-argcomplete" ,python-argcomplete)
3296 ("python-werkzeug" ,python-werkzeug)))
3297 (native-inputs
3298 `(("python-pytest" ,python-pytest)))
3299 (home-page
3300 "https://github.com/smurfix/flask-script")
3301 (synopsis "Scripting support for Flask")
3302 (description "The Flask-Script extension provides support for writing
3303 external scripts in Flask. This includes running a development server,
3304 a customised Python shell, scripts to set up your database, cronjobs,
3305 and other command-line tasks that belong outside the web application
3306 itself.")
3307 (license license:bsd-3)))
3308
3309 (define-public python2-flask-script
3310 (package-with-python2 python-flask-script))
3311
3312 (define-public python-flask-migrate
3313 (package
3314 (name "python-flask-migrate")
3315 (version "2.5.3")
3316 (source
3317 (origin
3318 (method url-fetch)
3319 (uri (pypi-uri "Flask-Migrate" version))
3320 (sha256
3321 (base32
3322 "1vip9ww6l18dxffjsggm83k71zkvihxpnhaswpv8klh95s6517d6"))))
3323 (build-system python-build-system)
3324 (propagated-inputs
3325 `(("python-flask" ,python-flask)
3326 ("python-alembic" ,python-alembic)
3327 ("python-sqlalchemy" ,python-sqlalchemy)
3328 ("python-flask-script" ,python-flask-script)
3329 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
3330 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
3331 (synopsis "SQLAlchemy database migrations for Flask programs using
3332 Alembic")
3333 (description "This package contains SQLAlchemy database migration tools
3334 for Flask programs that are using @code{python-alembic}.")
3335 (license license:expat)))
3336
3337 (define-public python-genshi
3338 (package
3339 (name "python-genshi")
3340 (version "0.7.3")
3341 (source
3342 (origin
3343 (method git-fetch)
3344 (uri (git-reference
3345 (url "https://github.com/edgewall/genshi")
3346 (commit version)))
3347 (file-name (git-file-name name version))
3348 (sha256
3349 (base32 "04bw7nd4wyn8ixnhik57hny2xpjjpn80k5hp6691inix5gc6rxaf"))))
3350 (build-system python-build-system)
3351 (home-page "https://genshi.edgewall.org/")
3352 (synopsis "Toolkit for generation of output for the web")
3353 (description "Genshi is a Python library that provides an integrated set
3354 of components for parsing, generating, and processing HTML, XML or other
3355 textual content for output generation on the web.")
3356 (license license:bsd-3)))
3357
3358 (define-public python2-genshi
3359 (package-with-python2 python-genshi))
3360
3361 (define-public python-flask-principal
3362 (package
3363 (name "python-flask-principal")
3364 (version "0.4.0")
3365 (source
3366 (origin
3367 (method url-fetch)
3368 (uri (pypi-uri "Flask-Principal" version))
3369 (sha256
3370 (base32
3371 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
3372 (build-system python-build-system)
3373 (propagated-inputs
3374 `(("python-blinker" ,python-blinker)))
3375 (native-inputs
3376 `(("python-flask" ,python-flask)
3377 ("python-nose" ,python-nose)))
3378 (home-page "https://pythonhosted.org/Flask-Principal/")
3379 (synopsis "Identity management for Flask")
3380 (description "@code{flask_principal} is a identity management library for
3381 Flask. It supports managing both authentication and authorization data in a
3382 thread-local variable.")
3383 (license license:expat)))
3384
3385 (define-public python2-flask-principal
3386 (package-with-python2 python-flask-principal))
3387
3388 (define-public python-flask-httpauth
3389 (package
3390 (name "python-flask-httpauth")
3391 (version "3.2.3")
3392 (source
3393 (origin
3394 (method url-fetch)
3395 (uri (pypi-uri "Flask-HTTPAuth" version))
3396 (sha256
3397 (base32
3398 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
3399 (build-system python-build-system)
3400 (native-inputs
3401 `(("python-flask" ,python-flask)))
3402 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
3403 (synopsis "Basic and Digest HTTP authentication for Flask routes")
3404 (description "@code{flask_httpauth} provides Basic and Digest HTTP
3405 authentication for Flask routes.")
3406 (license license:expat)))
3407
3408 (define-public python2-flask-httpauth
3409 (package-with-python2 python-flask-httpauth))
3410
3411 (define-public python-uritemplate
3412 (package
3413 (name "python-uritemplate")
3414 (version "3.0.1")
3415 (source
3416 (origin
3417 (method url-fetch)
3418 (uri (pypi-uri "uritemplate" version))
3419 (sha256
3420 (base32
3421 "1bkwmgr0ia9gcn4bszs2xlvml79f0bi2s4a87xg22ky9rq8avy2s"))))
3422 (build-system python-build-system)
3423 (home-page "https://uritemplate.readthedocs.org")
3424 (synopsis "Library to deal with URI Templates")
3425 (description "@code{uritemplate} provides Python library to deal with URI
3426 Templates.")
3427 (license license:bsd-2)))
3428
3429 (define-public python2-uritemplate
3430 (package-with-python2 python-uritemplate))
3431
3432 (define-public python-publicsuffix
3433 (package
3434 (name "python-publicsuffix")
3435 (version "1.1.0")
3436 (source (origin
3437 (method url-fetch)
3438 (uri (pypi-uri "publicsuffix" version))
3439 (sha256
3440 (base32
3441 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
3442 (build-system python-build-system)
3443 (arguments
3444 `(#:tests? #f)) ; tests use the internet
3445 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
3446 (synopsis "Get suffix for a domain name")
3447 (description "Get a public suffix for a domain name using the Public Suffix
3448 List.")
3449 (license license:expat)))
3450
3451 (define-public python2-publicsuffix
3452 (package-with-python2 python-publicsuffix))
3453
3454 (define-public python-publicsuffix2
3455 (package
3456 (name "python-publicsuffix2")
3457 (version "2.20191221")
3458 (source
3459 (origin
3460 (method url-fetch)
3461 (uri (pypi-uri "publicsuffix2" version))
3462 (sha256
3463 (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
3464 (build-system python-build-system)
3465 (arguments
3466 '(#:phases
3467 (modify-phases %standard-phases
3468 (add-after 'unpack 'ignore-maintainer-inputs
3469 (lambda _
3470 ;; Comment out a demand for python-requests, which is used only by
3471 ;; the unused ‘update_psl’ helper command.
3472 (substitute* "setup.py"
3473 (("'requests " match)
3474 (format #f "# ~a" match)))
3475 #t)))
3476 #:tests? #f)) ; the test suite requires network access
3477 (home-page "https://github.com/pombredanne/python-publicsuffix2")
3478 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
3479 (description "Get a public suffix for a domain name using the Public Suffix
3480 List. Forked from and using the same API as the publicsuffix package.")
3481 (license (list license:expat license:mpl2.0))))
3482
3483 (define-public python2-publicsuffix2
3484 (package-with-python2 python-publicsuffix2))
3485
3486 (define-public python-werkzeug
3487 (package
3488 (name "python-werkzeug")
3489 (version "1.0.0")
3490 (source
3491 (origin
3492 (method url-fetch)
3493 (uri (pypi-uri "Werkzeug" version))
3494 (sha256
3495 (base32
3496 "15kh0z61klp62mrc1prka13xsshxn0rsp1j1s2964iw86yisi6qn"))))
3497 (build-system python-build-system)
3498 (arguments
3499 '(#:phases
3500 (modify-phases %standard-phases
3501 (delete 'check)
3502 (add-after 'install 'check
3503 (lambda* (#:key inputs outputs #:allow-other-keys)
3504 (add-installed-pythonpath inputs outputs)
3505 (invoke "python" "-m" "pytest"))))))
3506 (propagated-inputs
3507 `(("python-requests" ,python-requests)))
3508 (native-inputs
3509 `(("python-pytest" ,python-pytest)
3510 ("python-pytest-timeout" ,python-pytest-timeout)))
3511 (home-page "https://www.palletsprojects.org/p/werkzeug/")
3512 (synopsis "Utilities for WSGI applications")
3513 (description "One of the most advanced WSGI utility modules. It includes a
3514 powerful debugger, full-featured request and response objects, HTTP utilities to
3515 handle entity tags, cache control headers, HTTP dates, cookie handling, file
3516 uploads, a powerful URL routing system and a bunch of community-contributed
3517 addon modules.")
3518 (license license:x11)))
3519
3520 (define-public python2-werkzeug
3521 (package-with-python2 python-werkzeug))
3522
3523 (define-public python-bottle
3524 (package
3525 (name "python-bottle")
3526 (version "0.12.19")
3527 (source
3528 (origin
3529 (method url-fetch)
3530 (uri (pypi-uri "bottle" version))
3531 (sha256
3532 (base32 "0b6s50vc4iad97b6bb3xnyrgajb3nj6n6jbr5p54a4vapky3zmx9"))))
3533 (build-system python-build-system)
3534 (home-page "https://bottlepy.org/")
3535 (synopsis "WSGI framework for small web-applications.")
3536 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
3537 (license license:expat)))
3538
3539 (define-public python2-bottle
3540 (package-with-python2 python-bottle))
3541
3542 (define-public python-wtforms
3543 (package
3544 (name "python-wtforms")
3545 (version "2.1")
3546 (source
3547 (origin
3548 (method url-fetch)
3549 (uri (pypi-uri "WTForms" version ".zip"))
3550 (sha256
3551 (base32
3552 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
3553 (build-system python-build-system)
3554 (arguments
3555 '(#:phases
3556 (modify-phases %standard-phases
3557 (add-after 'unpack 'remove-django-test
3558 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
3559 (lambda _
3560 (substitute*
3561 "tests/runtests.py"
3562 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
3563 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
3564 #t)))))
3565 (native-inputs
3566 `(("unzip" ,unzip)))
3567 (home-page "http://wtforms.simplecodes.com/")
3568 (synopsis
3569 "Form validation and rendering library for Python web development")
3570 (description
3571 "WTForms is a flexible forms validation and rendering library
3572 for Python web development. It is very similar to the web form API
3573 available in Django, but is a standalone package.")
3574 (license license:bsd-3)))
3575
3576 (define-public python2-wtforms
3577 (package-with-python2 python-wtforms))
3578
3579 (define-public python-paste
3580 (package
3581 (name "python-paste")
3582 (version "3.0.6")
3583 (source
3584 (origin
3585 (method url-fetch)
3586 (uri (pypi-uri "Paste" version))
3587 (sha256
3588 (base32
3589 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
3590 (patches (search-patches "python-paste-remove-timing-test.patch"))
3591 (modules '((guix build utils)))
3592 (snippet
3593 '(begin
3594 ;; This test calls out to the internet.
3595 (delete-file "tests/test_proxy.py") #t))))
3596 (build-system python-build-system)
3597 (native-inputs
3598 `(("python-pytest" ,python-pytest)
3599 ("python-pytest-runner" ,python-pytest-runner)
3600 ("python-nose" ,python-nose)))
3601 (propagated-inputs
3602 `(("python-six" ,python-six)))
3603 (home-page "https://pythonpaste.readthedocs.io/")
3604 (synopsis
3605 "Python web development tools, focusing on WSGI")
3606 (description
3607 "Paste provides a variety of web development tools and middleware which
3608 can be nested together to build web applications. Paste's design closely
3609 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
3610 (license license:expat)))
3611
3612 (define-public python2-paste
3613 (package-with-python2 python-paste))
3614
3615 (define-public python-pastescript
3616 (package
3617 (name "python-pastescript")
3618 (version "2.0.2")
3619 (source
3620 (origin
3621 (method url-fetch)
3622 (uri (pypi-uri "PasteScript" version))
3623 (sha256
3624 (base32
3625 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
3626 (build-system python-build-system)
3627 (native-inputs
3628 `(("python-nose" ,python-nose)))
3629 (propagated-inputs
3630 `(("python-paste" ,python-paste)
3631 ("python-pastedeploy" ,python-pastedeploy)))
3632 (home-page (string-append "https://web.archive.org/web/20161025192515/"
3633 "http://pythonpaste.org/script/"))
3634 (arguments
3635 '(;; Unfortunately, this requires the latest unittest2,
3636 ;; but that requires traceback2 which requires linecache2 which requires
3637 ;; unittest2. So we're skipping tests for now.
3638 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
3639 ;; so in theory we could get around this situation somehow.)
3640 #:tests? #f))
3641 (synopsis
3642 "Pluggable command line tool for serving web applications and more")
3643 (description
3644 "PasteScript is a plugin-friendly command line tool which provides a
3645 variety of features, from launching web applications to bootstrapping project
3646 layouts.")
3647 (license license:expat)))
3648
3649 (define-public python2-pastescript
3650 (package-with-python2 python-pastescript))
3651
3652 (define-public python2-urlgrabber
3653 (package
3654 (name "python2-urlgrabber")
3655 (version "3.10.2")
3656 (source
3657 (origin
3658 (method url-fetch)
3659 (uri (pypi-uri "urlgrabber" version))
3660 (sha256
3661 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
3662 (build-system python-build-system)
3663 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
3664 (home-page "http://urlgrabber.baseurl.org")
3665 (synopsis "High-level cross protocol url-grabber")
3666 (description "@code{urlgrabber} is Python2 library that unifies access to
3667 files available on web, FTP or locally. It supports HTTP, FTP and file://
3668 protocols, it supports features like HTTP keep-alive, reget, throttling and
3669 more.")
3670 (license license:lgpl2.1+)))
3671
3672 (define-public python-pycares
3673 (package
3674 (name "python-pycares")
3675 (version "2.3.0")
3676 (source
3677 (origin
3678 (method url-fetch)
3679 (uri (pypi-uri "pycares" version))
3680 (sha256
3681 (base32
3682 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
3683 (build-system python-build-system)
3684 (arguments
3685 `(#:tests? #f)) ;tests require internet access
3686 (home-page "https://github.com/saghul/pycares")
3687 (synopsis "Python interface for @code{c-ares}")
3688 (description "@code{pycares} is a Python module which provides an
3689 interface to @code{c-ares}, a C library that performs DNS requests and
3690 name resolutions asynchronously.")
3691 (license license:expat)))
3692
3693 (define-public python-yarl
3694 (package
3695 (name "python-yarl")
3696 (version "1.1.1")
3697 (source
3698 (origin
3699 (method url-fetch)
3700 (uri (pypi-uri "yarl" version))
3701 (sha256
3702 (base32
3703 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
3704 (build-system python-build-system)
3705 (native-inputs
3706 `(("python-pytest" ,python-pytest)
3707 ("python-pytest-runner" ,python-pytest-runner)))
3708 (propagated-inputs
3709 `(("python-idna" ,python-idna)
3710 ("python-multidict" ,python-multidict)))
3711 (home-page "https://github.com/aio-libs/yarl/")
3712 (synopsis "Yet another URL library")
3713 (description "@code{yarl} module provides handy @code{URL} class
3714 for URL parsing and changing.")
3715 (license license:asl2.0)))
3716
3717 (define-public python-google-api-client
3718 (package
3719 (name "python-google-api-client")
3720 (version "1.6.7")
3721 (source
3722 (origin
3723 (method url-fetch)
3724 (uri (pypi-uri "google-api-python-client" version))
3725 (sha256
3726 (base32
3727 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
3728 (build-system python-build-system)
3729 (arguments
3730 '(#:tests? #f)) ; tests require internet access
3731 (native-inputs
3732 `(("python-httplib2" ,python-httplib2)
3733 ("python-six" ,python-six)
3734 ("python-oauth2client" ,python-oauth2client)
3735 ("python-uritemplate" ,python-uritemplate)))
3736 (home-page "https://github.com/google/google-api-python-client")
3737 (synopsis "Core Python library for accessing Google APIs")
3738 (description "Python client library for Google's discovery based APIs")
3739 (license license:asl2.0)))
3740
3741 (define-public python2-google-api-client
3742 (package-with-python2 python-google-api-client))
3743
3744 (define-public python-hawkauthlib
3745 (package
3746 (name "python-hawkauthlib")
3747 (version "2.0.0")
3748 (source
3749 (origin
3750 (method url-fetch)
3751 (uri (pypi-uri "hawkauthlib" version))
3752 (sha256
3753 (base32
3754 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
3755 (build-system python-build-system)
3756 (propagated-inputs
3757 `(("python-requests" ,python-requests)
3758 ("python-webob" ,python-webob)))
3759 (home-page "https://github.com/mozilla-services/hawkauthlib")
3760 (synopsis "Hawk Access Authentication protocol")
3761 (description
3762 "This is a low-level Python library for implementing Hawk Access Authentication,
3763 a simple HTTP request-signing scheme.")
3764 (license license:mpl2.0)))
3765
3766 (define-public python-pybrowserid
3767 (package
3768 (name "python-pybrowserid")
3769 (version "0.14.0")
3770 (source
3771 (origin
3772 (method url-fetch)
3773 (uri (pypi-uri "PyBrowserID" version))
3774 (sha256
3775 (base32
3776 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
3777 (build-system python-build-system)
3778 (propagated-inputs
3779 `(("python-requests" ,python-requests)))
3780 (native-inputs
3781 `(("python-mock" ,python-mock)))
3782 (home-page "https://github.com/mozilla/PyBrowserID")
3783 (synopsis "Python library for the BrowserID protocol")
3784 (description
3785 "This is a Python client library for the BrowserID protocol that
3786 underlies Mozilla Persona.")
3787 (license license:mpl2.0)))
3788
3789 (define-public python-pyfxa
3790 (package
3791 (name "python-pyfxa")
3792 (version "0.6.0")
3793 (source
3794 (origin
3795 (method url-fetch)
3796 (uri (pypi-uri "PyFxA" version))
3797 (sha256
3798 (base32
3799 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
3800 (build-system python-build-system)
3801 (arguments '(#:tests? #f)) ; 17 tests require network access
3802 (propagated-inputs
3803 `(("python-cryptography" ,python-cryptography)
3804 ("python-hawkauthlib" ,python-hawkauthlib)
3805 ("python-pybrowserid" ,python-pybrowserid)
3806 ("python-requests" ,python-requests)
3807 ("python-six" ,python-six)))
3808 (native-inputs
3809 `(("python-grequests" ,python-grequests)
3810 ("python-mock" ,python-mock)
3811 ("python-responses" ,python-responses)
3812 ("python-unittest2" ,python-unittest2)))
3813 (home-page "https://github.com/mozilla/PyFxA")
3814 (synopsis "Firefox Accounts client library for Python")
3815 (description
3816 "This is a Python library for interacting with the Firefox Accounts
3817 ecosystem.")
3818 (license license:mpl2.0)))
3819
3820 (define-public python-hyperlink
3821 (package
3822 (name "python-hyperlink")
3823 (version "19.0.0")
3824 (source
3825 (origin
3826 (method url-fetch)
3827 (uri (pypi-uri "hyperlink" version))
3828 (sha256
3829 (base32
3830 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
3831 (build-system python-build-system)
3832 (propagated-inputs
3833 `(("python-idna" ,python-idna)))
3834 (home-page "https://github.com/python-hyper/hyperlink")
3835 (synopsis "Python module to create immutable URLs according to spec")
3836 (description "This package provides a Python module to create immutable, and
3837 correct URLs for Python according to RFCs 3986 and 3987.")
3838 (license license:expat)))
3839
3840 (define-public python-treq
3841 (package
3842 (name "python-treq")
3843 (version "18.6.0")
3844 (source
3845 (origin
3846 (method url-fetch)
3847 (uri (pypi-uri "treq" version))
3848 (sha256
3849 (base32
3850 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
3851 (build-system python-build-system)
3852 (propagated-inputs
3853 `(("python-attrs" ,python-attrs)
3854 ("python-idna" ,python-idna)
3855 ("python-incremental" ,python-incremental)
3856 ("python-requests" ,python-requests)
3857 ("python-service-identity" ,python-service-identity)
3858 ("python-twisted" ,python-twisted)))
3859 (home-page "https://github.com/twisted/treq")
3860 (synopsis "Requests-like API built on top of twisted.web's Agent")
3861 (description "This package provides an HTTP library inspired by
3862 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
3863 high level API for making HTTP requests when using Twisted.")
3864 (license license:expat)))
3865
3866 (define-public python-autobahn
3867 (package
3868 (name "python-autobahn")
3869 (version "19.2.1")
3870 (source
3871 (origin
3872 (method url-fetch)
3873 (uri (pypi-uri "autobahn" version))
3874 (sha256
3875 (base32
3876 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
3877 (build-system python-build-system)
3878 (arguments
3879 ;; The tests fail to run:
3880 ;; https://github.com/crossbario/autobahn-python/issues/1117
3881 `(#:tests? #f))
3882 (propagated-inputs
3883 `(("python-cffi" ,python-cffi)
3884 ("python-twisted" ,python-twisted)
3885 ("python-txaio" ,python-txaio)))
3886 (home-page "https://crossbar.io/autobahn/")
3887 (synopsis "Web Application Messaging Protocol implementation")
3888 (description "This package provides an implementation of the @dfn{Web Application
3889 Messaging Protocol} (WAMP). WAMP connects components in distributed
3890 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
3891 Calls (rRPC). It is ideal for distributed, multi-client and server applications
3892 such as IoT applications or multi-user database-driven business applications.")
3893 (license license:expat)))
3894
3895 (define-public python-ws4py
3896 (package
3897 (name "python-ws4py")
3898 (version "0.5.1")
3899 (source
3900 (origin
3901 (method url-fetch)
3902 (uri (pypi-uri "ws4py" version))
3903 (sha256
3904 (base32
3905 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
3906 (build-system python-build-system)
3907 (arguments
3908 `(#:phases
3909 (modify-phases %standard-phases
3910 (add-after 'unpack 'python3.7-compatibility
3911 (lambda _
3912 (substitute* '("ws4py/server/tulipserver.py"
3913 "ws4py/async_websocket.py")
3914 (("asyncio.async")
3915 "asyncio.ensure_future"))
3916 #t))
3917 ;; We don't have a package for cherrypy.
3918 (add-after 'unpack 'remove-cherrypy-support
3919 (lambda _
3920 (delete-file "ws4py/server/cherrypyserver.py")
3921 #t)))))
3922 (propagated-inputs
3923 `(("python-gevent" ,python-gevent)
3924 ("python-tornado" ,python-tornado)))
3925 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
3926 (synopsis "WebSocket client and server library")
3927 (description
3928 "This package provides a WebSocket client and server library for
3929 Python.")
3930 (license license:bsd-3)))
3931
3932 (define-public python-slugify
3933 (package
3934 (name "python-slugify")
3935 (version "4.0.1")
3936 (source
3937 (origin
3938 (method url-fetch)
3939 (uri (pypi-uri "python-slugify" version))
3940 (sha256
3941 (base32 "0w22fapghmzk3xdasc4dn7h8sl58l08d1h5zbf72dh80drv1g9b9"))))
3942 (propagated-inputs
3943 `(("python-unidecode" ,python-unidecode)))
3944 (arguments
3945 `(#:phases
3946 (modify-phases %standard-phases
3947 (replace 'check
3948 (lambda _
3949 (invoke "python" "test.py"))))))
3950 (build-system python-build-system)
3951 (home-page "https://github.com/un33k/python-slugify")
3952 (synopsis "Python Slugify application that handles Unicode")
3953 (description "This package provides a @command{slufigy} command and
3954 library to create slugs from unicode strings while keeping it DRY.")
3955 (license license:expat)))
3956
3957 (define-public python-branca
3958 (package
3959 (name "python-branca")
3960 (version "0.3.1")
3961 (source
3962 (origin
3963 (method url-fetch)
3964 (uri (pypi-uri "branca" version))
3965 (sha256
3966 (base32
3967 "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
3968 (build-system python-build-system)
3969 (propagated-inputs
3970 `(("python-jinja2" ,python-jinja2)
3971 ("python-six" ,python-six)))
3972 (native-inputs
3973 `(("python-pytest" ,python-pytest)))
3974 (home-page "https://github.com/python-visualization/branca")
3975 (synopsis "Generate complex HTML+JS pages with Python")
3976 (description "Generate complex HTML+JS pages with Python")
3977 (license license:expat)))
3978
3979 (define-public python-tinycss2
3980 (package
3981 (name "python-tinycss2")
3982 (version "1.0.2")
3983 (source
3984 (origin
3985 (method url-fetch)
3986 (uri (pypi-uri "tinycss2" version))
3987 (patches (search-patches "python-tinycss2-flake8-compat.patch"))
3988 (sha256
3989 (base32 "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4"))))
3990 (build-system python-build-system)
3991 (arguments
3992 `(#:phases
3993 (modify-phases %standard-phases
3994 (replace 'check
3995 (lambda _ (invoke "pytest"))))))
3996 (propagated-inputs
3997 `(("python-webencodings" ,python-webencodings)))
3998 (native-inputs
3999 `(("python-pytest-flake8" ,python-pytest-flake8)
4000 ("python-pytest-isort" ,python-pytest-isort)
4001 ("python-pytest-runner" ,python-pytest-runner)))
4002 (home-page "https://tinycss2.readthedocs.io/")
4003 (synopsis "Low-level CSS parser for Python")
4004 (description "@code{tinycss2} can parse strings, return Python objects
4005 representing tokens and blocks, and generate CSS strings corresponding to
4006 these objects.
4007
4008 Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
4009 grammar of CSS but doesn’t know specific rules, properties or values supported
4010 in various CSS modules.")
4011 (license license:bsd-3)))
4012
4013 (define-public python-cssselect2
4014 (package
4015 (name "python-cssselect2")
4016 (version "0.2.2")
4017 (source
4018 (origin
4019 (method url-fetch)
4020 (uri (pypi-uri "cssselect2" version))
4021 (sha256
4022 (base32 "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h"))))
4023 (build-system python-build-system)
4024 (arguments
4025 `(#:phases
4026 (modify-phases %standard-phases
4027 (replace 'check
4028 (lambda _ (invoke "pytest"))))))
4029 (propagated-inputs
4030 `(("python-tinycss2" ,python-tinycss2)))
4031 (native-inputs
4032 `(("python-pytest-cov" ,python-pytest-cov)
4033 ("python-pytest-flake8" ,python-pytest-flake8)
4034 ("python-pytest-isort" ,python-pytest-isort)
4035 ("python-pytest-runner" ,python-pytest-runner)))
4036 (home-page "https://cssselect2.readthedocs.io/")
4037 (synopsis "CSS selectors for Python ElementTree")
4038 (description "@code{cssselect2} is a straightforward implementation of
4039 CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
4040 ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
4041
4042 Unlike the Python package @code{cssselect}, it does not translate selectors to
4043 XPath and therefore does not have all the correctness corner cases that are
4044 hard or impossible to fix in cssselect.")
4045 (license license:bsd-3)))
4046
4047 (define-public python-uvloop
4048 (package
4049 (name "python-uvloop")
4050 (version "0.14.0")
4051 (source
4052 (origin
4053 (method url-fetch)
4054 (uri (pypi-uri "uvloop" version))
4055 (sha256
4056 (base32 "07j678z9gf41j98w72ysrnb5sa41pl5yxd7ib17lcwfxqz0cjfhj"))))
4057 (build-system python-build-system)
4058 (arguments
4059 '(#:tests? #f ;FIXME: tests hang and with some errors in the way
4060 #:phases
4061 (modify-phases %standard-phases
4062 (add-after 'unpack 'preparations
4063 (lambda _
4064 ;; Use packaged libuv.
4065 (substitute* "setup.py" (("self.use_system_libuv = False")
4066 "self.use_system_libuv = True"))
4067 #t)))))
4068 (native-inputs
4069 `(("python-aiohttp" ,python-aiohttp)
4070 ("python-cython" ,python-cython)
4071 ("python-flake8" ,python-flake8)
4072 ("python-psutil" ,python-psutil)
4073 ("python-pyopenssl" ,python-pyopenssl)
4074 ("python-twine" ,python-twine)))
4075 (inputs
4076 `(("libuv" ,libuv)))
4077 (home-page "https://github.com/MagicStack/uvloop")
4078 (synopsis "Fast implementation of asyncio event loop on top of libuv")
4079 (description
4080 "@code{uvloop} is a fast, drop-in replacement of the built-in asyncio
4081 event loop. It is implemented in Cython and uses libuv under the hood.")
4082 (license license:expat)))
4083
4084 (define-public gunicorn
4085 (package
4086 (name "gunicorn")
4087 (version "20.0.4")
4088 (source
4089 (origin
4090 (method url-fetch)
4091 (uri (pypi-uri "gunicorn" version))
4092 (sha256
4093 (base32
4094 "09n6fc019bgrvph1s5h1lwhn2avcsprw6ncd203qhra3i8mvn10r"))))
4095 (outputs '("out" "doc"))
4096 (build-system python-build-system)
4097 (arguments
4098 `(#:phases
4099 (modify-phases %standard-phases
4100 (add-after 'build 'build-doc
4101 (lambda _
4102 (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
4103 (delete-file "docs/build/texinfo/Makefile")
4104 (delete-file "docs/build/texinfo/Gunicorn.texi")
4105 #t))
4106 (replace 'check
4107 (lambda _
4108 (setenv "PYTHONPATH"
4109 (string-append ".:" (getenv "PYTHONPATH")))
4110 (invoke "pytest")))
4111 (add-after 'install 'install-doc
4112 (lambda* (#:key outputs #:allow-other-keys)
4113 (let* ((doc (string-append (assoc-ref outputs "doc")
4114 "/share/doc/" ,name "-" ,version))
4115 (html (string-append doc "/html"))
4116 (info (string-append doc "/info"))
4117 (examples (string-append doc "/examples")))
4118 (mkdir-p html)
4119 (mkdir-p info)
4120 (mkdir-p examples)
4121 (copy-recursively "docs/build/html" html)
4122 (copy-recursively "docs/build/texinfo" info)
4123 (copy-recursively "examples" examples)
4124 (for-each (lambda (file)
4125 (copy-file file (string-append doc "/" file)))
4126 '("README.rst" "NOTICE" "LICENSE" "THANKS")))
4127 #t)))))
4128 (native-inputs
4129 `(("binutils" ,binutils) ;; for ctypes.util.find_library()
4130 ("python-aiohttp" ,python-aiohttp)
4131 ("python-pytest" ,python-pytest)
4132 ("python-pytest-cov" ,python-pytest-cov)
4133 ("python-sphinx" ,python-sphinx)
4134 ("texinfo" ,texinfo)))
4135 (home-page "https://gunicorn.org/")
4136 (synopsis "Python WSGI HTTP Server for UNIX")
4137 (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
4138 Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
4139 Unicorn project. The Gunicorn server is broadly compatible with
4140 various web frameworks, simply implemented, light on server resources,
4141 and fairly speedy.")
4142 (license license:expat)))
4143
4144 ;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
4145 ;; its tests
4146 (define-public gunicorn-bootstrap
4147 (package
4148 (inherit gunicorn)
4149 (name "gunicorn")
4150 (arguments `(#:tests? #f))
4151 (properties '((hidden? . #t)))
4152 (native-inputs `())))
4153
4154 (define-public python-httptools
4155 (package
4156 (name "python-httptools")
4157 (version "0.1.1")
4158 (source
4159 (origin
4160 ;; PyPI tarball comes with a vendored http-parser and no tests.
4161 (method git-fetch)
4162 (uri (git-reference
4163 (url "https://github.com/MagicStack/httptools")
4164 (commit (string-append "v" version))))
4165 (file-name (git-file-name name version))
4166 (sha256
4167 (base32 "0g08128x2ixsiwrzskxc6c8ymgzs39wbzr5mhy0mjk30q9pqqv77"))))
4168 (build-system python-build-system)
4169 (arguments
4170 '(#:phases
4171 (modify-phases %standard-phases
4172 (add-after 'unpack 'preparations
4173 (lambda _
4174 ;; Skip a failing test (AssertionError). Bug report:
4175 ;; https://github.com/MagicStack/httptools/issues/10.
4176 (substitute* "tests/test_parser.py"
4177 ((" def test_parser_response_1")
4178 (string-append
4179 " @unittest.skip(\"Disabled.\")\n"
4180 " def test_parser_response_1")))
4181 ;; Use packaged http-parser.
4182 (substitute* "setup.py" (("self.use_system_http_parser = False")
4183 "self.use_system_http_parser = True"))
4184 ;; This path is hardcoded. Hardcode our own.
4185 (substitute* "httptools/parser/cparser.pxd"
4186 (("../../vendor/http-parser")
4187 (string-append (assoc-ref %build-inputs "http-parser")
4188 "/include")))
4189 ;; Don't force Cython version.
4190 (substitute* "setup.py" (("Cython==") "Cython>="))
4191 #t)))))
4192 (native-inputs
4193 `(("python-cython" ,python-cython)
4194 ("python-pytest" ,python-pytest)))
4195 (inputs
4196 `(("http-parser" ,http-parser)))
4197 (home-page "https://github.com/MagicStack/httptools")
4198 (synopsis "Collection of framework independent HTTP protocol utils")
4199 (description
4200 "@code{httptools} is a Python binding for the nodejs HTTP parser.")
4201 (license license:expat)))
4202
4203 (define-public python-uvicorn
4204 (package
4205 (name "python-uvicorn")
4206 (version "0.11.8")
4207 (source
4208 (origin
4209 ;; PyPI tarball has no tests.
4210 (method git-fetch)
4211 (uri (git-reference
4212 (url "https://github.com/encode/uvicorn")
4213 (commit version)))
4214 (file-name (git-file-name name version))
4215 (sha256
4216 (base32 "00iidg5ysp7k00bw3kmkvr8mghnh4jdi0p2ryiarhryf8wz2r3fy"))))
4217 (build-system python-build-system)
4218 (arguments
4219 `(#:phases
4220 (modify-phases %standard-phases
4221 (replace 'check
4222 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4223 (add-installed-pythonpath inputs outputs)
4224 (invoke "pytest" "-vv"))))))
4225 (native-inputs
4226 `(("python-black" ,python-black)
4227 ("python-codecov" ,python-codecov)
4228 ("python-flake8" ,python-flake8)
4229 ("python-isort" ,python-isort)
4230 ("python-mypy" ,python-mypy)
4231 ("python-pytest" ,python-pytest)
4232 ("python-pytest-cov" ,python-pytest-cov)
4233 ("python-pytest-mock" ,python-pytest-mock)
4234 ("python-requests" ,python-requests)))
4235 (propagated-inputs
4236 `(("python-click" ,python-click)
4237 ("python-h11" ,python-h11)
4238 ("python-httptools" ,python-httptools)
4239 ("python-pyyaml" ,python-pyyaml)
4240 ("python-uvloop" ,python-uvloop)
4241 ("python-watchgod" ,python-watchgod)
4242 ("python-websockets" ,python-websockets)
4243 ("python-wsproto" ,python-wsproto)))
4244 (home-page "https://github.com/encode/uvicorn")
4245 (synopsis "Fast ASGI server implementation")
4246 (description
4247 "@code{uvicorn} is a fast ASGI server implementation, using @code{uvloop}
4248 and @code{httptools}. It currently supports HTTP/1.1 and WebSockets. Support
4249 for HTTP/2 is planned.")
4250 (license license:bsd-3)))
4251
4252 (define-public python-translation-finder
4253 (package
4254 (name "python-translation-finder")
4255 (version "1.7")
4256 (source
4257 (origin
4258 (method url-fetch)
4259 (uri (pypi-uri "translation-finder" version))
4260 (sha256
4261 (base32
4262 "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
4263 (build-system python-build-system)
4264 (arguments
4265 `(#:phases
4266 (modify-phases %standard-phases
4267 (add-before 'build 'remove-failing-test
4268 (lambda _
4269 (delete-file "translation_finder/test_api.py")
4270 #t)))))
4271 (propagated-inputs
4272 `(("python-chardet" ,python-chardet)
4273 ("python-pathlib2" ,python-pathlib2)
4274 ("python-ruamel.yaml" ,python-ruamel.yaml)
4275 ("python-six" ,python-six)))
4276 (native-inputs
4277 `(("python-codecov" ,python-codecov)
4278 ("python-codacy-coverage" ,python-codacy-coverage)
4279 ("python-pytest-cov" ,python-pytest-cov)
4280 ("python-pytest-runner" ,python-pytest-runner)
4281 ("python-twine" ,python-twine)))
4282 (home-page "https://weblate.org/")
4283 (synopsis "Translation file finder for Weblate")
4284 (description "This package provides a function to find translation file in
4285 the source code of a project. It supports many translation file formats and
4286 is part of the Weblate translation platform.")
4287 (license license:gpl3+)))
4288
4289 (define-public python-gitlab
4290 (package
4291 (name "python-gitlab")
4292 (version "1.15.0")
4293 (source
4294 (origin
4295 (method url-fetch)
4296 (uri (pypi-uri "python-gitlab" version))
4297 (sha256
4298 (base32
4299 "0zl6kz8v8cg1bcy2r78b2snb0lpw0b573gdx2x1ps0nhsh75l4j5"))))
4300 (build-system python-build-system)
4301 (propagated-inputs
4302 `(("python-requests" ,python-requests)
4303 ("python-six" ,python-six)))
4304 (native-inputs
4305 `(("python-httmock" ,python-httmock)
4306 ("python-mock" ,python-mock)))
4307 (home-page
4308 "https://github.com/python-gitlab/python-gitlab")
4309 (synopsis "Interact with GitLab API")
4310 (description "This package provides an extended library for interacting
4311 with GitLab instances through their API.")
4312 (license license:lgpl3+)))
4313
4314 (define-public python-path-and-address
4315 (package
4316 (name "python-path-and-address")
4317 (version "2.0.1")
4318 (source
4319 (origin
4320 ;; The source distributed on PyPI doesn't include tests.
4321 (method git-fetch)
4322 (uri (git-reference
4323 (url "https://github.com/joeyespo/path-and-address")
4324 (commit (string-append "v" version))))
4325 (file-name (git-file-name name version))
4326 (sha256
4327 (base32
4328 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
4329 (build-system python-build-system)
4330 (arguments
4331 `(#:phases
4332 (modify-phases %standard-phases
4333 (replace 'check
4334 (lambda* (#:key inputs outputs #:allow-other-keys)
4335 (add-installed-pythonpath inputs outputs)
4336 (invoke "py.test"))))))
4337 (native-inputs
4338 `(("python-pytest" ,python-pytest)))
4339 (home-page "https://github.com/joeyespo/path-and-address")
4340 (synopsis "Functions for command-line server tools used by humans")
4341 (description "Path-and-address resolves ambiguities of command-line
4342 interfaces, inferring which argument is the path, and which is the address.")
4343 (license license:expat)))
4344
4345 (define-public grip
4346 ;; No release by upstream for quite some time, some bugs fixed since. See:
4347 ;; https://github.com/joeyespo/grip/issues/304
4348 (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
4349 (package
4350 (name "grip")
4351 (version (git-version "4.5.2" "1" commit))
4352 (source
4353 (origin
4354 (method git-fetch)
4355 (uri (git-reference
4356 (url "https://github.com/joeyespo/grip")
4357 (commit commit)))
4358 (file-name (git-file-name name version))
4359 (sha256
4360 (base32
4361 "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
4362 (build-system python-build-system)
4363 (propagated-inputs
4364 `(("python-docopt" ,python-docopt)
4365 ("python-flask" ,python-flask)
4366 ("python-markdown" ,python-markdown)
4367 ("python-path-and-address" ,python-path-and-address)
4368 ("python-pygments" ,python-pygments)
4369 ("python-requests" ,python-requests)))
4370 (native-inputs
4371 `(("python-pytest" ,python-pytest)
4372 ("python-responses" ,python-responses)))
4373 (arguments
4374 `(#:phases
4375 (modify-phases %standard-phases
4376 (replace 'check
4377 (lambda* (#:key inputs outputs #:allow-other-keys)
4378 (add-installed-pythonpath inputs outputs)
4379 (setenv "PATH" (string-append
4380 (getenv "PATH") ":"
4381 (assoc-ref %outputs "out") "/bin"))
4382 (invoke "py.test" "-m" "not assumption"))))))
4383 (home-page "https://github.com/joeyespo/grip")
4384 (synopsis "Preview Markdown files using the GitHub API")
4385 (description "Grip is a command-line server application written in Python
4386 that uses the GitHub Markdown API to render a local Markdown file. The styles
4387 and rendering come directly from GitHub, so you'll know exactly how it will
4388 appear. Changes you make to the file will be instantly reflected in the browser
4389 without requiring a page refresh.")
4390 (license license:expat))))
4391
4392 (define-public python-port-for
4393 (package
4394 (name "python-port-for")
4395 (version "0.4")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 (uri (pypi-uri "port-for" version))
4400 (sha256
4401 (base32
4402 "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
4403 (build-system python-build-system)
4404 (arguments
4405 `(#:phases
4406 (modify-phases %standard-phases
4407 (add-after 'unpack 'use-urllib3
4408 (lambda _
4409 (substitute* "port_for/_download_ranges.py"
4410 (("urllib2") "urllib3"))
4411 #t)))))
4412 (propagated-inputs
4413 `(("python-urllib3" ,python-urllib3)))
4414 (native-inputs
4415 `(("python-mock" ,python-mock)))
4416 (home-page "https://github.com/kmike/port-for/")
4417 (synopsis "TCP localhost port finder and association manager")
4418 (description
4419 "This package provides a utility that helps with local TCP ports
4420 management. It can find an unused TCP localhost port and remember the
4421 association.")
4422 (license license:expat)))
4423
4424 (define-public python-livereload
4425 (package
4426 (name "python-livereload")
4427 (version "2.6.1")
4428 (source
4429 (origin
4430 (method url-fetch)
4431 (uri (pypi-uri "livereload" version))
4432 (sha256
4433 (base32
4434 "0rhggz185bxc3zjnfpmhcvibyzi86i624za1lfh7x7ajsxw4y9c9"))))
4435 (build-system python-build-system)
4436 (propagated-inputs
4437 `(("python-six" ,python-six)
4438 ("python-tornado" ,python-tornado)))
4439 (home-page "https://github.com/lepture/python-livereload")
4440 (synopsis "Python LiveReload")
4441 (description
4442 "Python LiveReload provides a command line utility, @command{livereload},
4443 for starting a web server in a directory. It can trigger arbitrary commands
4444 and serve updated contents upon changes to the directory.")
4445 (license license:bsd-3)))
4446
4447 (define-public python-vf-1
4448 (package
4449 (name "python-vf-1")
4450 (version "0.0.11")
4451 (source
4452 (origin
4453 (method url-fetch)
4454 (uri (pypi-uri "VF-1" version))
4455 (sha256
4456 (base32
4457 "0xlqsaxsiayk1sd07kpz8abbcnab582y29a1y4882fq6j4gma5xi"))))
4458 (build-system python-build-system)
4459 (home-page "https://github.com/solderpunk/VF-1")
4460 (synopsis "Command line gopher client")
4461 (description "@code{VF-1} is a command line gopher client with
4462 @acronym{TLS, Transport Layer Security} support.")
4463 (license license:bsd-2)))
4464
4465 (define-public python-httpcore
4466 (package
4467 (name "python-httpcore")
4468 (version "0.11.0")
4469 (source
4470 (origin
4471 ;; PyPI tarball does not contain tests.
4472 (method git-fetch)
4473 (uri (git-reference
4474 (url "https://github.com/encode/httpcore")
4475 (commit version)))
4476 (file-name (git-file-name name version))
4477 (sha256
4478 (base32 "01bhajcxqgkdzg7b7x0fqs2lwcfsajlgqwi1nlxx58jss7g2kxn9"))))
4479 (build-system python-build-system)
4480 (arguments
4481 `(#:phases
4482 (modify-phases %standard-phases
4483 (add-after 'unpack 'remove-unavailable-tests
4484 (lambda _
4485 ;; These tests require 'mitmproxy' which is not packaged.
4486 (for-each (lambda (f)
4487 (delete-file f))
4488 '("tests/conftest.py"
4489 "tests/sync_tests/test_interfaces.py"
4490 "tests/async_tests/test_interfaces.py"))
4491 #t))
4492 (add-after 'remove-unavailable-tests 'force-h11-version
4493 ;; Allow build with h11 >= 0.10.
4494 (lambda _
4495 (substitute* "setup.py" (("h11>=0.8,<0.10") "h11"))
4496 #t))
4497 (replace 'check
4498 (lambda* (#:key inputs outputs #:allow-other-keys)
4499 (add-installed-pythonpath inputs outputs)
4500 (invoke "pytest" "-vv" "--cov=httpcore"
4501 "--cov=tests" "tests"))))))
4502 (native-inputs
4503 `(;; ("mitmproxy" ,mitmproxy) ;; TODO: Package this.
4504 ("python-autoflake" ,python-autoflake)
4505 ("python-flake8" ,python-flake8)
4506 ("python-flake8-bugbear" ,python-flake8-bugbear)
4507 ("python-flake8-pie" ,python-flake8-pie)
4508 ("python-isort" ,python-isort)
4509 ("python-mypy" ,python-mypy)
4510 ("python-pytest" ,python-pytest)
4511 ("python-pytest-asyncio" ,python-pytest-asyncio)
4512 ("python-pytest-cov" ,python-pytest-cov)
4513 ("python-pytest-trio" ,python-pytest-trio)
4514 ("python-uvicorn" ,python-uvicorn)
4515 ("python-trustme" ,python-trustme)))
4516 (propagated-inputs
4517 `(("python-h11" ,python-h11)
4518 ("python-h2" ,python-h2)
4519 ("python-sniffio" ,python-sniffio)
4520 ("python-trio" ,python-trio)
4521 ("python-trio-typing" ,python-trio-typing)))
4522 (home-page "https://github.com/encode/httpcore")
4523 (synopsis "Minimal, low-level HTTP client")
4524 (description
4525 "HTTP Core provides a minimal and low-level HTTP client, which does one
4526 thing only: send HTTP requests.
4527
4528 Some things HTTP Core does do:
4529
4530 @itemize
4531 @item Sending HTTP requests.
4532 @item Provides both sync and async interfaces.
4533 @item Supports HTTP/1.1 and HTTP/2.
4534 @item Async backend support for asyncio and trio.
4535 @item Automatic connection pooling.
4536 @item HTTP(S) proxy support.
4537 @end itemize")
4538 (license license:bsd-3)))
4539
4540 (define-public python-httpx
4541 (package
4542 (name "python-httpx")
4543 (version "0.15.4")
4544 (source
4545 (origin
4546 ;; PyPI tarball does not contain tests.
4547 (method git-fetch)
4548 (uri (git-reference
4549 (url "https://github.com/encode/httpx")
4550 (commit version)))
4551 (file-name (git-file-name name version))
4552 (sha256
4553 (base32 "1qr91xw6jxynvihmw953bi5446ssm9ffmb2c4nhfa77v7883sp21"))))
4554 (build-system python-build-system)
4555 (arguments
4556 `(#:phases
4557 (modify-phases %standard-phases
4558 (replace 'check
4559 (lambda _
4560 (invoke "pytest" "-vv" "-k"
4561 ;; These tests try to open an outgoing connection.
4562 (string-append
4563 "not test_connect_timeout"
4564 " and not test_that_send_cause_async_client_to_be_not_"
4565 "closed"
4566 " and not test_that_async_client_caused_warning_when_"
4567 "being_deleted"
4568 " and not test_that_send_cause_client_to_be_not_closed"
4569 " and not test_async_proxy_close"
4570 " and not test_sync_proxy_close")))))))
4571 (native-inputs
4572 `(("python-autoflake" ,python-autoflake)
4573 ("python-black" ,python-black)
4574 ("python-cryptography" ,python-cryptography)
4575 ("python-flake8" ,python-flake8)
4576 ("python-flake8-bugbear" ,python-flake8-bugbear)
4577 ("python-flake8-pie" ,python-flake8-pie)
4578 ("python-isort" ,python-isort)
4579 ("python-mypy" ,python-mypy)
4580 ("python-pytest" ,python-pytest)
4581 ("python-pytest-asyncio" ,python-pytest-asyncio)
4582 ("python-pytest-trio" ,python-pytest-trio)
4583 ("python-pytest-cov" ,python-pytest-cov)
4584 ("python-trio" ,python-trio)
4585 ("python-trio-typing" ,python-trio-typing)
4586 ("python-trustme" ,python-trustme)
4587 ("python-uvicorn" ,python-uvicorn)))
4588 (propagated-inputs
4589 `(("python-brotli" ,python-brotli)
4590 ("python-certifi" ,python-certifi)
4591 ("python-chardet" ,python-chardet)
4592 ("python-httpcore" ,python-httpcore)
4593 ("python-idna" ,python-idna)
4594 ("python-rfc3986" ,python-rfc3986)
4595 ("python-sniffio" ,python-sniffio)))
4596 (home-page "https://www.python-httpx.org/")
4597 (synopsis "HTTP client for Python")
4598 (description
4599 "HTTPX is a fully featured HTTP client for Python 3, which provides sync
4600 and async APIs, and support for both HTTP/1.1 and HTTP/2.
4601
4602 HTTPX builds on the well-established usability of requests, and gives you:
4603
4604 @itemize
4605 @item A broadly requests-compatible API.
4606 @item Standard synchronous interface, but with async support if you need it.
4607 @item HTTP/1.1 and HTTP/2 support.
4608 @item Ability to make requests directly to WSGI applications or ASGI applications.
4609 @item Strict timeouts everywhere.
4610 @item Fully type annotated.
4611 @item 99% test coverage.
4612 @end itemize
4613
4614 Plus all the standard features of requests:
4615
4616 @itemize
4617 @item International Domains and URLs
4618 @item Keep-Alive & Connection Pooling
4619 @item Sessions with Cookie Persistence
4620 @item Browser-style SSL Verification
4621 @item Basic/Digest Authentication
4622 @item Elegant Key/Value Cookies
4623 @item Automatic Decompression
4624 @item Automatic Content Decoding
4625 @item Unicode Response Bodies
4626 @item Multipart File Uploads
4627 @item HTTP(S) Proxy Support
4628 @item Connection Timeouts
4629 @item Streaming Downloads
4630 @item .netrc Support
4631 @item Chunked Requests
4632 @end itemize")
4633 (license license:bsd-3)))
4634
4635 (define-public python-websockets
4636 (package
4637 (name "python-websockets")
4638 (version "8.1")
4639 (source
4640 (origin
4641 (method url-fetch)
4642 (uri (pypi-uri "websockets" version))
4643 (sha256
4644 (base32
4645 "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw"))))
4646 (build-system python-build-system)
4647 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
4648 (home-page "https://github.com/aaugustin/websockets")
4649 (synopsis
4650 "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
4651 (description
4652 "@code{websockets} is a library for building WebSocket servers and clients
4653 in Python with a focus on correctness and simplicity.
4654
4655 Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
4656 it provides an elegant coroutine-based API.")
4657 (license license:bsd-3)))
4658
4659 (define-public python-selenium
4660 (package
4661 (name "python-selenium")
4662 (version "3.141.0")
4663 (source
4664 (origin
4665 (method url-fetch)
4666 (uri (pypi-uri "selenium" version))
4667 (sha256
4668 (base32
4669 "039hf9knvl4s3hp21bzwsp1g5ri9gxsh504dp48lc6nr1av35byy"))))
4670 (build-system python-build-system)
4671 (propagated-inputs
4672 `(("python-urllib3" ,python-urllib3)))
4673 (home-page
4674 "https://github.com/SeleniumHQ/selenium/")
4675 (synopsis "Python bindings for Selenium")
4676 (description "Selenium enables web browser automation.
4677 Selenium specifically provides infrastructure for the W3C WebDriver specification
4678 — a platform and language-neutral coding interface compatible with all
4679 major web browsers.")
4680 (license license:asl2.0)))
4681
4682 (define-public python-rapidjson
4683 (package
4684 (name "python-rapidjson")
4685 (version "0.9.1")
4686 (source
4687 (origin
4688 (method url-fetch)
4689 (uri (pypi-uri "python-rapidjson" version))
4690 (sha256
4691 (base32
4692 "18cl2dhx3gds5vg52jxmh9wjlbiy8dx06c3n482rfpdi9dzbv05d"))
4693 (modules '((guix build utils)))
4694 (snippet
4695 '(begin (delete-file-recursively "rapidjson") #t))))
4696 (build-system python-build-system)
4697 (arguments
4698 `(#:configure-flags
4699 (list (string-append "--rj-include-dir="
4700 (assoc-ref %build-inputs "rapidjson")
4701 "/include/rapidjson"))
4702 #:phases
4703 (modify-phases %standard-phases
4704 (replace 'build
4705 (lambda* (#:key inputs #:allow-other-keys)
4706 (invoke "python" "setup.py" "build"
4707 (string-append "--rj-include-dir="
4708 (assoc-ref %build-inputs "rapidjson")
4709 "/include/rapidjson"))))
4710 (replace 'check
4711 (lambda* (#:key inputs outputs #:allow-other-keys)
4712 (add-installed-pythonpath inputs outputs)
4713 ;; Some tests are broken.
4714 (delete-file "tests/test_base_types.py")
4715 (delete-file "tests/test_validator.py")
4716 (invoke "python" "-m" "pytest" "tests"))))))
4717 (native-inputs
4718 `(("rapidjson" ,rapidjson)
4719 ("python-pytest" ,python-pytest)
4720 ("python-pytz" ,python-pytz)))
4721 (home-page "https://github.com/python-rapidjson/python-rapidjson")
4722 (synopsis "Python wrapper around rapidjson")
4723 (description "This package provides a python wrapper around rapidjson.")
4724 (license license:expat)))
4725
4726 (define-public python-venusian
4727 (package
4728 (name "python-venusian")
4729 (version "3.0.0")
4730 (source
4731 (origin
4732 (method url-fetch)
4733 (uri (pypi-uri "venusian" version))
4734 (sha256
4735 (base32 "0f7f67dkgxxcjfhpdd5frb9pszkf04lyzzpn5069q0xi89r2p17n"))))
4736 (build-system python-build-system)
4737 (native-inputs
4738 `(("python-pytest" ,python-pytest)
4739 ("python-runner" ,python-pytest-runner)
4740 ("python-pytest-cov" ,python-pytest-cov)))
4741 (arguments '(#:test-target "pytest"))
4742 (home-page "https://docs.pylonsproject.org/projects/venusian")
4743 (synopsis "Library for deferring decorator actions")
4744 (description
4745 "Venusian is a library which allows framework authors to defer decorator
4746 actions. Instead of taking actions when a function (or class) decorator is
4747 executed at import time, you can defer the action usually taken by the
4748 decorator until a separate scan phase.")
4749 (license license:repoze)))
4750
4751 (define-public python-zope-deprecation
4752 (package
4753 (name "python-zope-deprecation")
4754 (version "4.4.0")
4755 (source (origin
4756 (method url-fetch)
4757 (uri (pypi-uri "zope.deprecation" version))
4758 (sha256
4759 (base32
4760 "1pz2cv7gv9y1r3m0bdv7ks1alagmrn5msm5spwdzkb2by0w36i8d"))))
4761 (build-system python-build-system)
4762 (native-inputs `())
4763 (propagated-inputs `())
4764 (home-page "https://zopedeprecation.readthedocs.io/")
4765 (synopsis "Function for marking deprecations")
4766 (description "The @code{zope.deprecation} module provides a function for
4767 marking modules, classes, functions, methods and properties as deprecated,
4768 displaying warnings when usaged in application code.")
4769 (license license:zpl2.1)))
4770
4771 (define-public python-translationstring
4772 (package
4773 (name "python-translationstring")
4774 (version "1.3")
4775 (source (origin
4776 (method url-fetch)
4777 (uri (pypi-uri "translationstring" version))
4778 (sha256
4779 (base32
4780 "0bdpcnd9pv0131dl08h4zbcwmgc45lyvq3pa224xwan5b3x4rr2f"))))
4781 (build-system python-build-system)
4782 (home-page "http://docs.pylonsproject.org/projects/translationstring")
4783 (synopsis "Internationalization tooling for the Pylons project")
4784 (description "This package provides a library used by various Pylons
4785 project packages for internationalization (i18n) duties related to
4786 translation.")
4787 (license license:repoze)))
4788
4789 (define-public python-plaster
4790 (package
4791 (name "python-plaster")
4792 (version "1.0")
4793 (source (origin
4794 (method url-fetch)
4795 (uri (pypi-uri "plaster" version))
4796 (sha256
4797 (base32
4798 "1hy8k0nv2mxq94y5aysk6hjk9ryb4bsd13g83m60hcyzxz3wflc3"))))
4799 (build-system python-build-system)
4800 (native-inputs
4801 `(("python-pytest" ,python-pytest)))
4802 (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
4803 (synopsis "Configuration loader for multiple config file formats")
4804 (description
4805 "Plaster is a loader interface around multiple config file formats. It
4806 exists to define a common API for applications to use when they wish to load
4807 configuration. The library itself does not aim to handle anything except a
4808 basic API that applications may use to find and load configuration settings.
4809 Any specific constraints should be implemented in a pluggable loader which can
4810 be registered via an entrypoint.")
4811 (license license:repoze)))
4812
4813 (define-public python-plaster-pastedeploy
4814 (package
4815 (name "python-plaster-pastedeploy")
4816 (version "0.7")
4817 (source (origin
4818 (method url-fetch)
4819 (uri (pypi-uri "plaster_pastedeploy" version))
4820 (sha256
4821 (base32
4822 "1zg7gcsvc1kzay1ry5p699rg2qavfsxqwl17mqxzr0gzw6j9679r"))))
4823 (build-system python-build-system)
4824 (native-inputs
4825 `(("python-pytest" ,python-pytest)))
4826 (propagated-inputs
4827 `(("python-plaster" ,python-plaster)
4828 ("python-pastedeploy" ,python-pastedeploy)))
4829 (home-page "https://github.com/Pylons/plaster_pastedeploy")
4830 (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
4831 (description
4832 "This plugin for @code{python-plaster} adds support for PasteDeploy
4833 syntax, it provides a plaster @code{Loader} object that can parse ini files
4834 according to the standard set by PasteDeploy ")
4835 (license license:expat)))
4836
4837 (define-public python-hupper
4838 (package
4839 (name "python-hupper")
4840 (version "1.10.2")
4841 (source (origin
4842 (method url-fetch)
4843 (uri (pypi-uri "hupper" version))
4844 (sha256
4845 (base32
4846 "0am0p6g5cz6xmcaf04xq8q6dzdd9qz0phj6gcmpsckf2mcyza61q"))))
4847 (build-system python-build-system)
4848 (arguments '(#:test-target "pytest"))
4849 (native-inputs
4850 `(("python-pytest" ,python-pytest)
4851 ("python-pytest-runner" ,python-pytest-runner)
4852 ("python-watchdog" ,python-watchdog)
4853 ("python-mock" ,python-mock)
4854 ("python-pytest-cov" ,python-pytest-cov)))
4855 (propagated-inputs
4856 `(("python-pytz" ,python-pytz)))
4857 (home-page "https://readthedocs.org/projects/hupper")
4858 (synopsis "Integrated process monitor tracking changes to imported Python files")
4859 (description
4860 "Hupper is an integrated process monitor that will track changes to any
4861 imported Python files in sys.modules as well as custom paths. When files are
4862 changed the process is restarted.")
4863 (license license:expat)))
4864
4865 (define-public python-pyramid
4866 (package
4867 (name "python-pyramid")
4868 (version "1.10.4")
4869 (source (origin
4870 (method url-fetch)
4871 (uri (pypi-uri "pyramid" version))
4872 (sha256
4873 (base32
4874 "0rkxs1ajycg2zh1c94xlmls56mx5m161sn8112skj0amza6cn36q"))))
4875 (build-system python-build-system)
4876 (propagated-inputs
4877 `(("python-hupper" ,python-hupper)
4878 ("python-plaster-pastedeploy" ,python-plaster-pastedeploy)
4879 ("python-translationstring" ,python-translationstring)
4880 ("python-venusian" ,python-venusian)
4881 ("python-webob" ,python-webob)
4882 ("python-zope-deprecation" ,python-zope-deprecation)
4883 ("python-zope-interface" ,python-zope-interface)
4884 ("python-webtest" ,python-webtest)
4885 ("python-zope-component" ,python-zope-component)
4886 ("python-plaster" ,python-plaster)))
4887 (home-page "https://trypyramid.com/")
4888 (synopsis "Python web-framework suitable for small and large sites")
4889 (description
4890 "Pyramid makes it easy to write web applications. From minimal
4891 request/response web apps to larger, grown applications.")
4892 (license license:repoze)))
4893
4894 (define-public python-random-user-agent
4895 (package
4896 (name "python-random-user-agent")
4897 (version "1.0.1")
4898 (source
4899 (origin
4900 (method url-fetch)
4901 (uri (pypi-uri "random_user_agent" version))
4902 (sha256
4903 (base32
4904 "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
4905 (build-system python-build-system)
4906 (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
4907 (synopsis "List of user agents")
4908 (description
4909 "This package provides a list of user agents, from a collection of more
4910 than 326,000 known user-agents. Users can pick a random one, or select one
4911 based on filters.")
4912 (license license:expat)))
4913
4914 (define-public python-flask-restx
4915 (package
4916 (name "python-flask-restx")
4917 (version "0.2.0")
4918 (source
4919 ;; We fetch from the Git repo because there are no tests in the PyPI
4920 ;; archive.
4921 (origin
4922 (method git-fetch)
4923 (uri (git-reference
4924 (url "https://github.com/python-restx/flask-restx")
4925 (commit version)))
4926 (file-name (git-file-name name version))
4927 (sha256
4928 (base32 "0xf2vkmdngp9cv9klznizai4byxjcf0iqh1pr4b83nann0jxqwy7"))))
4929 (build-system python-build-system)
4930 (propagated-inputs
4931 `(("python-aniso8601" ,python-aniso8601)
4932 ("python-flask" ,python-flask)
4933 ("python-jsonschema" ,python-jsonschema)
4934 ("python-pytz" ,python-pytz)))
4935 (native-inputs
4936 `(("python-blinker" ,python-blinker)
4937 ("python-faker" ,python-faker)
4938 ("python-pytest" ,python-pytest)
4939 ("python-pytest-benchmark"
4940 ,python-pytest-benchmark)
4941 ("python-pytest-flask" ,python-pytest-flask)
4942 ("python-pytest-mock" ,python-pytest-mock)))
4943 (arguments
4944 `(#:phases
4945 (modify-phases %standard-phases
4946 (replace 'check
4947 (lambda _
4948 (invoke "pytest" "--benchmark-skip" "-k"
4949 ;; Those tests need internet access
4950 "not test_check and not test_valid_value_check"))))))
4951 (home-page "https://github.com/python-restx/flask-restx")
4952 (synopsis
4953 "Framework for fast, easy and documented API development with Flask")
4954 (description
4955 "Flask-RESTX is an extension for Flask that adds support for quickly building
4956 REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
4957 with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
4958 decorators and tools to describe your API and expose its documentation properly using
4959 Swagger.")
4960 (license license:bsd-3)))
4961
4962 (define-public python-manuel
4963 (package
4964 (name "python-manuel")
4965 (version "1.10.1")
4966 (source
4967 (origin
4968 (method url-fetch)
4969 (uri (pypi-uri "manuel" version))
4970 (sha256
4971 (base32
4972 "1bdzay7j70fly5fy6wbdi8fbrxjrrlxnxnw226rwry1c8a351rpy"))))
4973 (build-system python-build-system)
4974 (propagated-inputs
4975 `(("python-six" ,python-six)))
4976 (native-inputs
4977 `(("python-zope-testing" ,python-zope-testing)))
4978 (home-page "https://pypi.org/project/manuel/")
4979 (synopsis "Build tested documentation")
4980 (description
4981 "Manuel lets you mix and match traditional doctests with custom test syntax.")
4982 (license license:asl2.0)))
4983
4984 (define-public python-persistent
4985 (package
4986 (name "python-persistent")
4987 (version "4.6.4")
4988 (source
4989 (origin
4990 (method url-fetch)
4991 (uri (pypi-uri "persistent" version))
4992 (sha256
4993 (base32
4994 "0imm9ji03lhkpcfmhid7x5209ix8g2rlgki9ik1qxks4b8sm8gzq"))))
4995 (build-system python-build-system)
4996 (propagated-inputs
4997 `(("python-cffi" ,python-cffi)
4998 ("python-zope-interface" ,python-zope-interface)))
4999 (native-inputs
5000 `(("python-manuel" ,python-manuel)
5001 ("python-zope-testrunner" ,python-zope-testrunner)))
5002 (home-page "https://github.com/zopefoundation/persistent/")
5003 (synopsis "Translucent persistent objects")
5004 (description "This package contains a generic persistence implementation for
5005 Python. It forms the core protocol for making objects interact
5006 \"transparently\" with a database such as the ZODB.")
5007 (license license:zpl2.1)))
5008
5009 (define-public python-btrees
5010 (package
5011 (name "python-btrees")
5012 (version "4.7.2")
5013 (source
5014 (origin
5015 (method url-fetch)
5016 (uri (pypi-uri "BTrees" version))
5017 (sha256
5018 (base32
5019 "0iiq0g9k1g6qgqq84q9h6639vlvzznk1rgdm0rfcnnqkbkmsbr3w"))))
5020 (build-system python-build-system)
5021 (propagated-inputs
5022 `(("python-persistent" ,python-persistent)
5023 ("python-zope-interface" ,python-zope-interface)))
5024 (native-inputs
5025 `(("python-persistent" ,python-persistent)
5026 ("python-transaction" ,python-transaction)
5027 ("python-zope-testrunner" ,python-zope-testrunner)))
5028 (home-page "https://github.com/zopefoundation/BTrees")
5029 (synopsis "Scalable persistent object containers")
5030 (description
5031 "This package contains a set of persistent object containers built around a
5032 modified BTree data structure. The trees are optimized for use inside ZODB's
5033 \"optimistic concurrency\" paradigm, and include explicit resolution of
5034 conflicts detected by that mechanism.")
5035 (license license:zpl2.1)))
5036
5037 (define-public python-transaction
5038 (package
5039 (name "python-transaction")
5040 (version "3.0.0")
5041 (source
5042 (origin
5043 (method url-fetch)
5044 (uri (pypi-uri "transaction" version))
5045 (sha256
5046 (base32
5047 "0bdaks31bgfh78wnj3sij24bfysmqk25crsis6amz8kzrc0d82iv"))))
5048 (build-system python-build-system)
5049 (propagated-inputs
5050 `(("python-zope-interface" ,python-zope-interface)))
5051 (native-inputs
5052 `(("python-coverage" ,python-coverage)
5053 ("python-mock" ,python-mock)
5054 ("python-nose" ,python-nose)))
5055 (home-page "https://github.com/zopefoundation/transaction")
5056 (synopsis "Transaction management for Python")
5057 (description "This package contains a generic transaction implementation
5058 for Python. It is mainly used by the ZODB.")
5059 (license license:zpl2.1)))
5060
5061 (define-public python-robot-detection
5062 (package
5063 (name "python-robot-detection")
5064 (version "0.4")
5065 (source
5066 (origin
5067 (method url-fetch)
5068 (uri (pypi-uri "robot-detection" version))
5069 (sha256
5070 (base32
5071 "1xd2jm3yn31bnk1kqzggils2rxj26ylxsfz3ap7bhr3ilhnbg3rx"))))
5072 (build-system python-build-system)
5073 (arguments '(#:tests? #f)) ; Tests not shipped in pypi release.
5074 (propagated-inputs `(("python-six" ,python-six)))
5075 (home-page "https://github.com/rory/robot-detection")
5076 (synopsis "Detect web crawlers")
5077 (description
5078 "@code{robot_detection} is a python module to detect if a given HTTP User
5079 Agent is a web crawler. It uses the list of registered robots from
5080 @url{http://www.robotstxt.org}.")
5081 (license license:gpl3+)))
5082
5083 (define-public python-pysolr
5084 (package
5085 (name "python-pysolr")
5086 (version "3.9.0")
5087 (source
5088 (origin
5089 (method url-fetch)
5090 (uri (pypi-uri "pysolr" version))
5091 (sha256
5092 (base32
5093 "1rj5jmscvxjwcmlfi6hmkj44l4x6n3ln5p7d8d18j566hzmmzw3f"))))
5094 (build-system python-build-system)
5095 (arguments
5096 '(#:tests? #f)) ; Tests require network access.
5097 (propagated-inputs
5098 `(("python-requests" ,python-requests)))
5099 (native-inputs
5100 `(("python-setuptools-scm" ,python-setuptools-scm)))
5101 (home-page "https://github.com/django-haystack/pysolr/")
5102 (synopsis "Lightweight python wrapper for Apache Solr")
5103 (description
5104 "This module provides an interface that queries the Apache Solr server
5105 using a pure Python implementation.")
5106 (license license:bsd-3)))
5107
5108 (define-public python-http-ece
5109 (package
5110 (name "python-http-ece")
5111 (version "1.1.0")
5112 (source
5113 (origin
5114 (method git-fetch)
5115 (uri (git-reference
5116 (url "https://github.com/web-push-libs/encrypted-content-encoding")
5117 (commit (string-append "v" version))))
5118 (file-name (git-file-name name version))
5119 (sha256
5120 (base32
5121 "0bp4cc0xc123i72h80ax3qz3ixfwx3j7pw343kc7i6kdvfi8klx7"))))
5122 (build-system python-build-system)
5123 (arguments
5124 `(#:phases
5125 (modify-phases %standard-phases
5126 (add-after 'unpack 'change-directory
5127 (lambda _ (chdir "python") #t)))))
5128 (propagated-inputs
5129 `(("python-cryptography" ,python-cryptography)))
5130 (native-inputs
5131 `(("python-coverage" ,python-coverage)
5132 ("python-flake8" ,python-flake8)
5133 ("python-mock" ,python-mock)
5134 ("python-nose" ,python-nose)))
5135 (home-page "https://github.com/web-push-libs/encrypted-content-encoding")
5136 (synopsis "Encrypted Content Encoding for HTTP")
5137 (description
5138 "This package provices a simple implementation of Encrypted Content
5139 Encoding for HTTP.")
5140 (license license:expat)))
5141
5142 (define-public python-cloudscraper
5143 (package
5144 (name "python-cloudscraper")
5145 (version "1.2.48")
5146 (source
5147 (origin
5148 (method url-fetch)
5149 (uri (pypi-uri "cloudscraper" version))
5150 (sha256
5151 (base32 "0qjxzb0z5bprvmdhx42ayqhlhi2h49d9dwc0vvycj817s71f2sxv"))
5152 (modules '((guix build utils)))
5153 (snippet
5154 '(with-directory-excursion "cloudscraper"
5155 (for-each delete-file
5156 '("captcha/2captcha.py"
5157 "captcha/9kw.py"
5158 "captcha/anticaptcha.py"
5159 "captcha/deathbycaptcha.py"
5160 "interpreters/js2py.py"
5161 "interpreters/v8.py"))
5162 (substitute* "__init__.py"
5163 ;; Perhaps it's a joke, but don't promote proprietary software.
5164 (("([Th]is feature is not available) in the .*'" _ prefix)
5165 (string-append prefix ".'")))
5166 #t))))
5167 (build-system python-build-system)
5168 (propagated-inputs
5169 `(("python-requests" ,python-requests)
5170 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
5171 ("python-pyparsing" ,python-pyparsing-2.4.7)))
5172 (native-inputs
5173 `(("python-pytest" ,python-pytest)))
5174 (home-page "https://github.com/venomous/cloudscraper")
5175 (synopsis "Cloudflare anti-bot bypass")
5176 (description
5177 "This module acts as a webbrowser solving Cloudflare's Javascript
5178 challenges.")
5179 (license license:expat)))
5180
5181 (define-public python-imap-tools
5182 (package
5183 (name "python-imap-tools")
5184 (version "0.29.0")
5185 (source
5186 (origin
5187 (method url-fetch)
5188 (uri (pypi-uri "imap_tools" version))
5189 (sha256
5190 (base32
5191 "0x122jwpc74wwyw2rsv2fvh6p12y31019ndfr9717jzjkj2d3lhb"))))
5192 (build-system python-build-system)
5193 (arguments '(#:tests? #f)) ; tests require internet access
5194 (home-page "https://github.com/ikvk/imap_tools")
5195 (synopsis "Work with email and mailbox by IMAP")
5196 (description
5197 "This Python library provides tools to deal with email and mailboxes
5198 over IMAP:
5199
5200 @itemize
5201 @item Parsed email message attributes
5202 @item Query builder for searching emails
5203 @item Work with emails in folders (copy, delete, flag, move, seen)
5204 @item Work with mailbox folders (list, set, get, create, exists, rename, delete, status)
5205 @end itemize")
5206 (license license:asl2.0)))