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