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