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