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