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