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 "2020.1.16")
467 (uri (pypi-uri "html2text" version))
470 "1fvv4z6dblii2wk1x82981ag8yhxbim1v2ksgywxsndh2s7335p2"))))
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 "1rhpg0jb08v0gd7f19jjiwlcdnxpmqi1fhvw7r4s9avddi4kvx5k"))))
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-ipaddress" ,python-ipaddress)
2254 ("python-pyopenssl" ,python-pyopenssl)
2255 ("python-pysocks" ,python-pysocks)))
2256 (home-page "https://urllib3.readthedocs.io/")
2257 (synopsis "HTTP library with thread-safe connection pooling")
2259 "Urllib3 supports features left out of urllib and urllib2 libraries. It
2260 can reuse the same socket connection for multiple requests, it can POST files,
2261 supports url redirection and retries, and also gzip and deflate decoding.")
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 (package-with-python2 python-urllib3))
2279 (define-public awscli
2286 (uri (pypi-uri name version))
2289 "0p479mfs9r0m82a217pap8156ijwvhv6r3kqa4k267gd05wgvygm"))))
2290 (build-system python-build-system)
2292 ;; FIXME: The 'pypi' release does not contain tests.
2295 (modify-phases %standard-phases
2296 (add-after 'unpack 'fix-reference-to-groff
2298 (substitute* "awscli/help.py"
2299 (("if not self._exists_on_path\\('groff'\\):") "")
2300 (("raise ExecutableNotFoundError\\('groff'\\)") "")
2301 (("cmdline = \\['groff'")
2302 (string-append "cmdline = ['" (which "groff") "'")))
2305 `(("python-colorama" ,python-colorama)
2306 ("python-botocore" ,python-botocore)
2307 ("python-s3transfer" ,python-s3transfer)
2308 ("python-docutils" ,python-docutils)
2309 ("python-pyyaml" ,python-pyyaml)
2310 ("python-rsa" ,python-rsa)))
2312 `(("groff" ,groff)))
2313 (home-page "https://aws.amazon.com/cli/")
2314 (synopsis "Command line client for AWS")
2315 (description "AWS CLI provides a unified command line interface to the
2316 Amazon Web Services (AWS) API.")
2317 (license license:asl2.0)))
2319 (define-public python-wsgiproxy2
2321 (name "python-wsgiproxy2")
2326 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
2328 (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
2329 (build-system python-build-system)
2331 `(("python-webtest" ,python-webtest)))
2333 `(("python-requests" ,python-requests)
2334 ("python-six" ,python-six)
2335 ("python-urllib3" ,python-urllib3)
2336 ("python-webob" ,python-webob)))
2337 (home-page "https://github.com/gawel/WSGIProxy2/")
2338 (synopsis "WSGI Proxy with various http client backends")
2339 (description "WSGI turns HTTP requests into WSGI function calls.
2340 WSGIProxy turns WSGI function calls into HTTP requests.
2341 It also includes code to sign requests and pass private data,
2342 and to spawn subprocesses to handle requests.")
2343 (license license:expat)))
2345 (define-public python2-wsgiproxy2
2346 (package-with-python2 python-wsgiproxy2))
2348 (define-public python-pastedeploy
2350 (name "python-pastedeploy")
2355 (uri (pypi-uri "PasteDeploy" version))
2357 (base32 "05s88qdjdwd9d9qs13fap7nqgxs7qs5qfzzjbrc5va13k2mxdskd"))))
2358 (build-system python-build-system)
2360 '(#:test-target "pytest"))
2362 `(("python-pytest" ,python-pytest)
2363 ("python-pytest-runner" ,python-pytest-runner)))
2364 (home-page "https://pylonsproject.org/")
2366 "Load, configure, and compose WSGI applications and servers")
2368 "This tool provides code to load WSGI applications and servers from URIs;
2369 these URIs can refer to Python Eggs for INI-style configuration files. Paste
2370 Script provides commands to serve applications based on this configuration
2372 (license license:expat)))
2374 (define-public python2-pastedeploy
2375 (package-with-python2 python-pastedeploy))
2377 (define-public python-webtest
2379 (name "python-webtest")
2384 (uri (pypi-uri "WebTest" version))
2387 "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21"))))
2388 (build-system python-build-system)
2390 ;; Tests require python-pyquery, which creates a circular dependency.
2393 `(("python-waitress" ,python-waitress)
2394 ("python-webob" ,python-webob)
2395 ("python-six" ,python-six)
2396 ("python-beautifulsoup4" ,python-beautifulsoup4)))
2397 (home-page "https://docs.pylonsproject.org/projects/webtest/")
2398 (synopsis "Helper to test WSGI applications")
2399 (description "Webtest allows you to test your Python web applications
2400 without starting an HTTP server. It supports anything that supports the
2402 (license license:expat)))
2404 (define-public python2-webtest
2405 (package-with-python2 python-webtest))
2407 (define-public python-flask
2409 (name "python-flask")
2413 (uri (pypi-uri "Flask" version))
2416 "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf"))))
2417 (build-system python-build-system)
2420 (modify-phases %standard-phases
2423 (setenv "PYTHONPATH" (string-append "./build/lib:"
2424 (getenv "PYTHONPATH")))
2425 (invoke "pytest" "-vv" "tests"))))))
2427 `(("python-pytest" ,python-pytest)))
2429 `(("python-itsdangerous" ,python-itsdangerous)
2430 ("python-jinja2" ,python-jinja2)
2431 ("python-click" ,python-click)
2432 ("python-werkzeug" ,python-werkzeug)))
2433 (home-page "https://www.palletsprojects.com/p/flask/")
2434 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
2435 (description "Flask is a micro web framework based on the Werkzeug toolkit
2436 and Jinja2 template engine. It is called a micro framework because it does not
2437 presume or force a developer to use a particular tool or library.")
2438 (license license:bsd-3)))
2440 (define-public python2-flask
2441 (package-with-python2 python-flask))
2443 (define-public python-flask-wtf
2445 (name "python-flask-wtf")
2450 (uri (pypi-uri "Flask-WTF" version))
2453 "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"))))
2454 (build-system python-build-system)
2457 (modify-phases %standard-phases
2460 (setenv "PYTHONPATH" (string-append "./build/lib:"
2461 (getenv "PYTHONPATH")))
2462 (invoke "pytest" "-vv"))))))
2464 `(("python-flask-babel" ,python-flask-babel)
2465 ("python-babel" ,python-babel)
2466 ("python-wtforms" ,python-wtforms)))
2468 `(("python-pytest" ,python-pytest)))
2469 (home-page "https://github.com/lepture/flask-wtf")
2470 (synopsis "Simple integration of Flask and WTForms")
2471 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
2472 upload, and reCAPTCHA.")
2473 (license license:bsd-3)))
2475 (define-public python2-flask-wtf
2476 (package-with-python2 python-flask-wtf))
2478 (define-public python-flask-multistatic
2480 (name "python-flask-multistatic")
2485 (uri (pypi-uri "flask-multistatic" version))
2488 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
2489 (build-system python-build-system)
2491 `(("python-flask" ,python-flask)))
2492 (home-page "https://pagure.io/flask-multistatic")
2493 (synopsis "Flask plugin to allow overriding static files")
2494 (description "@code{flask-multistatic} is a flask plugin that adds support
2495 for overriding static files.")
2496 (license license:gpl3+)))
2498 (define-public python2-flask-multistatic
2499 (package-with-python2 python-flask-multistatic))
2501 (define-public python-cookies
2503 (name "python-cookies")
2507 (uri (pypi-uri "cookies" version))
2510 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
2511 (build-system python-build-system)
2513 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
2516 `(("python-pytest" ,python-pytest)))
2517 (synopsis "HTTP cookie parser and renderer")
2518 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
2520 (home-page "https://gitlab.com/sashahart/cookies")
2521 (license license:expat)))
2523 (define-public python2-cookies
2524 (package-with-python2 python-cookies))
2526 (define-public python-responses
2528 (name "python-responses")
2532 (uri (pypi-uri "responses" version))
2535 "147pacwkkqy3qf3hr33fnl1xbzgw0zsm3qppvvy9qhq8h069qbah"))))
2536 (build-system python-build-system)
2538 `(;; Test suite is not distributed:
2539 ;; https://github.com/getsentry/responses/issues/38
2542 `(("python-mock" ,python-mock)))
2544 `(("python-requests" ,python-requests)
2545 ("python-cookies" ,python-cookies)
2546 ("python-six" ,python-six)))
2547 (home-page "https://github.com/getsentry/responses")
2548 (synopsis "Utility for mocking out the `requests` Python library")
2549 (description "A utility library for mocking out the `requests` Python
2551 (license license:asl2.0)))
2553 (define-public python2-responses
2554 (package-with-python2 python-responses))
2556 (define-public python-grequests
2558 (name "python-grequests")
2563 (uri (pypi-uri "grequests" version))
2566 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
2567 (build-system python-build-system)
2569 `(("python-gevent" ,python-gevent)
2570 ("python-requests" ,python-requests)))
2572 `(("python-nose" ,python-nose)
2573 ("python-zope.interface" ,python-zope-interface)
2574 ("python-zope.event" ,python-zope-event)))
2575 (home-page "https://github.com/kennethreitz/grequests")
2576 (synopsis "Python library for asynchronous HTTP requests")
2577 (description "GRequests is a Python library that allows you to use
2578 @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
2579 (license license:bsd-2)))
2581 (define-public python-geventhttpclient
2583 (name "python-geventhttpclient")
2587 (uri (pypi-uri "geventhttpclient" version))
2590 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
2591 (modules '((guix build utils)))
2594 ;; Delete pre-compiled files.
2595 (for-each delete-file (find-files "src/geventhttpclient"
2598 (build-system python-build-system)
2601 (modify-phases %standard-phases
2602 (add-after 'unpack 'delete-network-tests
2604 (delete-file "src/geventhttpclient/tests/test_client.py")
2607 (lambda* (#:key inputs outputs #:allow-other-keys)
2608 (add-installed-pythonpath inputs outputs)
2609 (invoke "py.test" "src/geventhttpclient/tests" "-v"
2610 ;; Append the test modules to sys.path to avoid
2611 ;; namespace conflict which breaks SSL tests.
2612 "--import-mode=append"
2613 ;; XXX: Disable test fails with Python 3.8:
2614 ;; https://github.com/gwik/geventhttpclient/issues/119
2615 "-k" (string-append "not test_cookielib_compatibility"))
2618 `(("python-pytest" ,python-pytest)))
2620 `(("python-certifi" ,python-certifi)
2621 ("python-gevent" ,python-gevent)
2622 ("python-six" ,python-six)))
2623 (home-page "https://github.com/gwik/geventhttpclient")
2624 (synopsis "HTTP client library for gevent")
2625 (description "@code{python-geventhttpclient} is a high performance,
2626 concurrent HTTP client library for python using @code{gevent}.")
2627 (license license:expat)))
2629 (define-public python2-geventhttpclient
2630 (package-with-python2 python-geventhttpclient))
2632 (define-public python-requests-oauthlib
2634 (name "python-requests-oauthlib")
2639 (uri (pypi-uri "requests-oauthlib" version))
2642 "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
2643 (build-system python-build-system)
2646 (modify-phases %standard-phases
2647 ;; removes tests that require network access
2648 (add-before 'check 'pre-check
2650 (delete-file "tests/test_core.py")
2653 `(("python-pyjwt" ,python-pyjwt)
2654 ("python-requests-mock" ,python-requests-mock)
2655 ("python-mock" ,python-mock)))
2657 `(("python-oauthlib" ,python-oauthlib)
2658 ("python-requests" ,python-requests)))
2660 "https://github.com/requests/requests-oauthlib")
2662 "OAuthlib authentication support for Requests")
2664 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
2665 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
2666 (license license:isc)))
2668 (define-public python2-requests-oauthlib
2669 (package-with-python2 python-requests-oauthlib))
2671 (define-public python-url
2677 (uri (pypi-uri "url" version))
2680 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
2681 (build-system python-build-system)
2683 `(("python-publicsuffix" ,python-publicsuffix)))
2685 `(("python-coverage" ,python-coverage)
2686 ("python-nose" ,python-nose)))
2688 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
2689 (home-page "https://github.com/seomoz/url-py")
2690 (synopsis "URL Parsing")
2691 (description "Library for parsing urls.")
2692 (license license:expat)
2693 (properties `((python2-variant . ,(delay python2-url))))))
2695 (define-public python2-url
2696 (let ((base (package-with-python2 (strip-python2-variant python-url))))
2697 (package (inherit base)
2699 `(("python2-publicsuffix" ,python2-publicsuffix))))))
2701 (define-public python-cachecontrol
2703 (name "python-cachecontrol")
2708 ;; Pypi does not have tests.
2710 (url "https://github.com/ionrock/cachecontrol")
2711 (commit (string-append "v" version))))
2712 (file-name (git-file-name name version))
2715 "03lgc65sl04n0cgzmmgg99bk83f9i6k8yrmcd4hpl46q1pymn0kz"))))
2716 (build-system python-build-system)
2718 ;; Versions > 0.11.6 depend on CherryPy for testing.
2719 ;; It's too much work to package CherryPy for now.
2722 `(("python-requests" ,python-requests)
2723 ("python-msgpack" ,python-msgpack)
2724 ("python-lockfile" ,python-lockfile)))
2725 (home-page "https://github.com/ionrock/cachecontrol")
2726 (synopsis "The httplib2 caching algorithms for use with requests")
2727 (description "CacheControl is a port of the caching algorithms in
2728 @code{httplib2} for use with @code{requests} session objects.")
2729 (license license:asl2.0)))
2731 (define-public python2-cachecontrol
2732 (package-with-python2 python-cachecontrol))
2734 (define-public python-betamax
2736 (name "python-betamax")
2741 (uri (pypi-uri "betamax" version))
2744 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
2745 (build-system python-build-system)
2747 '(;; Many tests fail because they require networking.
2750 `(("python-requests" ,python-requests)))
2751 (home-page "https://github.com/sigmavirus24/betamax")
2752 (synopsis "Record HTTP interactions with python-requests")
2753 (description "Betamax will record your test suite's HTTP interactions and
2754 replay them during future tests. It is designed to work with python-requests.")
2755 (license license:expat)))
2757 (define-public python2-betamax
2758 (package-with-python2 python-betamax))
2760 (define-public python-betamax-matchers
2762 (name "python-betamax-matchers")
2767 (uri (pypi-uri "betamax-matchers" version))
2770 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
2771 (build-system python-build-system)
2773 `(("python-betamax" ,python-betamax)
2774 ("python-requests-toolbelt" ,python-requests-toolbelt)))
2775 (home-page "https://github.com/sigmavirus24/betamax_matchers")
2776 (synopsis "VCR imitation for python-requests")
2777 (description "@code{betamax-matchers} provides a set of Matchers for
2779 (license license:asl2.0)))
2781 (define-public python2-betamax-matchers
2782 (package-with-python2 python-betamax-matchers))
2784 (define-public python-s3transfer
2786 (name "python-s3transfer")
2790 (uri (pypi-uri "s3transfer" version))
2793 "08fhj73b1ai52hrs2q3nggshq3pswn1gq8ch3m009cb2v2vmqggj"))))
2794 (build-system python-build-system)
2797 (modify-phases %standard-phases
2798 (add-after 'unpack 'patch
2800 ;; There's a small issue with one test with Python 3.8, this
2801 ;; change has been suggested upstream:
2802 ;; https://github.com/boto/s3transfer/pull/164
2803 (substitute* "tests/unit/test_s3transfer.py"
2804 (("super\\(FailedDownloadParts, self\\)\\.submit\\(function\\)")
2805 "futures.Future()"))
2809 ;; Some of the 'integration' tests require network access or
2810 ;; login credentials.
2811 (invoke "nosetests" "--exclude=integration")
2814 `(("python-docutils" ,python-docutils)
2815 ("python-mock" ,python-mock)
2816 ("python-nose" ,python-nose)))
2818 `(("python-botocore" ,python-botocore)
2819 ("python-urllib3" ,python-urllib3)))
2820 (synopsis "Amazon S3 Transfer Manager")
2821 (description "S3transfer is a Python library for managing Amazon S3
2823 (home-page "https://github.com/boto/s3transfer")
2824 (license license:asl2.0)
2825 (properties `((python2-variant . ,(delay python2-s3transfer))))))
2827 (define-public python2-s3transfer
2828 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
2832 `(("python2-futures" ,python2-futures)
2833 ,@(package-native-inputs base))))))
2835 (define-public python-slimit
2837 (name "python-slimit")
2842 (uri (pypi-uri "slimit" version ".zip"))
2845 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
2846 (build-system python-build-system)
2848 `(("unzip" ,unzip)))
2850 `(("python-ply" ,python-ply)))
2851 (home-page "https://slimit.readthedocs.io/")
2852 (synopsis "JavaScript minifier, parser and lexer written in Python")
2854 "SlimIt is a JavaScript minifier written in Python. It compiles
2855 JavaScript into more compact code so that it downloads and runs faster.
2856 SlimIt also provides a library that includes a JavaScript parser, lexer,
2857 pretty printer and a tree visitor.")
2858 (license license:expat)))
2860 (define-public python-flask-restful
2862 (name "python-flask-restful")
2867 (uri (pypi-uri "Flask-RESTful" version))
2868 (patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
2871 "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
2872 (build-system python-build-system)
2874 `(("python-aniso8601" ,python-aniso8601)
2875 ("python-flask" ,python-flask)
2876 ("python-pycrypto" ,python-pycrypto)
2877 ("python-pytz" ,python-pytz)))
2879 `(;; Optional dependency of Flask. Tests need it.
2880 ("python-blinker" ,python-blinker)
2881 ("python-mock" ,python-mock) ; For tests
2882 ("python-nose" ,python-nose))) ;for tests
2884 "https://www.github.com/flask-restful/flask-restful/")
2886 "Flask module for creating REST APIs")
2888 "This package contains a Flask module for creating REST APIs.")
2889 (license license:bsd-3)))
2891 (define-public python-flask-basicauth
2893 (name "python-flask-basicauth")
2898 (uri (pypi-uri "Flask-BasicAuth" version))
2901 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
2902 (build-system python-build-system)
2904 `(#:phases (modify-phases %standard-phases
2905 (add-after 'unpack 'fix-imports
2907 (substitute* '("docs/index.rst"
2909 "flask_basicauth.py"
2910 "test_basicauth.py")
2911 (("flask\\.ext\\.basicauth")
2915 `(("python-flask" ,python-flask)))
2916 (home-page "https://github.com/jpvanhal/flask-basicauth")
2917 (synopsis "HTTP basic access authentication for Flask")
2919 "This package provides HTTP basic access authentication for Flask.")
2920 (license license:bsd-3)))
2922 (define-public python-flask-htpasswd
2924 (name "python-flask-htpasswd")
2929 (uri (pypi-uri "flask-htpasswd" version))
2932 "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
2933 (build-system python-build-system)
2935 `(("python-flask" ,python-flask)
2936 ("python-itsdangerous" ,python-itsdangerous)
2937 ("python-passlib" ,python-passlib)
2938 ("python-tox" ,python-tox)))
2939 (home-page "https://github.com/carsongee/flask-htpasswd")
2940 (synopsis "Basic authentication via htpasswd files in Flask applications")
2941 (description "This package provides Basic authentication via
2942 @file{htpasswd} files and access_token authentication in Flask
2944 (license license:bsd-3)))
2946 (define-public python-flask-sqlalchemy
2948 (name "python-flask-sqlalchemy")
2952 (uri (pypi-uri "Flask-SQLAlchemy" version))
2955 "1rgsj49gnx361hnb3vn6c1h17497qh22yc3r70l1r6w0mw71bixz"))))
2956 (build-system python-build-system)
2958 `(("python-flask" ,python-flask)
2959 ("python-sqlalchemy" ,python-sqlalchemy)))
2960 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
2961 (synopsis "Module adding SQLAlchemy support to your Flask application")
2963 "This package adds SQLAlchemy support to your Flask application.")
2964 (license license:bsd-3)))
2966 (define-public python-flask-restplus
2968 (name "python-flask-restplus")
2973 (uri (pypi-uri "flask-restplus" version))
2976 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2977 (build-system python-build-system)
2979 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2981 ;; (modify-phases %standard-phases
2984 ;; (invoke "nosetests")
2987 `(("python-aniso8601" ,python-aniso8601)
2988 ("python-flask" ,python-flask)
2989 ("python-jsonschema" ,python-jsonschema)
2990 ("python-pytz" ,python-pytz)
2991 ("python-six" ,python-six)))
2993 `(("python-tzlocal" ,python-tzlocal)
2994 ("python-blinker" ,python-blinker)
2995 ("python-nose" ,python-nose)
2996 ("python-rednose" ,python-rednose)))
2997 (home-page "https://github.com/noirbizarre/flask-restplus")
2998 (synopsis "Framework for documented API development with Flask")
2999 (description "This package provides a framework for API development with
3000 the Flask web framework in Python. It is similar to package
3001 @code{python-flask-restful} but supports the @code{python-swagger}
3002 documentation builder.")
3003 (license license:expat)))
3005 (define-public python-flask-restful-swagger
3007 (name "python-flask-restful-swagger")
3012 (uri (pypi-uri "flask-restful-swagger" version))
3015 "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
3016 (build-system python-build-system)
3017 (arguments '(#:tests? #f)) ;no tests
3019 `(("python-flask-restful" ,python-flask-restful)))
3020 (home-page "https://github.com/rantav/flask-restful-swagger")
3021 (synopsis "Extract Swagger specs from Flask-Restful projects")
3022 (description "This package lets you extract Swagger API documentation
3023 specs from your Flask-Restful projects.")
3024 (license license:expat)))
3026 (define-public python2-flask-restful-swagger
3027 (package-with-python2 python-flask-restful-swagger))
3029 (define-public python-htmlmin
3031 (name "python-htmlmin")
3036 (uri (pypi-uri "htmlmin" version))
3039 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
3041 `(#:tests? #f)) ; no tests
3042 (build-system python-build-system)
3043 (home-page "https://htmlmin.readthedocs.org/en/latest/")
3044 (synopsis "HTML minifier")
3045 (description "@code{htmlmin} is an HTML minifier that just works.
3046 It comes with safe defaults and easily configurable options.")
3047 (license license:bsd-3)))
3049 (define-public python2-htmlmin
3050 (package-with-python2 python-htmlmin))
3052 (define-public python-flask-htmlmin
3054 (name "python-flask-htmlmin")
3059 (uri (pypi-uri "Flask-HTMLmin" version))
3062 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
3064 `(("python-flask" ,python-flask)
3065 ("python-htmlmin" ,python-htmlmin)))
3066 (build-system python-build-system)
3067 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
3068 (synopsis "HTML response minifier for Flask")
3070 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
3071 (license license:bsd-3)))
3073 (define-public python2-flask-htmlmin
3074 (package-with-python2 python-flask-htmlmin))
3076 (define-public python-jsmin
3078 (name "python-jsmin")
3083 (uri (pypi-uri "jsmin" version))
3086 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
3087 (build-system python-build-system)
3088 (home-page "https://github.com/tikitu/jsmin/")
3089 (synopsis "Python JavaScript minifier")
3091 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
3092 on the command line.")
3093 (license license:expat)))
3095 (define-public python-flask-login
3097 (name "python-flask-login")
3103 (url "https://github.com/maxcountryman/flask-login")
3105 (file-name (git-file-name name version))
3107 (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
3108 (build-system python-build-system)
3110 `(("python-flask" ,python-flask)))
3113 `(("python-blinker" ,python-blinker)
3114 ("python-coverage" ,python-coverage)
3115 ("python-mock" ,python-mock)
3116 ("python-pycodestyle" ,python-pycodestyle)
3117 ("python-pyflakes" ,python-pyflakes)
3118 ("python-pytest" ,python-pytest)
3119 ("python-semantic-version" ,python-semantic-version)
3120 ("python-werkzeug" ,python-werkzeug)))
3121 (home-page "https://github.com/maxcountryman/flask-login")
3122 (synopsis "User session management for Flask")
3124 "@code{Flask-Login} provides user session management for Flask. It
3125 handles the common tasks of logging in, logging out, and remembering your
3126 users' sessions over extended periods of time.")
3127 (license license:expat)))
3129 (define-public python2-flask-login
3130 (package-with-python2 python-flask-login))
3132 (define-public python-oauth2client
3134 (name "python-oauth2client")
3139 (uri (pypi-uri "oauth2client" version))
3142 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
3143 (build-system python-build-system)
3147 `(("python-httplib2" ,python-httplib2)
3148 ("python-pyasn1" ,python-pyasn1)
3149 ("python-pyasn1-modules" ,python-pyasn1-modules)
3150 ("python-rsa" ,python-rsa)
3151 ("python-six" ,python-six)))
3152 (home-page "https://github.com/google/oauth2client/")
3153 (synopsis "OAuth 2.0 client library")
3154 (description "@code{python-oauth2client} provides an OAuth 2.0 client
3155 library for Python")
3156 (license license:asl2.0)))
3158 (define-public python2-oauth2client
3159 (package-with-python2 python-oauth2client))
3161 (define-public python-flask-oidc
3163 (name "python-flask-oidc")
3168 (uri (pypi-uri "flask-oidc" version))
3171 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
3172 (build-system python-build-system)
3174 `(("python-flask" ,python-flask)
3175 ("python-itsdangerous" ,python-itsdangerous)
3176 ("python-oauth2client" ,python-oauth2client)
3177 ("python-six" ,python-six)))
3179 `(("python-nose" ,python-nose)
3180 ("python-mock" ,python-mock)))
3181 (home-page "https://github.com/puiterwijk/flask-oidc")
3182 (synopsis "OpenID Connect extension for Flask")
3183 (description "@code{python-flask-oidc} provides an OpenID Connect extension
3185 (license license:bsd-2)))
3187 (define-public python-webassets
3189 (name "python-webassets")
3194 (uri (pypi-uri "webassets" version))
3197 "1kc1042jydgk54xpgcp0r1ib4gys91nhy285jzfcxj3pfqrk4w8n"))))
3198 (build-system python-build-system)
3200 '(#:phases (modify-phases %standard-phases
3201 (add-before 'check 'disable-some-tests
3203 ;; This test requires 'postcss' and 'babel' which are
3204 ;; not yet available in Guix.
3205 (delete-file "tests/test_filters.py")
3209 (setenv "PYTHONPATH"
3210 (string-append "./build/lib:"
3211 (getenv "PYTHONPATH")))
3212 (invoke "pytest" "-vv"))))))
3214 `(("python-jinja2" ,python-jinja2)
3215 ("python-mock" ,python-mock)
3216 ("python-nose" ,python-nose)
3217 ("python-pytest" ,python-pytest)))
3218 (home-page "https://github.com/miracle2k/webassets")
3219 (synopsis "Media asset management")
3220 (description "Merges, minifies and compresses Javascript and CSS files,
3221 supporting a variety of different filters, including YUI, jsmin, jspacker or
3222 CSS tidy. Also supports URL rewriting in CSS files.")
3223 (license license:bsd-2)))
3225 (define-public python-cssmin
3227 (name "python-cssmin")
3232 (uri (pypi-uri "cssmin" version))
3235 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
3236 (build-system python-build-system)
3237 (home-page "https://github.com/zacharyvoase/cssmin")
3238 (synopsis "Python port of the YUI CSS Compressor")
3239 (description "Python port of the YUI CSS Compressor.")
3240 (license (list license:expat license:bsd-3))))
3242 (define-public python2-cssmin
3243 (package-with-python2 python-cssmin))
3245 (define-public python-elasticsearch
3247 (name "python-elasticsearch")
3252 (uri (pypi-uri "elasticsearch" version))
3255 "0rnjvlhw4v3vg14l519qliy1s1zpmx3827q0xfviwvk42rr7hh01"))))
3256 (build-system python-build-system)
3258 `(("python-mock" ,python-mock)
3259 ("python-nosexcover" ,python-nosexcover)
3260 ("python-pyaml" ,python-pyaml)
3261 ("python-requests" ,python-requests)))
3263 `(("urllib3" ,python-urllib3)))
3265 ;; tests require the test_elasticsearch module but it is not distributed.
3267 (home-page "https://github.com/elastic/elasticsearch-py")
3268 (synopsis "Low-level client for Elasticsearch")
3269 (description "Official low-level client for Elasticsearch. Its goal is to
3270 provide common ground for all Elasticsearch-related code in Python; because of
3271 this it tries to be opinion-free and very extendable.")
3272 (license license:expat)))
3274 (define-public python2-elasticsearch
3275 (package-with-python2 python-elasticsearch))
3277 (define-public python-flask-script
3279 (name "python-flask-script")
3284 (uri (pypi-uri "Flask-Script" version))
3287 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
3288 (build-system python-build-system)
3291 (modify-phases %standard-phases
3292 (add-after 'unpack 'patch-tests
3294 (substitute* "tests.py"
3295 (("flask\\.ext\\.script") "flask_script"))
3298 `(("python-flask" ,python-flask)
3299 ("python-argcomplete" ,python-argcomplete)
3300 ("python-werkzeug" ,python-werkzeug)))
3302 `(("python-pytest" ,python-pytest)))
3304 "https://github.com/smurfix/flask-script")
3305 (synopsis "Scripting support for Flask")
3306 (description "The Flask-Script extension provides support for writing
3307 external scripts in Flask. This includes running a development server,
3308 a customised Python shell, scripts to set up your database, cronjobs,
3309 and other command-line tasks that belong outside the web application
3311 (license license:bsd-3)))
3313 (define-public python2-flask-script
3314 (package-with-python2 python-flask-script))
3316 (define-public python-flask-migrate
3318 (name "python-flask-migrate")
3323 (uri (pypi-uri "Flask-Migrate" version))
3326 "1vip9ww6l18dxffjsggm83k71zkvihxpnhaswpv8klh95s6517d6"))))
3327 (build-system python-build-system)
3329 `(("python-flask" ,python-flask)
3330 ("python-alembic" ,python-alembic)
3331 ("python-sqlalchemy" ,python-sqlalchemy)
3332 ("python-flask-script" ,python-flask-script)
3333 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
3334 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
3335 (synopsis "SQLAlchemy database migrations for Flask programs using
3337 (description "This package contains SQLAlchemy database migration tools
3338 for Flask programs that are using @code{python-alembic}.")
3339 (license license:expat)))
3341 (define-public python-genshi
3343 (name "python-genshi")
3349 (url "https://github.com/edgewall/genshi")
3351 (file-name (git-file-name name version))
3353 (base32 "04bw7nd4wyn8ixnhik57hny2xpjjpn80k5hp6691inix5gc6rxaf"))))
3354 (build-system python-build-system)
3355 (home-page "https://genshi.edgewall.org/")
3356 (synopsis "Toolkit for generation of output for the web")
3357 (description "Genshi is a Python library that provides an integrated set
3358 of components for parsing, generating, and processing HTML, XML or other
3359 textual content for output generation on the web.")
3360 (license license:bsd-3)))
3362 (define-public python2-genshi
3363 (package-with-python2 python-genshi))
3365 (define-public python-flask-principal
3367 (name "python-flask-principal")
3372 (uri (pypi-uri "Flask-Principal" version))
3375 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
3376 (build-system python-build-system)
3378 `(("python-blinker" ,python-blinker)))
3380 `(("python-flask" ,python-flask)
3381 ("python-nose" ,python-nose)))
3382 (home-page "https://pythonhosted.org/Flask-Principal/")
3383 (synopsis "Identity management for Flask")
3384 (description "@code{flask_principal} is a identity management library for
3385 Flask. It supports managing both authentication and authorization data in a
3386 thread-local variable.")
3387 (license license:expat)))
3389 (define-public python2-flask-principal
3390 (package-with-python2 python-flask-principal))
3392 (define-public python-flask-httpauth
3394 (name "python-flask-httpauth")
3399 (uri (pypi-uri "Flask-HTTPAuth" version))
3402 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
3403 (build-system python-build-system)
3405 `(("python-flask" ,python-flask)))
3406 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
3407 (synopsis "Basic and Digest HTTP authentication for Flask routes")
3408 (description "@code{flask_httpauth} provides Basic and Digest HTTP
3409 authentication for Flask routes.")
3410 (license license:expat)))
3412 (define-public python2-flask-httpauth
3413 (package-with-python2 python-flask-httpauth))
3415 (define-public python-uritemplate
3417 (name "python-uritemplate")
3422 (uri (pypi-uri "uritemplate" version))
3425 "1bkwmgr0ia9gcn4bszs2xlvml79f0bi2s4a87xg22ky9rq8avy2s"))))
3426 (build-system python-build-system)
3427 (home-page "https://uritemplate.readthedocs.org")
3428 (synopsis "Library to deal with URI Templates")
3429 (description "@code{uritemplate} provides Python library to deal with URI
3431 (license license:bsd-2)))
3433 (define-public python2-uritemplate
3434 (package-with-python2 python-uritemplate))
3436 (define-public python-publicsuffix
3438 (name "python-publicsuffix")
3442 (uri (pypi-uri "publicsuffix" version))
3445 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
3446 (build-system python-build-system)
3448 `(#:tests? #f)) ; tests use the internet
3449 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
3450 (synopsis "Get suffix for a domain name")
3451 (description "Get a public suffix for a domain name using the Public Suffix
3453 (license license:expat)))
3455 (define-public python2-publicsuffix
3456 (package-with-python2 python-publicsuffix))
3458 (define-public python-publicsuffix2
3460 (name "python-publicsuffix2")
3461 (version "2.20191221")
3465 (uri (pypi-uri "publicsuffix2" version))
3467 (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
3468 (build-system python-build-system)
3471 (modify-phases %standard-phases
3472 (add-after 'unpack 'ignore-maintainer-inputs
3474 ;; Comment out a demand for python-requests, which is used only by
3475 ;; the unused ‘update_psl’ helper command.
3476 (substitute* "setup.py"
3477 (("'requests " match)
3478 (format #f "# ~a" match)))
3480 #:tests? #f)) ; the test suite requires network access
3481 (home-page "https://github.com/pombredanne/python-publicsuffix2")
3482 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
3483 (description "Get a public suffix for a domain name using the Public Suffix
3484 List. Forked from and using the same API as the publicsuffix package.")
3485 (license (list license:expat license:mpl2.0))))
3487 (define-public python2-publicsuffix2
3488 (package-with-python2 python-publicsuffix2))
3490 (define-public python-werkzeug
3492 (name "python-werkzeug")
3497 (uri (pypi-uri "Werkzeug" version))
3500 "15kh0z61klp62mrc1prka13xsshxn0rsp1j1s2964iw86yisi6qn"))))
3501 (build-system python-build-system)
3504 (modify-phases %standard-phases
3506 (add-after 'install 'check
3507 (lambda* (#:key inputs outputs #:allow-other-keys)
3508 (add-installed-pythonpath inputs outputs)
3509 (invoke "python" "-m" "pytest"))))))
3511 `(("python-requests" ,python-requests)))
3513 `(("python-pytest" ,python-pytest)
3514 ("python-pytest-timeout" ,python-pytest-timeout)))
3515 (home-page "https://www.palletsprojects.org/p/werkzeug/")
3516 (synopsis "Utilities for WSGI applications")
3517 (description "One of the most advanced WSGI utility modules. It includes a
3518 powerful debugger, full-featured request and response objects, HTTP utilities to
3519 handle entity tags, cache control headers, HTTP dates, cookie handling, file
3520 uploads, a powerful URL routing system and a bunch of community-contributed
3522 (license license:x11)))
3524 (define-public python2-werkzeug
3525 (package-with-python2 python-werkzeug))
3527 (define-public python-bottle
3529 (name "python-bottle")
3534 (uri (pypi-uri "bottle" version))
3536 (base32 "0b6s50vc4iad97b6bb3xnyrgajb3nj6n6jbr5p54a4vapky3zmx9"))))
3537 (build-system python-build-system)
3538 (home-page "https://bottlepy.org/")
3539 (synopsis "WSGI framework for small web-applications.")
3540 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
3541 (license license:expat)))
3543 (define-public python2-bottle
3544 (package-with-python2 python-bottle))
3546 (define-public python-wtforms
3548 (name "python-wtforms")
3553 (uri (pypi-uri "WTForms" version ".zip"))
3556 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
3557 (build-system python-build-system)
3560 (modify-phases %standard-phases
3561 (add-after 'unpack 'remove-django-test
3562 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
3566 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
3567 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
3570 `(("unzip" ,unzip)))
3571 (home-page "http://wtforms.simplecodes.com/")
3573 "Form validation and rendering library for Python web development")
3575 "WTForms is a flexible forms validation and rendering library
3576 for Python web development. It is very similar to the web form API
3577 available in Django, but is a standalone package.")
3578 (license license:bsd-3)))
3580 (define-public python2-wtforms
3581 (package-with-python2 python-wtforms))
3583 (define-public python-paste
3585 (name "python-paste")
3590 (uri (pypi-uri "Paste" version))
3593 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
3594 (patches (search-patches "python-paste-remove-timing-test.patch"))
3595 (modules '((guix build utils)))
3598 ;; This test calls out to the internet.
3599 (delete-file "tests/test_proxy.py") #t))))
3600 (build-system python-build-system)
3602 `(("python-pytest" ,python-pytest)
3603 ("python-pytest-runner" ,python-pytest-runner)
3604 ("python-nose" ,python-nose)))
3606 `(("python-six" ,python-six)))
3607 (home-page "https://pythonpaste.readthedocs.io/")
3609 "Python web development tools, focusing on WSGI")
3611 "Paste provides a variety of web development tools and middleware which
3612 can be nested together to build web applications. Paste's design closely
3613 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
3614 (license license:expat)))
3616 (define-public python2-paste
3617 (package-with-python2 python-paste))
3619 (define-public python-pastescript
3621 (name "python-pastescript")
3626 (uri (pypi-uri "PasteScript" version))
3629 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
3630 (build-system python-build-system)
3632 `(("python-nose" ,python-nose)))
3634 `(("python-paste" ,python-paste)
3635 ("python-pastedeploy" ,python-pastedeploy)))
3636 (home-page (string-append "https://web.archive.org/web/20161025192515/"
3637 "http://pythonpaste.org/script/"))
3639 '(;; Unfortunately, this requires the latest unittest2,
3640 ;; but that requires traceback2 which requires linecache2 which requires
3641 ;; unittest2. So we're skipping tests for now.
3642 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
3643 ;; so in theory we could get around this situation somehow.)
3646 "Pluggable command line tool for serving web applications and more")
3648 "PasteScript is a plugin-friendly command line tool which provides a
3649 variety of features, from launching web applications to bootstrapping project
3651 (license license:expat)))
3653 (define-public python2-pastescript
3654 (package-with-python2 python-pastescript))
3656 (define-public python2-urlgrabber
3658 (name "python2-urlgrabber")
3663 (uri (pypi-uri "urlgrabber" version))
3665 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
3666 (build-system python-build-system)
3667 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
3668 (home-page "http://urlgrabber.baseurl.org")
3669 (synopsis "High-level cross protocol url-grabber")
3670 (description "@code{urlgrabber} is Python2 library that unifies access to
3671 files available on web, FTP or locally. It supports HTTP, FTP and file://
3672 protocols, it supports features like HTTP keep-alive, reget, throttling and
3674 (license license:lgpl2.1+)))
3676 (define-public python-pycares
3678 (name "python-pycares")
3683 (uri (pypi-uri "pycares" version))
3686 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
3687 (build-system python-build-system)
3689 `(#:tests? #f)) ;tests require internet access
3690 (home-page "https://github.com/saghul/pycares")
3691 (synopsis "Python interface for @code{c-ares}")
3692 (description "@code{pycares} is a Python module which provides an
3693 interface to @code{c-ares}, a C library that performs DNS requests and
3694 name resolutions asynchronously.")
3695 (license license:expat)))
3697 (define-public python-yarl
3699 (name "python-yarl")
3704 (uri (pypi-uri "yarl" version))
3707 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
3708 (build-system python-build-system)
3710 `(("python-pytest" ,python-pytest)
3711 ("python-pytest-runner" ,python-pytest-runner)))
3713 `(("python-idna" ,python-idna)
3714 ("python-multidict" ,python-multidict)))
3715 (home-page "https://github.com/aio-libs/yarl/")
3716 (synopsis "Yet another URL library")
3717 (description "@code{yarl} module provides handy @code{URL} class
3718 for URL parsing and changing.")
3719 (license license:asl2.0)))
3721 (define-public python-google-api-client
3723 (name "python-google-api-client")
3728 (uri (pypi-uri "google-api-python-client" version))
3731 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
3732 (build-system python-build-system)
3734 '(#:tests? #f)) ; tests require internet access
3736 `(("python-httplib2" ,python-httplib2)
3737 ("python-six" ,python-six)
3738 ("python-oauth2client" ,python-oauth2client)
3739 ("python-uritemplate" ,python-uritemplate)))
3740 (home-page "https://github.com/google/google-api-python-client")
3741 (synopsis "Core Python library for accessing Google APIs")
3742 (description "Python client library for Google's discovery based APIs")
3743 (license license:asl2.0)))
3745 (define-public python2-google-api-client
3746 (package-with-python2 python-google-api-client))
3748 (define-public python-hawkauthlib
3750 (name "python-hawkauthlib")
3755 (uri (pypi-uri "hawkauthlib" version))
3758 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
3759 (build-system python-build-system)
3761 `(("python-requests" ,python-requests)
3762 ("python-webob" ,python-webob)))
3763 (home-page "https://github.com/mozilla-services/hawkauthlib")
3764 (synopsis "Hawk Access Authentication protocol")
3766 "This is a low-level Python library for implementing Hawk Access Authentication,
3767 a simple HTTP request-signing scheme.")
3768 (license license:mpl2.0)))
3770 (define-public python-pybrowserid
3772 (name "python-pybrowserid")
3777 (uri (pypi-uri "PyBrowserID" version))
3780 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
3781 (build-system python-build-system)
3783 `(("python-requests" ,python-requests)))
3785 `(("python-mock" ,python-mock)))
3786 (home-page "https://github.com/mozilla/PyBrowserID")
3787 (synopsis "Python library for the BrowserID protocol")
3789 "This is a Python client library for the BrowserID protocol that
3790 underlies Mozilla Persona.")
3791 (license license:mpl2.0)))
3793 (define-public python-pyfxa
3795 (name "python-pyfxa")
3800 (uri (pypi-uri "PyFxA" version))
3803 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
3804 (build-system python-build-system)
3805 (arguments '(#:tests? #f)) ; 17 tests require network access
3807 `(("python-cryptography" ,python-cryptography)
3808 ("python-hawkauthlib" ,python-hawkauthlib)
3809 ("python-pybrowserid" ,python-pybrowserid)
3810 ("python-requests" ,python-requests)
3811 ("python-six" ,python-six)))
3813 `(("python-grequests" ,python-grequests)
3814 ("python-mock" ,python-mock)
3815 ("python-responses" ,python-responses)
3816 ("python-unittest2" ,python-unittest2)))
3817 (home-page "https://github.com/mozilla/PyFxA")
3818 (synopsis "Firefox Accounts client library for Python")
3820 "This is a Python library for interacting with the Firefox Accounts
3822 (license license:mpl2.0)))
3824 (define-public python-hyperlink
3826 (name "python-hyperlink")
3831 (uri (pypi-uri "hyperlink" version))
3834 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
3835 (build-system python-build-system)
3837 `(("python-idna" ,python-idna)))
3838 (home-page "https://github.com/python-hyper/hyperlink")
3839 (synopsis "Python module to create immutable URLs according to spec")
3840 (description "This package provides a Python module to create immutable, and
3841 correct URLs for Python according to RFCs 3986 and 3987.")
3842 (license license:expat)))
3844 (define-public python-treq
3846 (name "python-treq")
3851 (uri (pypi-uri "treq" version))
3854 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
3855 (build-system python-build-system)
3857 `(("python-attrs" ,python-attrs)
3858 ("python-idna" ,python-idna)
3859 ("python-incremental" ,python-incremental)
3860 ("python-requests" ,python-requests)
3861 ("python-service-identity" ,python-service-identity)
3862 ("python-twisted" ,python-twisted)))
3863 (home-page "https://github.com/twisted/treq")
3864 (synopsis "Requests-like API built on top of twisted.web's Agent")
3865 (description "This package provides an HTTP library inspired by
3866 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
3867 high level API for making HTTP requests when using Twisted.")
3868 (license license:expat)))
3870 (define-public python-autobahn
3872 (name "python-autobahn")
3877 (uri (pypi-uri "autobahn" version))
3880 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
3881 (build-system python-build-system)
3883 ;; The tests fail to run:
3884 ;; https://github.com/crossbario/autobahn-python/issues/1117
3887 `(("python-cffi" ,python-cffi)
3888 ("python-twisted" ,python-twisted)
3889 ("python-txaio" ,python-txaio)))
3890 (home-page "https://crossbar.io/autobahn/")
3891 (synopsis "Web Application Messaging Protocol implementation")
3892 (description "This package provides an implementation of the @dfn{Web Application
3893 Messaging Protocol} (WAMP). WAMP connects components in distributed
3894 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
3895 Calls (rRPC). It is ideal for distributed, multi-client and server applications
3896 such as IoT applications or multi-user database-driven business applications.")
3897 (license license:expat)))
3899 (define-public python-ws4py
3901 (name "python-ws4py")
3906 (uri (pypi-uri "ws4py" version))
3909 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
3910 (build-system python-build-system)
3913 (modify-phases %standard-phases
3914 (add-after 'unpack 'python3.7-compatibility
3916 (substitute* '("ws4py/server/tulipserver.py"
3917 "ws4py/async_websocket.py")
3919 "asyncio.ensure_future"))
3921 ;; We don't have a package for cherrypy.
3922 (add-after 'unpack 'remove-cherrypy-support
3924 (delete-file "ws4py/server/cherrypyserver.py")
3927 `(("python-gevent" ,python-gevent)
3928 ("python-tornado" ,python-tornado)))
3929 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
3930 (synopsis "WebSocket client and server library")
3932 "This package provides a WebSocket client and server library for
3934 (license license:bsd-3)))
3936 (define-public python-slugify
3938 (name "python-slugify")
3943 (uri (pypi-uri "python-slugify" version))
3945 (base32 "0w22fapghmzk3xdasc4dn7h8sl58l08d1h5zbf72dh80drv1g9b9"))))
3947 `(("python-unidecode" ,python-unidecode)))
3950 (modify-phases %standard-phases
3953 (invoke "python" "test.py"))))))
3954 (build-system python-build-system)
3955 (home-page "https://github.com/un33k/python-slugify")
3956 (synopsis "Python Slugify application that handles Unicode")
3957 (description "This package provides a @command{slufigy} command and
3958 library to create slugs from unicode strings while keeping it DRY.")
3959 (license license:expat)))
3961 (define-public python-branca
3963 (name "python-branca")
3968 (uri (pypi-uri "branca" version))
3971 "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
3972 (build-system python-build-system)
3974 `(("python-jinja2" ,python-jinja2)
3975 ("python-six" ,python-six)))
3977 `(("python-pytest" ,python-pytest)))
3978 (home-page "https://github.com/python-visualization/branca")
3979 (synopsis "Generate complex HTML+JS pages with Python")
3980 (description "Generate complex HTML+JS pages with Python")
3981 (license license:expat)))
3983 (define-public python-tinycss2
3985 (name "python-tinycss2")
3990 (uri (pypi-uri "tinycss2" version))
3991 (patches (search-patches "python-tinycss2-flake8-compat.patch"))
3993 (base32 "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4"))))
3994 (build-system python-build-system)
3997 (modify-phases %standard-phases
3999 (lambda _ (invoke "pytest"))))))
4001 `(("python-webencodings" ,python-webencodings)))
4003 `(("python-pytest-flake8" ,python-pytest-flake8)
4004 ("python-pytest-isort" ,python-pytest-isort)
4005 ("python-pytest-runner" ,python-pytest-runner)))
4006 (home-page "https://tinycss2.readthedocs.io/")
4007 (synopsis "Low-level CSS parser for Python")
4008 (description "@code{tinycss2} can parse strings, return Python objects
4009 representing tokens and blocks, and generate CSS strings corresponding to
4012 Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
4013 grammar of CSS but doesn’t know specific rules, properties or values supported
4014 in various CSS modules.")
4015 (license license:bsd-3)))
4017 (define-public python-cssselect2
4019 (name "python-cssselect2")
4024 (uri (pypi-uri "cssselect2" version))
4026 (base32 "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h"))))
4027 (build-system python-build-system)
4030 (modify-phases %standard-phases
4032 (lambda _ (invoke "pytest"))))))
4034 `(("python-tinycss2" ,python-tinycss2)))
4036 `(("python-pytest-cov" ,python-pytest-cov)
4037 ("python-pytest-flake8" ,python-pytest-flake8)
4038 ("python-pytest-isort" ,python-pytest-isort)
4039 ("python-pytest-runner" ,python-pytest-runner)))
4040 (home-page "https://cssselect2.readthedocs.io/")
4041 (synopsis "CSS selectors for Python ElementTree")
4042 (description "@code{cssselect2} is a straightforward implementation of
4043 CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
4044 ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
4046 Unlike the Python package @code{cssselect}, it does not translate selectors to
4047 XPath and therefore does not have all the correctness corner cases that are
4048 hard or impossible to fix in cssselect.")
4049 (license license:bsd-3)))
4051 (define-public python-uvloop
4053 (name "python-uvloop")
4058 (uri (pypi-uri "uvloop" version))
4060 (base32 "07j678z9gf41j98w72ysrnb5sa41pl5yxd7ib17lcwfxqz0cjfhj"))))
4061 (build-system python-build-system)
4063 '(#:tests? #f ;FIXME: tests hang and with some errors in the way
4065 (modify-phases %standard-phases
4066 (add-after 'unpack 'preparations
4068 ;; Use packaged libuv.
4069 (substitute* "setup.py" (("self.use_system_libuv = False")
4070 "self.use_system_libuv = True"))
4073 `(("python-aiohttp" ,python-aiohttp)
4074 ("python-cython" ,python-cython)
4075 ("python-flake8" ,python-flake8)
4076 ("python-psutil" ,python-psutil)
4077 ("python-pyopenssl" ,python-pyopenssl)
4078 ("python-twine" ,python-twine)))
4080 `(("libuv" ,libuv)))
4081 (home-page "https://github.com/MagicStack/uvloop")
4082 (synopsis "Fast implementation of asyncio event loop on top of libuv")
4084 "@code{uvloop} is a fast, drop-in replacement of the built-in asyncio
4085 event loop. It is implemented in Cython and uses libuv under the hood.")
4086 (license license:expat)))
4088 (define-public gunicorn
4095 (uri (pypi-uri "gunicorn" version))
4098 "09n6fc019bgrvph1s5h1lwhn2avcsprw6ncd203qhra3i8mvn10r"))))
4099 (outputs '("out" "doc"))
4100 (build-system python-build-system)
4103 (modify-phases %standard-phases
4104 (add-after 'build 'build-doc
4106 (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
4107 (delete-file "docs/build/texinfo/Makefile")
4108 (delete-file "docs/build/texinfo/Gunicorn.texi")
4112 (setenv "PYTHONPATH"
4113 (string-append ".:" (getenv "PYTHONPATH")))
4115 (add-after 'install 'install-doc
4116 (lambda* (#:key outputs #:allow-other-keys)
4117 (let* ((doc (string-append (assoc-ref outputs "doc")
4118 "/share/doc/" ,name "-" ,version))
4119 (html (string-append doc "/html"))
4120 (info (string-append doc "/info"))
4121 (examples (string-append doc "/examples")))
4125 (copy-recursively "docs/build/html" html)
4126 (copy-recursively "docs/build/texinfo" info)
4127 (copy-recursively "examples" examples)
4128 (for-each (lambda (file)
4129 (copy-file file (string-append doc "/" file)))
4130 '("README.rst" "NOTICE" "LICENSE" "THANKS")))
4133 `(("binutils" ,binutils) ;; for ctypes.util.find_library()
4134 ("python-aiohttp" ,python-aiohttp)
4135 ("python-pytest" ,python-pytest)
4136 ("python-pytest-cov" ,python-pytest-cov)
4137 ("python-sphinx" ,python-sphinx)
4138 ("texinfo" ,texinfo)))
4139 (home-page "https://gunicorn.org/")
4140 (synopsis "Python WSGI HTTP Server for UNIX")
4141 (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
4142 Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
4143 Unicorn project. The Gunicorn server is broadly compatible with
4144 various web frameworks, simply implemented, light on server resources,
4145 and fairly speedy.")
4146 (license license:expat)))
4148 ;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
4150 (define-public gunicorn-bootstrap
4154 (arguments `(#:tests? #f))
4155 (properties '((hidden? . #t)))
4156 (native-inputs `())))
4158 (define-public python-httptools
4160 (name "python-httptools")
4164 ;; PyPI tarball comes with a vendored http-parser and no tests.
4167 (url "https://github.com/MagicStack/httptools")
4168 (commit (string-append "v" version))))
4169 (file-name (git-file-name name version))
4171 (base32 "0g08128x2ixsiwrzskxc6c8ymgzs39wbzr5mhy0mjk30q9pqqv77"))))
4172 (build-system python-build-system)
4175 (modify-phases %standard-phases
4176 (add-after 'unpack 'preparations
4178 ;; Skip a failing test (AssertionError). Bug report:
4179 ;; https://github.com/MagicStack/httptools/issues/10.
4180 (substitute* "tests/test_parser.py"
4181 ((" def test_parser_response_1")
4183 " @unittest.skip(\"Disabled.\")\n"
4184 " def test_parser_response_1")))
4185 ;; Use packaged http-parser.
4186 (substitute* "setup.py" (("self.use_system_http_parser = False")
4187 "self.use_system_http_parser = True"))
4188 ;; This path is hardcoded. Hardcode our own.
4189 (substitute* "httptools/parser/cparser.pxd"
4190 (("../../vendor/http-parser")
4191 (string-append (assoc-ref %build-inputs "http-parser")
4193 ;; Don't force Cython version.
4194 (substitute* "setup.py" (("Cython==") "Cython>="))
4197 `(("python-cython" ,python-cython)
4198 ("python-pytest" ,python-pytest)))
4200 `(("http-parser" ,http-parser)))
4201 (home-page "https://github.com/MagicStack/httptools")
4202 (synopsis "Collection of framework independent HTTP protocol utils")
4204 "@code{httptools} is a Python binding for the nodejs HTTP parser.")
4205 (license license:expat)))
4207 (define-public python-uvicorn
4209 (name "python-uvicorn")
4213 ;; PyPI tarball has no tests.
4216 (url "https://github.com/encode/uvicorn")
4218 (file-name (git-file-name name version))
4220 (base32 "00iidg5ysp7k00bw3kmkvr8mghnh4jdi0p2ryiarhryf8wz2r3fy"))))
4221 (build-system python-build-system)
4224 (modify-phases %standard-phases
4226 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4227 (add-installed-pythonpath inputs outputs)
4228 (invoke "pytest" "-vv"))))))
4230 `(("python-black" ,python-black)
4231 ("python-codecov" ,python-codecov)
4232 ("python-flake8" ,python-flake8)
4233 ("python-isort" ,python-isort)
4234 ("python-mypy" ,python-mypy)
4235 ("python-pytest" ,python-pytest)
4236 ("python-pytest-cov" ,python-pytest-cov)
4237 ("python-pytest-mock" ,python-pytest-mock)
4238 ("python-requests" ,python-requests)))
4240 `(("python-click" ,python-click)
4241 ("python-h11" ,python-h11)
4242 ("python-httptools" ,python-httptools)
4243 ("python-pyyaml" ,python-pyyaml)
4244 ("python-uvloop" ,python-uvloop)
4245 ("python-watchgod" ,python-watchgod)
4246 ("python-websockets" ,python-websockets)
4247 ("python-wsproto" ,python-wsproto)))
4248 (home-page "https://github.com/encode/uvicorn")
4249 (synopsis "Fast ASGI server implementation")
4251 "@code{uvicorn} is a fast ASGI server implementation, using @code{uvloop}
4252 and @code{httptools}. It currently supports HTTP/1.1 and WebSockets. Support
4253 for HTTP/2 is planned.")
4254 (license license:bsd-3)))
4256 (define-public python-translation-finder
4258 (name "python-translation-finder")
4263 (uri (pypi-uri "translation-finder" version))
4266 "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
4267 (build-system python-build-system)
4270 (modify-phases %standard-phases
4271 (add-before 'build 'remove-failing-test
4273 (delete-file "translation_finder/test_api.py")
4276 `(("python-chardet" ,python-chardet)
4277 ("python-pathlib2" ,python-pathlib2)
4278 ("python-ruamel.yaml" ,python-ruamel.yaml)
4279 ("python-six" ,python-six)))
4281 `(("python-codecov" ,python-codecov)
4282 ("python-codacy-coverage" ,python-codacy-coverage)
4283 ("python-pytest-cov" ,python-pytest-cov)
4284 ("python-pytest-runner" ,python-pytest-runner)
4285 ("python-twine" ,python-twine)))
4286 (home-page "https://weblate.org/")
4287 (synopsis "Translation file finder for Weblate")
4288 (description "This package provides a function to find translation file in
4289 the source code of a project. It supports many translation file formats and
4290 is part of the Weblate translation platform.")
4291 (license license:gpl3+)))
4293 (define-public python-gitlab
4295 (name "python-gitlab")
4300 (uri (pypi-uri "python-gitlab" version))
4303 "0zl6kz8v8cg1bcy2r78b2snb0lpw0b573gdx2x1ps0nhsh75l4j5"))))
4304 (build-system python-build-system)
4306 `(("python-requests" ,python-requests)
4307 ("python-six" ,python-six)))
4309 `(("python-httmock" ,python-httmock)
4310 ("python-mock" ,python-mock)))
4312 "https://github.com/python-gitlab/python-gitlab")
4313 (synopsis "Interact with GitLab API")
4314 (description "This package provides an extended library for interacting
4315 with GitLab instances through their API.")
4316 (license license:lgpl3+)))
4318 (define-public python-path-and-address
4320 (name "python-path-and-address")
4324 ;; The source distributed on PyPI doesn't include tests.
4327 (url "https://github.com/joeyespo/path-and-address")
4328 (commit (string-append "v" version))))
4329 (file-name (git-file-name name version))
4332 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
4333 (build-system python-build-system)
4336 (modify-phases %standard-phases
4338 (lambda* (#:key inputs outputs #:allow-other-keys)
4339 (add-installed-pythonpath inputs outputs)
4340 (invoke "py.test"))))))
4342 `(("python-pytest" ,python-pytest)))
4343 (home-page "https://github.com/joeyespo/path-and-address")
4344 (synopsis "Functions for command-line server tools used by humans")
4345 (description "Path-and-address resolves ambiguities of command-line
4346 interfaces, inferring which argument is the path, and which is the address.")
4347 (license license:expat)))
4350 ;; No release by upstream for quite some time, some bugs fixed since. See:
4351 ;; https://github.com/joeyespo/grip/issues/304
4352 (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
4355 (version (git-version "4.5.2" "1" commit))
4360 (url "https://github.com/joeyespo/grip")
4362 (file-name (git-file-name name version))
4365 "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
4366 (build-system python-build-system)
4368 `(("python-docopt" ,python-docopt)
4369 ("python-flask" ,python-flask)
4370 ("python-markdown" ,python-markdown)
4371 ("python-path-and-address" ,python-path-and-address)
4372 ("python-pygments" ,python-pygments)
4373 ("python-requests" ,python-requests)))
4375 `(("python-pytest" ,python-pytest)
4376 ("python-responses" ,python-responses)))
4379 (modify-phases %standard-phases
4381 (lambda* (#:key inputs outputs #:allow-other-keys)
4382 (add-installed-pythonpath inputs outputs)
4383 (setenv "PATH" (string-append
4385 (assoc-ref %outputs "out") "/bin"))
4386 (invoke "py.test" "-m" "not assumption"))))))
4387 (home-page "https://github.com/joeyespo/grip")
4388 (synopsis "Preview Markdown files using the GitHub API")
4389 (description "Grip is a command-line server application written in Python
4390 that uses the GitHub Markdown API to render a local Markdown file. The styles
4391 and rendering come directly from GitHub, so you'll know exactly how it will
4392 appear. Changes you make to the file will be instantly reflected in the browser
4393 without requiring a page refresh.")
4394 (license license:expat))))
4396 (define-public python-port-for
4398 (name "python-port-for")
4403 (uri (pypi-uri "port-for" version))
4406 "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
4407 (build-system python-build-system)
4410 (modify-phases %standard-phases
4411 (add-after 'unpack 'use-urllib3
4413 (substitute* "port_for/_download_ranges.py"
4414 (("urllib2") "urllib3"))
4417 `(("python-urllib3" ,python-urllib3)))
4419 `(("python-mock" ,python-mock)))
4420 (home-page "https://github.com/kmike/port-for/")
4421 (synopsis "TCP localhost port finder and association manager")
4423 "This package provides a utility that helps with local TCP ports
4424 management. It can find an unused TCP localhost port and remember the
4426 (license license:expat)))
4428 (define-public python-livereload
4430 (name "python-livereload")
4435 (uri (pypi-uri "livereload" version))
4438 "0rhggz185bxc3zjnfpmhcvibyzi86i624za1lfh7x7ajsxw4y9c9"))))
4439 (build-system python-build-system)
4441 `(("python-six" ,python-six)
4442 ("python-tornado" ,python-tornado)))
4443 (home-page "https://github.com/lepture/python-livereload")
4444 (synopsis "Python LiveReload")
4446 "Python LiveReload provides a command line utility, @command{livereload},
4447 for starting a web server in a directory. It can trigger arbitrary commands
4448 and serve updated contents upon changes to the directory.")
4449 (license license:bsd-3)))
4451 (define-public python-vf-1
4453 (name "python-vf-1")
4458 (uri (pypi-uri "VF-1" version))
4461 "0xlqsaxsiayk1sd07kpz8abbcnab582y29a1y4882fq6j4gma5xi"))))
4462 (build-system python-build-system)
4463 (home-page "https://github.com/solderpunk/VF-1")
4464 (synopsis "Command line gopher client")
4465 (description "@code{VF-1} is a command line gopher client with
4466 @acronym{TLS, Transport Layer Security} support.")
4467 (license license:bsd-2)))
4469 (define-public python-httpcore
4471 (name "python-httpcore")
4475 ;; PyPI tarball does not contain tests.
4478 (url "https://github.com/encode/httpcore")
4480 (file-name (git-file-name name version))
4482 (base32 "01bhajcxqgkdzg7b7x0fqs2lwcfsajlgqwi1nlxx58jss7g2kxn9"))))
4483 (build-system python-build-system)
4486 (modify-phases %standard-phases
4487 (add-after 'unpack 'remove-unavailable-tests
4489 ;; These tests require 'mitmproxy' which is not packaged.
4490 (for-each (lambda (f)
4492 '("tests/conftest.py"
4493 "tests/sync_tests/test_interfaces.py"
4494 "tests/async_tests/test_interfaces.py"))
4496 (add-after 'remove-unavailable-tests 'force-h11-version
4497 ;; Allow build with h11 >= 0.10.
4499 (substitute* "setup.py" (("h11>=0.8,<0.10") "h11"))
4502 (lambda* (#:key inputs outputs #:allow-other-keys)
4503 (add-installed-pythonpath inputs outputs)
4504 (invoke "pytest" "-vv" "--cov=httpcore"
4505 "--cov=tests" "tests"))))))
4507 `(;; ("mitmproxy" ,mitmproxy) ;; TODO: Package this.
4508 ("python-autoflake" ,python-autoflake)
4509 ("python-flake8" ,python-flake8)
4510 ("python-flake8-bugbear" ,python-flake8-bugbear)
4511 ("python-flake8-pie" ,python-flake8-pie)
4512 ("python-isort" ,python-isort)
4513 ("python-mypy" ,python-mypy)
4514 ("python-pytest" ,python-pytest)
4515 ("python-pytest-asyncio" ,python-pytest-asyncio)
4516 ("python-pytest-cov" ,python-pytest-cov)
4517 ("python-pytest-trio" ,python-pytest-trio)
4518 ("python-uvicorn" ,python-uvicorn)
4519 ("python-trustme" ,python-trustme)))
4521 `(("python-h11" ,python-h11)
4522 ("python-h2" ,python-h2)
4523 ("python-sniffio" ,python-sniffio)
4524 ("python-trio" ,python-trio)
4525 ("python-trio-typing" ,python-trio-typing)))
4526 (home-page "https://github.com/encode/httpcore")
4527 (synopsis "Minimal, low-level HTTP client")
4529 "HTTP Core provides a minimal and low-level HTTP client, which does one
4530 thing only: send HTTP requests.
4532 Some things HTTP Core does do:
4535 @item Sending HTTP requests.
4536 @item Provides both sync and async interfaces.
4537 @item Supports HTTP/1.1 and HTTP/2.
4538 @item Async backend support for asyncio and trio.
4539 @item Automatic connection pooling.
4540 @item HTTP(S) proxy support.
4542 (license license:bsd-3)))
4544 (define-public python-httpx
4546 (name "python-httpx")
4550 ;; PyPI tarball does not contain tests.
4553 (url "https://github.com/encode/httpx")
4555 (file-name (git-file-name name version))
4557 (base32 "1qr91xw6jxynvihmw953bi5446ssm9ffmb2c4nhfa77v7883sp21"))))
4558 (build-system python-build-system)
4561 (modify-phases %standard-phases
4564 (invoke "pytest" "-vv" "-k"
4565 ;; These tests try to open an outgoing connection.
4567 "not test_connect_timeout"
4568 " and not test_that_send_cause_async_client_to_be_not_"
4570 " and not test_that_async_client_caused_warning_when_"
4572 " and not test_that_send_cause_client_to_be_not_closed"
4573 " and not test_async_proxy_close"
4574 " and not test_sync_proxy_close")))))))
4576 `(("python-autoflake" ,python-autoflake)
4577 ("python-black" ,python-black)
4578 ("python-cryptography" ,python-cryptography)
4579 ("python-flake8" ,python-flake8)
4580 ("python-flake8-bugbear" ,python-flake8-bugbear)
4581 ("python-flake8-pie" ,python-flake8-pie)
4582 ("python-isort" ,python-isort)
4583 ("python-mypy" ,python-mypy)
4584 ("python-pytest" ,python-pytest)
4585 ("python-pytest-asyncio" ,python-pytest-asyncio)
4586 ("python-pytest-trio" ,python-pytest-trio)
4587 ("python-pytest-cov" ,python-pytest-cov)
4588 ("python-trio" ,python-trio)
4589 ("python-trio-typing" ,python-trio-typing)
4590 ("python-trustme" ,python-trustme)
4591 ("python-uvicorn" ,python-uvicorn)))
4593 `(("python-brotli" ,python-brotli)
4594 ("python-certifi" ,python-certifi)
4595 ("python-chardet" ,python-chardet)
4596 ("python-httpcore" ,python-httpcore)
4597 ("python-idna" ,python-idna)
4598 ("python-rfc3986" ,python-rfc3986)
4599 ("python-sniffio" ,python-sniffio)))
4600 (home-page "https://www.python-httpx.org/")
4601 (synopsis "HTTP client for Python")
4603 "HTTPX is a fully featured HTTP client for Python 3, which provides sync
4604 and async APIs, and support for both HTTP/1.1 and HTTP/2.
4606 HTTPX builds on the well-established usability of requests, and gives you:
4609 @item A broadly requests-compatible API.
4610 @item Standard synchronous interface, but with async support if you need it.
4611 @item HTTP/1.1 and HTTP/2 support.
4612 @item Ability to make requests directly to WSGI applications or ASGI applications.
4613 @item Strict timeouts everywhere.
4614 @item Fully type annotated.
4615 @item 99% test coverage.
4618 Plus all the standard features of requests:
4621 @item International Domains and URLs
4622 @item Keep-Alive & Connection Pooling
4623 @item Sessions with Cookie Persistence
4624 @item Browser-style SSL Verification
4625 @item Basic/Digest Authentication
4626 @item Elegant Key/Value Cookies
4627 @item Automatic Decompression
4628 @item Automatic Content Decoding
4629 @item Unicode Response Bodies
4630 @item Multipart File Uploads
4631 @item HTTP(S) Proxy Support
4632 @item Connection Timeouts
4633 @item Streaming Downloads
4634 @item .netrc Support
4635 @item Chunked Requests
4637 (license license:bsd-3)))
4639 (define-public python-websockets
4641 (name "python-websockets")
4646 (uri (pypi-uri "websockets" version))
4649 "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw"))))
4650 (build-system python-build-system)
4651 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
4652 (home-page "https://github.com/aaugustin/websockets")
4654 "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
4656 "@code{websockets} is a library for building WebSocket servers and clients
4657 in Python with a focus on correctness and simplicity.
4659 Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
4660 it provides an elegant coroutine-based API.")
4661 (license license:bsd-3)))
4663 (define-public python-selenium
4665 (name "python-selenium")
4670 (uri (pypi-uri "selenium" version))
4673 "039hf9knvl4s3hp21bzwsp1g5ri9gxsh504dp48lc6nr1av35byy"))))
4674 (build-system python-build-system)
4676 `(("python-urllib3" ,python-urllib3)))
4678 "https://github.com/SeleniumHQ/selenium/")
4679 (synopsis "Python bindings for Selenium")
4680 (description "Selenium enables web browser automation.
4681 Selenium specifically provides infrastructure for the W3C WebDriver specification
4682 — a platform and language-neutral coding interface compatible with all
4683 major web browsers.")
4684 (license license:asl2.0)))
4686 (define-public python-rapidjson
4688 (name "python-rapidjson")
4693 (uri (pypi-uri "python-rapidjson" version))
4696 "18cl2dhx3gds5vg52jxmh9wjlbiy8dx06c3n482rfpdi9dzbv05d"))
4697 (modules '((guix build utils)))
4699 '(begin (delete-file-recursively "rapidjson") #t))))
4700 (build-system python-build-system)
4703 (list (string-append "--rj-include-dir="
4704 (assoc-ref %build-inputs "rapidjson")
4705 "/include/rapidjson"))
4707 (modify-phases %standard-phases
4709 (lambda* (#:key inputs #:allow-other-keys)
4710 (invoke "python" "setup.py" "build"
4711 (string-append "--rj-include-dir="
4712 (assoc-ref %build-inputs "rapidjson")
4713 "/include/rapidjson"))))
4715 (lambda* (#:key inputs outputs #:allow-other-keys)
4716 (add-installed-pythonpath inputs outputs)
4717 ;; Some tests are broken.
4718 (delete-file "tests/test_base_types.py")
4719 (delete-file "tests/test_validator.py")
4720 (invoke "python" "-m" "pytest" "tests"))))))
4722 `(("rapidjson" ,rapidjson)
4723 ("python-pytest" ,python-pytest)
4724 ("python-pytz" ,python-pytz)))
4725 (home-page "https://github.com/python-rapidjson/python-rapidjson")
4726 (synopsis "Python wrapper around rapidjson")
4727 (description "This package provides a python wrapper around rapidjson.")
4728 (license license:expat)))
4730 (define-public python-venusian
4732 (name "python-venusian")
4737 (uri (pypi-uri "venusian" version))
4739 (base32 "0f7f67dkgxxcjfhpdd5frb9pszkf04lyzzpn5069q0xi89r2p17n"))))
4740 (build-system python-build-system)
4742 `(("python-pytest" ,python-pytest)
4743 ("python-runner" ,python-pytest-runner)
4744 ("python-pytest-cov" ,python-pytest-cov)))
4745 (arguments '(#:test-target "pytest"))
4746 (home-page "https://docs.pylonsproject.org/projects/venusian")
4747 (synopsis "Library for deferring decorator actions")
4749 "Venusian is a library which allows framework authors to defer decorator
4750 actions. Instead of taking actions when a function (or class) decorator is
4751 executed at import time, you can defer the action usually taken by the
4752 decorator until a separate scan phase.")
4753 (license license:repoze)))
4755 (define-public python-zope-deprecation
4757 (name "python-zope-deprecation")
4761 (uri (pypi-uri "zope.deprecation" version))
4764 "1pz2cv7gv9y1r3m0bdv7ks1alagmrn5msm5spwdzkb2by0w36i8d"))))
4765 (build-system python-build-system)
4767 (propagated-inputs `())
4768 (home-page "https://zopedeprecation.readthedocs.io/")
4769 (synopsis "Function for marking deprecations")
4770 (description "The @code{zope.deprecation} module provides a function for
4771 marking modules, classes, functions, methods and properties as deprecated,
4772 displaying warnings when usaged in application code.")
4773 (license license:zpl2.1)))
4775 (define-public python-translationstring
4777 (name "python-translationstring")
4781 (uri (pypi-uri "translationstring" version))
4784 "0bdpcnd9pv0131dl08h4zbcwmgc45lyvq3pa224xwan5b3x4rr2f"))))
4785 (build-system python-build-system)
4786 (home-page "http://docs.pylonsproject.org/projects/translationstring")
4787 (synopsis "Internationalization tooling for the Pylons project")
4788 (description "This package provides a library used by various Pylons
4789 project packages for internationalization (i18n) duties related to
4791 (license license:repoze)))
4793 (define-public python-plaster
4795 (name "python-plaster")
4799 (uri (pypi-uri "plaster" version))
4802 "1hy8k0nv2mxq94y5aysk6hjk9ryb4bsd13g83m60hcyzxz3wflc3"))))
4803 (build-system python-build-system)
4805 `(("python-pytest" ,python-pytest)))
4806 (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
4807 (synopsis "Configuration loader for multiple config file formats")
4809 "Plaster is a loader interface around multiple config file formats. It
4810 exists to define a common API for applications to use when they wish to load
4811 configuration. The library itself does not aim to handle anything except a
4812 basic API that applications may use to find and load configuration settings.
4813 Any specific constraints should be implemented in a pluggable loader which can
4814 be registered via an entrypoint.")
4815 (license license:repoze)))
4817 (define-public python-plaster-pastedeploy
4819 (name "python-plaster-pastedeploy")
4823 (uri (pypi-uri "plaster_pastedeploy" version))
4826 "1zg7gcsvc1kzay1ry5p699rg2qavfsxqwl17mqxzr0gzw6j9679r"))))
4827 (build-system python-build-system)
4829 `(("python-pytest" ,python-pytest)))
4831 `(("python-plaster" ,python-plaster)
4832 ("python-pastedeploy" ,python-pastedeploy)))
4833 (home-page "https://github.com/Pylons/plaster_pastedeploy")
4834 (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
4836 "This plugin for @code{python-plaster} adds support for PasteDeploy
4837 syntax, it provides a plaster @code{Loader} object that can parse ini files
4838 according to the standard set by PasteDeploy ")
4839 (license license:expat)))
4841 (define-public python-hupper
4843 (name "python-hupper")
4847 (uri (pypi-uri "hupper" version))
4850 "0am0p6g5cz6xmcaf04xq8q6dzdd9qz0phj6gcmpsckf2mcyza61q"))))
4851 (build-system python-build-system)
4852 (arguments '(#:test-target "pytest"))
4854 `(("python-pytest" ,python-pytest)
4855 ("python-pytest-runner" ,python-pytest-runner)
4856 ("python-watchdog" ,python-watchdog)
4857 ("python-mock" ,python-mock)
4858 ("python-pytest-cov" ,python-pytest-cov)))
4860 `(("python-pytz" ,python-pytz)))
4861 (home-page "https://readthedocs.org/projects/hupper")
4862 (synopsis "Integrated process monitor tracking changes to imported Python files")
4864 "Hupper is an integrated process monitor that will track changes to any
4865 imported Python files in sys.modules as well as custom paths. When files are
4866 changed the process is restarted.")
4867 (license license:expat)))
4869 (define-public python-pyramid
4871 (name "python-pyramid")
4875 (uri (pypi-uri "pyramid" version))
4878 "0rkxs1ajycg2zh1c94xlmls56mx5m161sn8112skj0amza6cn36q"))))
4879 (build-system python-build-system)
4881 `(("python-hupper" ,python-hupper)
4882 ("python-plaster-pastedeploy" ,python-plaster-pastedeploy)
4883 ("python-translationstring" ,python-translationstring)
4884 ("python-venusian" ,python-venusian)
4885 ("python-webob" ,python-webob)
4886 ("python-zope-deprecation" ,python-zope-deprecation)
4887 ("python-zope-interface" ,python-zope-interface)
4888 ("python-webtest" ,python-webtest)
4889 ("python-zope-component" ,python-zope-component)
4890 ("python-plaster" ,python-plaster)))
4891 (home-page "https://trypyramid.com/")
4892 (synopsis "Python web-framework suitable for small and large sites")
4894 "Pyramid makes it easy to write web applications. From minimal
4895 request/response web apps to larger, grown applications.")
4896 (license license:repoze)))
4898 (define-public python-random-user-agent
4900 (name "python-random-user-agent")
4905 (uri (pypi-uri "random_user_agent" version))
4908 "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
4909 (build-system python-build-system)
4910 (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
4911 (synopsis "List of user agents")
4913 "This package provides a list of user agents, from a collection of more
4914 than 326,000 known user-agents. Users can pick a random one, or select one
4916 (license license:expat)))
4918 (define-public python-flask-restx
4920 (name "python-flask-restx")
4923 ;; We fetch from the Git repo because there are no tests in the PyPI
4928 (url "https://github.com/python-restx/flask-restx")
4930 (file-name (git-file-name name version))
4932 (base32 "0xf2vkmdngp9cv9klznizai4byxjcf0iqh1pr4b83nann0jxqwy7"))))
4933 (build-system python-build-system)
4935 `(("python-aniso8601" ,python-aniso8601)
4936 ("python-flask" ,python-flask)
4937 ("python-jsonschema" ,python-jsonschema)
4938 ("python-pytz" ,python-pytz)))
4940 `(("python-blinker" ,python-blinker)
4941 ("python-faker" ,python-faker)
4942 ("python-pytest" ,python-pytest)
4943 ("python-pytest-benchmark"
4944 ,python-pytest-benchmark)
4945 ("python-pytest-flask" ,python-pytest-flask)
4946 ("python-pytest-mock" ,python-pytest-mock)))
4949 (modify-phases %standard-phases
4952 (invoke "pytest" "--benchmark-skip" "-k"
4953 ;; Those tests need internet access
4954 "not test_check and not test_valid_value_check"))))))
4955 (home-page "https://github.com/python-restx/flask-restx")
4957 "Framework for fast, easy and documented API development with Flask")
4959 "Flask-RESTX is an extension for Flask that adds support for quickly building
4960 REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
4961 with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
4962 decorators and tools to describe your API and expose its documentation properly using
4964 (license license:bsd-3)))
4966 (define-public python-manuel
4968 (name "python-manuel")
4973 (uri (pypi-uri "manuel" version))
4976 "1bdzay7j70fly5fy6wbdi8fbrxjrrlxnxnw226rwry1c8a351rpy"))))
4977 (build-system python-build-system)
4979 `(("python-six" ,python-six)))
4981 `(("python-zope-testing" ,python-zope-testing)))
4982 (home-page "https://pypi.org/project/manuel/")
4983 (synopsis "Build tested documentation")
4985 "Manuel lets you mix and match traditional doctests with custom test syntax.")
4986 (license license:asl2.0)))
4988 (define-public python-persistent
4990 (name "python-persistent")
4995 (uri (pypi-uri "persistent" version))
4998 "0imm9ji03lhkpcfmhid7x5209ix8g2rlgki9ik1qxks4b8sm8gzq"))))
4999 (build-system python-build-system)
5001 `(("python-cffi" ,python-cffi)
5002 ("python-zope-interface" ,python-zope-interface)))
5004 `(("python-manuel" ,python-manuel)
5005 ("python-zope-testrunner" ,python-zope-testrunner)))
5006 (home-page "https://github.com/zopefoundation/persistent/")
5007 (synopsis "Translucent persistent objects")
5008 (description "This package contains a generic persistence implementation for
5009 Python. It forms the core protocol for making objects interact
5010 \"transparently\" with a database such as the ZODB.")
5011 (license license:zpl2.1)))
5013 (define-public python-btrees
5015 (name "python-btrees")
5020 (uri (pypi-uri "BTrees" version))
5023 "0iiq0g9k1g6qgqq84q9h6639vlvzznk1rgdm0rfcnnqkbkmsbr3w"))))
5024 (build-system python-build-system)
5026 `(("python-persistent" ,python-persistent)
5027 ("python-zope-interface" ,python-zope-interface)))
5029 `(("python-persistent" ,python-persistent)
5030 ("python-transaction" ,python-transaction)
5031 ("python-zope-testrunner" ,python-zope-testrunner)))
5032 (home-page "https://github.com/zopefoundation/BTrees")
5033 (synopsis "Scalable persistent object containers")
5035 "This package contains a set of persistent object containers built around a
5036 modified BTree data structure. The trees are optimized for use inside ZODB's
5037 \"optimistic concurrency\" paradigm, and include explicit resolution of
5038 conflicts detected by that mechanism.")
5039 (license license:zpl2.1)))
5041 (define-public python-transaction
5043 (name "python-transaction")
5048 (uri (pypi-uri "transaction" version))
5051 "0bdaks31bgfh78wnj3sij24bfysmqk25crsis6amz8kzrc0d82iv"))))
5052 (build-system python-build-system)
5054 `(("python-zope-interface" ,python-zope-interface)))
5056 `(("python-coverage" ,python-coverage)
5057 ("python-mock" ,python-mock)
5058 ("python-nose" ,python-nose)))
5059 (home-page "https://github.com/zopefoundation/transaction")
5060 (synopsis "Transaction management for Python")
5061 (description "This package contains a generic transaction implementation
5062 for Python. It is mainly used by the ZODB.")
5063 (license license:zpl2.1)))
5065 (define-public python-robot-detection
5067 (name "python-robot-detection")
5072 (uri (pypi-uri "robot-detection" version))
5075 "1xd2jm3yn31bnk1kqzggils2rxj26ylxsfz3ap7bhr3ilhnbg3rx"))))
5076 (build-system python-build-system)
5077 (arguments '(#:tests? #f)) ; Tests not shipped in pypi release.
5078 (propagated-inputs `(("python-six" ,python-six)))
5079 (home-page "https://github.com/rory/robot-detection")
5080 (synopsis "Detect web crawlers")
5082 "@code{robot_detection} is a python module to detect if a given HTTP User
5083 Agent is a web crawler. It uses the list of registered robots from
5084 @url{http://www.robotstxt.org}.")
5085 (license license:gpl3+)))
5087 (define-public python-pysolr
5089 (name "python-pysolr")
5094 (uri (pypi-uri "pysolr" version))
5097 "1rj5jmscvxjwcmlfi6hmkj44l4x6n3ln5p7d8d18j566hzmmzw3f"))))
5098 (build-system python-build-system)
5100 '(#:tests? #f)) ; Tests require network access.
5102 `(("python-requests" ,python-requests)))
5104 `(("python-setuptools-scm" ,python-setuptools-scm)))
5105 (home-page "https://github.com/django-haystack/pysolr/")
5106 (synopsis "Lightweight python wrapper for Apache Solr")
5108 "This module provides an interface that queries the Apache Solr server
5109 using a pure Python implementation.")
5110 (license license:bsd-3)))
5112 (define-public python-http-ece
5114 (name "python-http-ece")
5120 (url "https://github.com/web-push-libs/encrypted-content-encoding")
5121 (commit (string-append "v" version))))
5122 (file-name (git-file-name name version))
5125 "0bp4cc0xc123i72h80ax3qz3ixfwx3j7pw343kc7i6kdvfi8klx7"))))
5126 (build-system python-build-system)
5129 (modify-phases %standard-phases
5130 (add-after 'unpack 'change-directory
5131 (lambda _ (chdir "python") #t)))))
5133 `(("python-cryptography" ,python-cryptography)))
5135 `(("python-coverage" ,python-coverage)
5136 ("python-flake8" ,python-flake8)
5137 ("python-mock" ,python-mock)
5138 ("python-nose" ,python-nose)))
5139 (home-page "https://github.com/web-push-libs/encrypted-content-encoding")
5140 (synopsis "Encrypted Content Encoding for HTTP")
5142 "This package provices a simple implementation of Encrypted Content
5143 Encoding for HTTP.")
5144 (license license:expat)))
5146 (define-public python-cloudscraper
5148 (name "python-cloudscraper")
5153 (uri (pypi-uri "cloudscraper" version))
5155 (base32 "0qjxzb0z5bprvmdhx42ayqhlhi2h49d9dwc0vvycj817s71f2sxv"))
5156 (modules '((guix build utils)))
5158 '(with-directory-excursion "cloudscraper"
5159 (for-each delete-file
5160 '("captcha/2captcha.py"
5162 "captcha/anticaptcha.py"
5163 "captcha/deathbycaptcha.py"
5164 "interpreters/js2py.py"
5165 "interpreters/v8.py"))
5166 (substitute* "__init__.py"
5167 ;; Perhaps it's a joke, but don't promote proprietary software.
5168 (("([Th]is feature is not available) in the .*'" _ prefix)
5169 (string-append prefix ".'")))
5171 (build-system python-build-system)
5173 `(("python-requests" ,python-requests)
5174 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
5175 ("python-pyparsing" ,python-pyparsing-2.4.7)))
5177 `(("python-pytest" ,python-pytest)))
5178 (home-page "https://github.com/venomous/cloudscraper")
5179 (synopsis "Cloudflare anti-bot bypass")
5181 "This module acts as a webbrowser solving Cloudflare's Javascript
5183 (license license:expat)))
5185 (define-public python-imap-tools
5187 (name "python-imap-tools")
5192 (uri (pypi-uri "imap_tools" version))
5195 "0x122jwpc74wwyw2rsv2fvh6p12y31019ndfr9717jzjkj2d3lhb"))))
5196 (build-system python-build-system)
5197 (arguments '(#:tests? #f)) ; tests require internet access
5198 (home-page "https://github.com/ikvk/imap_tools")
5199 (synopsis "Work with email and mailbox by IMAP")
5201 "This Python library provides tools to deal with email and mailboxes
5205 @item Parsed email message attributes
5206 @item Query builder for searching emails
5207 @item Work with emails in folders (copy, delete, flag, move, seen)
5208 @item Work with mailbox folders (list, set, get, create, exists, rename, delete, status)
5210 (license license:asl2.0)))