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