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