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