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