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