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