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