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