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