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