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