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