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