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