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