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