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