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