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, 2020 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 (arguments
2909 `(#:phases (modify-phases %standard-phases
2910 (add-after 'unpack 'fix-imports
2911 (lambda _
2912 (substitute* '("docs/index.rst"
2913 "docs/conf.py"
2914 "flask_basicauth.py"
2915 "test_basicauth.py")
2916 (("flask\\.ext\\.basicauth")
2917 "flask_basicauth"))
2918 #t)))))
2919 (propagated-inputs
2920 `(("python-flask" ,python-flask)))
2921 (home-page "https://github.com/jpvanhal/flask-basicauth")
2922 (synopsis "HTTP basic access authentication for Flask")
2923 (description
2924 "This package provides HTTP basic access authentication for Flask.")
2925 (license license:bsd-3)))
2926
2927 (define-public python-flask-htpasswd
2928 (package
2929 (name "python-flask-htpasswd")
2930 (version "0.3.1")
2931 (source
2932 (origin
2933 (method url-fetch)
2934 (uri (pypi-uri "flask-htpasswd" version))
2935 (sha256
2936 (base32
2937 "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
2938 (build-system python-build-system)
2939 (propagated-inputs
2940 `(("python-flask" ,python-flask)
2941 ("python-itsdangerous" ,python-itsdangerous)
2942 ("python-passlib" ,python-passlib)
2943 ("python-tox" ,python-tox)))
2944 (home-page "https://github.com/carsongee/flask-htpasswd")
2945 (synopsis "Basic authentication via htpasswd files in Flask applications")
2946 (description "This package provides Basic authentication via
2947 @file{htpasswd} files and access_token authentication in Flask
2948 applications.")
2949 (license license:bsd-3)))
2950
2951 (define-public python-flask-sqlalchemy
2952 (package
2953 (name "python-flask-sqlalchemy")
2954 (version "2.4.4")
2955 (source (origin
2956 (method url-fetch)
2957 (uri (pypi-uri "Flask-SQLAlchemy" version))
2958 (sha256
2959 (base32
2960 "1rgsj49gnx361hnb3vn6c1h17497qh22yc3r70l1r6w0mw71bixz"))))
2961 (build-system python-build-system)
2962 (propagated-inputs
2963 `(("python-flask" ,python-flask)
2964 ("python-sqlalchemy" ,python-sqlalchemy)))
2965 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
2966 (synopsis "Module adding SQLAlchemy support to your Flask application")
2967 (description
2968 "This package adds SQLAlchemy support to your Flask application.")
2969 (license license:bsd-3)))
2970
2971 (define-public python-flask-restplus
2972 (package
2973 (name "python-flask-restplus")
2974 (version "0.9.2")
2975 (source
2976 (origin
2977 (method url-fetch)
2978 (uri (pypi-uri "flask-restplus" version))
2979 (sha256
2980 (base32
2981 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2982 (build-system python-build-system)
2983 (arguments
2984 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2985 ;; #:phases
2986 ;; (modify-phases %standard-phases
2987 ;; (replace 'check
2988 ;; (lambda _
2989 ;; (invoke "nosetests")
2990 ;; #t)))))
2991 (propagated-inputs
2992 `(("python-aniso8601" ,python-aniso8601)
2993 ("python-flask" ,python-flask)
2994 ("python-jsonschema" ,python-jsonschema)
2995 ("python-pytz" ,python-pytz)
2996 ("python-six" ,python-six)))
2997 (native-inputs
2998 `(("python-tzlocal" ,python-tzlocal)
2999 ("python-blinker" ,python-blinker)
3000 ("python-nose" ,python-nose)
3001 ("python-rednose" ,python-rednose)))
3002 (home-page "https://github.com/noirbizarre/flask-restplus")
3003 (synopsis "Framework for documented API development with Flask")
3004 (description "This package provides a framework for API development with
3005 the Flask web framework in Python. It is similar to package
3006 @code{python-flask-restful} but supports the @code{python-swagger}
3007 documentation builder.")
3008 (license license:expat)))
3009
3010 (define-public python-flask-restful-swagger
3011 (package
3012 (name "python-flask-restful-swagger")
3013 (version "0.20.1")
3014 (source
3015 (origin
3016 (method url-fetch)
3017 (uri (pypi-uri "flask-restful-swagger" version))
3018 (sha256
3019 (base32
3020 "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
3021 (build-system python-build-system)
3022 (arguments '(#:tests? #f)) ;no tests
3023 (propagated-inputs
3024 `(("python-flask-restful" ,python-flask-restful)))
3025 (home-page "https://github.com/rantav/flask-restful-swagger")
3026 (synopsis "Extract Swagger specs from Flask-Restful projects")
3027 (description "This package lets you extract Swagger API documentation
3028 specs from your Flask-Restful projects.")
3029 (license license:expat)))
3030
3031 (define-public python2-flask-restful-swagger
3032 (package-with-python2 python-flask-restful-swagger))
3033
3034 (define-public python-htmlmin
3035 (package
3036 (name "python-htmlmin")
3037 (version "0.1.12")
3038 (source
3039 (origin
3040 (method url-fetch)
3041 (uri (pypi-uri "htmlmin" version))
3042 (sha256
3043 (base32
3044 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
3045 (arguments
3046 `(#:tests? #f)) ; no tests
3047 (build-system python-build-system)
3048 (home-page "https://htmlmin.readthedocs.org/en/latest/")
3049 (synopsis "HTML minifier")
3050 (description "@code{htmlmin} is an HTML minifier that just works.
3051 It comes with safe defaults and easily configurable options.")
3052 (license license:bsd-3)))
3053
3054 (define-public python2-htmlmin
3055 (package-with-python2 python-htmlmin))
3056
3057 (define-public python-flask-htmlmin
3058 (package
3059 (name "python-flask-htmlmin")
3060 (version "1.2")
3061 (source
3062 (origin
3063 (method url-fetch)
3064 (uri (pypi-uri "Flask-HTMLmin" version))
3065 (sha256
3066 (base32
3067 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
3068 (propagated-inputs
3069 `(("python-flask" ,python-flask)
3070 ("python-htmlmin" ,python-htmlmin)))
3071 (build-system python-build-system)
3072 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
3073 (synopsis "HTML response minifier for Flask")
3074 (description
3075 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
3076 (license license:bsd-3)))
3077
3078 (define-public python2-flask-htmlmin
3079 (package-with-python2 python-flask-htmlmin))
3080
3081 (define-public python-jsmin
3082 (package
3083 (name "python-jsmin")
3084 (version "2.2.2")
3085 (source
3086 (origin
3087 (method url-fetch)
3088 (uri (pypi-uri "jsmin" version))
3089 (sha256
3090 (base32
3091 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
3092 (build-system python-build-system)
3093 (home-page "https://github.com/tikitu/jsmin/")
3094 (synopsis "Python JavaScript minifier")
3095 (description
3096 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
3097 on the command line.")
3098 (license license:expat)))
3099
3100 (define-public python-flask-login
3101 (package
3102 (name "python-flask-login")
3103 (version "0.5.0")
3104 (source
3105 (origin
3106 (method git-fetch)
3107 (uri (git-reference
3108 (url "https://github.com/maxcountryman/flask-login")
3109 (commit version)))
3110 (file-name (git-file-name name version))
3111 (sha256
3112 (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
3113 (build-system python-build-system)
3114 (propagated-inputs
3115 `(("python-flask" ,python-flask)))
3116 (native-inputs
3117 ;; For tests.
3118 `(("python-blinker" ,python-blinker)
3119 ("python-coverage" ,python-coverage)
3120 ("python-mock" ,python-mock)
3121 ("python-pycodestyle" ,python-pycodestyle)
3122 ("python-pyflakes" ,python-pyflakes)
3123 ("python-pytest" ,python-pytest)
3124 ("python-semantic-version" ,python-semantic-version)
3125 ("python-werkzeug" ,python-werkzeug)))
3126 (home-page "https://github.com/maxcountryman/flask-login")
3127 (synopsis "User session management for Flask")
3128 (description
3129 "@code{Flask-Login} provides user session management for Flask. It
3130 handles the common tasks of logging in, logging out, and remembering your
3131 users' sessions over extended periods of time.")
3132 (license license:expat)))
3133
3134 (define-public python2-flask-login
3135 (package-with-python2 python-flask-login))
3136
3137 (define-public python-oauth2client
3138 (package
3139 (name "python-oauth2client")
3140 (version "4.0.0")
3141 (source
3142 (origin
3143 (method url-fetch)
3144 (uri (pypi-uri "oauth2client" version))
3145 (sha256
3146 (base32
3147 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
3148 (build-system python-build-system)
3149 (arguments
3150 `(#:tests? #f))
3151 (propagated-inputs
3152 `(("python-httplib2" ,python-httplib2)
3153 ("python-pyasn1" ,python-pyasn1)
3154 ("python-pyasn1-modules" ,python-pyasn1-modules)
3155 ("python-rsa" ,python-rsa)
3156 ("python-six" ,python-six)))
3157 (home-page "https://github.com/google/oauth2client/")
3158 (synopsis "OAuth 2.0 client library")
3159 (description "@code{python-oauth2client} provides an OAuth 2.0 client
3160 library for Python")
3161 (license license:asl2.0)))
3162
3163 (define-public python2-oauth2client
3164 (package-with-python2 python-oauth2client))
3165
3166 (define-public python-flask-oidc
3167 (package
3168 (name "python-flask-oidc")
3169 (version "1.1.1")
3170 (source
3171 (origin
3172 (method url-fetch)
3173 (uri (pypi-uri "flask-oidc" version))
3174 (sha256
3175 (base32
3176 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
3177 (build-system python-build-system)
3178 (propagated-inputs
3179 `(("python-flask" ,python-flask)
3180 ("python-itsdangerous" ,python-itsdangerous)
3181 ("python-oauth2client" ,python-oauth2client)
3182 ("python-six" ,python-six)))
3183 (native-inputs
3184 `(("python-nose" ,python-nose)
3185 ("python-mock" ,python-mock)))
3186 (home-page "https://github.com/puiterwijk/flask-oidc")
3187 (synopsis "OpenID Connect extension for Flask")
3188 (description "@code{python-flask-oidc} provides an OpenID Connect extension
3189 for Flask.")
3190 (license license:bsd-2)))
3191
3192 (define-public python-webassets
3193 (package
3194 (name "python-webassets")
3195 (version "2.0")
3196 (source
3197 (origin
3198 (method url-fetch)
3199 (uri (pypi-uri "webassets" version))
3200 (sha256
3201 (base32
3202 "1kc1042jydgk54xpgcp0r1ib4gys91nhy285jzfcxj3pfqrk4w8n"))))
3203 (build-system python-build-system)
3204 (arguments
3205 '(#:phases (modify-phases %standard-phases
3206 (add-before 'check 'disable-some-tests
3207 (lambda _
3208 ;; This test requires 'postcss' and 'babel' which are
3209 ;; not yet available in Guix.
3210 (delete-file "tests/test_filters.py")
3211 #t))
3212 (replace 'check
3213 (lambda _
3214 (setenv "PYTHONPATH"
3215 (string-append "./build/lib:"
3216 (getenv "PYTHONPATH")))
3217 (invoke "pytest" "-vv"))))))
3218 (native-inputs
3219 `(("python-jinja2" ,python-jinja2)
3220 ("python-mock" ,python-mock)
3221 ("python-nose" ,python-nose)
3222 ("python-pytest" ,python-pytest)))
3223 (home-page "https://github.com/miracle2k/webassets")
3224 (synopsis "Media asset management")
3225 (description "Merges, minifies and compresses Javascript and CSS files,
3226 supporting a variety of different filters, including YUI, jsmin, jspacker or
3227 CSS tidy. Also supports URL rewriting in CSS files.")
3228 (license license:bsd-2)))
3229
3230 (define-public python-cssmin
3231 (package
3232 (name "python-cssmin")
3233 (version "0.2.0")
3234 (source
3235 (origin
3236 (method url-fetch)
3237 (uri (pypi-uri "cssmin" version))
3238 (sha256
3239 (base32
3240 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
3241 (build-system python-build-system)
3242 (home-page "https://github.com/zacharyvoase/cssmin")
3243 (synopsis "Python port of the YUI CSS Compressor")
3244 (description "Python port of the YUI CSS Compressor.")
3245 (license (list license:expat license:bsd-3))))
3246
3247 (define-public python2-cssmin
3248 (package-with-python2 python-cssmin))
3249
3250 (define-public python-elasticsearch
3251 (package
3252 (name "python-elasticsearch")
3253 (version "7.1.0")
3254 (source
3255 (origin
3256 (method url-fetch)
3257 (uri (pypi-uri "elasticsearch" version))
3258 (sha256
3259 (base32
3260 "0rnjvlhw4v3vg14l519qliy1s1zpmx3827q0xfviwvk42rr7hh01"))))
3261 (build-system python-build-system)
3262 (native-inputs
3263 `(("python-mock" ,python-mock)
3264 ("python-nosexcover" ,python-nosexcover)
3265 ("python-pyaml" ,python-pyaml)
3266 ("python-requests" ,python-requests)))
3267 (propagated-inputs
3268 `(("urllib3" ,python-urllib3)))
3269 (arguments
3270 ;; tests require the test_elasticsearch module but it is not distributed.
3271 `(#:tests? #f))
3272 (home-page "https://github.com/elastic/elasticsearch-py")
3273 (synopsis "Low-level client for Elasticsearch")
3274 (description "Official low-level client for Elasticsearch. Its goal is to
3275 provide common ground for all Elasticsearch-related code in Python; because of
3276 this it tries to be opinion-free and very extendable.")
3277 (license license:expat)))
3278
3279 (define-public python2-elasticsearch
3280 (package-with-python2 python-elasticsearch))
3281
3282 (define-public python-flask-script
3283 (package
3284 (name "python-flask-script")
3285 (version "2.0.6")
3286 (source
3287 (origin
3288 (method url-fetch)
3289 (uri (pypi-uri "Flask-Script" version))
3290 (sha256
3291 (base32
3292 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
3293 (build-system python-build-system)
3294 (arguments
3295 `(#:phases
3296 (modify-phases %standard-phases
3297 (add-after 'unpack 'patch-tests
3298 (lambda _
3299 (substitute* "tests.py"
3300 (("flask\\.ext\\.script") "flask_script"))
3301 #t)))))
3302 (propagated-inputs
3303 `(("python-flask" ,python-flask)
3304 ("python-argcomplete" ,python-argcomplete)
3305 ("python-werkzeug" ,python-werkzeug)))
3306 (native-inputs
3307 `(("python-pytest" ,python-pytest)))
3308 (home-page
3309 "https://github.com/smurfix/flask-script")
3310 (synopsis "Scripting support for Flask")
3311 (description "The Flask-Script extension provides support for writing
3312 external scripts in Flask. This includes running a development server,
3313 a customised Python shell, scripts to set up your database, cronjobs,
3314 and other command-line tasks that belong outside the web application
3315 itself.")
3316 (license license:bsd-3)))
3317
3318 (define-public python2-flask-script
3319 (package-with-python2 python-flask-script))
3320
3321 (define-public python-flask-migrate
3322 (package
3323 (name "python-flask-migrate")
3324 (version "2.5.3")
3325 (source
3326 (origin
3327 (method url-fetch)
3328 (uri (pypi-uri "Flask-Migrate" version))
3329 (sha256
3330 (base32
3331 "1vip9ww6l18dxffjsggm83k71zkvihxpnhaswpv8klh95s6517d6"))))
3332 (build-system python-build-system)
3333 (propagated-inputs
3334 `(("python-flask" ,python-flask)
3335 ("python-alembic" ,python-alembic)
3336 ("python-sqlalchemy" ,python-sqlalchemy)
3337 ("python-flask-script" ,python-flask-script)
3338 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
3339 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
3340 (synopsis "SQLAlchemy database migrations for Flask programs using
3341 Alembic")
3342 (description "This package contains SQLAlchemy database migration tools
3343 for Flask programs that are using @code{python-alembic}.")
3344 (license license:expat)))
3345
3346 (define-public python-genshi
3347 (package
3348 (name "python-genshi")
3349 (version "0.7.3")
3350 (source
3351 (origin
3352 (method git-fetch)
3353 (uri (git-reference
3354 (url "https://github.com/edgewall/genshi")
3355 (commit version)))
3356 (file-name (git-file-name name version))
3357 (sha256
3358 (base32 "04bw7nd4wyn8ixnhik57hny2xpjjpn80k5hp6691inix5gc6rxaf"))))
3359 (build-system python-build-system)
3360 (home-page "https://genshi.edgewall.org/")
3361 (synopsis "Toolkit for generation of output for the web")
3362 (description "Genshi is a Python library that provides an integrated set
3363 of components for parsing, generating, and processing HTML, XML or other
3364 textual content for output generation on the web.")
3365 (license license:bsd-3)))
3366
3367 (define-public python2-genshi
3368 (package-with-python2 python-genshi))
3369
3370 (define-public python-flask-principal
3371 (package
3372 (name "python-flask-principal")
3373 (version "0.4.0")
3374 (source
3375 (origin
3376 (method url-fetch)
3377 (uri (pypi-uri "Flask-Principal" version))
3378 (sha256
3379 (base32
3380 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
3381 (build-system python-build-system)
3382 (propagated-inputs
3383 `(("python-blinker" ,python-blinker)))
3384 (native-inputs
3385 `(("python-flask" ,python-flask)
3386 ("python-nose" ,python-nose)))
3387 (home-page "https://pythonhosted.org/Flask-Principal/")
3388 (synopsis "Identity management for Flask")
3389 (description "@code{flask_principal} is a identity management library for
3390 Flask. It supports managing both authentication and authorization data in a
3391 thread-local variable.")
3392 (license license:expat)))
3393
3394 (define-public python2-flask-principal
3395 (package-with-python2 python-flask-principal))
3396
3397 (define-public python-flask-httpauth
3398 (package
3399 (name "python-flask-httpauth")
3400 (version "3.2.3")
3401 (source
3402 (origin
3403 (method url-fetch)
3404 (uri (pypi-uri "Flask-HTTPAuth" version))
3405 (sha256
3406 (base32
3407 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
3408 (build-system python-build-system)
3409 (native-inputs
3410 `(("python-flask" ,python-flask)))
3411 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
3412 (synopsis "Basic and Digest HTTP authentication for Flask routes")
3413 (description "@code{flask_httpauth} provides Basic and Digest HTTP
3414 authentication for Flask routes.")
3415 (license license:expat)))
3416
3417 (define-public python2-flask-httpauth
3418 (package-with-python2 python-flask-httpauth))
3419
3420 (define-public python-uritemplate
3421 (package
3422 (name "python-uritemplate")
3423 (version "3.0.1")
3424 (source
3425 (origin
3426 (method url-fetch)
3427 (uri (pypi-uri "uritemplate" version))
3428 (sha256
3429 (base32
3430 "1bkwmgr0ia9gcn4bszs2xlvml79f0bi2s4a87xg22ky9rq8avy2s"))))
3431 (build-system python-build-system)
3432 (home-page "https://uritemplate.readthedocs.org")
3433 (synopsis "Library to deal with URI Templates")
3434 (description "@code{uritemplate} provides Python library to deal with URI
3435 Templates.")
3436 (license license:bsd-2)))
3437
3438 (define-public python2-uritemplate
3439 (package-with-python2 python-uritemplate))
3440
3441 (define-public python-publicsuffix
3442 (package
3443 (name "python-publicsuffix")
3444 (version "1.1.0")
3445 (source (origin
3446 (method url-fetch)
3447 (uri (pypi-uri "publicsuffix" version))
3448 (sha256
3449 (base32
3450 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
3451 (build-system python-build-system)
3452 (arguments
3453 `(#:tests? #f)) ; tests use the internet
3454 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
3455 (synopsis "Get suffix for a domain name")
3456 (description "Get a public suffix for a domain name using the Public Suffix
3457 List.")
3458 (license license:expat)))
3459
3460 (define-public python2-publicsuffix
3461 (package-with-python2 python-publicsuffix))
3462
3463 (define-public python-publicsuffix2
3464 (package
3465 (name "python-publicsuffix2")
3466 (version "2.20191221")
3467 (source
3468 (origin
3469 (method url-fetch)
3470 (uri (pypi-uri "publicsuffix2" version))
3471 (sha256
3472 (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
3473 (build-system python-build-system)
3474 (arguments
3475 '(#:phases
3476 (modify-phases %standard-phases
3477 (add-after 'unpack 'ignore-maintainer-inputs
3478 (lambda _
3479 ;; Comment out a demand for python-requests, which is used only by
3480 ;; the unused ‘update_psl’ helper command.
3481 (substitute* "setup.py"
3482 (("'requests " match)
3483 (format #f "# ~a" match)))
3484 #t)))
3485 #:tests? #f)) ; the test suite requires network access
3486 (home-page "https://github.com/pombredanne/python-publicsuffix2")
3487 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
3488 (description "Get a public suffix for a domain name using the Public Suffix
3489 List. Forked from and using the same API as the publicsuffix package.")
3490 (license (list license:expat license:mpl2.0))))
3491
3492 (define-public python2-publicsuffix2
3493 (package-with-python2 python-publicsuffix2))
3494
3495 (define-public python-werkzeug
3496 (package
3497 (name "python-werkzeug")
3498 (version "1.0.0")
3499 (source
3500 (origin
3501 (method url-fetch)
3502 (uri (pypi-uri "Werkzeug" version))
3503 (sha256
3504 (base32
3505 "15kh0z61klp62mrc1prka13xsshxn0rsp1j1s2964iw86yisi6qn"))))
3506 (build-system python-build-system)
3507 (arguments
3508 '(#:phases
3509 (modify-phases %standard-phases
3510 (delete 'check)
3511 (add-after 'install 'check
3512 (lambda* (#:key inputs outputs #:allow-other-keys)
3513 (add-installed-pythonpath inputs outputs)
3514 (invoke "python" "-m" "pytest"))))))
3515 (propagated-inputs
3516 `(("python-requests" ,python-requests)))
3517 (native-inputs
3518 `(("python-pytest" ,python-pytest)
3519 ("python-pytest-timeout" ,python-pytest-timeout)))
3520 (home-page "https://www.palletsprojects.org/p/werkzeug/")
3521 (synopsis "Utilities for WSGI applications")
3522 (description "One of the most advanced WSGI utility modules. It includes a
3523 powerful debugger, full-featured request and response objects, HTTP utilities to
3524 handle entity tags, cache control headers, HTTP dates, cookie handling, file
3525 uploads, a powerful URL routing system and a bunch of community-contributed
3526 addon modules.")
3527 (license license:x11)))
3528
3529 (define-public python2-werkzeug
3530 (package-with-python2 python-werkzeug))
3531
3532 (define-public python-bottle
3533 (package
3534 (name "python-bottle")
3535 (version "0.12.19")
3536 (source
3537 (origin
3538 (method url-fetch)
3539 (uri (pypi-uri "bottle" version))
3540 (sha256
3541 (base32 "0b6s50vc4iad97b6bb3xnyrgajb3nj6n6jbr5p54a4vapky3zmx9"))))
3542 (build-system python-build-system)
3543 (home-page "https://bottlepy.org/")
3544 (synopsis "WSGI framework for small web-applications.")
3545 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
3546 (license license:expat)))
3547
3548 (define-public python2-bottle
3549 (package-with-python2 python-bottle))
3550
3551 (define-public python-wtforms
3552 (package
3553 (name "python-wtforms")
3554 (version "2.1")
3555 (source
3556 (origin
3557 (method url-fetch)
3558 (uri (pypi-uri "WTForms" version ".zip"))
3559 (sha256
3560 (base32
3561 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
3562 (build-system python-build-system)
3563 (arguments
3564 '(#:phases
3565 (modify-phases %standard-phases
3566 (add-after 'unpack 'remove-django-test
3567 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
3568 (lambda _
3569 (substitute*
3570 "tests/runtests.py"
3571 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
3572 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
3573 #t)))))
3574 (native-inputs
3575 `(("unzip" ,unzip)))
3576 (home-page "http://wtforms.simplecodes.com/")
3577 (synopsis
3578 "Form validation and rendering library for Python web development")
3579 (description
3580 "WTForms is a flexible forms validation and rendering library
3581 for Python web development. It is very similar to the web form API
3582 available in Django, but is a standalone package.")
3583 (license license:bsd-3)))
3584
3585 (define-public python2-wtforms
3586 (package-with-python2 python-wtforms))
3587
3588 (define-public python-paste
3589 (package
3590 (name "python-paste")
3591 (version "3.0.6")
3592 (source
3593 (origin
3594 (method url-fetch)
3595 (uri (pypi-uri "Paste" version))
3596 (sha256
3597 (base32
3598 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
3599 (patches (search-patches "python-paste-remove-timing-test.patch"))
3600 (modules '((guix build utils)))
3601 (snippet
3602 '(begin
3603 ;; This test calls out to the internet.
3604 (delete-file "tests/test_proxy.py") #t))))
3605 (build-system python-build-system)
3606 (native-inputs
3607 `(("python-pytest" ,python-pytest)
3608 ("python-pytest-runner" ,python-pytest-runner)
3609 ("python-nose" ,python-nose)))
3610 (propagated-inputs
3611 `(("python-six" ,python-six)))
3612 (home-page "https://pythonpaste.readthedocs.io/")
3613 (synopsis
3614 "Python web development tools, focusing on WSGI")
3615 (description
3616 "Paste provides a variety of web development tools and middleware which
3617 can be nested together to build web applications. Paste's design closely
3618 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
3619 (license license:expat)))
3620
3621 (define-public python2-paste
3622 (package-with-python2 python-paste))
3623
3624 (define-public python-pastescript
3625 (package
3626 (name "python-pastescript")
3627 (version "2.0.2")
3628 (source
3629 (origin
3630 (method url-fetch)
3631 (uri (pypi-uri "PasteScript" version))
3632 (sha256
3633 (base32
3634 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
3635 (build-system python-build-system)
3636 (native-inputs
3637 `(("python-nose" ,python-nose)))
3638 (propagated-inputs
3639 `(("python-paste" ,python-paste)
3640 ("python-pastedeploy" ,python-pastedeploy)))
3641 (home-page (string-append "https://web.archive.org/web/20161025192515/"
3642 "http://pythonpaste.org/script/"))
3643 (arguments
3644 '(;; Unfortunately, this requires the latest unittest2,
3645 ;; but that requires traceback2 which requires linecache2 which requires
3646 ;; unittest2. So we're skipping tests for now.
3647 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
3648 ;; so in theory we could get around this situation somehow.)
3649 #:tests? #f))
3650 (synopsis
3651 "Pluggable command line tool for serving web applications and more")
3652 (description
3653 "PasteScript is a plugin-friendly command line tool which provides a
3654 variety of features, from launching web applications to bootstrapping project
3655 layouts.")
3656 (license license:expat)))
3657
3658 (define-public python2-pastescript
3659 (package-with-python2 python-pastescript))
3660
3661 (define-public python2-urlgrabber
3662 (package
3663 (name "python2-urlgrabber")
3664 (version "3.10.2")
3665 (source
3666 (origin
3667 (method url-fetch)
3668 (uri (pypi-uri "urlgrabber" version))
3669 (sha256
3670 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
3671 (build-system python-build-system)
3672 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
3673 (home-page "http://urlgrabber.baseurl.org")
3674 (synopsis "High-level cross protocol url-grabber")
3675 (description "@code{urlgrabber} is Python2 library that unifies access to
3676 files available on web, FTP or locally. It supports HTTP, FTP and file://
3677 protocols, it supports features like HTTP keep-alive, reget, throttling and
3678 more.")
3679 (license license:lgpl2.1+)))
3680
3681 (define-public python-pycares
3682 (package
3683 (name "python-pycares")
3684 (version "2.3.0")
3685 (source
3686 (origin
3687 (method url-fetch)
3688 (uri (pypi-uri "pycares" version))
3689 (sha256
3690 (base32
3691 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
3692 (build-system python-build-system)
3693 (arguments
3694 `(#:tests? #f)) ;tests require internet access
3695 (home-page "https://github.com/saghul/pycares")
3696 (synopsis "Python interface for @code{c-ares}")
3697 (description "@code{pycares} is a Python module which provides an
3698 interface to @code{c-ares}, a C library that performs DNS requests and
3699 name resolutions asynchronously.")
3700 (license license:expat)))
3701
3702 (define-public python-yarl
3703 (package
3704 (name "python-yarl")
3705 (version "1.1.1")
3706 (source
3707 (origin
3708 (method url-fetch)
3709 (uri (pypi-uri "yarl" version))
3710 (sha256
3711 (base32
3712 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
3713 (build-system python-build-system)
3714 (native-inputs
3715 `(("python-pytest" ,python-pytest)
3716 ("python-pytest-runner" ,python-pytest-runner)))
3717 (propagated-inputs
3718 `(("python-idna" ,python-idna)
3719 ("python-multidict" ,python-multidict)))
3720 (home-page "https://github.com/aio-libs/yarl/")
3721 (synopsis "Yet another URL library")
3722 (description "@code{yarl} module provides handy @code{URL} class
3723 for URL parsing and changing.")
3724 (license license:asl2.0)))
3725
3726 (define-public python-google-api-client
3727 (package
3728 (name "python-google-api-client")
3729 (version "1.6.7")
3730 (source
3731 (origin
3732 (method url-fetch)
3733 (uri (pypi-uri "google-api-python-client" version))
3734 (sha256
3735 (base32
3736 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
3737 (build-system python-build-system)
3738 (arguments
3739 '(#:tests? #f)) ; tests require internet access
3740 (native-inputs
3741 `(("python-httplib2" ,python-httplib2)
3742 ("python-six" ,python-six)
3743 ("python-oauth2client" ,python-oauth2client)
3744 ("python-uritemplate" ,python-uritemplate)))
3745 (home-page "https://github.com/google/google-api-python-client")
3746 (synopsis "Core Python library for accessing Google APIs")
3747 (description "Python client library for Google's discovery based APIs")
3748 (license license:asl2.0)))
3749
3750 (define-public python2-google-api-client
3751 (package-with-python2 python-google-api-client))
3752
3753 (define-public python-hawkauthlib
3754 (package
3755 (name "python-hawkauthlib")
3756 (version "2.0.0")
3757 (source
3758 (origin
3759 (method url-fetch)
3760 (uri (pypi-uri "hawkauthlib" version))
3761 (sha256
3762 (base32
3763 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
3764 (build-system python-build-system)
3765 (propagated-inputs
3766 `(("python-requests" ,python-requests)
3767 ("python-webob" ,python-webob)))
3768 (home-page "https://github.com/mozilla-services/hawkauthlib")
3769 (synopsis "Hawk Access Authentication protocol")
3770 (description
3771 "This is a low-level Python library for implementing Hawk Access Authentication,
3772 a simple HTTP request-signing scheme.")
3773 (license license:mpl2.0)))
3774
3775 (define-public python-pybrowserid
3776 (package
3777 (name "python-pybrowserid")
3778 (version "0.14.0")
3779 (source
3780 (origin
3781 (method url-fetch)
3782 (uri (pypi-uri "PyBrowserID" version))
3783 (sha256
3784 (base32
3785 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
3786 (build-system python-build-system)
3787 (propagated-inputs
3788 `(("python-requests" ,python-requests)))
3789 (native-inputs
3790 `(("python-mock" ,python-mock)))
3791 (home-page "https://github.com/mozilla/PyBrowserID")
3792 (synopsis "Python library for the BrowserID protocol")
3793 (description
3794 "This is a Python client library for the BrowserID protocol that
3795 underlies Mozilla Persona.")
3796 (license license:mpl2.0)))
3797
3798 (define-public python-pyfxa
3799 (package
3800 (name "python-pyfxa")
3801 (version "0.6.0")
3802 (source
3803 (origin
3804 (method url-fetch)
3805 (uri (pypi-uri "PyFxA" version))
3806 (sha256
3807 (base32
3808 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
3809 (build-system python-build-system)
3810 (arguments '(#:tests? #f)) ; 17 tests require network access
3811 (propagated-inputs
3812 `(("python-cryptography" ,python-cryptography)
3813 ("python-hawkauthlib" ,python-hawkauthlib)
3814 ("python-pybrowserid" ,python-pybrowserid)
3815 ("python-requests" ,python-requests)
3816 ("python-six" ,python-six)))
3817 (native-inputs
3818 `(("python-grequests" ,python-grequests)
3819 ("python-mock" ,python-mock)
3820 ("python-responses" ,python-responses)
3821 ("python-unittest2" ,python-unittest2)))
3822 (home-page "https://github.com/mozilla/PyFxA")
3823 (synopsis "Firefox Accounts client library for Python")
3824 (description
3825 "This is a Python library for interacting with the Firefox Accounts
3826 ecosystem.")
3827 (license license:mpl2.0)))
3828
3829 (define-public python-hyperlink
3830 (package
3831 (name "python-hyperlink")
3832 (version "19.0.0")
3833 (source
3834 (origin
3835 (method url-fetch)
3836 (uri (pypi-uri "hyperlink" version))
3837 (sha256
3838 (base32
3839 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
3840 (build-system python-build-system)
3841 (propagated-inputs
3842 `(("python-idna" ,python-idna)))
3843 (home-page "https://github.com/python-hyper/hyperlink")
3844 (synopsis "Python module to create immutable URLs according to spec")
3845 (description "This package provides a Python module to create immutable, and
3846 correct URLs for Python according to RFCs 3986 and 3987.")
3847 (license license:expat)))
3848
3849 (define-public python-treq
3850 (package
3851 (name "python-treq")
3852 (version "18.6.0")
3853 (source
3854 (origin
3855 (method url-fetch)
3856 (uri (pypi-uri "treq" version))
3857 (sha256
3858 (base32
3859 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
3860 (build-system python-build-system)
3861 (propagated-inputs
3862 `(("python-attrs" ,python-attrs)
3863 ("python-idna" ,python-idna)
3864 ("python-incremental" ,python-incremental)
3865 ("python-requests" ,python-requests)
3866 ("python-service-identity" ,python-service-identity)
3867 ("python-twisted" ,python-twisted)))
3868 (home-page "https://github.com/twisted/treq")
3869 (synopsis "Requests-like API built on top of twisted.web's Agent")
3870 (description "This package provides an HTTP library inspired by
3871 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
3872 high level API for making HTTP requests when using Twisted.")
3873 (license license:expat)))
3874
3875 (define-public python-autobahn
3876 (package
3877 (name "python-autobahn")
3878 (version "19.2.1")
3879 (source
3880 (origin
3881 (method url-fetch)
3882 (uri (pypi-uri "autobahn" version))
3883 (sha256
3884 (base32
3885 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
3886 (build-system python-build-system)
3887 (arguments
3888 ;; The tests fail to run:
3889 ;; https://github.com/crossbario/autobahn-python/issues/1117
3890 `(#:tests? #f))
3891 (propagated-inputs
3892 `(("python-cffi" ,python-cffi)
3893 ("python-twisted" ,python-twisted)
3894 ("python-txaio" ,python-txaio)))
3895 (home-page "https://crossbar.io/autobahn/")
3896 (synopsis "Web Application Messaging Protocol implementation")
3897 (description "This package provides an implementation of the @dfn{Web Application
3898 Messaging Protocol} (WAMP). WAMP connects components in distributed
3899 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
3900 Calls (rRPC). It is ideal for distributed, multi-client and server applications
3901 such as IoT applications or multi-user database-driven business applications.")
3902 (license license:expat)))
3903
3904 (define-public python-ws4py
3905 (package
3906 (name "python-ws4py")
3907 (version "0.5.1")
3908 (source
3909 (origin
3910 (method url-fetch)
3911 (uri (pypi-uri "ws4py" version))
3912 (sha256
3913 (base32
3914 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
3915 (build-system python-build-system)
3916 (arguments
3917 `(#:phases
3918 (modify-phases %standard-phases
3919 (add-after 'unpack 'python3.7-compatibility
3920 (lambda _
3921 (substitute* '("ws4py/server/tulipserver.py"
3922 "ws4py/async_websocket.py")
3923 (("asyncio.async")
3924 "asyncio.ensure_future"))
3925 #t))
3926 ;; We don't have a package for cherrypy.
3927 (add-after 'unpack 'remove-cherrypy-support
3928 (lambda _
3929 (delete-file "ws4py/server/cherrypyserver.py")
3930 #t)))))
3931 (propagated-inputs
3932 `(("python-gevent" ,python-gevent)
3933 ("python-tornado" ,python-tornado)))
3934 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
3935 (synopsis "WebSocket client and server library")
3936 (description
3937 "This package provides a WebSocket client and server library for
3938 Python.")
3939 (license license:bsd-3)))
3940
3941 (define-public python-slugify
3942 (package
3943 (name "python-slugify")
3944 (version "4.0.1")
3945 (source
3946 (origin
3947 (method url-fetch)
3948 (uri (pypi-uri "python-slugify" version))
3949 (sha256
3950 (base32 "0w22fapghmzk3xdasc4dn7h8sl58l08d1h5zbf72dh80drv1g9b9"))))
3951 (propagated-inputs
3952 `(("python-unidecode" ,python-unidecode)))
3953 (arguments
3954 `(#:phases
3955 (modify-phases %standard-phases
3956 (replace 'check
3957 (lambda _
3958 (invoke "python" "test.py"))))))
3959 (build-system python-build-system)
3960 (home-page "https://github.com/un33k/python-slugify")
3961 (synopsis "Python Slugify application that handles Unicode")
3962 (description "This package provides a @command{slufigy} command and
3963 library to create slugs from unicode strings while keeping it DRY.")
3964 (license license:expat)))
3965
3966 (define-public python-branca
3967 (package
3968 (name "python-branca")
3969 (version "0.3.1")
3970 (source
3971 (origin
3972 (method url-fetch)
3973 (uri (pypi-uri "branca" version))
3974 (sha256
3975 (base32
3976 "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
3977 (build-system python-build-system)
3978 (propagated-inputs
3979 `(("python-jinja2" ,python-jinja2)
3980 ("python-six" ,python-six)))
3981 (native-inputs
3982 `(("python-pytest" ,python-pytest)))
3983 (home-page "https://github.com/python-visualization/branca")
3984 (synopsis "Generate complex HTML+JS pages with Python")
3985 (description "Generate complex HTML+JS pages with Python")
3986 (license license:expat)))
3987
3988 (define-public python-tinycss2
3989 (package
3990 (name "python-tinycss2")
3991 (version "1.0.2")
3992 (source
3993 (origin
3994 (method url-fetch)
3995 (uri (pypi-uri "tinycss2" version))
3996 (patches (search-patches "python-tinycss2-flake8-compat.patch"))
3997 (sha256
3998 (base32 "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4"))))
3999 (build-system python-build-system)
4000 (arguments
4001 `(#:phases
4002 (modify-phases %standard-phases
4003 (replace 'check
4004 (lambda _ (invoke "pytest"))))))
4005 (propagated-inputs
4006 `(("python-webencodings" ,python-webencodings)))
4007 (native-inputs
4008 `(("python-pytest-flake8" ,python-pytest-flake8)
4009 ("python-pytest-isort" ,python-pytest-isort)
4010 ("python-pytest-runner" ,python-pytest-runner)))
4011 (home-page "https://tinycss2.readthedocs.io/")
4012 (synopsis "Low-level CSS parser for Python")
4013 (description "@code{tinycss2} can parse strings, return Python objects
4014 representing tokens and blocks, and generate CSS strings corresponding to
4015 these objects.
4016
4017 Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
4018 grammar of CSS but doesn’t know specific rules, properties or values supported
4019 in various CSS modules.")
4020 (license license:bsd-3)))
4021
4022 (define-public python-cssselect2
4023 (package
4024 (name "python-cssselect2")
4025 (version "0.2.2")
4026 (source
4027 (origin
4028 (method url-fetch)
4029 (uri (pypi-uri "cssselect2" version))
4030 (sha256
4031 (base32 "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h"))))
4032 (build-system python-build-system)
4033 (arguments
4034 `(#:phases
4035 (modify-phases %standard-phases
4036 (replace 'check
4037 (lambda _ (invoke "pytest"))))))
4038 (propagated-inputs
4039 `(("python-tinycss2" ,python-tinycss2)))
4040 (native-inputs
4041 `(("python-pytest-cov" ,python-pytest-cov)
4042 ("python-pytest-flake8" ,python-pytest-flake8)
4043 ("python-pytest-isort" ,python-pytest-isort)
4044 ("python-pytest-runner" ,python-pytest-runner)))
4045 (home-page "https://cssselect2.readthedocs.io/")
4046 (synopsis "CSS selectors for Python ElementTree")
4047 (description "@code{cssselect2} is a straightforward implementation of
4048 CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
4049 ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
4050
4051 Unlike the Python package @code{cssselect}, it does not translate selectors to
4052 XPath and therefore does not have all the correctness corner cases that are
4053 hard or impossible to fix in cssselect.")
4054 (license license:bsd-3)))
4055
4056 (define-public python-uvloop
4057 (package
4058 (name "python-uvloop")
4059 (version "0.14.0")
4060 (source
4061 (origin
4062 (method url-fetch)
4063 (uri (pypi-uri "uvloop" version))
4064 (sha256
4065 (base32 "07j678z9gf41j98w72ysrnb5sa41pl5yxd7ib17lcwfxqz0cjfhj"))))
4066 (build-system python-build-system)
4067 (arguments
4068 '(#:tests? #f ;FIXME: tests hang and with some errors in the way
4069 #:phases
4070 (modify-phases %standard-phases
4071 (add-after 'unpack 'preparations
4072 (lambda _
4073 ;; Use packaged libuv.
4074 (substitute* "setup.py" (("self.use_system_libuv = False")
4075 "self.use_system_libuv = True"))
4076 #t)))))
4077 (native-inputs
4078 `(("python-aiohttp" ,python-aiohttp)
4079 ("python-cython" ,python-cython)
4080 ("python-flake8" ,python-flake8)
4081 ("python-psutil" ,python-psutil)
4082 ("python-pyopenssl" ,python-pyopenssl)
4083 ("python-twine" ,python-twine)))
4084 (inputs
4085 `(("libuv" ,libuv)))
4086 (home-page "https://github.com/MagicStack/uvloop")
4087 (synopsis "Fast implementation of asyncio event loop on top of libuv")
4088 (description
4089 "@code{uvloop} is a fast, drop-in replacement of the built-in asyncio
4090 event loop. It is implemented in Cython and uses libuv under the hood.")
4091 (license license:expat)))
4092
4093 (define-public gunicorn
4094 (package
4095 (name "gunicorn")
4096 (version "20.0.4")
4097 (source
4098 (origin
4099 (method url-fetch)
4100 (uri (pypi-uri "gunicorn" version))
4101 (sha256
4102 (base32
4103 "09n6fc019bgrvph1s5h1lwhn2avcsprw6ncd203qhra3i8mvn10r"))))
4104 (outputs '("out" "doc"))
4105 (build-system python-build-system)
4106 (arguments
4107 `(#:phases
4108 (modify-phases %standard-phases
4109 (add-after 'build 'build-doc
4110 (lambda _
4111 (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
4112 (delete-file "docs/build/texinfo/Makefile")
4113 (delete-file "docs/build/texinfo/Gunicorn.texi")
4114 #t))
4115 (replace 'check
4116 (lambda _
4117 (setenv "PYTHONPATH"
4118 (string-append ".:" (getenv "PYTHONPATH")))
4119 (invoke "pytest")))
4120 (add-after 'install 'install-doc
4121 (lambda* (#:key outputs #:allow-other-keys)
4122 (let* ((doc (string-append (assoc-ref outputs "doc")
4123 "/share/doc/" ,name "-" ,version))
4124 (html (string-append doc "/html"))
4125 (info (string-append doc "/info"))
4126 (examples (string-append doc "/examples")))
4127 (mkdir-p html)
4128 (mkdir-p info)
4129 (mkdir-p examples)
4130 (copy-recursively "docs/build/html" html)
4131 (copy-recursively "docs/build/texinfo" info)
4132 (copy-recursively "examples" examples)
4133 (for-each (lambda (file)
4134 (copy-file file (string-append doc "/" file)))
4135 '("README.rst" "NOTICE" "LICENSE" "THANKS")))
4136 #t)))))
4137 (native-inputs
4138 `(("binutils" ,binutils) ;; for ctypes.util.find_library()
4139 ("python-aiohttp" ,python-aiohttp)
4140 ("python-pytest" ,python-pytest)
4141 ("python-pytest-cov" ,python-pytest-cov)
4142 ("python-sphinx" ,python-sphinx)
4143 ("texinfo" ,texinfo)))
4144 (home-page "https://gunicorn.org/")
4145 (synopsis "Python WSGI HTTP Server for UNIX")
4146 (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
4147 Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
4148 Unicorn project. The Gunicorn server is broadly compatible with
4149 various web frameworks, simply implemented, light on server resources,
4150 and fairly speedy.")
4151 (license license:expat)))
4152
4153 ;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
4154 ;; its tests
4155 (define-public gunicorn-bootstrap
4156 (package
4157 (inherit gunicorn)
4158 (name "gunicorn")
4159 (arguments `(#:tests? #f))
4160 (properties '((hidden? . #t)))
4161 (native-inputs `())))
4162
4163 (define-public python-httptools
4164 (package
4165 (name "python-httptools")
4166 (version "0.1.1")
4167 (source
4168 (origin
4169 ;; PyPI tarball comes with a vendored http-parser and no tests.
4170 (method git-fetch)
4171 (uri (git-reference
4172 (url "https://github.com/MagicStack/httptools")
4173 (commit (string-append "v" version))))
4174 (file-name (git-file-name name version))
4175 (sha256
4176 (base32 "0g08128x2ixsiwrzskxc6c8ymgzs39wbzr5mhy0mjk30q9pqqv77"))))
4177 (build-system python-build-system)
4178 (arguments
4179 '(#:phases
4180 (modify-phases %standard-phases
4181 (add-after 'unpack 'preparations
4182 (lambda _
4183 ;; Skip a failing test (AssertionError). Bug report:
4184 ;; https://github.com/MagicStack/httptools/issues/10.
4185 (substitute* "tests/test_parser.py"
4186 ((" def test_parser_response_1")
4187 (string-append
4188 " @unittest.skip(\"Disabled.\")\n"
4189 " def test_parser_response_1")))
4190 ;; Use packaged http-parser.
4191 (substitute* "setup.py" (("self.use_system_http_parser = False")
4192 "self.use_system_http_parser = True"))
4193 ;; This path is hardcoded. Hardcode our own.
4194 (substitute* "httptools/parser/cparser.pxd"
4195 (("../../vendor/http-parser")
4196 (string-append (assoc-ref %build-inputs "http-parser")
4197 "/include")))
4198 ;; Don't force Cython version.
4199 (substitute* "setup.py" (("Cython==") "Cython>="))
4200 #t)))))
4201 (native-inputs
4202 `(("python-cython" ,python-cython)
4203 ("python-pytest" ,python-pytest)))
4204 (inputs
4205 `(("http-parser" ,http-parser)))
4206 (home-page "https://github.com/MagicStack/httptools")
4207 (synopsis "Collection of framework independent HTTP protocol utils")
4208 (description
4209 "@code{httptools} is a Python binding for the nodejs HTTP parser.")
4210 (license license:expat)))
4211
4212 (define-public python-uvicorn
4213 (package
4214 (name "python-uvicorn")
4215 (version "0.11.8")
4216 (source
4217 (origin
4218 ;; PyPI tarball has no tests.
4219 (method git-fetch)
4220 (uri (git-reference
4221 (url "https://github.com/encode/uvicorn")
4222 (commit version)))
4223 (file-name (git-file-name name version))
4224 (sha256
4225 (base32 "00iidg5ysp7k00bw3kmkvr8mghnh4jdi0p2ryiarhryf8wz2r3fy"))))
4226 (build-system python-build-system)
4227 (arguments
4228 `(#:phases
4229 (modify-phases %standard-phases
4230 (replace 'check
4231 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4232 (add-installed-pythonpath inputs outputs)
4233 (invoke "pytest" "-vv"))))))
4234 (native-inputs
4235 `(("python-black" ,python-black)
4236 ("python-codecov" ,python-codecov)
4237 ("python-flake8" ,python-flake8)
4238 ("python-isort" ,python-isort)
4239 ("python-mypy" ,python-mypy)
4240 ("python-pytest" ,python-pytest)
4241 ("python-pytest-cov" ,python-pytest-cov)
4242 ("python-pytest-mock" ,python-pytest-mock)
4243 ("python-requests" ,python-requests)))
4244 (propagated-inputs
4245 `(("python-click" ,python-click)
4246 ("python-h11" ,python-h11)
4247 ("python-httptools" ,python-httptools)
4248 ("python-pyyaml" ,python-pyyaml)
4249 ("python-uvloop" ,python-uvloop)
4250 ("python-watchgod" ,python-watchgod)
4251 ("python-websockets" ,python-websockets)
4252 ("python-wsproto" ,python-wsproto)))
4253 (home-page "https://github.com/encode/uvicorn")
4254 (synopsis "Fast ASGI server implementation")
4255 (description
4256 "@code{uvicorn} is a fast ASGI server implementation, using @code{uvloop}
4257 and @code{httptools}. It currently supports HTTP/1.1 and WebSockets. Support
4258 for HTTP/2 is planned.")
4259 (license license:bsd-3)))
4260
4261 (define-public python-translation-finder
4262 (package
4263 (name "python-translation-finder")
4264 (version "1.7")
4265 (source
4266 (origin
4267 (method url-fetch)
4268 (uri (pypi-uri "translation-finder" version))
4269 (sha256
4270 (base32
4271 "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
4272 (build-system python-build-system)
4273 (arguments
4274 `(#:phases
4275 (modify-phases %standard-phases
4276 (add-before 'build 'remove-failing-test
4277 (lambda _
4278 (delete-file "translation_finder/test_api.py")
4279 #t)))))
4280 (propagated-inputs
4281 `(("python-chardet" ,python-chardet)
4282 ("python-pathlib2" ,python-pathlib2)
4283 ("python-ruamel.yaml" ,python-ruamel.yaml)
4284 ("python-six" ,python-six)))
4285 (native-inputs
4286 `(("python-codecov" ,python-codecov)
4287 ("python-codacy-coverage" ,python-codacy-coverage)
4288 ("python-pytest-cov" ,python-pytest-cov)
4289 ("python-pytest-runner" ,python-pytest-runner)
4290 ("python-twine" ,python-twine)))
4291 (home-page "https://weblate.org/")
4292 (synopsis "Translation file finder for Weblate")
4293 (description "This package provides a function to find translation file in
4294 the source code of a project. It supports many translation file formats and
4295 is part of the Weblate translation platform.")
4296 (license license:gpl3+)))
4297
4298 (define-public python-gitlab
4299 (package
4300 (name "python-gitlab")
4301 (version "1.15.0")
4302 (source
4303 (origin
4304 (method url-fetch)
4305 (uri (pypi-uri "python-gitlab" version))
4306 (sha256
4307 (base32
4308 "0zl6kz8v8cg1bcy2r78b2snb0lpw0b573gdx2x1ps0nhsh75l4j5"))))
4309 (build-system python-build-system)
4310 (propagated-inputs
4311 `(("python-requests" ,python-requests)
4312 ("python-six" ,python-six)))
4313 (native-inputs
4314 `(("python-httmock" ,python-httmock)
4315 ("python-mock" ,python-mock)))
4316 (home-page
4317 "https://github.com/python-gitlab/python-gitlab")
4318 (synopsis "Interact with GitLab API")
4319 (description "This package provides an extended library for interacting
4320 with GitLab instances through their API.")
4321 (license license:lgpl3+)))
4322
4323 (define-public python-path-and-address
4324 (package
4325 (name "python-path-and-address")
4326 (version "2.0.1")
4327 (source
4328 (origin
4329 ;; The source distributed on PyPI doesn't include tests.
4330 (method git-fetch)
4331 (uri (git-reference
4332 (url "https://github.com/joeyespo/path-and-address")
4333 (commit (string-append "v" version))))
4334 (file-name (git-file-name name version))
4335 (sha256
4336 (base32
4337 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
4338 (build-system python-build-system)
4339 (arguments
4340 `(#:phases
4341 (modify-phases %standard-phases
4342 (replace 'check
4343 (lambda* (#:key inputs outputs #:allow-other-keys)
4344 (add-installed-pythonpath inputs outputs)
4345 (invoke "py.test"))))))
4346 (native-inputs
4347 `(("python-pytest" ,python-pytest)))
4348 (home-page "https://github.com/joeyespo/path-and-address")
4349 (synopsis "Functions for command-line server tools used by humans")
4350 (description "Path-and-address resolves ambiguities of command-line
4351 interfaces, inferring which argument is the path, and which is the address.")
4352 (license license:expat)))
4353
4354 (define-public grip
4355 ;; No release by upstream for quite some time, some bugs fixed since. See:
4356 ;; https://github.com/joeyespo/grip/issues/304
4357 (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
4358 (package
4359 (name "grip")
4360 (version (git-version "4.5.2" "1" commit))
4361 (source
4362 (origin
4363 (method git-fetch)
4364 (uri (git-reference
4365 (url "https://github.com/joeyespo/grip")
4366 (commit commit)))
4367 (file-name (git-file-name name version))
4368 (sha256
4369 (base32
4370 "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
4371 (build-system python-build-system)
4372 (propagated-inputs
4373 `(("python-docopt" ,python-docopt)
4374 ("python-flask" ,python-flask)
4375 ("python-markdown" ,python-markdown)
4376 ("python-path-and-address" ,python-path-and-address)
4377 ("python-pygments" ,python-pygments)
4378 ("python-requests" ,python-requests)))
4379 (native-inputs
4380 `(("python-pytest" ,python-pytest)
4381 ("python-responses" ,python-responses)))
4382 (arguments
4383 `(#:phases
4384 (modify-phases %standard-phases
4385 (replace 'check
4386 (lambda* (#:key inputs outputs #:allow-other-keys)
4387 (add-installed-pythonpath inputs outputs)
4388 (setenv "PATH" (string-append
4389 (getenv "PATH") ":"
4390 (assoc-ref %outputs "out") "/bin"))
4391 (invoke "py.test" "-m" "not assumption"))))))
4392 (home-page "https://github.com/joeyespo/grip")
4393 (synopsis "Preview Markdown files using the GitHub API")
4394 (description "Grip is a command-line server application written in Python
4395 that uses the GitHub Markdown API to render a local Markdown file. The styles
4396 and rendering come directly from GitHub, so you'll know exactly how it will
4397 appear. Changes you make to the file will be instantly reflected in the browser
4398 without requiring a page refresh.")
4399 (license license:expat))))
4400
4401 (define-public python-port-for
4402 (package
4403 (name "python-port-for")
4404 (version "0.4")
4405 (source
4406 (origin
4407 (method url-fetch)
4408 (uri (pypi-uri "port-for" version))
4409 (sha256
4410 (base32
4411 "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
4412 (build-system python-build-system)
4413 (arguments
4414 `(#:phases
4415 (modify-phases %standard-phases
4416 (add-after 'unpack 'use-urllib3
4417 (lambda _
4418 (substitute* "port_for/_download_ranges.py"
4419 (("urllib2") "urllib3"))
4420 #t)))))
4421 (propagated-inputs
4422 `(("python-urllib3" ,python-urllib3)))
4423 (native-inputs
4424 `(("python-mock" ,python-mock)))
4425 (home-page "https://github.com/kmike/port-for/")
4426 (synopsis "TCP localhost port finder and association manager")
4427 (description
4428 "This package provides a utility that helps with local TCP ports
4429 management. It can find an unused TCP localhost port and remember the
4430 association.")
4431 (license license:expat)))
4432
4433 (define-public python-livereload
4434 (package
4435 (name "python-livereload")
4436 (version "2.6.1")
4437 (source
4438 (origin
4439 (method url-fetch)
4440 (uri (pypi-uri "livereload" version))
4441 (sha256
4442 (base32
4443 "0rhggz185bxc3zjnfpmhcvibyzi86i624za1lfh7x7ajsxw4y9c9"))))
4444 (build-system python-build-system)
4445 (propagated-inputs
4446 `(("python-six" ,python-six)
4447 ("python-tornado" ,python-tornado)))
4448 (home-page "https://github.com/lepture/python-livereload")
4449 (synopsis "Python LiveReload")
4450 (description
4451 "Python LiveReload provides a command line utility, @command{livereload},
4452 for starting a web server in a directory. It can trigger arbitrary commands
4453 and serve updated contents upon changes to the directory.")
4454 (license license:bsd-3)))
4455
4456 (define-public python-vf-1
4457 (package
4458 (name "python-vf-1")
4459 (version "0.0.11")
4460 (source
4461 (origin
4462 (method url-fetch)
4463 (uri (pypi-uri "VF-1" version))
4464 (sha256
4465 (base32
4466 "0xlqsaxsiayk1sd07kpz8abbcnab582y29a1y4882fq6j4gma5xi"))))
4467 (build-system python-build-system)
4468 (home-page "https://github.com/solderpunk/VF-1")
4469 (synopsis "Command line gopher client")
4470 (description "@code{VF-1} is a command line gopher client with
4471 @acronym{TLS, Transport Layer Security} support.")
4472 (license license:bsd-2)))
4473
4474 (define-public python-httpcore
4475 (package
4476 (name "python-httpcore")
4477 (version "0.11.0")
4478 (source
4479 (origin
4480 ;; PyPI tarball does not contain tests.
4481 (method git-fetch)
4482 (uri (git-reference
4483 (url "https://github.com/encode/httpcore")
4484 (commit version)))
4485 (file-name (git-file-name name version))
4486 (sha256
4487 (base32 "01bhajcxqgkdzg7b7x0fqs2lwcfsajlgqwi1nlxx58jss7g2kxn9"))))
4488 (build-system python-build-system)
4489 (arguments
4490 `(#:phases
4491 (modify-phases %standard-phases
4492 (add-after 'unpack 'remove-unavailable-tests
4493 (lambda _
4494 ;; These tests require 'mitmproxy' which is not packaged.
4495 (for-each (lambda (f)
4496 (delete-file f))
4497 '("tests/conftest.py"
4498 "tests/sync_tests/test_interfaces.py"
4499 "tests/async_tests/test_interfaces.py"))
4500 #t))
4501 (add-after 'remove-unavailable-tests 'force-h11-version
4502 ;; Allow build with h11 >= 0.10.
4503 (lambda _
4504 (substitute* "setup.py" (("h11>=0.8,<0.10") "h11"))
4505 #t))
4506 (replace 'check
4507 (lambda* (#:key inputs outputs #:allow-other-keys)
4508 (add-installed-pythonpath inputs outputs)
4509 (invoke "pytest" "-vv" "--cov=httpcore"
4510 "--cov=tests" "tests"))))))
4511 (native-inputs
4512 `(;; ("mitmproxy" ,mitmproxy) ;; TODO: Package this.
4513 ("python-autoflake" ,python-autoflake)
4514 ("python-flake8" ,python-flake8)
4515 ("python-flake8-bugbear" ,python-flake8-bugbear)
4516 ("python-flake8-pie" ,python-flake8-pie)
4517 ("python-isort" ,python-isort)
4518 ("python-mypy" ,python-mypy)
4519 ("python-pytest" ,python-pytest)
4520 ("python-pytest-asyncio" ,python-pytest-asyncio)
4521 ("python-pytest-cov" ,python-pytest-cov)
4522 ("python-pytest-trio" ,python-pytest-trio)
4523 ("python-uvicorn" ,python-uvicorn)
4524 ("python-trustme" ,python-trustme)))
4525 (propagated-inputs
4526 `(("python-h11" ,python-h11)
4527 ("python-h2" ,python-h2)
4528 ("python-sniffio" ,python-sniffio)
4529 ("python-trio" ,python-trio)
4530 ("python-trio-typing" ,python-trio-typing)))
4531 (home-page "https://github.com/encode/httpcore")
4532 (synopsis "Minimal, low-level HTTP client")
4533 (description
4534 "HTTP Core provides a minimal and low-level HTTP client, which does one
4535 thing only: send HTTP requests.
4536
4537 Some things HTTP Core does do:
4538
4539 @itemize
4540 @item Sending HTTP requests.
4541 @item Provides both sync and async interfaces.
4542 @item Supports HTTP/1.1 and HTTP/2.
4543 @item Async backend support for asyncio and trio.
4544 @item Automatic connection pooling.
4545 @item HTTP(S) proxy support.
4546 @end itemize")
4547 (license license:bsd-3)))
4548
4549 (define-public python-httpx
4550 (package
4551 (name "python-httpx")
4552 (version "0.15.4")
4553 (source
4554 (origin
4555 ;; PyPI tarball does not contain tests.
4556 (method git-fetch)
4557 (uri (git-reference
4558 (url "https://github.com/encode/httpx")
4559 (commit version)))
4560 (file-name (git-file-name name version))
4561 (sha256
4562 (base32 "1qr91xw6jxynvihmw953bi5446ssm9ffmb2c4nhfa77v7883sp21"))))
4563 (build-system python-build-system)
4564 (arguments
4565 `(#:phases
4566 (modify-phases %standard-phases
4567 (replace 'check
4568 (lambda _
4569 (invoke "pytest" "-vv" "-k"
4570 ;; These tests try to open an outgoing connection.
4571 (string-append
4572 "not test_connect_timeout"
4573 " and not test_that_send_cause_async_client_to_be_not_"
4574 "closed"
4575 " and not test_that_async_client_caused_warning_when_"
4576 "being_deleted"
4577 " and not test_that_send_cause_client_to_be_not_closed"
4578 " and not test_async_proxy_close"
4579 " and not test_sync_proxy_close")))))))
4580 (native-inputs
4581 `(("python-autoflake" ,python-autoflake)
4582 ("python-black" ,python-black)
4583 ("python-cryptography" ,python-cryptography)
4584 ("python-flake8" ,python-flake8)
4585 ("python-flake8-bugbear" ,python-flake8-bugbear)
4586 ("python-flake8-pie" ,python-flake8-pie)
4587 ("python-isort" ,python-isort)
4588 ("python-mypy" ,python-mypy)
4589 ("python-pytest" ,python-pytest)
4590 ("python-pytest-asyncio" ,python-pytest-asyncio)
4591 ("python-pytest-trio" ,python-pytest-trio)
4592 ("python-pytest-cov" ,python-pytest-cov)
4593 ("python-trio" ,python-trio)
4594 ("python-trio-typing" ,python-trio-typing)
4595 ("python-trustme" ,python-trustme)
4596 ("python-uvicorn" ,python-uvicorn)))
4597 (propagated-inputs
4598 `(("python-brotli" ,python-brotli)
4599 ("python-certifi" ,python-certifi)
4600 ("python-chardet" ,python-chardet)
4601 ("python-httpcore" ,python-httpcore)
4602 ("python-idna" ,python-idna)
4603 ("python-rfc3986" ,python-rfc3986)
4604 ("python-sniffio" ,python-sniffio)))
4605 (home-page "https://www.python-httpx.org/")
4606 (synopsis "HTTP client for Python")
4607 (description
4608 "HTTPX is a fully featured HTTP client for Python 3, which provides sync
4609 and async APIs, and support for both HTTP/1.1 and HTTP/2.
4610
4611 HTTPX builds on the well-established usability of requests, and gives you:
4612
4613 @itemize
4614 @item A broadly requests-compatible API.
4615 @item Standard synchronous interface, but with async support if you need it.
4616 @item HTTP/1.1 and HTTP/2 support.
4617 @item Ability to make requests directly to WSGI applications or ASGI applications.
4618 @item Strict timeouts everywhere.
4619 @item Fully type annotated.
4620 @item 99% test coverage.
4621 @end itemize
4622
4623 Plus all the standard features of requests:
4624
4625 @itemize
4626 @item International Domains and URLs
4627 @item Keep-Alive & Connection Pooling
4628 @item Sessions with Cookie Persistence
4629 @item Browser-style SSL Verification
4630 @item Basic/Digest Authentication
4631 @item Elegant Key/Value Cookies
4632 @item Automatic Decompression
4633 @item Automatic Content Decoding
4634 @item Unicode Response Bodies
4635 @item Multipart File Uploads
4636 @item HTTP(S) Proxy Support
4637 @item Connection Timeouts
4638 @item Streaming Downloads
4639 @item .netrc Support
4640 @item Chunked Requests
4641 @end itemize")
4642 (license license:bsd-3)))
4643
4644 (define-public python-websockets
4645 (package
4646 (name "python-websockets")
4647 (version "8.1")
4648 (source
4649 (origin
4650 (method url-fetch)
4651 (uri (pypi-uri "websockets" version))
4652 (sha256
4653 (base32
4654 "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw"))))
4655 (build-system python-build-system)
4656 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
4657 (home-page "https://github.com/aaugustin/websockets")
4658 (synopsis
4659 "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
4660 (description
4661 "@code{websockets} is a library for building WebSocket servers and clients
4662 in Python with a focus on correctness and simplicity.
4663
4664 Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
4665 it provides an elegant coroutine-based API.")
4666 (license license:bsd-3)))
4667
4668 (define-public python-selenium
4669 (package
4670 (name "python-selenium")
4671 (version "3.141.0")
4672 (source
4673 (origin
4674 (method url-fetch)
4675 (uri (pypi-uri "selenium" version))
4676 (sha256
4677 (base32
4678 "039hf9knvl4s3hp21bzwsp1g5ri9gxsh504dp48lc6nr1av35byy"))))
4679 (build-system python-build-system)
4680 (propagated-inputs
4681 `(("python-urllib3" ,python-urllib3)))
4682 (home-page
4683 "https://github.com/SeleniumHQ/selenium/")
4684 (synopsis "Python bindings for Selenium")
4685 (description "Selenium enables web browser automation.
4686 Selenium specifically provides infrastructure for the W3C WebDriver specification
4687 — a platform and language-neutral coding interface compatible with all
4688 major web browsers.")
4689 (license license:asl2.0)))
4690
4691 (define-public python-rapidjson
4692 (package
4693 (name "python-rapidjson")
4694 (version "0.9.1")
4695 (source
4696 (origin
4697 (method url-fetch)
4698 (uri (pypi-uri "python-rapidjson" version))
4699 (sha256
4700 (base32
4701 "18cl2dhx3gds5vg52jxmh9wjlbiy8dx06c3n482rfpdi9dzbv05d"))
4702 (modules '((guix build utils)))
4703 (snippet
4704 '(begin (delete-file-recursively "rapidjson") #t))))
4705 (build-system python-build-system)
4706 (arguments
4707 `(#:configure-flags
4708 (list (string-append "--rj-include-dir="
4709 (assoc-ref %build-inputs "rapidjson")
4710 "/include/rapidjson"))
4711 #:phases
4712 (modify-phases %standard-phases
4713 (replace 'build
4714 (lambda* (#:key inputs #:allow-other-keys)
4715 (invoke "python" "setup.py" "build"
4716 (string-append "--rj-include-dir="
4717 (assoc-ref %build-inputs "rapidjson")
4718 "/include/rapidjson"))))
4719 (replace 'check
4720 (lambda* (#:key inputs outputs #:allow-other-keys)
4721 (add-installed-pythonpath inputs outputs)
4722 ;; Some tests are broken.
4723 (delete-file "tests/test_base_types.py")
4724 (delete-file "tests/test_validator.py")
4725 (invoke "python" "-m" "pytest" "tests"))))))
4726 (native-inputs
4727 `(("rapidjson" ,rapidjson)
4728 ("python-pytest" ,python-pytest)
4729 ("python-pytz" ,python-pytz)))
4730 (home-page "https://github.com/python-rapidjson/python-rapidjson")
4731 (synopsis "Python wrapper around rapidjson")
4732 (description "This package provides a python wrapper around rapidjson.")
4733 (license license:expat)))
4734
4735 (define-public python-venusian
4736 (package
4737 (name "python-venusian")
4738 (version "3.0.0")
4739 (source
4740 (origin
4741 (method url-fetch)
4742 (uri (pypi-uri "venusian" version))
4743 (sha256
4744 (base32 "0f7f67dkgxxcjfhpdd5frb9pszkf04lyzzpn5069q0xi89r2p17n"))))
4745 (build-system python-build-system)
4746 (native-inputs
4747 `(("python-pytest" ,python-pytest)
4748 ("python-runner" ,python-pytest-runner)
4749 ("python-pytest-cov" ,python-pytest-cov)))
4750 (arguments '(#:test-target "pytest"))
4751 (home-page "https://docs.pylonsproject.org/projects/venusian")
4752 (synopsis "Library for deferring decorator actions")
4753 (description
4754 "Venusian is a library which allows framework authors to defer decorator
4755 actions. Instead of taking actions when a function (or class) decorator is
4756 executed at import time, you can defer the action usually taken by the
4757 decorator until a separate scan phase.")
4758 (license license:repoze)))
4759
4760 (define-public python-zope-deprecation
4761 (package
4762 (name "python-zope-deprecation")
4763 (version "4.4.0")
4764 (source (origin
4765 (method url-fetch)
4766 (uri (pypi-uri "zope.deprecation" version))
4767 (sha256
4768 (base32
4769 "1pz2cv7gv9y1r3m0bdv7ks1alagmrn5msm5spwdzkb2by0w36i8d"))))
4770 (build-system python-build-system)
4771 (native-inputs `())
4772 (propagated-inputs `())
4773 (home-page "https://zopedeprecation.readthedocs.io/")
4774 (synopsis "Function for marking deprecations")
4775 (description "The @code{zope.deprecation} module provides a function for
4776 marking modules, classes, functions, methods and properties as deprecated,
4777 displaying warnings when usaged in application code.")
4778 (license license:zpl2.1)))
4779
4780 (define-public python-translationstring
4781 (package
4782 (name "python-translationstring")
4783 (version "1.3")
4784 (source (origin
4785 (method url-fetch)
4786 (uri (pypi-uri "translationstring" version))
4787 (sha256
4788 (base32
4789 "0bdpcnd9pv0131dl08h4zbcwmgc45lyvq3pa224xwan5b3x4rr2f"))))
4790 (build-system python-build-system)
4791 (home-page "http://docs.pylonsproject.org/projects/translationstring")
4792 (synopsis "Internationalization tooling for the Pylons project")
4793 (description "This package provides a library used by various Pylons
4794 project packages for internationalization (i18n) duties related to
4795 translation.")
4796 (license license:repoze)))
4797
4798 (define-public python-plaster
4799 (package
4800 (name "python-plaster")
4801 (version "1.0")
4802 (source (origin
4803 (method url-fetch)
4804 (uri (pypi-uri "plaster" version))
4805 (sha256
4806 (base32
4807 "1hy8k0nv2mxq94y5aysk6hjk9ryb4bsd13g83m60hcyzxz3wflc3"))))
4808 (build-system python-build-system)
4809 (native-inputs
4810 `(("python-pytest" ,python-pytest)))
4811 (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
4812 (synopsis "Configuration loader for multiple config file formats")
4813 (description
4814 "Plaster is a loader interface around multiple config file formats. It
4815 exists to define a common API for applications to use when they wish to load
4816 configuration. The library itself does not aim to handle anything except a
4817 basic API that applications may use to find and load configuration settings.
4818 Any specific constraints should be implemented in a pluggable loader which can
4819 be registered via an entrypoint.")
4820 (license license:repoze)))
4821
4822 (define-public python-plaster-pastedeploy
4823 (package
4824 (name "python-plaster-pastedeploy")
4825 (version "0.7")
4826 (source (origin
4827 (method url-fetch)
4828 (uri (pypi-uri "plaster_pastedeploy" version))
4829 (sha256
4830 (base32
4831 "1zg7gcsvc1kzay1ry5p699rg2qavfsxqwl17mqxzr0gzw6j9679r"))))
4832 (build-system python-build-system)
4833 (native-inputs
4834 `(("python-pytest" ,python-pytest)))
4835 (propagated-inputs
4836 `(("python-plaster" ,python-plaster)
4837 ("python-pastedeploy" ,python-pastedeploy)))
4838 (home-page "https://github.com/Pylons/plaster_pastedeploy")
4839 (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
4840 (description
4841 "This plugin for @code{python-plaster} adds support for PasteDeploy
4842 syntax, it provides a plaster @code{Loader} object that can parse ini files
4843 according to the standard set by PasteDeploy ")
4844 (license license:expat)))
4845
4846 (define-public python-hupper
4847 (package
4848 (name "python-hupper")
4849 (version "1.10.2")
4850 (source (origin
4851 (method url-fetch)
4852 (uri (pypi-uri "hupper" version))
4853 (sha256
4854 (base32
4855 "0am0p6g5cz6xmcaf04xq8q6dzdd9qz0phj6gcmpsckf2mcyza61q"))))
4856 (build-system python-build-system)
4857 (arguments '(#:test-target "pytest"))
4858 (native-inputs
4859 `(("python-pytest" ,python-pytest)
4860 ("python-pytest-runner" ,python-pytest-runner)
4861 ("python-watchdog" ,python-watchdog)
4862 ("python-mock" ,python-mock)
4863 ("python-pytest-cov" ,python-pytest-cov)))
4864 (propagated-inputs
4865 `(("python-pytz" ,python-pytz)))
4866 (home-page "https://readthedocs.org/projects/hupper")
4867 (synopsis "Integrated process monitor tracking changes to imported Python files")
4868 (description
4869 "Hupper is an integrated process monitor that will track changes to any
4870 imported Python files in sys.modules as well as custom paths. When files are
4871 changed the process is restarted.")
4872 (license license:expat)))
4873
4874 (define-public python-pyramid
4875 (package
4876 (name "python-pyramid")
4877 (version "1.10.4")
4878 (source (origin
4879 (method url-fetch)
4880 (uri (pypi-uri "pyramid" version))
4881 (sha256
4882 (base32
4883 "0rkxs1ajycg2zh1c94xlmls56mx5m161sn8112skj0amza6cn36q"))))
4884 (build-system python-build-system)
4885 (propagated-inputs
4886 `(("python-hupper" ,python-hupper)
4887 ("python-plaster-pastedeploy" ,python-plaster-pastedeploy)
4888 ("python-translationstring" ,python-translationstring)
4889 ("python-venusian" ,python-venusian)
4890 ("python-webob" ,python-webob)
4891 ("python-zope-deprecation" ,python-zope-deprecation)
4892 ("python-zope-interface" ,python-zope-interface)
4893 ("python-webtest" ,python-webtest)
4894 ("python-zope-component" ,python-zope-component)
4895 ("python-plaster" ,python-plaster)))
4896 (home-page "https://trypyramid.com/")
4897 (synopsis "Python web-framework suitable for small and large sites")
4898 (description
4899 "Pyramid makes it easy to write web applications. From minimal
4900 request/response web apps to larger, grown applications.")
4901 (license license:repoze)))
4902
4903 (define-public python-random-user-agent
4904 (package
4905 (name "python-random-user-agent")
4906 (version "1.0.1")
4907 (source
4908 (origin
4909 (method url-fetch)
4910 (uri (pypi-uri "random_user_agent" version))
4911 (sha256
4912 (base32
4913 "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
4914 (build-system python-build-system)
4915 (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
4916 (synopsis "List of user agents")
4917 (description
4918 "This package provides a list of user agents, from a collection of more
4919 than 326,000 known user-agents. Users can pick a random one, or select one
4920 based on filters.")
4921 (license license:expat)))
4922
4923 (define-public python-flask-restx
4924 (package
4925 (name "python-flask-restx")
4926 (version "0.2.0")
4927 (source
4928 ;; We fetch from the Git repo because there are no tests in the PyPI
4929 ;; archive.
4930 (origin
4931 (method git-fetch)
4932 (uri (git-reference
4933 (url "https://github.com/python-restx/flask-restx")
4934 (commit version)))
4935 (file-name (git-file-name name version))
4936 (sha256
4937 (base32 "0xf2vkmdngp9cv9klznizai4byxjcf0iqh1pr4b83nann0jxqwy7"))))
4938 (build-system python-build-system)
4939 (propagated-inputs
4940 `(("python-aniso8601" ,python-aniso8601)
4941 ("python-flask" ,python-flask)
4942 ("python-jsonschema" ,python-jsonschema)
4943 ("python-pytz" ,python-pytz)))
4944 (native-inputs
4945 `(("python-blinker" ,python-blinker)
4946 ("python-faker" ,python-faker)
4947 ("python-pytest" ,python-pytest)
4948 ("python-pytest-benchmark"
4949 ,python-pytest-benchmark)
4950 ("python-pytest-flask" ,python-pytest-flask)
4951 ("python-pytest-mock" ,python-pytest-mock)))
4952 (arguments
4953 `(#:phases
4954 (modify-phases %standard-phases
4955 (replace 'check
4956 (lambda _
4957 (invoke "pytest" "--benchmark-skip" "-k"
4958 ;; Those tests need internet access
4959 "not test_check and not test_valid_value_check"))))))
4960 (home-page "https://github.com/python-restx/flask-restx")
4961 (synopsis
4962 "Framework for fast, easy and documented API development with Flask")
4963 (description
4964 "Flask-RESTX is an extension for Flask that adds support for quickly building
4965 REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
4966 with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
4967 decorators and tools to describe your API and expose its documentation properly using
4968 Swagger.")
4969 (license license:bsd-3)))
4970
4971 (define-public python-manuel
4972 (package
4973 (name "python-manuel")
4974 (version "1.10.1")
4975 (source
4976 (origin
4977 (method url-fetch)
4978 (uri (pypi-uri "manuel" version))
4979 (sha256
4980 (base32
4981 "1bdzay7j70fly5fy6wbdi8fbrxjrrlxnxnw226rwry1c8a351rpy"))))
4982 (build-system python-build-system)
4983 (propagated-inputs
4984 `(("python-six" ,python-six)))
4985 (native-inputs
4986 `(("python-zope-testing" ,python-zope-testing)))
4987 (home-page "https://pypi.org/project/manuel/")
4988 (synopsis "Build tested documentation")
4989 (description
4990 "Manuel lets you mix and match traditional doctests with custom test syntax.")
4991 (license license:asl2.0)))
4992
4993 (define-public python-persistent
4994 (package
4995 (name "python-persistent")
4996 (version "4.6.4")
4997 (source
4998 (origin
4999 (method url-fetch)
5000 (uri (pypi-uri "persistent" version))
5001 (sha256
5002 (base32
5003 "0imm9ji03lhkpcfmhid7x5209ix8g2rlgki9ik1qxks4b8sm8gzq"))))
5004 (build-system python-build-system)
5005 (propagated-inputs
5006 `(("python-cffi" ,python-cffi)
5007 ("python-zope-interface" ,python-zope-interface)))
5008 (native-inputs
5009 `(("python-manuel" ,python-manuel)
5010 ("python-zope-testrunner" ,python-zope-testrunner)))
5011 (home-page "https://github.com/zopefoundation/persistent/")
5012 (synopsis "Translucent persistent objects")
5013 (description "This package contains a generic persistence implementation for
5014 Python. It forms the core protocol for making objects interact
5015 \"transparently\" with a database such as the ZODB.")
5016 (license license:zpl2.1)))
5017
5018 (define-public python-btrees
5019 (package
5020 (name "python-btrees")
5021 (version "4.7.2")
5022 (source
5023 (origin
5024 (method url-fetch)
5025 (uri (pypi-uri "BTrees" version))
5026 (sha256
5027 (base32
5028 "0iiq0g9k1g6qgqq84q9h6639vlvzznk1rgdm0rfcnnqkbkmsbr3w"))))
5029 (build-system python-build-system)
5030 (propagated-inputs
5031 `(("python-persistent" ,python-persistent)
5032 ("python-zope-interface" ,python-zope-interface)))
5033 (native-inputs
5034 `(("python-persistent" ,python-persistent)
5035 ("python-transaction" ,python-transaction)
5036 ("python-zope-testrunner" ,python-zope-testrunner)))
5037 (home-page "https://github.com/zopefoundation/BTrees")
5038 (synopsis "Scalable persistent object containers")
5039 (description
5040 "This package contains a set of persistent object containers built around a
5041 modified BTree data structure. The trees are optimized for use inside ZODB's
5042 \"optimistic concurrency\" paradigm, and include explicit resolution of
5043 conflicts detected by that mechanism.")
5044 (license license:zpl2.1)))
5045
5046 (define-public python-transaction
5047 (package
5048 (name "python-transaction")
5049 (version "3.0.0")
5050 (source
5051 (origin
5052 (method url-fetch)
5053 (uri (pypi-uri "transaction" version))
5054 (sha256
5055 (base32
5056 "0bdaks31bgfh78wnj3sij24bfysmqk25crsis6amz8kzrc0d82iv"))))
5057 (build-system python-build-system)
5058 (propagated-inputs
5059 `(("python-zope-interface" ,python-zope-interface)))
5060 (native-inputs
5061 `(("python-coverage" ,python-coverage)
5062 ("python-mock" ,python-mock)
5063 ("python-nose" ,python-nose)))
5064 (home-page "https://github.com/zopefoundation/transaction")
5065 (synopsis "Transaction management for Python")
5066 (description "This package contains a generic transaction implementation
5067 for Python. It is mainly used by the ZODB.")
5068 (license license:zpl2.1)))
5069
5070 (define-public python-robot-detection
5071 (package
5072 (name "python-robot-detection")
5073 (version "0.4")
5074 (source
5075 (origin
5076 (method url-fetch)
5077 (uri (pypi-uri "robot-detection" version))
5078 (sha256
5079 (base32
5080 "1xd2jm3yn31bnk1kqzggils2rxj26ylxsfz3ap7bhr3ilhnbg3rx"))))
5081 (build-system python-build-system)
5082 (arguments '(#:tests? #f)) ; Tests not shipped in pypi release.
5083 (propagated-inputs `(("python-six" ,python-six)))
5084 (home-page "https://github.com/rory/robot-detection")
5085 (synopsis "Detect web crawlers")
5086 (description
5087 "@code{robot_detection} is a python module to detect if a given HTTP User
5088 Agent is a web crawler. It uses the list of registered robots from
5089 @url{http://www.robotstxt.org}.")
5090 (license license:gpl3+)))
5091
5092 (define-public python-pysolr
5093 (package
5094 (name "python-pysolr")
5095 (version "3.9.0")
5096 (source
5097 (origin
5098 (method url-fetch)
5099 (uri (pypi-uri "pysolr" version))
5100 (sha256
5101 (base32
5102 "1rj5jmscvxjwcmlfi6hmkj44l4x6n3ln5p7d8d18j566hzmmzw3f"))))
5103 (build-system python-build-system)
5104 (arguments
5105 '(#:tests? #f)) ; Tests require network access.
5106 (propagated-inputs
5107 `(("python-requests" ,python-requests)))
5108 (native-inputs
5109 `(("python-setuptools-scm" ,python-setuptools-scm)))
5110 (home-page "https://github.com/django-haystack/pysolr/")
5111 (synopsis "Lightweight python wrapper for Apache Solr")
5112 (description
5113 "This module provides an interface that queries the Apache Solr server
5114 using a pure Python implementation.")
5115 (license license:bsd-3)))
5116
5117 (define-public python-http-ece
5118 (package
5119 (name "python-http-ece")
5120 (version "1.1.0")
5121 (source
5122 (origin
5123 (method git-fetch)
5124 (uri (git-reference
5125 (url "https://github.com/web-push-libs/encrypted-content-encoding")
5126 (commit (string-append "v" version))))
5127 (file-name (git-file-name name version))
5128 (sha256
5129 (base32
5130 "0bp4cc0xc123i72h80ax3qz3ixfwx3j7pw343kc7i6kdvfi8klx7"))))
5131 (build-system python-build-system)
5132 (arguments
5133 `(#:phases
5134 (modify-phases %standard-phases
5135 (add-after 'unpack 'change-directory
5136 (lambda _ (chdir "python") #t)))))
5137 (propagated-inputs
5138 `(("python-cryptography" ,python-cryptography)))
5139 (native-inputs
5140 `(("python-coverage" ,python-coverage)
5141 ("python-flake8" ,python-flake8)
5142 ("python-mock" ,python-mock)
5143 ("python-nose" ,python-nose)))
5144 (home-page "https://github.com/web-push-libs/encrypted-content-encoding")
5145 (synopsis "Encrypted Content Encoding for HTTP")
5146 (description
5147 "This package provices a simple implementation of Encrypted Content
5148 Encoding for HTTP.")
5149 (license license:expat)))
5150
5151 (define-public python-cloudscraper
5152 (package
5153 (name "python-cloudscraper")
5154 (version "1.2.48")
5155 (source
5156 (origin
5157 (method url-fetch)
5158 (uri (pypi-uri "cloudscraper" version))
5159 (sha256
5160 (base32 "0qjxzb0z5bprvmdhx42ayqhlhi2h49d9dwc0vvycj817s71f2sxv"))
5161 (modules '((guix build utils)))
5162 (snippet
5163 '(with-directory-excursion "cloudscraper"
5164 (for-each delete-file
5165 '("captcha/2captcha.py"
5166 "captcha/9kw.py"
5167 "captcha/anticaptcha.py"
5168 "captcha/deathbycaptcha.py"
5169 "interpreters/js2py.py"
5170 "interpreters/v8.py"))
5171 (substitute* "__init__.py"
5172 ;; Perhaps it's a joke, but don't promote proprietary software.
5173 (("([Th]is feature is not available) in the .*'" _ prefix)
5174 (string-append prefix ".'")))
5175 #t))))
5176 (build-system python-build-system)
5177 (propagated-inputs
5178 `(("python-requests" ,python-requests)
5179 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
5180 ("python-pyparsing" ,python-pyparsing-2.4.7)))
5181 (native-inputs
5182 `(("python-pytest" ,python-pytest)))
5183 (home-page "https://github.com/venomous/cloudscraper")
5184 (synopsis "Cloudflare anti-bot bypass")
5185 (description
5186 "This module acts as a webbrowser solving Cloudflare's Javascript
5187 challenges.")
5188 (license license:expat)))
5189
5190 (define-public python-imap-tools
5191 (package
5192 (name "python-imap-tools")
5193 (version "0.29.0")
5194 (source
5195 (origin
5196 (method url-fetch)
5197 (uri (pypi-uri "imap_tools" version))
5198 (sha256
5199 (base32
5200 "0x122jwpc74wwyw2rsv2fvh6p12y31019ndfr9717jzjkj2d3lhb"))))
5201 (build-system python-build-system)
5202 (arguments '(#:tests? #f)) ; tests require internet access
5203 (home-page "https://github.com/ikvk/imap_tools")
5204 (synopsis "Work with email and mailbox by IMAP")
5205 (description
5206 "This Python library provides tools to deal with email and mailboxes
5207 over IMAP:
5208
5209 @itemize
5210 @item Parsed email message attributes
5211 @item Query builder for searching emails
5212 @item Work with emails in folders (copy, delete, flag, move, seen)
5213 @item Work with mailbox folders (list, set, get, create, exists, rename, delete, status)
5214 @end itemize")
5215 (license license:asl2.0)))