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