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