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