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, 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>
43 ;;; This file is part of GNU Guix.
45 ;;; GNU Guix is free software; you can redistribute it and/or modify it
46 ;;; under the terms of the GNU General Public License as published by
47 ;;; the Free Software Foundation; either version 3 of the License, or (at
48 ;;; your option) any later version.
50 ;;; GNU Guix is distributed in the hope that it will be useful, but
51 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
52 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53 ;;; GNU General Public License for more details.
55 ;;; You should have received a copy of the GNU General Public License
56 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
58 (define-module (gnu packages python-web)
59 #:use-module (guix packages)
60 #:use-module (guix download)
61 #:use-module (guix git-download)
62 #:use-module (guix build-system python)
63 #:use-module (guix utils)
64 #:use-module (gnu packages)
65 #:use-module (gnu packages base)
66 #:use-module (gnu packages check)
67 #:use-module (gnu packages compression)
68 #:use-module (gnu packages curl)
69 #:use-module (gnu packages databases)
70 #:use-module (gnu packages django)
71 #:use-module (gnu packages groff)
72 #:use-module (gnu packages libevent)
73 #:use-module (gnu packages libffi)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages python)
76 #:use-module (gnu packages python-check)
77 #:use-module (gnu packages python-compression)
78 #:use-module (gnu packages python-crypto)
79 #:use-module (gnu packages python-xyz)
80 #:use-module (gnu packages serialization)
81 #:use-module (gnu packages sphinx)
82 #:use-module (gnu packages texinfo)
83 #:use-module (gnu packages tls)
84 #:use-module (gnu packages time)
85 #:use-module (gnu packages web)
86 #:use-module (gnu packages xml)
87 #:use-module ((guix licenses) #:prefix license:)
88 #:use-module (srfi srfi-1))
90 (define-public python-aiohttp
92 (name "python-aiohttp")
97 (uri (pypi-uri "aiohttp" version))
99 (base32 "0i9n7h8n06m2d8ryqyk4fv1si1m44ibq7blbfaxq46vx7jydg339"))
100 (patches (search-patches "python-aiohttp-3.6.2-no-warning-fail.patch"))))
101 (build-system python-build-system)
104 (modify-phases %standard-phases
105 (add-after 'unpack 'fix-tests
107 ;; disable brotli tests, because we’re not providing that optional library
108 (substitute* "tests/test_http_parser.py"
109 ((" async def test_feed_eof_no_err_brotli")
110 " @pytest.mark.xfail\n async def test_feed_eof_no_err_brotli"))
111 ;; make sure the timestamp of this file is > 1990, because a few
112 ;; tests like test_static_file_if_modified_since_past_date depend on it
113 (invoke "touch" "-d" "2020-01-01" "tests/data.unknown_mime_type")
115 ;; FIXME: These tests are failing due to deprecation warnings
116 ;; in Python 3.8. Remove this when updating to aiohttp >= 3.7.
117 ;; https://github.com/aio-libs/aiohttp/issues/4477
118 ;; https://github.com/aio-libs/aiohttp/issues/4525
119 (with-directory-excursion "tests"
120 (for-each delete-file '("test_client_session.py"
122 "test_web_middleware.py"
123 "test_web_protocol.py"
124 "test_web_urldispatcher.py")))
127 `(("python-aiodns" ,python-aiodns)
128 ("python-async-timeout" ,python-async-timeout)
129 ("python-attrs" ,python-attrs)
130 ("python-chardet" ,python-chardet)
131 ("python-idna-ssl" ,python-idna-ssl)
132 ("python-multidict" ,python-multidict)
133 ("python-yarl" ,python-yarl)))
135 `(("python-pytest-runner" ,python-pytest-runner)
136 ("python-pytest-xdit" ,python-pytest-xdist)
137 ("python-pytest-timeout" ,python-pytest-timeout)
138 ("python-pytest-forked" ,python-pytest-forked)
139 ("python-pytest-mock" ,python-pytest-mock)
140 ("gunicorn" ,gunicorn-bootstrap)
141 ("python-freezegun" ,python-freezegun)
142 ("python-async-generator" ,python-async-generator)))
143 (home-page "https://github.com/aio-libs/aiohttp/")
144 (synopsis "Async HTTP client/server framework (asyncio)")
145 (description "@code{aiohttp} is an asynchronous HTTP client/server
148 Its main features are:
150 @item Supports both client and server side of HTTP protocol.
151 @item Supports both client and server Web-Sockets out-of-the-box without the
153 @item Web-server has middlewares and pluggable routing.
155 (license license:asl2.0)))
157 (define-public python-aiohttp-socks
159 (name "python-aiohttp-socks")
164 (uri (pypi-uri "aiohttp_socks" version))
167 "0473702jk66xrgpm28wbdgpnak4v0dh2qmdjw7ky7hf3lwwqkggf"))))
168 (build-system python-build-system)
170 `(("python-aiohttp" ,python-aiohttp)))
171 (home-page "https://github.com/romis2012/aiohttp-socks")
172 (synopsis "SOCKS proxy connector for aiohttp")
173 (description "This package provides a SOCKS proxy connector for
174 aiohttp. It supports SOCKS4(a) and SOCKS5.")
175 (license license:asl2.0)))
177 (define-public python-aiodns
179 (name "python-aiodns")
184 (uri (pypi-uri "aiodns" version))
187 "1snr5paql8dgvc676n8xq460wypjsb1xj53cf3px1s4wczf7lryq"))))
188 (build-system python-build-system)
190 `(("python-pycares" ,python-pycares)))
192 `(#:tests? #f)) ;tests require internet access
193 (home-page "https://github.com/saghul/aiodns")
194 (synopsis "Simple DNS resolver for asyncio")
195 (description "@code{aiodns} provides a simple way for doing
196 asynchronous DNS resolutions with a synchronous looking interface by
197 using @url{https://github.com/saghul/pycares,pycares}.")
198 (license license:expat)))
200 (define-public python-aiorpcx
202 (name "python-aiorpcx")
207 (uri (pypi-uri "aiorpcX" version))
210 "0k545hc7wl6sh1svydzbv6x7sx5pig2pqkl3yxs9riwmvzawx9xp"))))
211 (build-system python-build-system)
213 `(("python-attrs" ,python-attrs)))
214 (home-page "https://github.com/kyuupichan/aiorpcX")
215 (synopsis "Generic asyncio RPC implementation")
217 "The aiorpcX library is a generic asyncio implementation of RPC suitable
218 for an application that is a client, server or both.
220 The package includes a module with full coverage of JSON RPC versions 1.0 and
221 2.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
222 comes with a SOCKS proxy client.")
223 (license (list license:expat license:bsd-2))))
225 (define-public python-asgiref
227 (name "python-asgiref")
231 (uri (pypi-uri "asgiref" version))
234 "06kg3hnnvh7qg0w9amkvk1hd6n6bs055r04b7if6ipa7w4g92lby"))))
235 (build-system python-build-system)
237 '(#:phases (modify-phases %standard-phases
241 (string-append "./build/lib:"
242 (getenv "PYTHONPATH")))
243 (invoke "pytest" "-vv"))))))
245 `(("python-pytest" ,python-pytest)
246 ("python-pytest-asyncio" ,python-pytest-asyncio)))
247 (home-page "https://github.com/django/asgiref/")
248 (synopsis "ASGI specs, helper code, and adapters")
250 "ASGI is a standard for Python asynchronous web apps and servers to
251 communicate with each other, and positioned as an asynchronous successor to
252 WSGI. This package includes libraries for implementing ASGI servers.")
253 (license license:bsd-3)))
255 (define-public python-css-html-js-minify
257 (name "python-css-html-js-minify")
261 (uri (pypi-uri "css-html-js-minify" version ".zip"))
264 "0v3l2dqdk2y4r6ax259gs4ij1zzm9yxg6491s6254vs9w3vi37sa"))))
265 (build-system python-build-system)
266 ;; XXX: The git repository has no tags, and the PyPI releases do not
268 (arguments '(#:tests? #f))
269 (native-inputs `(("unzip" ,unzip)))
270 (home-page "https://github.com/juancarlospaco/css-html-js-minify")
271 (synopsis "CSS/HTML/JS minifier")
273 "This package provides a single-file minifier for CSS, HTML, and JavaScript.")
274 ;; XXX: The README just says "GNU GPL and GNU LGPL and MIT". From
275 ;; <https://github.com/juancarlospaco/css-html-js-minify/issues/9> it
276 ;; looks like the user can choose a license.
277 (license (list license:gpl3+ license:lgpl3+ license:expat))))
279 (define-public python-falcon
281 (name "python-falcon")
286 (uri (pypi-uri "falcon" version))
289 "1z6mqfv574x6jiawf67ib52g4kk20c2x7xk7wrn1573b8v7r79gf"))
290 (modules '((guix build utils)))
293 (delete-file-recursively "falcon/vendor")
294 (substitute* "setup.py"
295 ((".*falcon\\.vendor\\.mimeparse.*") ""))
296 (substitute* '("falcon/media/handlers.py"
298 (("from falcon\\.vendor ") ""))
299 (substitute* "falcon.egg-info/SOURCES.txt"
300 (("falcon/vendor.*") ""))
302 (build-system python-build-system)
305 (modify-phases %standard-phases
307 (lambda* (#:key inputs outputs #:allow-other-keys)
308 ;; Skip orjson, which requires rust to build.
309 (substitute* "tests/test_media_handlers.py"
310 (("== 'CPython") "!= 'CPython"))
311 (add-installed-pythonpath inputs outputs)
312 (invoke "pytest" "--ignore" "falcon"))))))
314 `(("python-mimeparse" ,python-mimeparse)))
316 `(("python-cython" ,python-cython) ;for faster binaries
317 ("python-mujson" ,python-mujson)
318 ("python-msgpack" ,python-msgpack)
319 ("python-pytest" ,python-pytest)
320 ("python-pytest-runner" ,python-pytest-runner)
321 ("python-pyyaml" ,python-pyyaml)
322 ("python-rapidjson" ,python-rapidjson)
323 ("python-requests" ,python-requests)
324 ("python-testtools" ,python-testtools)
325 ("python-ujson" ,python-ujson)))
326 (home-page "https://falconframework.org")
328 "Web framework for building APIs and application backends")
330 "Falcon is a web API framework for building microservices, application
331 backends and higher-level frameworks. Among its features are:
333 @item Optimized and extensible code base
334 @item Routing via URI templates and REST-inspired resource
336 @item Access to headers and bodies through request and response
338 @item Request processing via middleware components and hooks
339 @item Idiomatic HTTP error responses
340 @item Straightforward exception handling
341 @item Unit testing support through WSGI helpers and mocks
342 @item Compatible with both CPython and PyPy
343 @item Cython support for better performance when used with CPython
345 (properties `((python2-variant . ,(delay python2-falcon))))
346 (license license:asl2.0)))
348 (define-public python2-falcon
349 (let ((falcon (package-with-python2 (strip-python2-variant python-falcon))))
353 (alist-delete "python-rapidjson" (package-native-inputs falcon))))))
355 (define-public python-falcon-cors
357 (name "python-falcon-cors")
362 (uri (pypi-uri "falcon-cors" version))
365 "12pym7hwsbd8b0c1azn95nas8gm3f1qpr6lpyx0958xm65ffr20p"))))
366 (build-system python-build-system)
368 `(("python-falcon" ,python-falcon)))
370 "https://github.com/lwcolton/falcon-cors")
371 (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
372 (description "This middleware provides @dfn{cross-origin resource
373 sharing} (CORS) support for Falcon. It allows applying a specially crafted
374 CORS object to the incoming requests, enabling the ability to serve resources
375 over a different origin than that of the web application.")
376 (license license:asl2.0)))
378 (define-public python2-falcon-cors
379 (package-with-python2 python-falcon-cors))
381 (define-public python-furl
388 (uri (pypi-uri "furl" version))
391 "1v2lakx03d5w8954a39ki44xv5mllnq0a0avhxykv9hrzg0yvjpx"))))
392 (build-system python-build-system)
394 `(("python-six" ,python-six)
395 ("python-orderedmultidict" ,python-orderedmultidict)))
397 `(("python-flake8" ,python-flake8)))
398 (home-page "https://github.com/gruns/furl")
399 (synopsis "URL manipulation in Python")
400 (description "Furl provides an easy-to-use alternative to the
401 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
402 (license license:unlicense)))
404 (define-public python2-furl
405 (package-with-python2 python-furl))
407 (define-public python-httplib2
409 (name "python-httplib2")
414 (uri (pypi-uri "httplib2" version))
417 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
418 (build-system python-build-system)
419 (home-page "https://github.com/jcgregorio/httplib2")
420 (synopsis "Comprehensive HTTP client library")
422 "A comprehensive HTTP client library supporting many features left out of
423 other HTTP libraries.")
424 (license license:expat)))
426 (define-public python2-httplib2
427 (package-with-python2 python-httplib2))
429 (define-public httpie
436 (uri (pypi-uri "httpie" version))
439 "15ngl3yc186gkgqdx8iav9bpj8gxjpzz26y32z92jwyhj4cmfh6m"))))
440 (build-system python-build-system)
442 ;; The tests attempt to access external web servers, so we cannot run them.
445 `(("python-colorama" ,python-colorama)
446 ("python-pygments" ,python-pygments)
447 ("python-requests" ,python-requests)
448 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)))
449 (home-page "https://httpie.io")
450 (synopsis "cURL-like tool for humans")
452 "A command line HTTP client with an intuitive UI, JSON support,
453 syntax highlighting, wget-like downloads, plugins, and more. It consists of
454 a single http command designed for painless debugging and interaction with
455 HTTP servers, RESTful APIs, and web services.")
456 ;; This was fixed in 1.0.3.
457 (properties `((lint-hidden-cve . ("CVE-2019-10751"))))
458 (license license:bsd-3)))
460 (define-public python-html2text
462 (name "python-html2text")
463 (version "2019.8.11")
467 (uri (pypi-uri "html2text" version))
470 "0ppgjplg06kmv9sj0x8p7acczcq2mcfgk1jdjwm4w5w40b0vj5pm"))))
471 (build-system python-build-system)
474 (modify-phases %standard-phases
477 (invoke "pytest" "test/"))))))
479 `(("python-pytest" ,python-pytest)))
480 (home-page "https://github.com/Alir3z4/html2text")
481 (synopsis "Convert HTML into plain text")
482 (description "html2text takes HTML and converts it into plain ASCII text
483 which is also valid markdown. html2text was originally written by Aaron
485 (license license:gpl3+)))
487 (define-public python2-html2text
488 (package-with-python2 python-html2text))
490 (define-public python-mechanicalsoup
492 (name "python-mechanicalsoup")
497 (uri (pypi-uri "MechanicalSoup" version))
499 (base32 "0k59wwk75q7nz6i6gynvzhagy02ql0bv7py3qqcwgjw7607yq4i7"))))
500 (build-system python-build-system)
502 ;; TODO: Enable tests when python-flake8@3.5 hits master.
505 `(("python-beautifulsoup4" ,python-beautifulsoup4)
506 ("python-lxml" ,python-lxml)
507 ("python-requests" ,python-requests)
508 ("python-six" ,python-six)))
511 ;; `(("python-pytest-flake8" ,python-pytest-flake8)
512 ;; ("python-pytest-httpbin" ,python-pytest-httpbin)
513 ;; ("python-pytest-mock" ,python-pytest-mock)
514 ;; ("python-pytest-runner" ,python-pytest-runner)
515 ;; ("python-requests-mock" ,python-requests-mock)))
516 (home-page "https://mechanicalsoup.readthedocs.io/")
517 (synopsis "Python library for automating website interaction")
519 "MechanicalSoup is a Python library for automating interaction with
520 websites. It automatically stores and sends cookies, follows redirects, and can
521 follow links and submit forms. It doesn’t do JavaScript.")
522 (license license:expat)))
524 (define-public python2-mechanicalsoup
525 (package-with-python2 python-mechanicalsoup))
527 (define-public python-hyperframe
529 (name "python-hyperframe")
534 (uri (pypi-uri "hyperframe" version))
536 (base32 "07xlf44l1cw0ghxx46sbmkgzil8vqv8kxwy42ywikiy35izw3xd9"))))
537 (build-system python-build-system)
540 (modify-phases %standard-phases
542 (lambda* (#:key inputs outputs #:allow-other-keys)
543 (add-installed-pythonpath inputs outputs)
544 (invoke "pytest" "-vv" "test"))))))
546 `(("python-pytest" ,python-pytest)))
547 (home-page "https://github.com/python-hyper/hyperframe")
548 (synopsis "HTTP/2 framing layer for Python")
550 "This library contains the HTTP/2 framing code used in the hyper project.
551 It provides a pure-Python codebase that is capable of decoding a binary stream
552 into HTTP/2 frames.")
553 (license license:expat)))
555 (define-public python-hpack
557 (name "python-hpack")
561 ;; PyPI tarball is missing some files necessary for the tests.
564 (url "https://github.com/python-hyper/hpack")
565 (commit (string-append "v" version))))
566 (file-name (git-file-name name version))
568 (base32 "0w8hkz50a6lzkmgi41ryicm0mh9ca9cx29pm3s0xlpn0vs29xrmd"))))
569 (build-system python-build-system)
572 (modify-phases %standard-phases
574 (lambda* (#:key inputs outputs #:allow-other-keys)
575 (add-installed-pythonpath inputs outputs)
576 (invoke "pytest" "-vv" "test" "-k"
577 ;; This test will be fixed in the next version. See:
578 ;; https://github.com/python-hyper/hpack/issues/168.
579 "not test_get_by_index_out_of_range"))))))
581 `(("python-pytest" ,python-pytest)))
582 (home-page "https://hyper.rtfd.org")
583 (synopsis "Pure-Python HPACK header compression")
585 "This module contains a pure-Python HTTP/2 header encoding (HPACK) logic
586 for use in Python programs that implement HTTP/2.")
587 (license license:expat)))
589 (define-public python-h11
596 (uri (pypi-uri "h11" version))
598 (base32 "1qfad70h59hya21vrzz8dqyyaiqhac0anl2dx3s3k80gpskvrm1k"))))
599 (build-system python-build-system)
602 (modify-phases %standard-phases
605 (invoke "pytest" "-vv"))))))
607 `(("python-pytest" ,python-pytest)))
608 (home-page "https://github.com/python-hyper/h11")
609 (synopsis "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1")
611 "This is a little HTTP/1.1 library written from scratch in Python, heavily
612 inspired by hyper-h2. It's a bring-your-own-I/O library; h11 contains no IO
613 code whatsoever. This means you can hook h11 up to your favorite network API,
614 and that could be anything you want.")
615 (license license:expat)))
617 (define-public python-h2
624 (uri (pypi-uri "h2" version))
626 (base32 "051gg30aca26rdxsmr9svwqm06pdz9bv21ch4n0lgi7jsvml2pw7"))))
627 (build-system python-build-system)
630 (modify-phases %standard-phases
632 (lambda* (#:key inputs outputs #:allow-other-keys)
633 (add-installed-pythonpath inputs outputs)
634 (invoke "pytest" "-vv" "test"))))))
636 `(("python-pytest" ,python-pytest)))
638 `(("python-hpack" ,python-hpack)
639 ("python-hyperframe" ,python-hyperframe)))
640 (home-page "https://github.com/python-hyper/hyper-h2")
641 (synopsis "HTTP/2 State-Machine based protocol implementation")
643 "This module contains a pure-Python implementation of a HTTP/2 protocol
644 stack. It does not provide a parsing layer, a network layer, or any rules
645 about concurrency. Instead, it's a purely in-memory solution, defined in
646 terms of data actions and HTTP/2 frames. This is one building block of a full
647 Python HTTP implementation.")
648 (license license:expat)))
650 (define-public python-sockjs-tornado
652 (name "python-sockjs-tornado")
657 (uri (pypi-uri "sockjs-tornado" version))
660 "15dgv6hw6c7h3m310alw1h6p5443lrm9pyqhcv2smc13fz1v04pc"))))
661 (build-system python-build-system)
663 `(;; There are no tests, and running the test phase requires missing
667 `(("python-tornado" ,python-tornado)))
668 (home-page "https://github.com/mrjoes/sockjs-tornado/")
670 "SockJS Python server implementation on top of the Tornado framework")
672 "SockJS-tornado provides the server-side counterpart to a SockJS client
673 library, through the Tornado framework.
675 SockJS provides a low-latency, full-duplex, cross-domain communication channel
676 between a web browser and web server.")
677 (license license:expat)))
679 (define-public python2-sockjs-tornado
680 (package-with-python2 python-sockjs-tornado))
682 (define-public python-flask-babel
684 (name "python-flask-babel")
689 (uri (pypi-uri "Flask-Babel" version))
692 "0gmb165vkwv5v7dxsxa2i3zhafns0fh938m2zdcrv4d8z5l099yn"))))
693 (build-system python-build-system)
695 '(#:phases (modify-phases %standard-phases
698 (with-directory-excursion "tests"
699 (invoke "python" "tests.py")))))))
701 `(("python-flask" ,python-flask)
702 ("python-babel" ,python-babel)
703 ("python-jinja2" ,python-jinja2)
704 ("python-pytz" ,python-pytz)))
705 (home-page "https://github.com/python-babel/flask-babel")
706 (synopsis "Add i18n/l10n support to Flask applications")
707 (description "This package implements internationalization and localization
708 support for Flask. This is based on the Python babel module as well as pytz -
709 both of which are installed automatically if you install this library.")
710 (license license:bsd-3)))
712 (define-public python2-flask-babel
713 (package-with-python2 python-flask-babel))
715 (define-public python-html5lib
717 (name "python-html5lib")
722 (uri (pypi-uri "html5lib" version))
725 "0dipzfrycv6j1jw82v9b7d8lzggx3x8xngx6l4xrqkxwvg7hvjv6"))))
726 (build-system python-build-system)
728 `(("python-six" ,python-six)
729 ("python-webencodings" ,python-webencodings)))
731 `(#:test-target "check"))
733 "https://github.com/html5lib/html5lib-python")
735 "Python HTML parser based on the WHATWG HTML specification")
737 "Html5lib is an HTML parser based on the WHATWG HTML specification
738 and written in Python.")
739 (license license:expat)))
741 (define-public python2-html5lib
742 (package-with-python2 python-html5lib))
744 ;; Needed for python-bleach, a dependency of python-notebook
745 (define-public python-html5lib-0.9
747 (inherit python-html5lib)
752 (uri (pypi-uri "html5lib" version))
755 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
757 (define-public python2-html5lib-0.9
758 (package-with-python2 python-html5lib-0.9))
760 (define-public python-html5-parser
762 (name "python-html5-parser")
766 (uri (pypi-uri "html5-parser" version))
769 "13yl3vnf3sxl05m0nhpngnrz3g1jvyahd33lys3m3hfb91l8zzi5"))))
770 (build-system python-build-system)
772 `(("pkg-config" ,pkg-config)))
774 `(("libxml2" ,libxml2)))
776 `(("python-lxml" ,python-lxml)
777 ("python-beautifulsoup4" ,python-beautifulsoup4)))
778 (home-page "https://html5-parser.readthedocs.io")
779 (synopsis "Fast C-based HTML5 parsing for Python")
780 (description "This package provides a fast implementation of the HTML5
781 parsing spec for Python. Parsing is done in C using a variant of the gumbo
782 parser. The gumbo parse tree is then transformed into an lxml tree, also in
783 C, yielding parse times that can be a thirtieth of the html5lib parse times.")
784 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
785 ;; indicate ASL2.0, including the LICENSE file for the whole project.
786 (license (list license:asl2.0 license:gpl3))))
788 (define-public python2-html5-parser
789 (package-with-python2 python-html5-parser))
791 (define-public python-pycurl
793 (name "python-pycurl")
798 (uri (string-append "https://dl.bintray.com/pycurl/pycurl/pycurl-"
801 (base32 "1cwlb76vddqp2mxqvjbhf367caddzy82rhangddjjhjqaj8x4zgc"))))
802 (build-system python-build-system)
804 ;; The tests attempt to access external web servers, so we cannot run
805 ;; them. Furthermore, they are skipped altogether when using Python 2.
807 #:phases (modify-phases %standard-phases
808 (add-before 'build 'configure-tls-backend
810 ;; XXX: PycURL fails to automatically determine which TLS
811 ;; backend to use when cURL is built with --disable-static.
812 ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
813 (setenv "PYCURL_SSL_LIBRARY" "gnutls")
816 `(("python-nose" ,python-nose)
817 ("python-bottle" ,python-bottle)))
821 (home-page "http://pycurl.io/")
822 (synopsis "Lightweight Python wrapper around libcurl")
823 (description "Pycurl is a lightweight wrapper around libcurl. It provides
824 high-speed transfers via libcurl and frequently outperforms alternatives.")
826 ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
827 ;; under the terms of LGPLv2.1+ or Expat.
828 (license (list license:lgpl2.1+ license:expat))))
830 (define-public python2-pycurl
831 (package-with-python2 python-pycurl))
833 (define-public python-webencodings
835 (name "python-webencodings")
839 (uri (pypi-uri "webencodings" version))
842 "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
843 (build-system python-build-system)
846 (modify-phases %standard-phases
849 (invoke "py.test" "-v" "webencodings/tests.py")
852 `(("python-pytest" ,python-pytest)))
853 (home-page "https://github.com/SimonSapin/python-webencodings")
854 (synopsis "Character encoding aliases for legacy web content")
856 "In order to be compatible with legacy web content when interpreting
857 something like @code{Content-Type: text/html; charset=latin1}, tools need
858 to use a particular set of aliases for encoding labels as well as some
859 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
860 the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
861 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
862 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
863 defines all such details so that implementations do not have to
864 reverse-engineer each other.
866 This module implements the Encoding standard and has encoding labels and
867 BOM detection, but the actual implementation for encoders and decoders
869 (license license:bsd-3)))
871 (define-public python2-webencodings
872 (package-with-python2 python-webencodings))
874 (define-public python-openid
876 (name "python-openid")
881 (uri (pypi-uri "python3-openid" version))
884 "1bxf9a3ny1js422j962zfzl4a9dhj192pvai05whn7j0iy9gdyrk"))))
885 (build-system python-build-system)
888 (modify-phases %standard-phases
891 (invoke "coverage" "run" "-m"
892 "unittest" "openid.test.test_suite"))))))
893 (properties `((python2-variant . ,(delay python2-openid))))
895 `(("python-defusedxml" ,python-defusedxml)))
897 `(("python-coverage" ,python-coverage)
898 ("python-psycopg2" ,python-psycopg2)
899 ("python-django" ,python-django)))
900 (home-page "https://github.com/necaris/python3-openid")
901 (synopsis "OpenID support for servers and consumers")
902 (description "This library provides OpenID authentication for Python, both
903 for clients and servers.")
904 (license license:asl2.0)))
906 (define-public python2-openid
908 (name "python2-openid")
913 (uri (pypi-uri "python-openid" version))
916 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
917 (build-system python-build-system)
919 ;; Python 3 support is in `python3-openid`, a separate package.
921 ;; Tests aren't initialized correctly.
923 (home-page "https://github.com/openid/python-openid")
924 (synopsis "OpenID support for servers and consumers")
925 (description "This library provides OpenID authentication for Python, both
926 for clients and servers.")
927 (license license:asl2.0)))
929 (define-public python-cssutils
931 (name "python-cssutils")
936 (uri (pypi-uri "cssutils" version))
939 "1bxchrbqzapwijap0yhlxdil1w9bmwvgx77aizlkhc2mcxjg1z52"))))
940 (build-system python-build-system)
942 `(("unzip" ,unzip))) ; for unpacking the source
944 `(#:tests? #f)) ; tests require python-pbr < 1.7.0
945 (home-page "http://cthedot.de/cssutils/")
947 "CSS Cascading Style Sheets library for Python")
949 "Cssutils is a Python package for parsing and building CSS
950 Cascading Style Sheets. Currently it provides a DOM only and no rendering
952 (license license:lgpl3+)))
954 (define-public python2-cssutils
955 (package-with-python2 python-cssutils))
957 (define-public python-css-parser
959 (inherit python-cssutils)
960 (name "python-css-parser")
965 (uri (pypi-uri "css-parser" version ".tar.gz"))
967 (base32 "0bmg4kiiir6pj9x3sd12x4dz2c1xpp2bn5nn60fxnbk2lnl4im2f"))))
968 (home-page "https://github.com/ebook-utils/css-parser")
969 (synopsis "Fork of cssutils modified for parsing ebooks")
971 "Css-parser is a Python package for parsing and building CSS
972 Cascading Style Sheets. Currently it provides a DOM only and no rendering
975 It's a fork of cssutils 1.0.2, updated and modified for parsing ebooks, due to
976 cssutils not receiving updates as of 1.0.2.")
977 (license license:lgpl3+)))
979 (define-public python2-css-parser
980 (package-with-python2 python-css-parser))
982 (define-public python-cssselect
984 (name "python-cssselect")
987 ;; The PyPI release does not contain tests.
990 (url "https://github.com/scrapy/cssselect")
991 (commit (string-append "v" version))))
992 (file-name (git-file-name name version))
995 "0xslrnhbrmgakp4xg6k26qffay3kqffp3a2z2sk27c65rwxa79kc"))))
996 (build-system python-build-system)
998 `(#:phases (modify-phases %standard-phases
1001 (invoke "pytest" "-vv"))))))
1003 `(("python-lxml" ,python-lxml)
1004 ("python-pytest" ,python-pytest)))
1005 (home-page "https://github.com/scrapy/cssselect")
1006 (synopsis "CSS3 selector parser and translator to XPath 1.0")
1008 "Cssselect ia a Python module that parses CSS3 Selectors and translates
1009 them to XPath 1.0 expressions. Such expressions can be used in lxml or
1010 another XPath engine to find the matching elements in an XML or HTML document.")
1011 (license license:bsd-3)))
1013 (define-public python2-cssselect
1014 (package-with-python2 python-cssselect))
1016 (define-public python-openid-cla
1018 (name "python-openid-cla")
1023 (uri (pypi-uri "python-openid-cla" version))
1026 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
1027 (build-system python-build-system)
1028 (arguments '(#:tests? #f)) ; No tests.
1029 (home-page "https://github.com/puiterwijk/python-openid-cla/")
1030 (synopsis "Implementation of the OpenID CLA extension for python-openid")
1031 (description "@code{openid-cla} is an implementation of the OpenID
1032 contributor license agreement extension for python-openid.")
1033 (license license:bsd-3)))
1035 (define-public python2-openid-cla
1036 (package-with-python2 python-openid-cla))
1038 (define-public python-openid-teams
1040 (name "python-openid-teams")
1045 (uri (pypi-uri "python-openid-teams" version))
1048 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
1049 (build-system python-build-system)
1050 (arguments '(#:tests? #f)) ; No tests.
1051 (home-page "https://github.com/puiterwijk/python-openid-teams/")
1052 (synopsis "Implementation of the OpenID teams extension for python-openid")
1054 "@code{openid-teams} is an implementation of the OpenID
1055 teams extension for python-openid.")
1056 (license license:bsd-3)))
1058 (define-public python2-openid-teams
1059 (package-with-python2 python-openid-teams))
1061 (define-public python-priority
1063 (name "python-priority")
1068 (uri (pypi-uri "priority" version))
1070 (base32 "1gpzn9k9zgks0iw5wdmad9b4dry8haiz2sbp6gycpjkzdld9dhbb"))))
1071 (build-system python-build-system)
1074 (modify-phases %standard-phases
1076 (lambda* (#:key inputs outputs #:allow-other-keys)
1077 (add-installed-pythonpath inputs outputs)
1078 (invoke "pytest" "-vv" "test" "-k"
1079 ;; This test exceeded the Hypothesis deadline.
1080 "not test_period_of_repetition"))))))
1082 `(("python-hypothesis" ,python-hypothesis)
1083 ("python-pytest" ,python-pytest)
1084 ("python-pytest-cov" ,python-pytest-cov)
1085 ("python-pytest-xdist" ,python-pytest-xdist)))
1086 (home-page "https://python-hyper.org/projects/priority/en/latest/")
1087 (synopsis "Pure-Python implementation of the HTTP/2 priority tree")
1089 "Priority is a pure-Python implementation of the priority logic for HTTP/2,
1090 set out in RFC 7540 Section 5.3 (Stream Priority).")
1091 (license license:expat)))
1093 (define-public python-wsproto
1095 (name "python-wsproto")
1100 (uri (pypi-uri "wsproto" version))
1102 (base32 "17gsxlli4w8am1wwwl3k90hpdfa213ax40ycbbvb7hjx1v1rhiv1"))))
1103 (build-system python-build-system)
1106 (modify-phases %standard-phases
1108 (lambda* (#:key inputs outputs #:allow-other-keys)
1109 (add-installed-pythonpath inputs outputs)
1110 (invoke "pytest" "-vv" "test"))))))
1112 `(("python-pytest" ,python-pytest)))
1114 `(("python-h11" ,python-h11)))
1115 (home-page "https://github.com/python-hyper/wsproto/")
1116 (synopsis "WebSockets state-machine based protocol implementation")
1118 "@code{wsproto} is a pure-Python implementation of a WebSocket protocol
1119 stack. It's written from the ground up to be embeddable in whatever program you
1120 choose to use, ensuring that you can communicate via WebSockets, as defined in
1121 RFC6455, regardless of your programming paradigm.")
1122 (license license:expat)))
1124 (define-public python-hypercorn
1126 (name "python-hypercorn")
1131 (uri (pypi-uri "Hypercorn" version))
1133 (base32 "15dgy47a18w2ls3hwykra1cyf7yzxmfjqnsqml482p12cxr2xwqr"))))
1134 (build-system python-build-system)
1137 (modify-phases %standard-phases
1139 (lambda* (#:key inputs outputs #:allow-other-keys)
1140 (add-installed-pythonpath inputs outputs)
1141 (invoke "pytest" "-vv"))))))
1143 `(("python-h11" ,python-h11)
1144 ("python-h2" ,python-h2)
1145 ("python-priority" ,python-priority)
1146 ("python-toml" ,python-toml)
1147 ("python-typing-extensions" ,python-typing-extensions)
1148 ("python-wsproto" ,python-wsproto)))
1150 `(("python-hypothesis" ,python-hypothesis)
1151 ("python-mock" ,python-mock)
1152 ("python-pytest" ,python-pytest)
1153 ("python-pytest-asyncio" ,python-pytest-asyncio)
1154 ("python-pytest-cov" ,python-pytest-cov)
1155 ("python-pytest-trio" ,python-pytest-trio)
1156 ("python-trio" ,python-trio)))
1157 (home-page "https://gitlab.com/pgjones/hypercorn/")
1158 (synopsis "ASGI Server based on Hyper libraries")
1160 "Hypercorn is an ASGI web server based on the sans-io hyper, h11, h2, and
1161 wsproto libraries and inspired by Gunicorn. It supports HTTP/1, HTTP/2,
1162 WebSockets (over HTTP/1 and HTTP/2), ASGI/2, and ASGI/3 specifications. It can
1163 utilise asyncio, uvloop, or trio worker types.")
1164 (license license:expat)))
1166 (define-public python-tornado
1168 (name "python-tornado")
1173 (uri (pypi-uri "tornado" version))
1176 "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
1177 (build-system python-build-system)
1179 '(;; FIXME: Two tests error out with:
1180 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
1182 ;; (modify-phases %standard-phases
1185 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
1186 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
1187 ;; (invoke "python" "-m" "tornado.test.runtests")
1191 `(("python-certifi" ,python-certifi)))
1192 (home-page "https://www.tornadoweb.org/")
1193 (synopsis "Python web framework and asynchronous networking library")
1195 "Tornado is a Python web framework and asynchronous networking library,
1196 originally developed at FriendFeed. By using non-blocking network I/O,
1197 Tornado can scale to tens of thousands of open connections, making it ideal
1198 for long polling, WebSockets, and other applications that require a long-lived
1199 connection to each user.")
1200 (license license:asl2.0)
1201 (properties `((python2-variant . ,(delay python2-tornado))))))
1203 (define-public python-tornado-6
1205 (name "python-tornado")
1210 (uri (pypi-uri "tornado" version))
1213 "1p5n7sw4580pkybywg93p8ddqdj9lhhy72rzswfa801vlidx9qhg"))))
1214 (build-system python-build-system)
1217 (modify-phases %standard-phases
1220 (invoke "python" "-m" "tornado.test.runtests")
1223 `(("python-certifi" ,python-certifi)))
1224 (home-page "https://www.tornadoweb.org/")
1225 (synopsis "Python web framework and asynchronous networking library")
1227 "Tornado is a Python web framework and asynchronous networking library,
1228 originally developed at FriendFeed. By using non-blocking network I/O,
1229 Tornado can scale to tens of thousands of open connections, making it ideal
1230 for long polling, WebSockets, and other applications that require a long-lived
1231 connection to each user.")
1232 (license license:asl2.0)))
1234 (define-public python2-tornado
1235 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
1236 (package (inherit tornado)
1238 `(("python2-backport-ssl-match-hostname"
1239 ,python2-backport-ssl-match-hostname)
1240 ("python2-backports-abc" ,python2-backports-abc)
1241 ("python2-singledispatch" ,python2-singledispatch)
1242 ,@(package-propagated-inputs tornado))))))
1244 (define-public python-tornado-http-auth
1246 (name "python-tornado-http-auth")
1251 (uri (pypi-uri "tornado-http-auth" version))
1253 (base32 "0hyc5f0a09i5yb99pk4bxpg6w9ichbrb5cv7hc9hff7rxd8w0v0x"))))
1254 (build-system python-build-system)
1256 `(("python-tornado" ,python-tornado)))
1257 (home-page "https://github.com/gvalkov/tornado-http-auth")
1258 (synopsis "Digest and basic authentication module for Tornado")
1260 "Provides support for adding authentication to services using the Tornado
1261 web framework, either via the basic or digest authentication schemes.")
1262 (license license:asl2.0)))
1264 (define-public python-terminado
1266 (name "python-terminado")
1271 (uri (pypi-uri "terminado" version))
1274 "0yh69k6579g848rmjyllb5h75pkvgcy27r1l3yzgkf33wnnzkasm"))))
1275 (build-system python-build-system)
1277 `(("python-tornado" ,python-tornado)
1278 ("python-ptyprocess" ,python-ptyprocess)))
1280 `(("python-nose" ,python-nose)))
1283 (modify-phases %standard-phases
1285 (lambda _ (invoke "nosetests") #t)))))
1286 (home-page "https://github.com/takluyver/terminado")
1287 (synopsis "Terminals served to term.js using Tornado websockets")
1288 (description "This package provides a Tornado websocket backend for the
1289 term.js Javascript terminal emulator library.")
1290 (license license:bsd-2)
1291 (properties `((python2-variant . ,(delay python2-terminado))))))
1293 (define-public python2-terminado
1294 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
1295 (package (inherit terminado)
1297 `(("python2-backport-ssl-match-hostname"
1298 ,python2-backport-ssl-match-hostname)
1299 ("python2-futures" ,python2-futures)
1300 ,@(package-propagated-inputs terminado))))))
1302 (define-public python-wsgi-intercept
1304 (name "python-wsgi-intercept")
1308 (uri (pypi-uri "wsgi_intercept" version))
1311 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
1312 (build-system python-build-system)
1314 `(("python-six" ,python-six)))
1316 `(("python-pytest" ,python-pytest)
1317 ("python-httplib2" ,python-httplib2)
1318 ("python-requests" ,python-requests)
1319 ("python-urllib3" ,python-urllib3)))
1320 (synopsis "Puts a WSGI application in place of a real URI for testing")
1321 (description "Wsgi_intercept installs a WSGI application in place of a real
1322 URI for testing. Testing a WSGI application normally involves starting a
1323 server at a local host and port, then pointing your test code to that address.
1324 Instead, this library lets you intercept calls to any specific host/port
1325 combination and redirect them into a WSGI application importable by your test
1326 program. Thus, you can avoid spawning multiple processes or threads to test
1328 (home-page "https://github.com/cdent/wsgi-intercept")
1329 (license license:expat)))
1331 (define-public python-webob
1333 (name "python-webob")
1338 (uri (pypi-uri "WebOb" version))
1341 "026i3z99nr3px75isa9mbnky5i7rffiv4d124h5kxfjjsxz92fma"))))
1342 (build-system python-build-system)
1344 `(("python-nose" ,python-nose)))
1345 (home-page "https://webob.org/")
1346 (synopsis "WSGI request and response object")
1348 "WebOb provides wrappers around the WSGI request environment, and an
1349 object to help create WSGI responses.")
1350 (license license:expat)))
1352 (define-public python2-webob
1353 (package-with-python2 python-webob))
1355 (define-public python-zope-event
1357 (name "python-zope-event")
1362 (uri (pypi-uri "zope.event" version))
1365 "1ksbc726av9xacml6jhcfyn828hlhb9xlddpx6fcvnlvmpmpvhk9"))))
1366 (build-system python-build-system)
1367 (home-page "https://pypi.org/project/zope.event/")
1368 (synopsis "Event publishing system for Python")
1369 (description "Zope.event provides an event publishing API, intended for
1370 use by applications which are unaware of any subscribers to their events. It
1371 is a simple event-dispatching system on which more sophisticated event
1372 dispatching systems can be built.")
1373 (license license:zpl2.1)))
1375 (define-public python2-zope-event
1376 (package-with-python2 python-zope-event))
1378 (define-public python-zope-interface
1380 (name "python-zope-interface")
1385 (uri (pypi-uri "zope.interface" version))
1388 "03nrl6b8cb600dnnh46y149awvrm0gxyqgwq5hdw3lvys8mw9r20"))))
1389 (build-system python-build-system)
1390 (arguments '(#:tests? #f)) ; test suite can't find python-zope-testing
1392 `(("python-coverage" ,python-coverage)
1393 ("python-nose" ,python-nose)
1394 ("python-zope-event" ,python-zope-event)
1395 ("python-zope-testing" ,python-zope-testing)))
1396 (home-page "https://github.com/zopefoundation/zope.interface")
1397 (synopsis "Python implementation of the \"design by contract\"
1399 (description "Zope.interface provides an implementation of \"object
1400 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
1401 conforming to a given API or contract.")
1402 (license license:zpl2.1)))
1404 (define-public python2-zope-interface
1405 (package-with-python2 python-zope-interface))
1407 (define-public python-zope-exceptions
1409 (name "python-zope-exceptions")
1414 (uri (pypi-uri "zope.exceptions" version))
1417 "1nkgfwawswmyc6i0b8g3ymvja4mb507m8yhid8s4rbxq3dmqhwhd"))))
1418 (build-system python-build-system)
1421 (modify-phases %standard-phases
1424 (invoke "zope-testrunner" "--test-path=src"))))))
1426 `(("python-zope-testrunner" ,python-zope-testrunner-bootstrap)))
1428 `(("python-zope-interface" ,python-zope-interface)))
1429 (home-page "https://pypi.org/project/zope.exceptions/")
1430 (synopsis "Zope exceptions")
1431 (description "Zope.exceptions provides general-purpose exception types
1432 that have uses outside of the Zope framework.")
1433 (license license:zpl2.1)))
1435 (define-public python-zope-exceptions-bootstrap
1437 (inherit python-zope-exceptions)
1438 (arguments `(#:tests? #f))
1439 (propagated-inputs `())
1441 (properties `((hidden? . #t)))))
1443 (define-public python2-zope-exceptions
1444 (package-with-python2 python-zope-exceptions))
1446 (define-public python-zope-testing
1448 (name "python-zope-testing")
1453 (uri (pypi-uri "zope.testing" version))
1456 "1sh3c3i0m8n8fnhqiry0bk3rr356i56ry7calmn57s1pvv8yhsyn"))))
1457 (build-system python-build-system)
1458 (home-page "https://pypi.org/project/zope.testing/")
1459 (synopsis "Zope testing helpers")
1460 (description "Zope.testing provides a number of testing utilities for HTML
1461 forms, HTTP servers, regular expressions, and more.")
1462 (license license:zpl2.1)))
1464 (define-public python2-zope-testing
1465 (package-with-python2 python-zope-testing))
1467 (define-public python-zope-testrunner
1469 (name "python-zope-testrunner")
1474 (uri (pypi-uri "zope.testrunner" version))
1477 "0jyyf1dcz156q95x2y7yw2v420q2xn3cff0c5aci7hmdmcbn0gc7"))))
1478 (build-system python-build-system)
1480 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1482 `(("python-zope-testing" ,python-zope-testing)))
1484 `(("python-six" ,python-six)
1485 ("python-zope-exceptions" ,python-zope-exceptions)
1486 ("python-zope-interface" ,python-zope-interface)))
1487 (home-page "https://pypi.org/project/zope.testrunner/")
1488 (synopsis "Zope testrunner script")
1489 (description "Zope.testrunner provides a script for running Python
1491 (license license:zpl2.1)))
1493 (define-public python-zope-testrunner-bootstrap
1495 (inherit python-zope-testrunner)
1496 (arguments `(#:tests? #f))
1498 `(("python-six" ,python-six)
1499 ("python-zope-exceptions" ,python-zope-exceptions-bootstrap)))
1500 (properties `((hidden? . #t)))))
1502 (define-public python2-zope-testrunner
1503 (package-with-python2 python-zope-testrunner))
1505 (define-public python-zope-i18nmessageid
1507 (name "python-zope-i18nmessageid")
1512 (uri (pypi-uri "zope.i18nmessageid" version))
1515 "0ndhn4w1qgwkfbwf9vm2bgq418z5g0wmfsgl0d9nz62cd0mi8d4m"))))
1516 (build-system python-build-system)
1518 `(("python-coverage" ,python-coverage)
1519 ("python-zope-testrunner" ,python-zope-testrunner)))
1521 `(("python-six" ,python-six)))
1522 (home-page "https://pypi.org/project/zope.i18nmessageid/")
1523 (synopsis "Message identifiers for internationalization")
1524 (description "Zope.i18nmessageid provides facilities for declaring
1525 internationalized messages within program source text.")
1526 (license license:zpl2.1)))
1528 (define-public python2-zope-i18nmessageid
1529 (package-with-python2 python-zope-i18nmessageid))
1531 (define-public python-zope-schema
1533 (name "python-zope-schema")
1538 (uri (pypi-uri "zope.schema" version))
1541 "09jg47bxhfg1ahr1jxb5y0cbiszyk1j6fn1r1r7s6svjl3lbryr0"))))
1542 (build-system python-build-system)
1545 (modify-phases %standard-phases
1547 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1548 (add-installed-pythonpath inputs outputs)
1550 (invoke "zope-testrunner" "--test-path=src")
1553 `(("python-zope-event" ,python-zope-event)
1554 ("python-zope-interface" ,python-zope-interface)))
1556 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1557 ("python-zope-testing" ,python-zope-testing)
1558 ("python-zope-testrunner" ,python-zope-testrunner)))
1559 (home-page "https://pypi.org/project/zope.schema/")
1560 (synopsis "Zope data schemas")
1561 (description "Zope.scheme provides extensions to zope.interface for
1562 defining data schemas.")
1563 (license license:zpl2.1)))
1565 (define-public python2-zope-schema
1566 (package-with-python2 python-zope-schema))
1568 (define-public python-zope-configuration
1570 (name "python-zope-configuration")
1574 (uri (pypi-uri "zope.configuration" version))
1577 "0g6vrl7y27z9cj5xyrww9xlzk4npj55mgmlrcd9d2nj08jn2pw79"))))
1578 (build-system python-build-system)
1580 `(("python-manuel" ,python-manuel)
1581 ("python-zope-testing" ,python-zope-testing)
1582 ("python-zope-testrunner" ,python-zope-testrunner)))
1584 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1585 ("python-zope-interface" ,python-zope-interface)
1586 ("python-zope-schema" ,python-zope-schema)))
1587 (home-page "https://pypi.org/project/zope.configuration/")
1588 (synopsis "Zope Configuration Markup Language")
1589 (description "Zope.configuration implements ZCML, the Zope Configuration
1591 (license license:zpl2.1)))
1593 (define-public python-zope-configuration-bootstrap
1595 (inherit python-zope-configuration)
1596 (arguments `(#:tests? #f))
1598 (properties `((hidden? . #t)))))
1600 (define-public python2-zope-configuration
1601 (package-with-python2 python-zope-configuration))
1603 (define-public python-zope-copy
1605 (name "python-zope-copy")
1610 (uri (pypi-uri "zope.copy" version))
1613 "06m75434krl57n6p73c2qj55k5i3fixg887j8ss01ih6zw4rvfs7"))))
1614 (build-system python-build-system)
1617 (modify-phases %standard-phases
1620 (invoke "zope-testrunner" "--test-path=src" "\\[]"))))))
1622 `(("python-zope-interface" ,python-zope-interface)))
1624 `(("python-zope-component" ,python-zope-component-bootstrap)
1625 ("python-zope-location" ,python-zope-location-bootstrap)
1626 ("python-zope-testing" ,python-zope-testing)
1627 ("python-zope-testrunner" ,python-zope-testrunner)))
1628 (home-page "https://github.com/zopefoundation/zope.copy")
1629 (synopsis "Pluggable object copying mechanism")
1631 "This package provides a pluggable mechanism for copying persistent objects.")
1632 (license license:zpl2.1)))
1634 (define-public python-zope-proxy
1636 (name "python-zope-proxy")
1641 (uri (pypi-uri "zope.proxy" version))
1644 "14h7nyfbl5vpfk0rbviy4ygdfx0yx5kncvg6jpbdb0dhwna0ssm6"))))
1645 (build-system python-build-system)
1647 `(("python-zope-security" ,python-zope-security-bootstrap)
1648 ("python-zope-testrunner" ,python-zope-testrunner)))
1650 `(("python-zope-interface" ,python-zope-interface)))
1651 (home-page "https://pypi.org/project/zope.proxy/")
1652 (synopsis "Generic, transparent proxies")
1653 (description "Zope.proxy provides generic, transparent proxies for Python.
1654 Proxies are special objects which serve as mostly-transparent wrappers around
1655 another object, intervening in the apparent behavior of the wrapped object
1656 only when necessary to apply the policy (e.g., access checking, location
1657 brokering, etc.) for which the proxy is responsible.")
1658 (license license:zpl2.1)))
1660 (define-public python-zope-proxy-bootstrap
1662 (inherit python-zope-proxy)
1663 (arguments `(#:tests? #f))
1665 (properties `((hidden? . #t)))))
1667 (define-public python2-zope-proxy
1668 (package-with-python2 python-zope-proxy))
1670 (define-public python-zope-hookable
1672 (name "python-zope-hookable")
1677 (uri (pypi-uri "zope.hookable" version))
1680 "0hc82lfr7bk53nvbxvjkibkarngyrzgfk2i6bg8wshl0ly0pdl19"))))
1681 (build-system python-build-system)
1683 `(("python-coverage" ,python-coverage)
1684 ("python-zope-testing" ,python-zope-testing)))
1685 (home-page "https://github.com/zopefoundation/zope.hookable")
1686 (synopsis "Zope hookable")
1687 (description "This package supports the efficient creation of hookable
1688 objects, which are callable objects that are meant to be optionally replaced.
1689 The idea is that you create a function that does some default thing and make i
1690 hookable. Later, someone can modify what it does by calling its sethook method
1691 and changing its implementation. All users of the function, including those
1692 that imported it, will see the change.")
1693 (license license:zpl2.1)))
1695 (define-public python-zope-location
1697 (name "python-zope-location")
1702 (uri (pypi-uri "zope.location" version))
1705 "1b40pzl8v00d583d3gsxv1qjdw2dhghlgkbgxl3m07d5r3izj857"))))
1706 (build-system python-build-system)
1708 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1710 `(("python-zope-testrunner" ,python-zope-testrunner)))
1712 `(("python-zope-interface" ,python-zope-interface)
1713 ("python-zope-proxy" ,python-zope-proxy)
1714 ("python-zope-schema" ,python-zope-schema)))
1715 (home-page "https://pypi.org/project/zope.location/")
1716 (synopsis "Zope location library")
1717 (description "Zope.location implements the concept of \"locations\" in
1718 Zope3, which are are special objects that have a structural location.")
1719 (license license:zpl2.1)))
1721 (define-public python-zope-location-bootstrap
1723 (inherit python-zope-location)
1724 (arguments `(#:tests? #f))
1726 (properties `((hidden? . #t)))))
1728 (define-public python2-zope-location
1729 (package-with-python2 python-zope-location))
1731 (define-public python-zope-security
1733 (name "python-zope-security")
1738 (uri (pypi-uri "zope.security" version))
1741 "11lfw67cigscfax9c5j63xcvz2qcj724zx5fcdqyc94am2glim0h"))))
1742 (build-system python-build-system)
1744 `(("python-zope-component" ,python-zope-component)
1745 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1746 ("python-zope-interface" ,python-zope-interface)
1747 ("python-zope-location" ,python-zope-location)
1748 ("python-zope-proxy" ,python-zope-proxy)
1749 ("python-zope-schema" ,python-zope-schema)))
1751 `(("python-btrees" ,python-btrees)
1752 ("python-zope-component" ,python-zope-component-bootstrap)
1753 ("python-zope-configuration" ,python-zope-configuration-bootstrap)
1754 ("python-zope-location" ,python-zope-location-bootstrap)
1755 ("python-zope-testing" ,python-zope-testing)
1756 ("python-zope-testrunner" ,python-zope-testrunner)))
1757 (home-page "https://pypi.org/project/zope.security/")
1758 (synopsis "Zope security framework")
1759 (description "Zope.security provides a generic mechanism to implement
1760 security policies on Python objects.")
1761 (license license:zpl2.1)))
1763 (define-public python-zope-security-bootstrap
1765 (inherit python-zope-security)
1766 (arguments `(#:tests? #f))
1768 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1769 ("python-zope-interface" ,python-zope-interface)
1770 ("python-zope-proxy" ,python-zope-proxy-bootstrap)
1771 ("python-zope-schema" ,python-zope-schema)))
1773 (properties `((hidden? . #t)))))
1775 (define-public python2-zope-security
1776 (package-with-python2 python-zope-security))
1778 (define-public python-zope-component
1780 (name "python-zope-component")
1785 (uri (pypi-uri "zope.component" version))
1788 "14iwp95hh6q5dj4k9h1iw75cbp89bs27nany4dinyglb44c8jqli"))))
1789 (build-system python-build-system)
1792 (modify-phases %standard-phases
1794 (lambda* (#:key inputs outputs #:allow-other-keys)
1795 (add-installed-pythonpath inputs outputs)
1796 (invoke "python" "setup.py" "test"))))))
1798 `(("python-persistent" ,python-persistent)
1799 ("python-zope-configuration" ,python-zope-configuration-bootstrap)
1800 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1801 ("python-zope-location" ,python-zope-location-bootstrap)
1802 ("python-zope-proxy" ,python-zope-proxy-bootstrap)
1803 ("python-zope-security" ,python-zope-security-bootstrap)
1804 ("python-zope-testing" ,python-zope-testing)
1805 ("python-zope-testrunner" ,python-zope-testrunner)))
1807 `(("python-zope-deferredimport" ,python-zope-deferredimport)
1808 ("python-zope-deprecation" ,python-zope-deprecation)
1809 ("python-zope-event" ,python-zope-event)
1810 ("python-zope-hookable" ,python-zope-hookable)
1811 ("python-zope-interface" ,python-zope-interface)))
1812 (home-page "https://github.com/zopefoundation/zope.component")
1813 (synopsis "Zope Component Architecture")
1814 (description "Zope.component represents the core of the Zope Component
1815 Architecture. Together with the zope.interface package, it provides
1816 facilities for defining, registering and looking up components.")
1817 (license license:zpl2.1)))
1819 (define-public python-zope-component-bootstrap
1821 (inherit python-zope-component)
1822 (arguments `(#:tests? #f))
1824 (properties `((hidden? . #t)))))
1826 (define-public python2-zope-component
1827 (package-with-python2 python-zope-component))
1829 (define-public python-zope-deferredimport
1831 (name "python-zope-deferredimport")
1836 (uri (pypi-uri "zope.deferredimport" version))
1839 "1q89v54dwniiqypjbwywwdfjdr4kdkqlyqsgrpplgvsygdg39cjp"))))
1840 (build-system python-build-system)
1842 `(("python-zope-proxy" ,python-zope-proxy)))
1844 `(("python-zope-testrunner" ,python-zope-testrunner)))
1845 (home-page "https://github.com/zopefoundation/zope.deferredimport")
1846 (synopsis "Defer imports until used by code")
1848 "Often, especially for package modules, you want to import names for
1849 convenience, but not actually perform the imports until necessary. The
1850 @code{zope.deferredimport} package provided facilities for defining names in
1851 modules that will be imported from somewhere else when used. You can also cause
1852 deprecation warnings to be issued when a variable is used.")
1853 (license license:zpl2.1)))
1855 (define-public python-ndg-httpsclient
1857 (name "python-ndg-httpsclient")
1861 (uri (pypi-uri "ndg_httpsclient" version))
1864 "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
1865 (build-system python-build-system)
1867 '(;; The tests appear to require networking.
1870 `(("python-pyopenssl" ,python-pyopenssl)))
1871 (synopsis "HTTPS support for Python's httplib and urllib2")
1872 (description "This is a HTTPS client implementation for httplib and urllib2
1873 based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
1874 over the default provided with Python and, importantly, enables full
1875 verification of the SSL peer.")
1876 (home-page "https://github.com/cedadev/ndg_httpsclient/")
1877 (license license:bsd-3)))
1879 ;; python2-openssl requires special care, so package-with-python2 is
1881 (define-public python2-ndg-httpsclient
1882 (package (inherit python-ndg-httpsclient)
1883 (name "python2-ndg-httpsclient")
1885 (substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
1886 ((#:python _) python-2)))
1888 `(("python2-pyopenssl" ,python2-pyopenssl)))))
1890 (define-public python-websocket-client
1892 (name "python-websocket-client")
1897 (uri (pypi-uri "websocket_client" version))
1900 "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
1901 (build-system python-build-system)
1903 `(("python-six" ,python-six)))
1904 (home-page "https://github.com/liris/websocket-client")
1905 (synopsis "WebSocket client for Python")
1906 (description "The Websocket-client module provides the low level APIs for
1907 WebSocket usage in Python programs.")
1908 (properties `((python2-variant . ,(delay python2-websocket-client))))
1909 (license license:lgpl2.1+)))
1911 (define-public python2-websocket-client
1912 (let ((base (package-with-python2
1913 (strip-python2-variant python-websocket-client))))
1917 `(("python2-backport-ssl-match-hostname"
1918 ,python2-backport-ssl-match-hostname)
1919 ,@(package-native-inputs base))))))
1921 (define-public python-purl
1923 (name "python-purl")
1928 (uri (pypi-uri "purl" version))
1931 "15ibnz1xrh5msmn04j0nr00sz4n7jwx6cwd6zlx99kkz3vpin53m"))))
1932 (build-system python-build-system)
1933 (propagated-inputs `(("python-six" ,python-six)))
1935 "https://github.com/codeinthehole/purl")
1937 "Python package for URL manipulation")
1939 "Purl is a Python package for handling URLs.")
1940 (license license:expat)))
1942 (define-public python-apiron
1944 (name "python-apiron")
1949 (uri (pypi-uri "apiron" version))
1951 (base32 "1qwbqn47sf0aqznj1snbv37v8ijx476qqkjf5l9pac7xjkxsr8qk"))))
1952 (build-system python-build-system)
1955 (modify-phases %standard-phases
1957 (lambda* (#:key inputs outputs #:allow-other-keys)
1958 (add-installed-pythonpath inputs outputs)
1959 (invoke "pytest" "-vv" "--cov" "-k"
1960 ;; This test tries to connect to the internet.
1961 "not test_call"))))))
1963 `(("python-requests" ,python-requests)))
1965 `(("python-pytest" ,python-pytest)
1966 ("python-pytest-cov" ,python-pytest-cov)))
1967 (home-page "https://github.com/ithaka/apiron")
1968 (synopsis "Python wrapper for interacting with RESTful APIs")
1970 "@code{apiron} provides a declarative, structured configuration of
1971 services and endpoints with a unified interface for interacting with RESTful
1973 (license license:expat)))
1975 (define-public python-beren
1977 (name "python-beren")
1982 (uri (pypi-uri "beren" version))
1984 (base32 "1v3mdwfqsyza892zvs124ym9w1bkng1j56b7l4dwfjir3723xcgf"))))
1985 (build-system python-build-system)
1987 ;; The test tries to open a connection to a remote server.
1990 `(("python-apiron" ,python-apiron)))
1991 (home-page "https://github.com/teffalump/beren")
1992 (synopsis "REST client for Orthanc DICOM servers")
1994 "@code{beren} provides a REST client for Orthanc, a DICOM server.")
1995 (license license:gpl3+)))
1997 (define-public python-requests
1999 (name "python-requests")
2003 (uri (pypi-uri "requests" version))
2006 "06r3017hz0hzxv42gpg73l8xvdjbzw7q904ljvp36b5p3l9rlmdk"))))
2007 (build-system python-build-system)
2009 `(("python-certifi" ,python-certifi)
2010 ("python-chardet" ,python-chardet)
2011 ("python-idna" ,python-idna)
2012 ("python-urllib3" ,python-urllib3)))
2014 ;; FIXME: Some tests require network access.
2016 (home-page "http://python-requests.org/")
2017 (synopsis "Python HTTP library")
2019 "Requests is a Python HTTP client library. It aims to be easier to use
2020 than Python’s urllib2 library.")
2021 (license license:asl2.0)))
2023 ;; Some software requires an older version of Requests, notably Docker/Docker
2025 (define-public python-requests-2.20
2026 (package (inherit python-requests)
2030 (uri (pypi-uri "requests" version))
2033 "0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a"))))
2035 `(("python-urllib3" ,python-urllib3-1.24)
2036 ("python-idna" ,python-idna-2.7)
2037 ,@(package-propagated-inputs python-requests)))))
2039 (define-public python2-requests
2040 (package-with-python2 python-requests))
2042 (define-public python-requests_ntlm
2044 (name "python-requests_ntlm")
2049 (uri (pypi-uri "requests_ntlm" version))
2052 "0wgbqzaq9w7bas16b7brdb75f91bh3275fb459093bk1ihpck2ci"))))
2053 (build-system python-build-system)
2055 `(("python-cryptography" ,python-cryptography)
2056 ("python-ntlm-auth" ,python-ntlm-auth)
2057 ("python-requests" ,python-requests)))
2058 (home-page "https://github.com/requests/requests-ntlm")
2060 "NTLM authentication support for Requests")
2062 "This package allows for HTTP NTLM authentication using the requests
2064 (license license:isc)))
2066 (define-public python-requests-mock
2068 (name "python-requests-mock")
2073 (uri (pypi-uri "requests-mock" version))
2076 "09nj8fmyj7xz2mgwyvbw0fl9zybmx2d3qd2hf529vvjc9s24d3z6"))))
2077 (build-system python-build-system)
2079 `(("python-requests" ,python-requests)
2080 ("python-six" ,python-six)))
2082 `(("python-pbr" ,python-pbr)
2083 ("python-discover" ,python-discover)
2084 ("python-docutils" ,python-docutils)
2085 ("python-fixtures" ,python-fixtures)
2086 ("python-mock" ,python-mock)
2087 ("python-purl" ,python-purl)
2088 ("python-pytest" ,python-pytest)
2089 ("python-sphinx" ,python-sphinx)
2090 ("python-testrepository" ,python-testrepository)))
2091 (home-page "https://requests-mock.readthedocs.org/")
2092 (synopsis "Mock out responses from the requests package")
2094 "This module provides a building block to stub out the HTTP requests
2095 portions of your testing code.")
2096 (properties `((python2-variant . ,(delay python2-requests-mock))))
2097 (license license:asl2.0)))
2099 (define-public python2-requests-mock
2100 (package (inherit (package-with-python2
2101 (strip-python2-variant python-requests-mock)))
2103 `(#:python ,python-2
2104 ;; FIXME: 'subunit.run discover: error: no such option: --list'
2107 (define-public python-requests-toolbelt
2109 (name "python-requests-toolbelt")
2113 (uri (pypi-uri "requests-toolbelt" version))
2116 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
2117 (build-system python-build-system)
2119 `(("python-betamax" ,python-betamax)
2120 ("python-mock" ,python-mock)
2121 ("python-pytest" ,python-pytest)))
2123 `(("python-requests" ,python-requests)))
2124 (synopsis "Extensions to python-requests")
2125 (description "This is a toolbelt of useful classes and functions to be used
2126 with python-requests.")
2127 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
2128 (license license:asl2.0)))
2130 (define-public python2-requests-toolbelt
2131 (package-with-python2 python-requests-toolbelt))
2133 (define-public python-requests-toolbelt-0.9.1
2135 (inherit python-requests-toolbelt)
2139 (uri (pypi-uri "requests-toolbelt" version))
2142 "1h3gm88dcjbd7gm229a7x5qkkhnsqsjz0m0l2xyavm2ab3a8k04n"))))
2144 `(;; FIXME: Some tests require network access.
2147 (define-public python-requests-ftp
2149 (name "python-requests-ftp")
2154 (uri (pypi-uri "requests-ftp" version))
2157 "0yh5v21v36dsjsgv4y9dx4mmz35741l5jf6pbq9w19d8rfsww13m"))))
2158 (build-system python-build-system)
2160 `(("python-requests" ,python-requests)))
2162 "https://github.com/Lukasa/requests-ftp")
2163 (synopsis "FTP Transport Adapter for Requests")
2165 "Requests-FTP is an implementation of a simple FTP transport
2166 adapter for use with the Requests library.")
2167 (license license:asl2.0)))
2169 (define-public python-oauthlib
2171 (name "python-oauthlib")
2175 (uri (pypi-uri "oauthlib" version))
2178 "12gqnabwck30gdlpwm6af3s28qm9p2yc7b1w8s4fk9ncbz1irr5y"))))
2179 (build-system python-build-system)
2181 `(#:phases (modify-phases %standard-phases
2184 (invoke "pytest" "-vv"))))))
2186 `(("python-pytest" ,python-pytest)
2187 ("python-pytest-cov" ,python-pytest-cov)
2188 ("python-mock" ,python-mock)))
2190 `(("python-cryptography" ,python-cryptography)
2191 ("python-pyjwt" ,python-pyjwt)
2192 ("python-blinker" ,python-blinker)))
2193 (home-page "https://github.com/oauthlib/oauthlib")
2194 (synopsis "OAuth implementation for Python")
2196 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2197 OAuth request-signing logic.")
2198 (license license:bsd-3)))
2200 (define-public python2-oauthlib
2201 (package-with-python2 python-oauthlib))
2203 (define-public python-rauth
2205 (name "python-rauth")
2210 (uri (pypi-uri "rauth" version))
2213 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
2214 (build-system python-build-system)
2216 `(#:test-target "check"))
2218 `(("python-requests" ,python-requests)))
2219 (home-page "https://github.com/litl/rauth")
2220 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
2222 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
2223 provides service wrappers for convenient connection initialization and
2224 authenticated session objects providing things like keep-alive.")
2225 (license license:expat)
2226 (properties `((python2-variant . ,(delay python2-rauth))))))
2228 (define-public python2-rauth
2229 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
2232 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2233 ,@(package-native-inputs base))))))
2235 (define-public python-urllib3
2237 (name "python-urllib3")
2242 (uri (pypi-uri "urllib3" version))
2245 "09rmjqm5syhhc8fx3v06h3yv6cqy0b1081jg8wm5grpwpr72j61h"))))
2246 (build-system python-build-system)
2247 (arguments `(#:tests? #f))
2249 `(;; These 5 inputs are used to build urrlib3[secure]
2250 ("python-certifi" ,python-certifi)
2251 ("python-cryptography" ,python-cryptography)
2252 ("python-idna" ,python-idna)
2253 ("python-pyopenssl" ,python-pyopenssl)
2254 ("python-pysocks" ,python-pysocks)))
2255 (home-page "https://urllib3.readthedocs.io/")
2256 (synopsis "HTTP library with thread-safe connection pooling")
2258 "Urllib3 supports features left out of urllib and urllib2 libraries. It
2259 can reuse the same socket connection for multiple requests, it can POST files,
2260 supports url redirection and retries, and also gzip and deflate decoding.")
2261 (properties `((python2-variant . ,(delay python2-urllib3))))
2262 (license license:expat)))
2264 ;; Some software requires an older version of urllib3, notably Docker.
2265 (define-public python-urllib3-1.24
2266 (package (inherit python-urllib3)
2270 (uri (pypi-uri "urllib3" version))
2273 "1x0slqrv6kixkbcdnxbglvjliwhc1payavxjvk8fvbqjrnasd4r3"))))))
2276 (define-public python2-urllib3
2277 (let ((base (package-with-python2 (strip-python2-variant python-urllib3))))
2281 `(("python-ipaddress" ,python2-ipaddress)
2282 ,@(package-propagated-inputs base))))))
2284 (define-public awscli
2291 (uri (pypi-uri name version))
2294 "0p479mfs9r0m82a217pap8156ijwvhv6r3kqa4k267gd05wgvygm"))))
2295 (build-system python-build-system)
2297 ;; FIXME: The 'pypi' release does not contain tests.
2300 (modify-phases %standard-phases
2301 (add-after 'unpack 'fix-reference-to-groff
2303 (substitute* "awscli/help.py"
2304 (("if not self._exists_on_path\\('groff'\\):") "")
2305 (("raise ExecutableNotFoundError\\('groff'\\)") "")
2306 (("cmdline = \\['groff'")
2307 (string-append "cmdline = ['" (which "groff") "'")))
2310 `(("python-colorama" ,python-colorama)
2311 ("python-botocore" ,python-botocore)
2312 ("python-s3transfer" ,python-s3transfer)
2313 ("python-docutils" ,python-docutils)
2314 ("python-pyyaml" ,python-pyyaml)
2315 ("python-rsa" ,python-rsa)))
2317 `(("groff" ,groff)))
2318 (home-page "https://aws.amazon.com/cli/")
2319 (synopsis "Command line client for AWS")
2320 (description "AWS CLI provides a unified command line interface to the
2321 Amazon Web Services (AWS) API.")
2322 (license license:asl2.0)))
2324 (define-public python-wsgiproxy2
2326 (name "python-wsgiproxy2")
2331 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
2333 (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
2334 (build-system python-build-system)
2336 `(("python-webtest" ,python-webtest)))
2338 `(("python-requests" ,python-requests)
2339 ("python-six" ,python-six)
2340 ("python-urllib3" ,python-urllib3)
2341 ("python-webob" ,python-webob)))
2342 (home-page "https://github.com/gawel/WSGIProxy2/")
2343 (synopsis "WSGI Proxy with various http client backends")
2344 (description "WSGI turns HTTP requests into WSGI function calls.
2345 WSGIProxy turns WSGI function calls into HTTP requests.
2346 It also includes code to sign requests and pass private data,
2347 and to spawn subprocesses to handle requests.")
2348 (license license:expat)))
2350 (define-public python2-wsgiproxy2
2351 (package-with-python2 python-wsgiproxy2))
2353 (define-public python-pastedeploy
2355 (name "python-pastedeploy")
2360 (uri (pypi-uri "PasteDeploy" version))
2362 (base32 "05s88qdjdwd9d9qs13fap7nqgxs7qs5qfzzjbrc5va13k2mxdskd"))))
2363 (build-system python-build-system)
2365 '(#:test-target "pytest"))
2367 `(("python-pytest" ,python-pytest)
2368 ("python-pytest-runner" ,python-pytest-runner)))
2369 (home-page "https://pylonsproject.org/")
2371 "Load, configure, and compose WSGI applications and servers")
2373 "This tool provides code to load WSGI applications and servers from URIs;
2374 these URIs can refer to Python Eggs for INI-style configuration files. Paste
2375 Script provides commands to serve applications based on this configuration
2377 (license license:expat)))
2379 (define-public python2-pastedeploy
2380 (package-with-python2 python-pastedeploy))
2382 (define-public python-webtest
2384 (name "python-webtest")
2389 (uri (pypi-uri "WebTest" version))
2392 "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21"))))
2393 (build-system python-build-system)
2395 ;; Tests require python-pyquery, which creates a circular dependency.
2398 `(("python-waitress" ,python-waitress)
2399 ("python-webob" ,python-webob)
2400 ("python-six" ,python-six)
2401 ("python-beautifulsoup4" ,python-beautifulsoup4)))
2402 (home-page "https://docs.pylonsproject.org/projects/webtest/")
2403 (synopsis "Helper to test WSGI applications")
2404 (description "Webtest allows you to test your Python web applications
2405 without starting an HTTP server. It supports anything that supports the
2407 (license license:expat)))
2409 (define-public python2-webtest
2410 (package-with-python2 python-webtest))
2412 (define-public python-flask
2414 (name "python-flask")
2418 (uri (pypi-uri "Flask" version))
2421 "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf"))))
2422 (build-system python-build-system)
2425 (modify-phases %standard-phases
2428 (setenv "PYTHONPATH" (string-append "./build/lib:"
2429 (getenv "PYTHONPATH")))
2430 (invoke "pytest" "-vv" "tests"))))))
2432 `(("python-pytest" ,python-pytest)))
2434 `(("python-itsdangerous" ,python-itsdangerous)
2435 ("python-jinja2" ,python-jinja2)
2436 ("python-click" ,python-click)
2437 ("python-werkzeug" ,python-werkzeug)))
2438 (home-page "https://www.palletsprojects.com/p/flask/")
2439 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
2440 (description "Flask is a micro web framework based on the Werkzeug toolkit
2441 and Jinja2 template engine. It is called a micro framework because it does not
2442 presume or force a developer to use a particular tool or library.")
2443 (license license:bsd-3)))
2445 (define-public python2-flask
2446 (package-with-python2 python-flask))
2448 (define-public python-flask-wtf
2450 (name "python-flask-wtf")
2455 (uri (pypi-uri "Flask-WTF" version))
2458 "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"))))
2459 (build-system python-build-system)
2462 (modify-phases %standard-phases
2465 (setenv "PYTHONPATH" (string-append "./build/lib:"
2466 (getenv "PYTHONPATH")))
2467 (invoke "pytest" "-vv"))))))
2469 `(("python-flask-babel" ,python-flask-babel)
2470 ("python-babel" ,python-babel)
2471 ("python-wtforms" ,python-wtforms)))
2473 `(("python-pytest" ,python-pytest)))
2474 (home-page "https://github.com/lepture/flask-wtf")
2475 (synopsis "Simple integration of Flask and WTForms")
2476 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
2477 upload, and reCAPTCHA.")
2478 (license license:bsd-3)))
2480 (define-public python2-flask-wtf
2481 (package-with-python2 python-flask-wtf))
2483 (define-public python-flask-multistatic
2485 (name "python-flask-multistatic")
2490 (uri (pypi-uri "flask-multistatic" version))
2493 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
2494 (build-system python-build-system)
2496 `(("python-flask" ,python-flask)))
2497 (home-page "https://pagure.io/flask-multistatic")
2498 (synopsis "Flask plugin to allow overriding static files")
2499 (description "@code{flask-multistatic} is a flask plugin that adds support
2500 for overriding static files.")
2501 (license license:gpl3+)))
2503 (define-public python2-flask-multistatic
2504 (package-with-python2 python-flask-multistatic))
2506 (define-public python-cookies
2508 (name "python-cookies")
2512 (uri (pypi-uri "cookies" version))
2515 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
2516 (build-system python-build-system)
2518 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
2521 `(("python-pytest" ,python-pytest)))
2522 (synopsis "HTTP cookie parser and renderer")
2523 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
2525 (home-page "https://gitlab.com/sashahart/cookies")
2526 (license license:expat)))
2528 (define-public python2-cookies
2529 (package-with-python2 python-cookies))
2531 (define-public python-responses
2533 (name "python-responses")
2537 (uri (pypi-uri "responses" version))
2540 "147pacwkkqy3qf3hr33fnl1xbzgw0zsm3qppvvy9qhq8h069qbah"))))
2541 (build-system python-build-system)
2543 `(;; Test suite is not distributed:
2544 ;; https://github.com/getsentry/responses/issues/38
2547 `(("python-mock" ,python-mock)))
2549 `(("python-requests" ,python-requests)
2550 ("python-cookies" ,python-cookies)
2551 ("python-six" ,python-six)))
2552 (home-page "https://github.com/getsentry/responses")
2553 (synopsis "Utility for mocking out the `requests` Python library")
2554 (description "A utility library for mocking out the `requests` Python
2556 (license license:asl2.0)))
2558 (define-public python2-responses
2559 (package-with-python2 python-responses))
2561 (define-public python-grequests
2563 (name "python-grequests")
2568 (uri (pypi-uri "grequests" version))
2571 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
2572 (build-system python-build-system)
2574 `(("python-gevent" ,python-gevent)
2575 ("python-requests" ,python-requests)))
2577 `(("python-nose" ,python-nose)
2578 ("python-zope.interface" ,python-zope-interface)
2579 ("python-zope.event" ,python-zope-event)))
2580 (home-page "https://github.com/kennethreitz/grequests")
2581 (synopsis "Python library for asynchronous HTTP requests")
2582 (description "GRequests is a Python library that allows you to use
2583 @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
2584 (license license:bsd-2)))
2586 (define-public python-geventhttpclient
2588 (name "python-geventhttpclient")
2592 (uri (pypi-uri "geventhttpclient" version))
2595 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
2596 (modules '((guix build utils)))
2599 ;; Delete pre-compiled files.
2600 (for-each delete-file (find-files "src/geventhttpclient"
2603 (build-system python-build-system)
2606 (modify-phases %standard-phases
2607 (add-after 'unpack 'delete-network-tests
2609 (delete-file "src/geventhttpclient/tests/test_client.py")
2612 (lambda* (#:key inputs outputs #:allow-other-keys)
2613 (add-installed-pythonpath inputs outputs)
2614 (invoke "py.test" "src/geventhttpclient/tests" "-v"
2615 ;; Append the test modules to sys.path to avoid
2616 ;; namespace conflict which breaks SSL tests.
2617 "--import-mode=append"
2618 ;; XXX: Disable test fails with Python 3.8:
2619 ;; https://github.com/gwik/geventhttpclient/issues/119
2620 "-k" (string-append "not test_cookielib_compatibility"))
2623 `(("python-pytest" ,python-pytest)))
2625 `(("python-certifi" ,python-certifi)
2626 ("python-gevent" ,python-gevent)
2627 ("python-six" ,python-six)))
2628 (home-page "https://github.com/gwik/geventhttpclient")
2629 (synopsis "HTTP client library for gevent")
2630 (description "@code{python-geventhttpclient} is a high performance,
2631 concurrent HTTP client library for python using @code{gevent}.")
2632 (license license:expat)))
2634 (define-public python2-geventhttpclient
2635 (package-with-python2 python-geventhttpclient))
2637 (define-public python-requests-oauthlib
2639 (name "python-requests-oauthlib")
2644 (uri (pypi-uri "requests-oauthlib" version))
2647 "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
2648 (build-system python-build-system)
2651 (modify-phases %standard-phases
2652 ;; removes tests that require network access
2653 (add-before 'check 'pre-check
2655 (delete-file "tests/test_core.py")
2658 `(("python-pyjwt" ,python-pyjwt)
2659 ("python-requests-mock" ,python-requests-mock)
2660 ("python-mock" ,python-mock)))
2662 `(("python-oauthlib" ,python-oauthlib)
2663 ("python-requests" ,python-requests)))
2665 "https://github.com/requests/requests-oauthlib")
2667 "OAuthlib authentication support for Requests")
2669 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
2670 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
2671 (license license:isc)))
2673 (define-public python2-requests-oauthlib
2674 (package-with-python2 python-requests-oauthlib))
2676 (define-public python-url
2682 (uri (pypi-uri "url" version))
2685 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
2686 (build-system python-build-system)
2688 `(("python-publicsuffix" ,python-publicsuffix)))
2690 `(("python-coverage" ,python-coverage)
2691 ("python-nose" ,python-nose)))
2693 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
2694 (home-page "https://github.com/seomoz/url-py")
2695 (synopsis "URL Parsing")
2696 (description "Library for parsing urls.")
2697 (license license:expat)
2698 (properties `((python2-variant . ,(delay python2-url))))))
2700 (define-public python2-url
2701 (let ((base (package-with-python2 (strip-python2-variant python-url))))
2702 (package (inherit base)
2704 `(("python2-publicsuffix" ,python2-publicsuffix))))))
2706 (define-public python-cachecontrol
2708 (name "python-cachecontrol")
2713 ;; Pypi does not have tests.
2715 (url "https://github.com/ionrock/cachecontrol")
2716 (commit (string-append "v" version))))
2717 (file-name (git-file-name name version))
2720 "03lgc65sl04n0cgzmmgg99bk83f9i6k8yrmcd4hpl46q1pymn0kz"))))
2721 (build-system python-build-system)
2723 ;; Versions > 0.11.6 depend on CherryPy for testing.
2724 ;; It's too much work to package CherryPy for now.
2727 `(("python-requests" ,python-requests)
2728 ("python-msgpack" ,python-msgpack)
2729 ("python-lockfile" ,python-lockfile)))
2730 (home-page "https://github.com/ionrock/cachecontrol")
2731 (synopsis "The httplib2 caching algorithms for use with requests")
2732 (description "CacheControl is a port of the caching algorithms in
2733 @code{httplib2} for use with @code{requests} session objects.")
2734 (license license:asl2.0)))
2736 (define-public python2-cachecontrol
2737 (package-with-python2 python-cachecontrol))
2739 (define-public python-betamax
2741 (name "python-betamax")
2746 (uri (pypi-uri "betamax" version))
2749 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
2750 (build-system python-build-system)
2752 '(;; Many tests fail because they require networking.
2755 `(("python-requests" ,python-requests)))
2756 (home-page "https://github.com/sigmavirus24/betamax")
2757 (synopsis "Record HTTP interactions with python-requests")
2758 (description "Betamax will record your test suite's HTTP interactions and
2759 replay them during future tests. It is designed to work with python-requests.")
2760 (license license:expat)))
2762 (define-public python2-betamax
2763 (package-with-python2 python-betamax))
2765 (define-public python-betamax-matchers
2767 (name "python-betamax-matchers")
2772 (uri (pypi-uri "betamax-matchers" version))
2775 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
2776 (build-system python-build-system)
2778 `(("python-betamax" ,python-betamax)
2779 ("python-requests-toolbelt" ,python-requests-toolbelt)))
2780 (home-page "https://github.com/sigmavirus24/betamax_matchers")
2781 (synopsis "VCR imitation for python-requests")
2782 (description "@code{betamax-matchers} provides a set of Matchers for
2784 (license license:asl2.0)))
2786 (define-public python2-betamax-matchers
2787 (package-with-python2 python-betamax-matchers))
2789 (define-public python-s3transfer
2791 (name "python-s3transfer")
2795 (uri (pypi-uri "s3transfer" version))
2798 "08fhj73b1ai52hrs2q3nggshq3pswn1gq8ch3m009cb2v2vmqggj"))))
2799 (build-system python-build-system)
2802 (modify-phases %standard-phases
2803 (add-after 'unpack 'patch
2805 ;; There's a small issue with one test with Python 3.8, this
2806 ;; change has been suggested upstream:
2807 ;; https://github.com/boto/s3transfer/pull/164
2808 (substitute* "tests/unit/test_s3transfer.py"
2809 (("super\\(FailedDownloadParts, self\\)\\.submit\\(function\\)")
2810 "futures.Future()"))
2814 ;; Some of the 'integration' tests require network access or
2815 ;; login credentials.
2816 (invoke "nosetests" "--exclude=integration")
2819 `(("python-docutils" ,python-docutils)
2820 ("python-mock" ,python-mock)
2821 ("python-nose" ,python-nose)))
2823 `(("python-botocore" ,python-botocore)
2824 ("python-urllib3" ,python-urllib3)))
2825 (synopsis "Amazon S3 Transfer Manager")
2826 (description "S3transfer is a Python library for managing Amazon S3
2828 (home-page "https://github.com/boto/s3transfer")
2829 (license license:asl2.0)
2830 (properties `((python2-variant . ,(delay python2-s3transfer))))))
2832 (define-public python2-s3transfer
2833 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
2837 `(("python2-futures" ,python2-futures)
2838 ,@(package-native-inputs base))))))
2840 (define-public python-slimit
2842 (name "python-slimit")
2847 (uri (pypi-uri "slimit" version ".zip"))
2850 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
2851 (build-system python-build-system)
2853 `(("unzip" ,unzip)))
2855 `(("python-ply" ,python-ply)))
2856 (home-page "https://slimit.readthedocs.io/")
2857 (synopsis "JavaScript minifier, parser and lexer written in Python")
2859 "SlimIt is a JavaScript minifier written in Python. It compiles
2860 JavaScript into more compact code so that it downloads and runs faster.
2861 SlimIt also provides a library that includes a JavaScript parser, lexer,
2862 pretty printer and a tree visitor.")
2863 (license license:expat)))
2865 (define-public python-flask-restful
2867 (name "python-flask-restful")
2872 (uri (pypi-uri "Flask-RESTful" version))
2873 (patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
2876 "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
2877 (build-system python-build-system)
2879 `(("python-aniso8601" ,python-aniso8601)
2880 ("python-flask" ,python-flask)
2881 ("python-pycrypto" ,python-pycrypto)
2882 ("python-pytz" ,python-pytz)))
2884 `(;; Optional dependency of Flask. Tests need it.
2885 ("python-blinker" ,python-blinker)
2886 ("python-mock" ,python-mock) ; For tests
2887 ("python-nose" ,python-nose))) ;for tests
2889 "https://www.github.com/flask-restful/flask-restful/")
2891 "Flask module for creating REST APIs")
2893 "This package contains a Flask module for creating REST APIs.")
2894 (license license:bsd-3)))
2896 (define-public python-flask-basicauth
2898 (name "python-flask-basicauth")
2903 (uri (pypi-uri "Flask-BasicAuth" version))
2906 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
2907 (build-system python-build-system)
2909 `(#:phases (modify-phases %standard-phases
2910 (add-after 'unpack 'fix-imports
2912 (substitute* '("docs/index.rst"
2914 "flask_basicauth.py"
2915 "test_basicauth.py")
2916 (("flask\\.ext\\.basicauth")
2920 `(("python-flask" ,python-flask)))
2921 (home-page "https://github.com/jpvanhal/flask-basicauth")
2922 (synopsis "HTTP basic access authentication for Flask")
2924 "This package provides HTTP basic access authentication for Flask.")
2925 (license license:bsd-3)))
2927 (define-public python-flask-htpasswd
2929 (name "python-flask-htpasswd")
2934 (uri (pypi-uri "flask-htpasswd" version))
2937 "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
2938 (build-system python-build-system)
2940 `(("python-flask" ,python-flask)
2941 ("python-itsdangerous" ,python-itsdangerous)
2942 ("python-passlib" ,python-passlib)
2943 ("python-tox" ,python-tox)))
2944 (home-page "https://github.com/carsongee/flask-htpasswd")
2945 (synopsis "Basic authentication via htpasswd files in Flask applications")
2946 (description "This package provides Basic authentication via
2947 @file{htpasswd} files and access_token authentication in Flask
2949 (license license:bsd-3)))
2951 (define-public python-flask-sqlalchemy
2953 (name "python-flask-sqlalchemy")
2957 (uri (pypi-uri "Flask-SQLAlchemy" version))
2960 "1rgsj49gnx361hnb3vn6c1h17497qh22yc3r70l1r6w0mw71bixz"))))
2961 (build-system python-build-system)
2963 `(("python-flask" ,python-flask)
2964 ("python-sqlalchemy" ,python-sqlalchemy)))
2965 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
2966 (synopsis "Module adding SQLAlchemy support to your Flask application")
2968 "This package adds SQLAlchemy support to your Flask application.")
2969 (license license:bsd-3)))
2971 (define-public python-flask-restplus
2973 (name "python-flask-restplus")
2978 (uri (pypi-uri "flask-restplus" version))
2981 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2982 (build-system python-build-system)
2984 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2986 ;; (modify-phases %standard-phases
2989 ;; (invoke "nosetests")
2992 `(("python-aniso8601" ,python-aniso8601)
2993 ("python-flask" ,python-flask)
2994 ("python-jsonschema" ,python-jsonschema)
2995 ("python-pytz" ,python-pytz)
2996 ("python-six" ,python-six)))
2998 `(("python-tzlocal" ,python-tzlocal)
2999 ("python-blinker" ,python-blinker)
3000 ("python-nose" ,python-nose)
3001 ("python-rednose" ,python-rednose)))
3002 (home-page "https://github.com/noirbizarre/flask-restplus")
3003 (synopsis "Framework for documented API development with Flask")
3004 (description "This package provides a framework for API development with
3005 the Flask web framework in Python. It is similar to package
3006 @code{python-flask-restful} but supports the @code{python-swagger}
3007 documentation builder.")
3008 (license license:expat)))
3010 (define-public python-flask-restful-swagger
3012 (name "python-flask-restful-swagger")
3017 (uri (pypi-uri "flask-restful-swagger" version))
3020 "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
3021 (build-system python-build-system)
3022 (arguments '(#:tests? #f)) ;no tests
3024 `(("python-flask-restful" ,python-flask-restful)))
3025 (home-page "https://github.com/rantav/flask-restful-swagger")
3026 (synopsis "Extract Swagger specs from Flask-Restful projects")
3027 (description "This package lets you extract Swagger API documentation
3028 specs from your Flask-Restful projects.")
3029 (license license:expat)))
3031 (define-public python2-flask-restful-swagger
3032 (package-with-python2 python-flask-restful-swagger))
3034 (define-public python-htmlmin
3036 (name "python-htmlmin")
3041 (uri (pypi-uri "htmlmin" version))
3044 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
3046 `(#:tests? #f)) ; no tests
3047 (build-system python-build-system)
3048 (home-page "https://htmlmin.readthedocs.org/en/latest/")
3049 (synopsis "HTML minifier")
3050 (description "@code{htmlmin} is an HTML minifier that just works.
3051 It comes with safe defaults and easily configurable options.")
3052 (license license:bsd-3)))
3054 (define-public python2-htmlmin
3055 (package-with-python2 python-htmlmin))
3057 (define-public python-flask-htmlmin
3059 (name "python-flask-htmlmin")
3064 (uri (pypi-uri "Flask-HTMLmin" version))
3067 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
3069 `(("python-flask" ,python-flask)
3070 ("python-htmlmin" ,python-htmlmin)))
3071 (build-system python-build-system)
3072 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
3073 (synopsis "HTML response minifier for Flask")
3075 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
3076 (license license:bsd-3)))
3078 (define-public python2-flask-htmlmin
3079 (package-with-python2 python-flask-htmlmin))
3081 (define-public python-jsmin
3083 (name "python-jsmin")
3088 (uri (pypi-uri "jsmin" version))
3091 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
3092 (build-system python-build-system)
3093 (home-page "https://github.com/tikitu/jsmin/")
3094 (synopsis "Python JavaScript minifier")
3096 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
3097 on the command line.")
3098 (license license:expat)))
3100 (define-public python-flask-login
3102 (name "python-flask-login")
3108 (url "https://github.com/maxcountryman/flask-login")
3110 (file-name (git-file-name name version))
3112 (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
3113 (build-system python-build-system)
3115 `(("python-flask" ,python-flask)))
3118 `(("python-blinker" ,python-blinker)
3119 ("python-coverage" ,python-coverage)
3120 ("python-mock" ,python-mock)
3121 ("python-pycodestyle" ,python-pycodestyle)
3122 ("python-pyflakes" ,python-pyflakes)
3123 ("python-pytest" ,python-pytest)
3124 ("python-semantic-version" ,python-semantic-version)
3125 ("python-werkzeug" ,python-werkzeug)))
3126 (home-page "https://github.com/maxcountryman/flask-login")
3127 (synopsis "User session management for Flask")
3129 "@code{Flask-Login} provides user session management for Flask. It
3130 handles the common tasks of logging in, logging out, and remembering your
3131 users' sessions over extended periods of time.")
3132 (license license:expat)))
3134 (define-public python2-flask-login
3135 (package-with-python2 python-flask-login))
3137 (define-public python-oauth2client
3139 (name "python-oauth2client")
3144 (uri (pypi-uri "oauth2client" version))
3147 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
3148 (build-system python-build-system)
3152 `(("python-httplib2" ,python-httplib2)
3153 ("python-pyasn1" ,python-pyasn1)
3154 ("python-pyasn1-modules" ,python-pyasn1-modules)
3155 ("python-rsa" ,python-rsa)
3156 ("python-six" ,python-six)))
3157 (home-page "https://github.com/google/oauth2client/")
3158 (synopsis "OAuth 2.0 client library")
3159 (description "@code{python-oauth2client} provides an OAuth 2.0 client
3160 library for Python")
3161 (license license:asl2.0)))
3163 (define-public python2-oauth2client
3164 (package-with-python2 python-oauth2client))
3166 (define-public python-flask-oidc
3168 (name "python-flask-oidc")
3173 (uri (pypi-uri "flask-oidc" version))
3176 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
3177 (build-system python-build-system)
3179 `(("python-flask" ,python-flask)
3180 ("python-itsdangerous" ,python-itsdangerous)
3181 ("python-oauth2client" ,python-oauth2client)
3182 ("python-six" ,python-six)))
3184 `(("python-nose" ,python-nose)
3185 ("python-mock" ,python-mock)))
3186 (home-page "https://github.com/puiterwijk/flask-oidc")
3187 (synopsis "OpenID Connect extension for Flask")
3188 (description "@code{python-flask-oidc} provides an OpenID Connect extension
3190 (license license:bsd-2)))
3192 (define-public python-webassets
3194 (name "python-webassets")
3199 (uri (pypi-uri "webassets" version))
3202 "1kc1042jydgk54xpgcp0r1ib4gys91nhy285jzfcxj3pfqrk4w8n"))))
3203 (build-system python-build-system)
3205 '(#:phases (modify-phases %standard-phases
3206 (add-before 'check 'disable-some-tests
3208 ;; This test requires 'postcss' and 'babel' which are
3209 ;; not yet available in Guix.
3210 (delete-file "tests/test_filters.py")
3214 (setenv "PYTHONPATH"
3215 (string-append "./build/lib:"
3216 (getenv "PYTHONPATH")))
3217 (invoke "pytest" "-vv"))))))
3219 `(("python-jinja2" ,python-jinja2)
3220 ("python-mock" ,python-mock)
3221 ("python-nose" ,python-nose)
3222 ("python-pytest" ,python-pytest)))
3223 (home-page "https://github.com/miracle2k/webassets")
3224 (synopsis "Media asset management")
3225 (description "Merges, minifies and compresses Javascript and CSS files,
3226 supporting a variety of different filters, including YUI, jsmin, jspacker or
3227 CSS tidy. Also supports URL rewriting in CSS files.")
3228 (license license:bsd-2)))
3230 (define-public python-cssmin
3232 (name "python-cssmin")
3237 (uri (pypi-uri "cssmin" version))
3240 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
3241 (build-system python-build-system)
3242 (home-page "https://github.com/zacharyvoase/cssmin")
3243 (synopsis "Python port of the YUI CSS Compressor")
3244 (description "Python port of the YUI CSS Compressor.")
3245 (license (list license:expat license:bsd-3))))
3247 (define-public python2-cssmin
3248 (package-with-python2 python-cssmin))
3250 (define-public python-elasticsearch
3252 (name "python-elasticsearch")
3257 (uri (pypi-uri "elasticsearch" version))
3260 "0rnjvlhw4v3vg14l519qliy1s1zpmx3827q0xfviwvk42rr7hh01"))))
3261 (build-system python-build-system)
3263 `(("python-mock" ,python-mock)
3264 ("python-nosexcover" ,python-nosexcover)
3265 ("python-pyaml" ,python-pyaml)
3266 ("python-requests" ,python-requests)))
3268 `(("urllib3" ,python-urllib3)))
3270 ;; tests require the test_elasticsearch module but it is not distributed.
3272 (home-page "https://github.com/elastic/elasticsearch-py")
3273 (synopsis "Low-level client for Elasticsearch")
3274 (description "Official low-level client for Elasticsearch. Its goal is to
3275 provide common ground for all Elasticsearch-related code in Python; because of
3276 this it tries to be opinion-free and very extendable.")
3277 (license license:expat)))
3279 (define-public python2-elasticsearch
3280 (package-with-python2 python-elasticsearch))
3282 (define-public python-flask-script
3284 (name "python-flask-script")
3289 (uri (pypi-uri "Flask-Script" version))
3292 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
3293 (build-system python-build-system)
3296 (modify-phases %standard-phases
3297 (add-after 'unpack 'patch-tests
3299 (substitute* "tests.py"
3300 (("flask\\.ext\\.script") "flask_script"))
3303 `(("python-flask" ,python-flask)
3304 ("python-argcomplete" ,python-argcomplete)
3305 ("python-werkzeug" ,python-werkzeug)))
3307 `(("python-pytest" ,python-pytest)))
3309 "https://github.com/smurfix/flask-script")
3310 (synopsis "Scripting support for Flask")
3311 (description "The Flask-Script extension provides support for writing
3312 external scripts in Flask. This includes running a development server,
3313 a customised Python shell, scripts to set up your database, cronjobs,
3314 and other command-line tasks that belong outside the web application
3316 (license license:bsd-3)))
3318 (define-public python2-flask-script
3319 (package-with-python2 python-flask-script))
3321 (define-public python-flask-migrate
3323 (name "python-flask-migrate")
3328 (uri (pypi-uri "Flask-Migrate" version))
3331 "1vip9ww6l18dxffjsggm83k71zkvihxpnhaswpv8klh95s6517d6"))))
3332 (build-system python-build-system)
3334 `(("python-flask" ,python-flask)
3335 ("python-alembic" ,python-alembic)
3336 ("python-sqlalchemy" ,python-sqlalchemy)
3337 ("python-flask-script" ,python-flask-script)
3338 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
3339 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
3340 (synopsis "SQLAlchemy database migrations for Flask programs using
3342 (description "This package contains SQLAlchemy database migration tools
3343 for Flask programs that are using @code{python-alembic}.")
3344 (license license:expat)))
3346 (define-public python-genshi
3348 (name "python-genshi")
3354 (url "https://github.com/edgewall/genshi")
3356 (file-name (git-file-name name version))
3358 (base32 "04bw7nd4wyn8ixnhik57hny2xpjjpn80k5hp6691inix5gc6rxaf"))))
3359 (build-system python-build-system)
3360 (home-page "https://genshi.edgewall.org/")
3361 (synopsis "Toolkit for generation of output for the web")
3362 (description "Genshi is a Python library that provides an integrated set
3363 of components for parsing, generating, and processing HTML, XML or other
3364 textual content for output generation on the web.")
3365 (license license:bsd-3)))
3367 (define-public python2-genshi
3368 (package-with-python2 python-genshi))
3370 (define-public python-flask-principal
3372 (name "python-flask-principal")
3377 (uri (pypi-uri "Flask-Principal" version))
3380 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
3381 (build-system python-build-system)
3383 `(("python-blinker" ,python-blinker)))
3385 `(("python-flask" ,python-flask)
3386 ("python-nose" ,python-nose)))
3387 (home-page "https://pythonhosted.org/Flask-Principal/")
3388 (synopsis "Identity management for Flask")
3389 (description "@code{flask_principal} is a identity management library for
3390 Flask. It supports managing both authentication and authorization data in a
3391 thread-local variable.")
3392 (license license:expat)))
3394 (define-public python2-flask-principal
3395 (package-with-python2 python-flask-principal))
3397 (define-public python-flask-httpauth
3399 (name "python-flask-httpauth")
3404 (uri (pypi-uri "Flask-HTTPAuth" version))
3407 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
3408 (build-system python-build-system)
3410 `(("python-flask" ,python-flask)))
3411 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
3412 (synopsis "Basic and Digest HTTP authentication for Flask routes")
3413 (description "@code{flask_httpauth} provides Basic and Digest HTTP
3414 authentication for Flask routes.")
3415 (license license:expat)))
3417 (define-public python2-flask-httpauth
3418 (package-with-python2 python-flask-httpauth))
3420 (define-public python-uritemplate
3422 (name "python-uritemplate")
3427 (uri (pypi-uri "uritemplate" version))
3430 "1bkwmgr0ia9gcn4bszs2xlvml79f0bi2s4a87xg22ky9rq8avy2s"))))
3431 (build-system python-build-system)
3432 (home-page "https://uritemplate.readthedocs.org")
3433 (synopsis "Library to deal with URI Templates")
3434 (description "@code{uritemplate} provides Python library to deal with URI
3436 (license license:bsd-2)))
3438 (define-public python2-uritemplate
3439 (package-with-python2 python-uritemplate))
3441 (define-public python-publicsuffix
3443 (name "python-publicsuffix")
3447 (uri (pypi-uri "publicsuffix" version))
3450 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
3451 (build-system python-build-system)
3453 `(#:tests? #f)) ; tests use the internet
3454 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
3455 (synopsis "Get suffix for a domain name")
3456 (description "Get a public suffix for a domain name using the Public Suffix
3458 (license license:expat)))
3460 (define-public python2-publicsuffix
3461 (package-with-python2 python-publicsuffix))
3463 (define-public python-publicsuffix2
3465 (name "python-publicsuffix2")
3466 (version "2.20191221")
3470 (uri (pypi-uri "publicsuffix2" version))
3472 (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
3473 (build-system python-build-system)
3476 (modify-phases %standard-phases
3477 (add-after 'unpack 'ignore-maintainer-inputs
3479 ;; Comment out a demand for python-requests, which is used only by
3480 ;; the unused ‘update_psl’ helper command.
3481 (substitute* "setup.py"
3482 (("'requests " match)
3483 (format #f "# ~a" match)))
3485 #:tests? #f)) ; the test suite requires network access
3486 (home-page "https://github.com/pombredanne/python-publicsuffix2")
3487 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
3488 (description "Get a public suffix for a domain name using the Public Suffix
3489 List. Forked from and using the same API as the publicsuffix package.")
3490 (license (list license:expat license:mpl2.0))))
3492 (define-public python2-publicsuffix2
3493 (package-with-python2 python-publicsuffix2))
3495 (define-public python-werkzeug
3497 (name "python-werkzeug")
3502 (uri (pypi-uri "Werkzeug" version))
3505 "15kh0z61klp62mrc1prka13xsshxn0rsp1j1s2964iw86yisi6qn"))))
3506 (build-system python-build-system)
3509 (modify-phases %standard-phases
3511 (add-after 'install 'check
3512 (lambda* (#:key inputs outputs #:allow-other-keys)
3513 (add-installed-pythonpath inputs outputs)
3514 (invoke "python" "-m" "pytest"))))))
3516 `(("python-requests" ,python-requests)))
3518 `(("python-pytest" ,python-pytest)
3519 ("python-pytest-timeout" ,python-pytest-timeout)))
3520 (home-page "https://www.palletsprojects.org/p/werkzeug/")
3521 (synopsis "Utilities for WSGI applications")
3522 (description "One of the most advanced WSGI utility modules. It includes a
3523 powerful debugger, full-featured request and response objects, HTTP utilities to
3524 handle entity tags, cache control headers, HTTP dates, cookie handling, file
3525 uploads, a powerful URL routing system and a bunch of community-contributed
3527 (license license:x11)))
3529 (define-public python2-werkzeug
3530 (package-with-python2 python-werkzeug))
3532 (define-public python-bottle
3534 (name "python-bottle")
3539 (uri (pypi-uri "bottle" version))
3541 (base32 "0b6s50vc4iad97b6bb3xnyrgajb3nj6n6jbr5p54a4vapky3zmx9"))))
3542 (build-system python-build-system)
3543 (home-page "https://bottlepy.org/")
3544 (synopsis "WSGI framework for small web-applications.")
3545 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
3546 (license license:expat)))
3548 (define-public python2-bottle
3549 (package-with-python2 python-bottle))
3551 (define-public python-wtforms
3553 (name "python-wtforms")
3558 (uri (pypi-uri "WTForms" version ".zip"))
3561 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
3562 (build-system python-build-system)
3565 (modify-phases %standard-phases
3566 (add-after 'unpack 'remove-django-test
3567 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
3571 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
3572 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
3575 `(("unzip" ,unzip)))
3576 (home-page "http://wtforms.simplecodes.com/")
3578 "Form validation and rendering library for Python web development")
3580 "WTForms is a flexible forms validation and rendering library
3581 for Python web development. It is very similar to the web form API
3582 available in Django, but is a standalone package.")
3583 (license license:bsd-3)))
3585 (define-public python2-wtforms
3586 (package-with-python2 python-wtforms))
3588 (define-public python-paste
3590 (name "python-paste")
3595 (uri (pypi-uri "Paste" version))
3598 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
3599 (patches (search-patches "python-paste-remove-timing-test.patch"))
3600 (modules '((guix build utils)))
3603 ;; This test calls out to the internet.
3604 (delete-file "tests/test_proxy.py") #t))))
3605 (build-system python-build-system)
3607 `(("python-pytest" ,python-pytest)
3608 ("python-pytest-runner" ,python-pytest-runner)
3609 ("python-nose" ,python-nose)))
3611 `(("python-six" ,python-six)))
3612 (home-page "https://pythonpaste.readthedocs.io/")
3614 "Python web development tools, focusing on WSGI")
3616 "Paste provides a variety of web development tools and middleware which
3617 can be nested together to build web applications. Paste's design closely
3618 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
3619 (license license:expat)))
3621 (define-public python2-paste
3622 (package-with-python2 python-paste))
3624 (define-public python-pastescript
3626 (name "python-pastescript")
3631 (uri (pypi-uri "PasteScript" version))
3634 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
3635 (build-system python-build-system)
3637 `(("python-nose" ,python-nose)))
3639 `(("python-paste" ,python-paste)
3640 ("python-pastedeploy" ,python-pastedeploy)))
3641 (home-page (string-append "https://web.archive.org/web/20161025192515/"
3642 "http://pythonpaste.org/script/"))
3644 '(;; Unfortunately, this requires the latest unittest2,
3645 ;; but that requires traceback2 which requires linecache2 which requires
3646 ;; unittest2. So we're skipping tests for now.
3647 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
3648 ;; so in theory we could get around this situation somehow.)
3651 "Pluggable command line tool for serving web applications and more")
3653 "PasteScript is a plugin-friendly command line tool which provides a
3654 variety of features, from launching web applications to bootstrapping project
3656 (license license:expat)))
3658 (define-public python2-pastescript
3659 (package-with-python2 python-pastescript))
3661 (define-public python2-urlgrabber
3663 (name "python2-urlgrabber")
3668 (uri (pypi-uri "urlgrabber" version))
3670 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
3671 (build-system python-build-system)
3672 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
3673 (home-page "http://urlgrabber.baseurl.org")
3674 (synopsis "High-level cross protocol url-grabber")
3675 (description "@code{urlgrabber} is Python2 library that unifies access to
3676 files available on web, FTP or locally. It supports HTTP, FTP and file://
3677 protocols, it supports features like HTTP keep-alive, reget, throttling and
3679 (license license:lgpl2.1+)))
3681 (define-public python-pycares
3683 (name "python-pycares")
3688 (uri (pypi-uri "pycares" version))
3691 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
3692 (build-system python-build-system)
3694 `(#:tests? #f)) ;tests require internet access
3695 (home-page "https://github.com/saghul/pycares")
3696 (synopsis "Python interface for @code{c-ares}")
3697 (description "@code{pycares} is a Python module which provides an
3698 interface to @code{c-ares}, a C library that performs DNS requests and
3699 name resolutions asynchronously.")
3700 (license license:expat)))
3702 (define-public python-yarl
3704 (name "python-yarl")
3709 (uri (pypi-uri "yarl" version))
3712 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
3713 (build-system python-build-system)
3715 `(("python-pytest" ,python-pytest)
3716 ("python-pytest-runner" ,python-pytest-runner)))
3718 `(("python-idna" ,python-idna)
3719 ("python-multidict" ,python-multidict)))
3720 (home-page "https://github.com/aio-libs/yarl/")
3721 (synopsis "Yet another URL library")
3722 (description "@code{yarl} module provides handy @code{URL} class
3723 for URL parsing and changing.")
3724 (license license:asl2.0)))
3726 (define-public python-google-api-client
3728 (name "python-google-api-client")
3733 (uri (pypi-uri "google-api-python-client" version))
3736 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
3737 (build-system python-build-system)
3739 '(#:tests? #f)) ; tests require internet access
3741 `(("python-httplib2" ,python-httplib2)
3742 ("python-six" ,python-six)
3743 ("python-oauth2client" ,python-oauth2client)
3744 ("python-uritemplate" ,python-uritemplate)))
3745 (home-page "https://github.com/google/google-api-python-client")
3746 (synopsis "Core Python library for accessing Google APIs")
3747 (description "Python client library for Google's discovery based APIs")
3748 (license license:asl2.0)))
3750 (define-public python2-google-api-client
3751 (package-with-python2 python-google-api-client))
3753 (define-public python-hawkauthlib
3755 (name "python-hawkauthlib")
3760 (uri (pypi-uri "hawkauthlib" version))
3763 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
3764 (build-system python-build-system)
3766 `(("python-requests" ,python-requests)
3767 ("python-webob" ,python-webob)))
3768 (home-page "https://github.com/mozilla-services/hawkauthlib")
3769 (synopsis "Hawk Access Authentication protocol")
3771 "This is a low-level Python library for implementing Hawk Access Authentication,
3772 a simple HTTP request-signing scheme.")
3773 (license license:mpl2.0)))
3775 (define-public python-pybrowserid
3777 (name "python-pybrowserid")
3782 (uri (pypi-uri "PyBrowserID" version))
3785 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
3786 (build-system python-build-system)
3788 `(("python-requests" ,python-requests)))
3790 `(("python-mock" ,python-mock)))
3791 (home-page "https://github.com/mozilla/PyBrowserID")
3792 (synopsis "Python library for the BrowserID protocol")
3794 "This is a Python client library for the BrowserID protocol that
3795 underlies Mozilla Persona.")
3796 (license license:mpl2.0)))
3798 (define-public python-pyfxa
3800 (name "python-pyfxa")
3805 (uri (pypi-uri "PyFxA" version))
3808 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
3809 (build-system python-build-system)
3810 (arguments '(#:tests? #f)) ; 17 tests require network access
3812 `(("python-cryptography" ,python-cryptography)
3813 ("python-hawkauthlib" ,python-hawkauthlib)
3814 ("python-pybrowserid" ,python-pybrowserid)
3815 ("python-requests" ,python-requests)
3816 ("python-six" ,python-six)))
3818 `(("python-grequests" ,python-grequests)
3819 ("python-mock" ,python-mock)
3820 ("python-responses" ,python-responses)
3821 ("python-unittest2" ,python-unittest2)))
3822 (home-page "https://github.com/mozilla/PyFxA")
3823 (synopsis "Firefox Accounts client library for Python")
3825 "This is a Python library for interacting with the Firefox Accounts
3827 (license license:mpl2.0)))
3829 (define-public python-hyperlink
3831 (name "python-hyperlink")
3836 (uri (pypi-uri "hyperlink" version))
3839 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
3840 (build-system python-build-system)
3842 `(("python-idna" ,python-idna)))
3843 (home-page "https://github.com/python-hyper/hyperlink")
3844 (synopsis "Python module to create immutable URLs according to spec")
3845 (description "This package provides a Python module to create immutable, and
3846 correct URLs for Python according to RFCs 3986 and 3987.")
3847 (license license:expat)))
3849 (define-public python-treq
3851 (name "python-treq")
3856 (uri (pypi-uri "treq" version))
3859 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
3860 (build-system python-build-system)
3862 `(("python-attrs" ,python-attrs)
3863 ("python-idna" ,python-idna)
3864 ("python-incremental" ,python-incremental)
3865 ("python-requests" ,python-requests)
3866 ("python-service-identity" ,python-service-identity)
3867 ("python-twisted" ,python-twisted)))
3868 (home-page "https://github.com/twisted/treq")
3869 (synopsis "Requests-like API built on top of twisted.web's Agent")
3870 (description "This package provides an HTTP library inspired by
3871 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
3872 high level API for making HTTP requests when using Twisted.")
3873 (license license:expat)))
3875 (define-public python-autobahn
3877 (name "python-autobahn")
3882 (uri (pypi-uri "autobahn" version))
3885 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
3886 (build-system python-build-system)
3888 ;; The tests fail to run:
3889 ;; https://github.com/crossbario/autobahn-python/issues/1117
3892 `(("python-cffi" ,python-cffi)
3893 ("python-twisted" ,python-twisted)
3894 ("python-txaio" ,python-txaio)))
3895 (home-page "https://crossbar.io/autobahn/")
3896 (synopsis "Web Application Messaging Protocol implementation")
3897 (description "This package provides an implementation of the @dfn{Web Application
3898 Messaging Protocol} (WAMP). WAMP connects components in distributed
3899 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
3900 Calls (rRPC). It is ideal for distributed, multi-client and server applications
3901 such as IoT applications or multi-user database-driven business applications.")
3902 (license license:expat)))
3904 (define-public python-ws4py
3906 (name "python-ws4py")
3911 (uri (pypi-uri "ws4py" version))
3914 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
3915 (build-system python-build-system)
3918 (modify-phases %standard-phases
3919 (add-after 'unpack 'python3.7-compatibility
3921 (substitute* '("ws4py/server/tulipserver.py"
3922 "ws4py/async_websocket.py")
3924 "asyncio.ensure_future"))
3926 ;; We don't have a package for cherrypy.
3927 (add-after 'unpack 'remove-cherrypy-support
3929 (delete-file "ws4py/server/cherrypyserver.py")
3932 `(("python-gevent" ,python-gevent)
3933 ("python-tornado" ,python-tornado)))
3934 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
3935 (synopsis "WebSocket client and server library")
3937 "This package provides a WebSocket client and server library for
3939 (license license:bsd-3)))
3941 (define-public python-slugify
3943 (name "python-slugify")
3948 (uri (pypi-uri "python-slugify" version))
3950 (base32 "0w22fapghmzk3xdasc4dn7h8sl58l08d1h5zbf72dh80drv1g9b9"))))
3952 `(("python-unidecode" ,python-unidecode)))
3955 (modify-phases %standard-phases
3958 (invoke "python" "test.py"))))))
3959 (build-system python-build-system)
3960 (home-page "https://github.com/un33k/python-slugify")
3961 (synopsis "Python Slugify application that handles Unicode")
3962 (description "This package provides a @command{slufigy} command and
3963 library to create slugs from unicode strings while keeping it DRY.")
3964 (license license:expat)))
3966 (define-public python-branca
3968 (name "python-branca")
3973 (uri (pypi-uri "branca" version))
3976 "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
3977 (build-system python-build-system)
3979 `(("python-jinja2" ,python-jinja2)
3980 ("python-six" ,python-six)))
3982 `(("python-pytest" ,python-pytest)))
3983 (home-page "https://github.com/python-visualization/branca")
3984 (synopsis "Generate complex HTML+JS pages with Python")
3985 (description "Generate complex HTML+JS pages with Python")
3986 (license license:expat)))
3988 (define-public python-tinycss2
3990 (name "python-tinycss2")
3995 (uri (pypi-uri "tinycss2" version))
3996 (patches (search-patches "python-tinycss2-flake8-compat.patch"))
3998 (base32 "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4"))))
3999 (build-system python-build-system)
4002 (modify-phases %standard-phases
4004 (lambda _ (invoke "pytest"))))))
4006 `(("python-webencodings" ,python-webencodings)))
4008 `(("python-pytest-flake8" ,python-pytest-flake8)
4009 ("python-pytest-isort" ,python-pytest-isort)
4010 ("python-pytest-runner" ,python-pytest-runner)))
4011 (home-page "https://tinycss2.readthedocs.io/")
4012 (synopsis "Low-level CSS parser for Python")
4013 (description "@code{tinycss2} can parse strings, return Python objects
4014 representing tokens and blocks, and generate CSS strings corresponding to
4017 Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
4018 grammar of CSS but doesn’t know specific rules, properties or values supported
4019 in various CSS modules.")
4020 (license license:bsd-3)))
4022 (define-public python-cssselect2
4024 (name "python-cssselect2")
4029 (uri (pypi-uri "cssselect2" version))
4031 (base32 "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h"))))
4032 (build-system python-build-system)
4035 (modify-phases %standard-phases
4037 (lambda _ (invoke "pytest"))))))
4039 `(("python-tinycss2" ,python-tinycss2)))
4041 `(("python-pytest-cov" ,python-pytest-cov)
4042 ("python-pytest-flake8" ,python-pytest-flake8)
4043 ("python-pytest-isort" ,python-pytest-isort)
4044 ("python-pytest-runner" ,python-pytest-runner)))
4045 (home-page "https://cssselect2.readthedocs.io/")
4046 (synopsis "CSS selectors for Python ElementTree")
4047 (description "@code{cssselect2} is a straightforward implementation of
4048 CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
4049 ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
4051 Unlike the Python package @code{cssselect}, it does not translate selectors to
4052 XPath and therefore does not have all the correctness corner cases that are
4053 hard or impossible to fix in cssselect.")
4054 (license license:bsd-3)))
4056 (define-public python-uvloop
4058 (name "python-uvloop")
4063 (uri (pypi-uri "uvloop" version))
4065 (base32 "07j678z9gf41j98w72ysrnb5sa41pl5yxd7ib17lcwfxqz0cjfhj"))))
4066 (build-system python-build-system)
4068 '(#:tests? #f ;FIXME: tests hang and with some errors in the way
4070 (modify-phases %standard-phases
4071 (add-after 'unpack 'preparations
4073 ;; Use packaged libuv.
4074 (substitute* "setup.py" (("self.use_system_libuv = False")
4075 "self.use_system_libuv = True"))
4078 `(("python-aiohttp" ,python-aiohttp)
4079 ("python-cython" ,python-cython)
4080 ("python-flake8" ,python-flake8)
4081 ("python-psutil" ,python-psutil)
4082 ("python-pyopenssl" ,python-pyopenssl)
4083 ("python-twine" ,python-twine)))
4085 `(("libuv" ,libuv)))
4086 (home-page "https://github.com/MagicStack/uvloop")
4087 (synopsis "Fast implementation of asyncio event loop on top of libuv")
4089 "@code{uvloop} is a fast, drop-in replacement of the built-in asyncio
4090 event loop. It is implemented in Cython and uses libuv under the hood.")
4091 (license license:expat)))
4093 (define-public gunicorn
4100 (uri (pypi-uri "gunicorn" version))
4103 "09n6fc019bgrvph1s5h1lwhn2avcsprw6ncd203qhra3i8mvn10r"))))
4104 (outputs '("out" "doc"))
4105 (build-system python-build-system)
4108 (modify-phases %standard-phases
4109 (add-after 'build 'build-doc
4111 (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
4112 (delete-file "docs/build/texinfo/Makefile")
4113 (delete-file "docs/build/texinfo/Gunicorn.texi")
4117 (setenv "PYTHONPATH"
4118 (string-append ".:" (getenv "PYTHONPATH")))
4120 (add-after 'install 'install-doc
4121 (lambda* (#:key outputs #:allow-other-keys)
4122 (let* ((doc (string-append (assoc-ref outputs "doc")
4123 "/share/doc/" ,name "-" ,version))
4124 (html (string-append doc "/html"))
4125 (info (string-append doc "/info"))
4126 (examples (string-append doc "/examples")))
4130 (copy-recursively "docs/build/html" html)
4131 (copy-recursively "docs/build/texinfo" info)
4132 (copy-recursively "examples" examples)
4133 (for-each (lambda (file)
4134 (copy-file file (string-append doc "/" file)))
4135 '("README.rst" "NOTICE" "LICENSE" "THANKS")))
4138 `(("binutils" ,binutils) ;; for ctypes.util.find_library()
4139 ("python-aiohttp" ,python-aiohttp)
4140 ("python-pytest" ,python-pytest)
4141 ("python-pytest-cov" ,python-pytest-cov)
4142 ("python-sphinx" ,python-sphinx)
4143 ("texinfo" ,texinfo)))
4144 (home-page "https://gunicorn.org/")
4145 (synopsis "Python WSGI HTTP Server for UNIX")
4146 (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
4147 Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
4148 Unicorn project. The Gunicorn server is broadly compatible with
4149 various web frameworks, simply implemented, light on server resources,
4150 and fairly speedy.")
4151 (license license:expat)))
4153 ;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
4155 (define-public gunicorn-bootstrap
4159 (arguments `(#:tests? #f))
4160 (properties '((hidden? . #t)))
4161 (native-inputs `())))
4163 (define-public python-httptools
4165 (name "python-httptools")
4169 ;; PyPI tarball comes with a vendored http-parser and no tests.
4172 (url "https://github.com/MagicStack/httptools")
4173 (commit (string-append "v" version))))
4174 (file-name (git-file-name name version))
4176 (base32 "0g08128x2ixsiwrzskxc6c8ymgzs39wbzr5mhy0mjk30q9pqqv77"))))
4177 (build-system python-build-system)
4180 (modify-phases %standard-phases
4181 (add-after 'unpack 'preparations
4183 ;; Skip a failing test (AssertionError). Bug report:
4184 ;; https://github.com/MagicStack/httptools/issues/10.
4185 (substitute* "tests/test_parser.py"
4186 ((" def test_parser_response_1")
4188 " @unittest.skip(\"Disabled.\")\n"
4189 " def test_parser_response_1")))
4190 ;; Use packaged http-parser.
4191 (substitute* "setup.py" (("self.use_system_http_parser = False")
4192 "self.use_system_http_parser = True"))
4193 ;; This path is hardcoded. Hardcode our own.
4194 (substitute* "httptools/parser/cparser.pxd"
4195 (("../../vendor/http-parser")
4196 (string-append (assoc-ref %build-inputs "http-parser")
4198 ;; Don't force Cython version.
4199 (substitute* "setup.py" (("Cython==") "Cython>="))
4202 `(("python-cython" ,python-cython)
4203 ("python-pytest" ,python-pytest)))
4205 `(("http-parser" ,http-parser)))
4206 (home-page "https://github.com/MagicStack/httptools")
4207 (synopsis "Collection of framework independent HTTP protocol utils")
4209 "@code{httptools} is a Python binding for the nodejs HTTP parser.")
4210 (license license:expat)))
4212 (define-public python-uvicorn
4214 (name "python-uvicorn")
4218 ;; PyPI tarball has no tests.
4221 (url "https://github.com/encode/uvicorn")
4223 (file-name (git-file-name name version))
4225 (base32 "00iidg5ysp7k00bw3kmkvr8mghnh4jdi0p2ryiarhryf8wz2r3fy"))))
4226 (build-system python-build-system)
4229 (modify-phases %standard-phases
4231 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4232 (add-installed-pythonpath inputs outputs)
4233 (invoke "pytest" "-vv"))))))
4235 `(("python-black" ,python-black)
4236 ("python-codecov" ,python-codecov)
4237 ("python-flake8" ,python-flake8)
4238 ("python-isort" ,python-isort)
4239 ("python-mypy" ,python-mypy)
4240 ("python-pytest" ,python-pytest)
4241 ("python-pytest-cov" ,python-pytest-cov)
4242 ("python-pytest-mock" ,python-pytest-mock)
4243 ("python-requests" ,python-requests)))
4245 `(("python-click" ,python-click)
4246 ("python-h11" ,python-h11)
4247 ("python-httptools" ,python-httptools)
4248 ("python-pyyaml" ,python-pyyaml)
4249 ("python-uvloop" ,python-uvloop)
4250 ("python-watchgod" ,python-watchgod)
4251 ("python-websockets" ,python-websockets)
4252 ("python-wsproto" ,python-wsproto)))
4253 (home-page "https://github.com/encode/uvicorn")
4254 (synopsis "Fast ASGI server implementation")
4256 "@code{uvicorn} is a fast ASGI server implementation, using @code{uvloop}
4257 and @code{httptools}. It currently supports HTTP/1.1 and WebSockets. Support
4258 for HTTP/2 is planned.")
4259 (license license:bsd-3)))
4261 (define-public python-translation-finder
4263 (name "python-translation-finder")
4268 (uri (pypi-uri "translation-finder" version))
4271 "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
4272 (build-system python-build-system)
4275 (modify-phases %standard-phases
4276 (add-before 'build 'remove-failing-test
4278 (delete-file "translation_finder/test_api.py")
4281 `(("python-chardet" ,python-chardet)
4282 ("python-pathlib2" ,python-pathlib2)
4283 ("python-ruamel.yaml" ,python-ruamel.yaml)
4284 ("python-six" ,python-six)))
4286 `(("python-codecov" ,python-codecov)
4287 ("python-codacy-coverage" ,python-codacy-coverage)
4288 ("python-pytest-cov" ,python-pytest-cov)
4289 ("python-pytest-runner" ,python-pytest-runner)
4290 ("python-twine" ,python-twine)))
4291 (home-page "https://weblate.org/")
4292 (synopsis "Translation file finder for Weblate")
4293 (description "This package provides a function to find translation file in
4294 the source code of a project. It supports many translation file formats and
4295 is part of the Weblate translation platform.")
4296 (license license:gpl3+)))
4298 (define-public python-gitlab
4300 (name "python-gitlab")
4305 (uri (pypi-uri "python-gitlab" version))
4308 "0zl6kz8v8cg1bcy2r78b2snb0lpw0b573gdx2x1ps0nhsh75l4j5"))))
4309 (build-system python-build-system)
4311 `(("python-requests" ,python-requests)
4312 ("python-six" ,python-six)))
4314 `(("python-httmock" ,python-httmock)
4315 ("python-mock" ,python-mock)))
4317 "https://github.com/python-gitlab/python-gitlab")
4318 (synopsis "Interact with GitLab API")
4319 (description "This package provides an extended library for interacting
4320 with GitLab instances through their API.")
4321 (license license:lgpl3+)))
4323 (define-public python-path-and-address
4325 (name "python-path-and-address")
4329 ;; The source distributed on PyPI doesn't include tests.
4332 (url "https://github.com/joeyespo/path-and-address")
4333 (commit (string-append "v" version))))
4334 (file-name (git-file-name name version))
4337 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
4338 (build-system python-build-system)
4341 (modify-phases %standard-phases
4343 (lambda* (#:key inputs outputs #:allow-other-keys)
4344 (add-installed-pythonpath inputs outputs)
4345 (invoke "py.test"))))))
4347 `(("python-pytest" ,python-pytest)))
4348 (home-page "https://github.com/joeyespo/path-and-address")
4349 (synopsis "Functions for command-line server tools used by humans")
4350 (description "Path-and-address resolves ambiguities of command-line
4351 interfaces, inferring which argument is the path, and which is the address.")
4352 (license license:expat)))
4355 ;; No release by upstream for quite some time, some bugs fixed since. See:
4356 ;; https://github.com/joeyespo/grip/issues/304
4357 (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
4360 (version (git-version "4.5.2" "1" commit))
4365 (url "https://github.com/joeyespo/grip")
4367 (file-name (git-file-name name version))
4370 "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
4371 (build-system python-build-system)
4373 `(("python-docopt" ,python-docopt)
4374 ("python-flask" ,python-flask)
4375 ("python-markdown" ,python-markdown)
4376 ("python-path-and-address" ,python-path-and-address)
4377 ("python-pygments" ,python-pygments)
4378 ("python-requests" ,python-requests)))
4380 `(("python-pytest" ,python-pytest)
4381 ("python-responses" ,python-responses)))
4384 (modify-phases %standard-phases
4386 (lambda* (#:key inputs outputs #:allow-other-keys)
4387 (add-installed-pythonpath inputs outputs)
4388 (setenv "PATH" (string-append
4390 (assoc-ref %outputs "out") "/bin"))
4391 (invoke "py.test" "-m" "not assumption"))))))
4392 (home-page "https://github.com/joeyespo/grip")
4393 (synopsis "Preview Markdown files using the GitHub API")
4394 (description "Grip is a command-line server application written in Python
4395 that uses the GitHub Markdown API to render a local Markdown file. The styles
4396 and rendering come directly from GitHub, so you'll know exactly how it will
4397 appear. Changes you make to the file will be instantly reflected in the browser
4398 without requiring a page refresh.")
4399 (license license:expat))))
4401 (define-public python-port-for
4403 (name "python-port-for")
4408 (uri (pypi-uri "port-for" version))
4411 "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
4412 (build-system python-build-system)
4415 (modify-phases %standard-phases
4416 (add-after 'unpack 'use-urllib3
4418 (substitute* "port_for/_download_ranges.py"
4419 (("urllib2") "urllib3"))
4422 `(("python-urllib3" ,python-urllib3)))
4424 `(("python-mock" ,python-mock)))
4425 (home-page "https://github.com/kmike/port-for/")
4426 (synopsis "TCP localhost port finder and association manager")
4428 "This package provides a utility that helps with local TCP ports
4429 management. It can find an unused TCP localhost port and remember the
4431 (license license:expat)))
4433 (define-public python-livereload
4435 (name "python-livereload")
4440 (uri (pypi-uri "livereload" version))
4443 "0rhggz185bxc3zjnfpmhcvibyzi86i624za1lfh7x7ajsxw4y9c9"))))
4444 (build-system python-build-system)
4446 `(("python-six" ,python-six)
4447 ("python-tornado" ,python-tornado)))
4448 (home-page "https://github.com/lepture/python-livereload")
4449 (synopsis "Python LiveReload")
4451 "Python LiveReload provides a command line utility, @command{livereload},
4452 for starting a web server in a directory. It can trigger arbitrary commands
4453 and serve updated contents upon changes to the directory.")
4454 (license license:bsd-3)))
4456 (define-public python-vf-1
4458 (name "python-vf-1")
4463 (uri (pypi-uri "VF-1" version))
4466 "0xlqsaxsiayk1sd07kpz8abbcnab582y29a1y4882fq6j4gma5xi"))))
4467 (build-system python-build-system)
4468 (home-page "https://github.com/solderpunk/VF-1")
4469 (synopsis "Command line gopher client")
4470 (description "@code{VF-1} is a command line gopher client with
4471 @acronym{TLS, Transport Layer Security} support.")
4472 (license license:bsd-2)))
4474 (define-public python-httpcore
4476 (name "python-httpcore")
4480 ;; PyPI tarball does not contain tests.
4483 (url "https://github.com/encode/httpcore")
4485 (file-name (git-file-name name version))
4487 (base32 "01bhajcxqgkdzg7b7x0fqs2lwcfsajlgqwi1nlxx58jss7g2kxn9"))))
4488 (build-system python-build-system)
4491 (modify-phases %standard-phases
4492 (add-after 'unpack 'remove-unavailable-tests
4494 ;; These tests require 'mitmproxy' which is not packaged.
4495 (for-each (lambda (f)
4497 '("tests/conftest.py"
4498 "tests/sync_tests/test_interfaces.py"
4499 "tests/async_tests/test_interfaces.py"))
4501 (add-after 'remove-unavailable-tests 'force-h11-version
4502 ;; Allow build with h11 >= 0.10.
4504 (substitute* "setup.py" (("h11>=0.8,<0.10") "h11"))
4507 (lambda* (#:key inputs outputs #:allow-other-keys)
4508 (add-installed-pythonpath inputs outputs)
4509 (invoke "pytest" "-vv" "--cov=httpcore"
4510 "--cov=tests" "tests"))))))
4512 `(;; ("mitmproxy" ,mitmproxy) ;; TODO: Package this.
4513 ("python-autoflake" ,python-autoflake)
4514 ("python-flake8" ,python-flake8)
4515 ("python-flake8-bugbear" ,python-flake8-bugbear)
4516 ("python-flake8-pie" ,python-flake8-pie)
4517 ("python-isort" ,python-isort)
4518 ("python-mypy" ,python-mypy)
4519 ("python-pytest" ,python-pytest)
4520 ("python-pytest-asyncio" ,python-pytest-asyncio)
4521 ("python-pytest-cov" ,python-pytest-cov)
4522 ("python-pytest-trio" ,python-pytest-trio)
4523 ("python-uvicorn" ,python-uvicorn)
4524 ("python-trustme" ,python-trustme)))
4526 `(("python-h11" ,python-h11)
4527 ("python-h2" ,python-h2)
4528 ("python-sniffio" ,python-sniffio)
4529 ("python-trio" ,python-trio)
4530 ("python-trio-typing" ,python-trio-typing)))
4531 (home-page "https://github.com/encode/httpcore")
4532 (synopsis "Minimal, low-level HTTP client")
4534 "HTTP Core provides a minimal and low-level HTTP client, which does one
4535 thing only: send HTTP requests.
4537 Some things HTTP Core does do:
4540 @item Sending HTTP requests.
4541 @item Provides both sync and async interfaces.
4542 @item Supports HTTP/1.1 and HTTP/2.
4543 @item Async backend support for asyncio and trio.
4544 @item Automatic connection pooling.
4545 @item HTTP(S) proxy support.
4547 (license license:bsd-3)))
4549 (define-public python-httpx
4551 (name "python-httpx")
4555 ;; PyPI tarball does not contain tests.
4558 (url "https://github.com/encode/httpx")
4560 (file-name (git-file-name name version))
4562 (base32 "1qr91xw6jxynvihmw953bi5446ssm9ffmb2c4nhfa77v7883sp21"))))
4563 (build-system python-build-system)
4566 (modify-phases %standard-phases
4569 (invoke "pytest" "-vv" "-k"
4570 ;; These tests try to open an outgoing connection.
4572 "not test_connect_timeout"
4573 " and not test_that_send_cause_async_client_to_be_not_"
4575 " and not test_that_async_client_caused_warning_when_"
4577 " and not test_that_send_cause_client_to_be_not_closed"
4578 " and not test_async_proxy_close"
4579 " and not test_sync_proxy_close")))))))
4581 `(("python-autoflake" ,python-autoflake)
4582 ("python-black" ,python-black)
4583 ("python-cryptography" ,python-cryptography)
4584 ("python-flake8" ,python-flake8)
4585 ("python-flake8-bugbear" ,python-flake8-bugbear)
4586 ("python-flake8-pie" ,python-flake8-pie)
4587 ("python-isort" ,python-isort)
4588 ("python-mypy" ,python-mypy)
4589 ("python-pytest" ,python-pytest)
4590 ("python-pytest-asyncio" ,python-pytest-asyncio)
4591 ("python-pytest-trio" ,python-pytest-trio)
4592 ("python-pytest-cov" ,python-pytest-cov)
4593 ("python-trio" ,python-trio)
4594 ("python-trio-typing" ,python-trio-typing)
4595 ("python-trustme" ,python-trustme)
4596 ("python-uvicorn" ,python-uvicorn)))
4598 `(("python-brotli" ,python-brotli)
4599 ("python-certifi" ,python-certifi)
4600 ("python-chardet" ,python-chardet)
4601 ("python-httpcore" ,python-httpcore)
4602 ("python-idna" ,python-idna)
4603 ("python-rfc3986" ,python-rfc3986)
4604 ("python-sniffio" ,python-sniffio)))
4605 (home-page "https://www.python-httpx.org/")
4606 (synopsis "HTTP client for Python")
4608 "HTTPX is a fully featured HTTP client for Python 3, which provides sync
4609 and async APIs, and support for both HTTP/1.1 and HTTP/2.
4611 HTTPX builds on the well-established usability of requests, and gives you:
4614 @item A broadly requests-compatible API.
4615 @item Standard synchronous interface, but with async support if you need it.
4616 @item HTTP/1.1 and HTTP/2 support.
4617 @item Ability to make requests directly to WSGI applications or ASGI applications.
4618 @item Strict timeouts everywhere.
4619 @item Fully type annotated.
4620 @item 99% test coverage.
4623 Plus all the standard features of requests:
4626 @item International Domains and URLs
4627 @item Keep-Alive & Connection Pooling
4628 @item Sessions with Cookie Persistence
4629 @item Browser-style SSL Verification
4630 @item Basic/Digest Authentication
4631 @item Elegant Key/Value Cookies
4632 @item Automatic Decompression
4633 @item Automatic Content Decoding
4634 @item Unicode Response Bodies
4635 @item Multipart File Uploads
4636 @item HTTP(S) Proxy Support
4637 @item Connection Timeouts
4638 @item Streaming Downloads
4639 @item .netrc Support
4640 @item Chunked Requests
4642 (license license:bsd-3)))
4644 (define-public python-websockets
4646 (name "python-websockets")
4651 (uri (pypi-uri "websockets" version))
4654 "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw"))))
4655 (build-system python-build-system)
4656 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
4657 (home-page "https://github.com/aaugustin/websockets")
4659 "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
4661 "@code{websockets} is a library for building WebSocket servers and clients
4662 in Python with a focus on correctness and simplicity.
4664 Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
4665 it provides an elegant coroutine-based API.")
4666 (license license:bsd-3)))
4668 (define-public python-selenium
4670 (name "python-selenium")
4675 (uri (pypi-uri "selenium" version))
4678 "039hf9knvl4s3hp21bzwsp1g5ri9gxsh504dp48lc6nr1av35byy"))))
4679 (build-system python-build-system)
4681 `(("python-urllib3" ,python-urllib3)))
4683 "https://github.com/SeleniumHQ/selenium/")
4684 (synopsis "Python bindings for Selenium")
4685 (description "Selenium enables web browser automation.
4686 Selenium specifically provides infrastructure for the W3C WebDriver specification
4687 — a platform and language-neutral coding interface compatible with all
4688 major web browsers.")
4689 (license license:asl2.0)))
4691 (define-public python-rapidjson
4693 (name "python-rapidjson")
4698 (uri (pypi-uri "python-rapidjson" version))
4701 "18cl2dhx3gds5vg52jxmh9wjlbiy8dx06c3n482rfpdi9dzbv05d"))
4702 (modules '((guix build utils)))
4704 '(begin (delete-file-recursively "rapidjson") #t))))
4705 (build-system python-build-system)
4708 (list (string-append "--rj-include-dir="
4709 (assoc-ref %build-inputs "rapidjson")
4710 "/include/rapidjson"))
4712 (modify-phases %standard-phases
4714 (lambda* (#:key inputs #:allow-other-keys)
4715 (invoke "python" "setup.py" "build"
4716 (string-append "--rj-include-dir="
4717 (assoc-ref %build-inputs "rapidjson")
4718 "/include/rapidjson"))))
4720 (lambda* (#:key inputs outputs #:allow-other-keys)
4721 (add-installed-pythonpath inputs outputs)
4722 ;; Some tests are broken.
4723 (delete-file "tests/test_base_types.py")
4724 (delete-file "tests/test_validator.py")
4725 (invoke "python" "-m" "pytest" "tests"))))))
4727 `(("rapidjson" ,rapidjson)
4728 ("python-pytest" ,python-pytest)
4729 ("python-pytz" ,python-pytz)))
4730 (home-page "https://github.com/python-rapidjson/python-rapidjson")
4731 (synopsis "Python wrapper around rapidjson")
4732 (description "This package provides a python wrapper around rapidjson.")
4733 (license license:expat)))
4735 (define-public python-venusian
4737 (name "python-venusian")
4742 (uri (pypi-uri "venusian" version))
4744 (base32 "0f7f67dkgxxcjfhpdd5frb9pszkf04lyzzpn5069q0xi89r2p17n"))))
4745 (build-system python-build-system)
4747 `(("python-pytest" ,python-pytest)
4748 ("python-runner" ,python-pytest-runner)
4749 ("python-pytest-cov" ,python-pytest-cov)))
4750 (arguments '(#:test-target "pytest"))
4751 (home-page "https://docs.pylonsproject.org/projects/venusian")
4752 (synopsis "Library for deferring decorator actions")
4754 "Venusian is a library which allows framework authors to defer decorator
4755 actions. Instead of taking actions when a function (or class) decorator is
4756 executed at import time, you can defer the action usually taken by the
4757 decorator until a separate scan phase.")
4758 (license license:repoze)))
4760 (define-public python-zope-deprecation
4762 (name "python-zope-deprecation")
4766 (uri (pypi-uri "zope.deprecation" version))
4769 "1pz2cv7gv9y1r3m0bdv7ks1alagmrn5msm5spwdzkb2by0w36i8d"))))
4770 (build-system python-build-system)
4772 (propagated-inputs `())
4773 (home-page "https://zopedeprecation.readthedocs.io/")
4774 (synopsis "Function for marking deprecations")
4775 (description "The @code{zope.deprecation} module provides a function for
4776 marking modules, classes, functions, methods and properties as deprecated,
4777 displaying warnings when usaged in application code.")
4778 (license license:zpl2.1)))
4780 (define-public python-translationstring
4782 (name "python-translationstring")
4786 (uri (pypi-uri "translationstring" version))
4789 "0bdpcnd9pv0131dl08h4zbcwmgc45lyvq3pa224xwan5b3x4rr2f"))))
4790 (build-system python-build-system)
4791 (home-page "http://docs.pylonsproject.org/projects/translationstring")
4792 (synopsis "Internationalization tooling for the Pylons project")
4793 (description "This package provides a library used by various Pylons
4794 project packages for internationalization (i18n) duties related to
4796 (license license:repoze)))
4798 (define-public python-plaster
4800 (name "python-plaster")
4804 (uri (pypi-uri "plaster" version))
4807 "1hy8k0nv2mxq94y5aysk6hjk9ryb4bsd13g83m60hcyzxz3wflc3"))))
4808 (build-system python-build-system)
4810 `(("python-pytest" ,python-pytest)))
4811 (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
4812 (synopsis "Configuration loader for multiple config file formats")
4814 "Plaster is a loader interface around multiple config file formats. It
4815 exists to define a common API for applications to use when they wish to load
4816 configuration. The library itself does not aim to handle anything except a
4817 basic API that applications may use to find and load configuration settings.
4818 Any specific constraints should be implemented in a pluggable loader which can
4819 be registered via an entrypoint.")
4820 (license license:repoze)))
4822 (define-public python-plaster-pastedeploy
4824 (name "python-plaster-pastedeploy")
4828 (uri (pypi-uri "plaster_pastedeploy" version))
4831 "1zg7gcsvc1kzay1ry5p699rg2qavfsxqwl17mqxzr0gzw6j9679r"))))
4832 (build-system python-build-system)
4834 `(("python-pytest" ,python-pytest)))
4836 `(("python-plaster" ,python-plaster)
4837 ("python-pastedeploy" ,python-pastedeploy)))
4838 (home-page "https://github.com/Pylons/plaster_pastedeploy")
4839 (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
4841 "This plugin for @code{python-plaster} adds support for PasteDeploy
4842 syntax, it provides a plaster @code{Loader} object that can parse ini files
4843 according to the standard set by PasteDeploy ")
4844 (license license:expat)))
4846 (define-public python-hupper
4848 (name "python-hupper")
4852 (uri (pypi-uri "hupper" version))
4855 "0am0p6g5cz6xmcaf04xq8q6dzdd9qz0phj6gcmpsckf2mcyza61q"))))
4856 (build-system python-build-system)
4857 (arguments '(#:test-target "pytest"))
4859 `(("python-pytest" ,python-pytest)
4860 ("python-pytest-runner" ,python-pytest-runner)
4861 ("python-watchdog" ,python-watchdog)
4862 ("python-mock" ,python-mock)
4863 ("python-pytest-cov" ,python-pytest-cov)))
4865 `(("python-pytz" ,python-pytz)))
4866 (home-page "https://readthedocs.org/projects/hupper")
4867 (synopsis "Integrated process monitor tracking changes to imported Python files")
4869 "Hupper is an integrated process monitor that will track changes to any
4870 imported Python files in sys.modules as well as custom paths. When files are
4871 changed the process is restarted.")
4872 (license license:expat)))
4874 (define-public python-pyramid
4876 (name "python-pyramid")
4880 (uri (pypi-uri "pyramid" version))
4883 "0rkxs1ajycg2zh1c94xlmls56mx5m161sn8112skj0amza6cn36q"))))
4884 (build-system python-build-system)
4886 `(("python-hupper" ,python-hupper)
4887 ("python-plaster-pastedeploy" ,python-plaster-pastedeploy)
4888 ("python-translationstring" ,python-translationstring)
4889 ("python-venusian" ,python-venusian)
4890 ("python-webob" ,python-webob)
4891 ("python-zope-deprecation" ,python-zope-deprecation)
4892 ("python-zope-interface" ,python-zope-interface)
4893 ("python-webtest" ,python-webtest)
4894 ("python-zope-component" ,python-zope-component)
4895 ("python-plaster" ,python-plaster)))
4896 (home-page "https://trypyramid.com/")
4897 (synopsis "Python web-framework suitable for small and large sites")
4899 "Pyramid makes it easy to write web applications. From minimal
4900 request/response web apps to larger, grown applications.")
4901 (license license:repoze)))
4903 (define-public python-random-user-agent
4905 (name "python-random-user-agent")
4910 (uri (pypi-uri "random_user_agent" version))
4913 "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
4914 (build-system python-build-system)
4915 (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
4916 (synopsis "List of user agents")
4918 "This package provides a list of user agents, from a collection of more
4919 than 326,000 known user-agents. Users can pick a random one, or select one
4921 (license license:expat)))
4923 (define-public python-flask-restx
4925 (name "python-flask-restx")
4928 ;; We fetch from the Git repo because there are no tests in the PyPI
4933 (url "https://github.com/python-restx/flask-restx")
4935 (file-name (git-file-name name version))
4937 (base32 "0xf2vkmdngp9cv9klznizai4byxjcf0iqh1pr4b83nann0jxqwy7"))))
4938 (build-system python-build-system)
4940 `(("python-aniso8601" ,python-aniso8601)
4941 ("python-flask" ,python-flask)
4942 ("python-jsonschema" ,python-jsonschema)
4943 ("python-pytz" ,python-pytz)))
4945 `(("python-blinker" ,python-blinker)
4946 ("python-faker" ,python-faker)
4947 ("python-pytest" ,python-pytest)
4948 ("python-pytest-benchmark"
4949 ,python-pytest-benchmark)
4950 ("python-pytest-flask" ,python-pytest-flask)
4951 ("python-pytest-mock" ,python-pytest-mock)))
4954 (modify-phases %standard-phases
4957 (invoke "pytest" "--benchmark-skip" "-k"
4958 ;; Those tests need internet access
4959 "not test_check and not test_valid_value_check"))))))
4960 (home-page "https://github.com/python-restx/flask-restx")
4962 "Framework for fast, easy and documented API development with Flask")
4964 "Flask-RESTX is an extension for Flask that adds support for quickly building
4965 REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
4966 with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
4967 decorators and tools to describe your API and expose its documentation properly using
4969 (license license:bsd-3)))
4971 (define-public python-manuel
4973 (name "python-manuel")
4978 (uri (pypi-uri "manuel" version))
4981 "1bdzay7j70fly5fy6wbdi8fbrxjrrlxnxnw226rwry1c8a351rpy"))))
4982 (build-system python-build-system)
4984 `(("python-six" ,python-six)))
4986 `(("python-zope-testing" ,python-zope-testing)))
4987 (home-page "https://pypi.org/project/manuel/")
4988 (synopsis "Build tested documentation")
4990 "Manuel lets you mix and match traditional doctests with custom test syntax.")
4991 (license license:asl2.0)))
4993 (define-public python-persistent
4995 (name "python-persistent")
5000 (uri (pypi-uri "persistent" version))
5003 "0imm9ji03lhkpcfmhid7x5209ix8g2rlgki9ik1qxks4b8sm8gzq"))))
5004 (build-system python-build-system)
5006 `(("python-cffi" ,python-cffi)
5007 ("python-zope-interface" ,python-zope-interface)))
5009 `(("python-manuel" ,python-manuel)
5010 ("python-zope-testrunner" ,python-zope-testrunner)))
5011 (home-page "https://github.com/zopefoundation/persistent/")
5012 (synopsis "Translucent persistent objects")
5013 (description "This package contains a generic persistence implementation for
5014 Python. It forms the core protocol for making objects interact
5015 \"transparently\" with a database such as the ZODB.")
5016 (license license:zpl2.1)))
5018 (define-public python-btrees
5020 (name "python-btrees")
5025 (uri (pypi-uri "BTrees" version))
5028 "0iiq0g9k1g6qgqq84q9h6639vlvzznk1rgdm0rfcnnqkbkmsbr3w"))))
5029 (build-system python-build-system)
5031 `(("python-persistent" ,python-persistent)
5032 ("python-zope-interface" ,python-zope-interface)))
5034 `(("python-persistent" ,python-persistent)
5035 ("python-transaction" ,python-transaction)
5036 ("python-zope-testrunner" ,python-zope-testrunner)))
5037 (home-page "https://github.com/zopefoundation/BTrees")
5038 (synopsis "Scalable persistent object containers")
5040 "This package contains a set of persistent object containers built around a
5041 modified BTree data structure. The trees are optimized for use inside ZODB's
5042 \"optimistic concurrency\" paradigm, and include explicit resolution of
5043 conflicts detected by that mechanism.")
5044 (license license:zpl2.1)))
5046 (define-public python-transaction
5048 (name "python-transaction")
5053 (uri (pypi-uri "transaction" version))
5056 "0bdaks31bgfh78wnj3sij24bfysmqk25crsis6amz8kzrc0d82iv"))))
5057 (build-system python-build-system)
5059 `(("python-zope-interface" ,python-zope-interface)))
5061 `(("python-coverage" ,python-coverage)
5062 ("python-mock" ,python-mock)
5063 ("python-nose" ,python-nose)))
5064 (home-page "https://github.com/zopefoundation/transaction")
5065 (synopsis "Transaction management for Python")
5066 (description "This package contains a generic transaction implementation
5067 for Python. It is mainly used by the ZODB.")
5068 (license license:zpl2.1)))
5070 (define-public python-robot-detection
5072 (name "python-robot-detection")
5077 (uri (pypi-uri "robot-detection" version))
5080 "1xd2jm3yn31bnk1kqzggils2rxj26ylxsfz3ap7bhr3ilhnbg3rx"))))
5081 (build-system python-build-system)
5082 (arguments '(#:tests? #f)) ; Tests not shipped in pypi release.
5083 (propagated-inputs `(("python-six" ,python-six)))
5084 (home-page "https://github.com/rory/robot-detection")
5085 (synopsis "Detect web crawlers")
5087 "@code{robot_detection} is a python module to detect if a given HTTP User
5088 Agent is a web crawler. It uses the list of registered robots from
5089 @url{http://www.robotstxt.org}.")
5090 (license license:gpl3+)))
5092 (define-public python-pysolr
5094 (name "python-pysolr")
5099 (uri (pypi-uri "pysolr" version))
5102 "1rj5jmscvxjwcmlfi6hmkj44l4x6n3ln5p7d8d18j566hzmmzw3f"))))
5103 (build-system python-build-system)
5105 '(#:tests? #f)) ; Tests require network access.
5107 `(("python-requests" ,python-requests)))
5109 `(("python-setuptools-scm" ,python-setuptools-scm)))
5110 (home-page "https://github.com/django-haystack/pysolr/")
5111 (synopsis "Lightweight python wrapper for Apache Solr")
5113 "This module provides an interface that queries the Apache Solr server
5114 using a pure Python implementation.")
5115 (license license:bsd-3)))
5117 (define-public python-http-ece
5119 (name "python-http-ece")
5125 (url "https://github.com/web-push-libs/encrypted-content-encoding")
5126 (commit (string-append "v" version))))
5127 (file-name (git-file-name name version))
5130 "0bp4cc0xc123i72h80ax3qz3ixfwx3j7pw343kc7i6kdvfi8klx7"))))
5131 (build-system python-build-system)
5134 (modify-phases %standard-phases
5135 (add-after 'unpack 'change-directory
5136 (lambda _ (chdir "python") #t)))))
5138 `(("python-cryptography" ,python-cryptography)))
5140 `(("python-coverage" ,python-coverage)
5141 ("python-flake8" ,python-flake8)
5142 ("python-mock" ,python-mock)
5143 ("python-nose" ,python-nose)))
5144 (home-page "https://github.com/web-push-libs/encrypted-content-encoding")
5145 (synopsis "Encrypted Content Encoding for HTTP")
5147 "This package provices a simple implementation of Encrypted Content
5148 Encoding for HTTP.")
5149 (license license:expat)))
5151 (define-public python-cloudscraper
5153 (name "python-cloudscraper")
5158 (uri (pypi-uri "cloudscraper" version))
5160 (base32 "0qjxzb0z5bprvmdhx42ayqhlhi2h49d9dwc0vvycj817s71f2sxv"))
5161 (modules '((guix build utils)))
5163 '(with-directory-excursion "cloudscraper"
5164 (for-each delete-file
5165 '("captcha/2captcha.py"
5167 "captcha/anticaptcha.py"
5168 "captcha/deathbycaptcha.py"
5169 "interpreters/js2py.py"
5170 "interpreters/v8.py"))
5171 (substitute* "__init__.py"
5172 ;; Perhaps it's a joke, but don't promote proprietary software.
5173 (("([Th]is feature is not available) in the .*'" _ prefix)
5174 (string-append prefix ".'")))
5176 (build-system python-build-system)
5178 `(("python-requests" ,python-requests)
5179 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
5180 ("python-pyparsing" ,python-pyparsing-2.4.7)))
5182 `(("python-pytest" ,python-pytest)))
5183 (home-page "https://github.com/venomous/cloudscraper")
5184 (synopsis "Cloudflare anti-bot bypass")
5186 "This module acts as a webbrowser solving Cloudflare's Javascript
5188 (license license:expat)))
5190 (define-public python-imap-tools
5192 (name "python-imap-tools")
5197 (uri (pypi-uri "imap_tools" version))
5200 "0x122jwpc74wwyw2rsv2fvh6p12y31019ndfr9717jzjkj2d3lhb"))))
5201 (build-system python-build-system)
5202 (arguments '(#:tests? #f)) ; tests require internet access
5203 (home-page "https://github.com/ikvk/imap_tools")
5204 (synopsis "Work with email and mailbox by IMAP")
5206 "This Python library provides tools to deal with email and mailboxes
5210 @item Parsed email message attributes
5211 @item Query builder for searching emails
5212 @item Work with emails in folders (copy, delete, flag, move, seen)
5213 @item Work with mailbox folders (list, set, get, create, exists, rename, delete, status)
5215 (license license:asl2.0)))