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