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 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 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 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>
42 ;;; This file is part of GNU Guix.
44 ;;; GNU Guix is free software; you can redistribute it and/or modify it
45 ;;; under the terms of the GNU General Public License as published by
46 ;;; the Free Software Foundation; either version 3 of the License, or (at
47 ;;; your option) any later version.
49 ;;; GNU Guix is distributed in the hope that it will be useful, but
50 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
51 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52 ;;; GNU General Public License for more details.
54 ;;; You should have received a copy of the GNU General Public License
55 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
57 (define-module (gnu packages python-web)
58 #:use-module (guix packages)
59 #:use-module (guix download)
60 #:use-module (guix git-download)
61 #:use-module (guix build-system python)
62 #:use-module (guix utils)
63 #:use-module (gnu packages)
64 #:use-module (gnu packages base)
65 #:use-module (gnu packages check)
66 #:use-module (gnu packages compression)
67 #:use-module (gnu packages curl)
68 #:use-module (gnu packages databases)
69 #:use-module (gnu packages django)
70 #:use-module (gnu packages groff)
71 #:use-module (gnu packages libffi)
72 #:use-module (gnu packages pkg-config)
73 #:use-module (gnu packages python)
74 #:use-module (gnu packages python-check)
75 #:use-module (gnu packages python-crypto)
76 #:use-module (gnu packages python-xyz)
77 #:use-module (gnu packages serialization)
78 #:use-module (gnu packages sphinx)
79 #:use-module (gnu packages texinfo)
80 #:use-module (gnu packages tls)
81 #:use-module (gnu packages time)
82 #:use-module (gnu packages web)
83 #:use-module (gnu packages xml)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (srfi srfi-1))
87 (define-public python-aiohttp
89 (name "python-aiohttp")
94 (uri (pypi-uri "aiohttp" version))
97 "09pkw6f1790prnrq0k8cqgnf1qy57ll8lpmc6kld09q7zw4vi6i5"))
98 (patches (search-patches "python-aiohttp-3.6.2-no-warning-fail.patch"))))
99 (build-system python-build-system)
102 (modify-phases %standard-phases
103 (add-after 'unpack 'fix-tests
105 ;; disable brotli tests, because we’re not providing that optional library
106 (substitute* "tests/test_http_parser.py"
107 ((" async def test_feed_eof_no_err_brotli")
108 " @pytest.mark.xfail\n async def test_feed_eof_no_err_brotli"))
109 ;; make sure the timestamp of this file is > 1990, because a few
110 ;; tests like test_static_file_if_modified_since_past_date depend on it
111 (invoke "touch" "-d" "2020-01-01" "tests/data.unknown_mime_type")
113 ;; FIXME: These tests are failing due to deprecation warnings
114 ;; in Python 3.8. Remove this when updating to aiohttp >= 3.7.
115 ;; https://github.com/aio-libs/aiohttp/issues/4477
116 ;; https://github.com/aio-libs/aiohttp/issues/4525
117 (with-directory-excursion "tests"
118 (for-each delete-file '("test_client_session.py"
120 "test_web_middleware.py"
121 "test_web_protocol.py"
122 "test_web_urldispatcher.py")))
125 `(("python-aiodns" ,python-aiodns)
126 ("python-async-timeout" ,python-async-timeout)
127 ("python-attrs" ,python-attrs)
128 ("python-chardet" ,python-chardet)
129 ("python-idna-ssl" ,python-idna-ssl)
130 ("python-multidict" ,python-multidict)
131 ("python-yarl" ,python-yarl)))
133 `(("python-pytest-runner" ,python-pytest-runner)
134 ("python-pytest-xdit" ,python-pytest-xdist)
135 ("python-pytest-timeout" ,python-pytest-timeout)
136 ("python-pytest-forked" ,python-pytest-forked)
137 ("python-pytest-mock" ,python-pytest-mock)
138 ("gunicorn" ,gunicorn-bootstrap)
139 ("python-freezegun" ,python-freezegun)
140 ("python-async-generator" ,python-async-generator)))
141 (home-page "https://github.com/aio-libs/aiohttp/")
142 (synopsis "Async HTTP client/server framework (asyncio)")
143 (description "@code{aiohttp} is an asynchronous HTTP client/server
146 Its main features are:
148 @item Supports both client and server side of HTTP protocol.
149 @item Supports both client and server Web-Sockets out-of-the-box without the
151 @item Web-server has middlewares and pluggable routing.
153 (license license:asl2.0)))
155 (define-public python-aiohttp-socks
157 (name "python-aiohttp-socks")
162 (uri (pypi-uri "aiohttp_socks" version))
165 "0473702jk66xrgpm28wbdgpnak4v0dh2qmdjw7ky7hf3lwwqkggf"))))
166 (build-system python-build-system)
168 `(("python-aiohttp" ,python-aiohttp)))
169 (home-page "https://github.com/romis2012/aiohttp-socks")
170 (synopsis "SOCKS proxy connector for aiohttp")
171 (description "This package provides a SOCKS proxy connector for
172 aiohttp. It supports SOCKS4(a) and SOCKS5.")
173 (license license:asl2.0)))
175 (define-public python-aiodns
177 (name "python-aiodns")
182 (uri (pypi-uri "aiodns" version))
185 "1snr5paql8dgvc676n8xq460wypjsb1xj53cf3px1s4wczf7lryq"))))
186 (build-system python-build-system)
188 `(("python-pycares" ,python-pycares)))
190 `(#:tests? #f)) ;tests require internet access
191 (home-page "https://github.com/saghul/aiodns")
192 (synopsis "Simple DNS resolver for asyncio")
193 (description "@code{aiodns} provides a simple way for doing
194 asynchronous DNS resolutions with a synchronous looking interface by
195 using @url{https://github.com/saghul/pycares,pycares}.")
196 (license license:expat)))
198 (define-public python-aiorpcx
200 (name "python-aiorpcx")
205 (uri (pypi-uri "aiorpcX" version))
208 "0k545hc7wl6sh1svydzbv6x7sx5pig2pqkl3yxs9riwmvzawx9xp"))))
209 (build-system python-build-system)
211 `(("python-attrs" ,python-attrs)))
212 (home-page "https://github.com/kyuupichan/aiorpcX")
213 (synopsis "Generic asyncio RPC implementation")
215 "The aiorpcX library is a generic asyncio implementation of RPC suitable
216 for an application that is a client, server or both.
218 The package includes a module with full coverage of JSON RPC versions 1.0 and
219 2.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
220 comes with a SOCKS proxy client.")
221 (license (list license:expat license:bsd-2))))
223 (define-public python-falcon
225 (name "python-falcon")
230 (uri (pypi-uri "falcon" version))
233 "1z6mqfv574x6jiawf67ib52g4kk20c2x7xk7wrn1573b8v7r79gf"))
234 (modules '((guix build utils)))
237 (delete-file-recursively "falcon/vendor")
238 (substitute* "setup.py"
239 ((".*falcon\\.vendor\\.mimeparse.*") ""))
240 (substitute* '("falcon/media/handlers.py"
242 (("from falcon\\.vendor ") ""))
243 (substitute* "falcon.egg-info/SOURCES.txt"
244 (("falcon/vendor.*") ""))
246 (build-system python-build-system)
249 (modify-phases %standard-phases
251 (lambda* (#:key inputs outputs #:allow-other-keys)
252 ;; Skip orjson, which requires rust to build.
253 (substitute* "tests/test_media_handlers.py"
254 (("== 'CPython") "!= 'CPython"))
255 (add-installed-pythonpath inputs outputs)
256 (invoke "pytest" "--ignore" "falcon"))))))
258 `(("python-mimeparse" ,python-mimeparse)))
260 `(("python-cython" ,python-cython) ;for faster binaries
261 ("python-mujson" ,python-mujson)
262 ("python-msgpack" ,python-msgpack)
263 ("python-pytest" ,python-pytest)
264 ("python-pytest-runner" ,python-pytest-runner)
265 ("python-pyyaml" ,python-pyyaml)
266 ("python-rapidjson" ,python-rapidjson)
267 ("python-requests" ,python-requests)
268 ("python-testtools" ,python-testtools)
269 ("python-ujson" ,python-ujson)))
270 (home-page "https://falconframework.org")
272 "Web framework for building APIs and application backends")
274 "Falcon is a web API framework for building microservices, application
275 backends and higher-level frameworks. Among its features are:
277 @item Optimized and extensible code base
278 @item Routing via URI templates and REST-inspired resource
280 @item Access to headers and bodies through request and response
282 @item Request processing via middleware components and hooks
283 @item Idiomatic HTTP error responses
284 @item Straightforward exception handling
285 @item Unit testing support through WSGI helpers and mocks
286 @item Compatible with both CPython and PyPy
287 @item Cython support for better performance when used with CPython
289 (properties `((python2-variant . ,(delay python2-falcon))))
290 (license license:asl2.0)))
292 (define-public python2-falcon
293 (let ((falcon (package-with-python2 (strip-python2-variant python-falcon))))
297 (alist-delete "python-rapidjson" (package-native-inputs falcon))))))
299 (define-public python-falcon-cors
301 (name "python-falcon-cors")
306 (uri (pypi-uri "falcon-cors" version))
309 "12pym7hwsbd8b0c1azn95nas8gm3f1qpr6lpyx0958xm65ffr20p"))))
310 (build-system python-build-system)
312 `(("python-falcon" ,python-falcon)))
314 "https://github.com/lwcolton/falcon-cors")
315 (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
316 (description "This middleware provides @dfn{cross-origin resource
317 sharing} (CORS) support for Falcon. It allows applying a specially crafted
318 CORS object to the incoming requests, enabling the ability to serve resources
319 over a different origin than that of the web application.")
320 (license license:asl2.0)))
322 (define-public python2-falcon-cors
323 (package-with-python2 python-falcon-cors))
325 (define-public python-furl
332 (uri (pypi-uri "furl" version))
335 "1v2lakx03d5w8954a39ki44xv5mllnq0a0avhxykv9hrzg0yvjpx"))))
336 (build-system python-build-system)
338 `(("python-six" ,python-six)
339 ("python-orderedmultidict" ,python-orderedmultidict)))
341 `(("python-flake8" ,python-flake8)))
342 (home-page "https://github.com/gruns/furl")
343 (synopsis "URL manipulation in Python")
344 (description "Furl provides an easy-to-use alternative to the
345 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
346 (license license:unlicense)))
348 (define-public python2-furl
349 (package-with-python2 python-furl))
351 (define-public python-httplib2
353 (name "python-httplib2")
358 (uri (pypi-uri "httplib2" version))
361 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
362 (build-system python-build-system)
363 (home-page "https://github.com/jcgregorio/httplib2")
364 (synopsis "Comprehensive HTTP client library")
366 "A comprehensive HTTP client library supporting many features left out of
367 other HTTP libraries.")
368 (license license:expat)))
370 (define-public python2-httplib2
371 (package-with-python2 python-httplib2))
373 (define-public httpie
380 (uri (pypi-uri "httpie" version))
383 "18058k0i3cc4ixvgzj882w693lf40283flvspbrvd876iq42ib1i"))))
384 (build-system python-build-system)
386 ;; The tests attempt to access external web servers, so we cannot run them.
389 `(("python-colorama" ,python-colorama)
390 ("python-pygments" ,python-pygments)
391 ("python-requests" ,python-requests)))
392 (home-page "https://httpie.org/")
393 (synopsis "cURL-like tool for humans")
395 "A command line HTTP client with an intuitive UI, JSON support,
396 syntax highlighting, wget-like downloads, plugins, and more. It consists of
397 a single http command designed for painless debugging and interaction with
398 HTTP servers, RESTful APIs, and web services.")
399 (license license:bsd-3)))
401 (define-public python-html2text
403 (name "python-html2text")
404 (version "2019.8.11")
408 (uri (pypi-uri "html2text" version))
411 "0ppgjplg06kmv9sj0x8p7acczcq2mcfgk1jdjwm4w5w40b0vj5pm"))))
412 (build-system python-build-system)
415 (modify-phases %standard-phases
418 (invoke "pytest" "test/"))))))
420 `(("python-pytest" ,python-pytest)))
421 (home-page "https://github.com/Alir3z4/html2text")
422 (synopsis "Convert HTML into plain text")
423 (description "html2text takes HTML and converts it into plain ASCII text
424 which is also valid markdown. html2text was originally written by Aaron
426 (license license:gpl3+)))
428 (define-public python2-html2text
429 (package-with-python2 python-html2text))
431 (define-public python-mechanicalsoup
433 (name "python-mechanicalsoup")
438 (uri (pypi-uri "MechanicalSoup" version))
440 (base32 "0k59wwk75q7nz6i6gynvzhagy02ql0bv7py3qqcwgjw7607yq4i7"))))
441 (build-system python-build-system)
443 ;; TODO: Enable tests when python-flake8@3.5 hits master.
446 `(("python-beautifulsoup4" ,python-beautifulsoup4)
447 ("python-lxml" ,python-lxml)
448 ("python-requests" ,python-requests)
449 ("python-six" ,python-six)))
452 ;; `(("python-pytest-flake8" ,python-pytest-flake8)
453 ;; ("python-pytest-httpbin" ,python-pytest-httpbin)
454 ;; ("python-pytest-mock" ,python-pytest-mock)
455 ;; ("python-pytest-runner" ,python-pytest-runner)
456 ;; ("python-requests-mock" ,python-requests-mock)))
457 (home-page "https://mechanicalsoup.readthedocs.io/")
458 (synopsis "Python library for automating website interaction")
460 "MechanicalSoup is a Python library for automating interaction with
461 websites. It automatically stores and sends cookies, follows redirects, and can
462 follow links and submit forms. It doesn’t do JavaScript.")
463 (license license:expat)))
465 (define-public python2-mechanicalsoup
466 (package-with-python2 python-mechanicalsoup))
468 (define-public python-hyperframe
470 (name "python-hyperframe")
475 (uri (pypi-uri "hyperframe" version))
477 (base32 "07xlf44l1cw0ghxx46sbmkgzil8vqv8kxwy42ywikiy35izw3xd9"))))
478 (build-system python-build-system)
481 (modify-phases %standard-phases
483 (lambda* (#:key inputs outputs #:allow-other-keys)
484 (add-installed-pythonpath inputs outputs)
485 (invoke "pytest" "-vv" "test"))))))
487 `(("python-pytest" ,python-pytest)))
488 (home-page "https://github.com/python-hyper/hyperframe")
489 (synopsis "HTTP/2 framing layer for Python")
491 "This library contains the HTTP/2 framing code used in the hyper project.
492 It provides a pure-Python codebase that is capable of decoding a binary stream
493 into HTTP/2 frames.")
494 (license license:expat)))
496 (define-public python-hpack
498 (name "python-hpack")
502 ;; PyPI tarball is missing some files necessary for the tests.
505 (url "https://github.com/python-hyper/hpack")
506 (commit (string-append "v" version))))
507 (file-name (git-file-name name version))
509 (base32 "0w8hkz50a6lzkmgi41ryicm0mh9ca9cx29pm3s0xlpn0vs29xrmd"))))
510 (build-system python-build-system)
513 (modify-phases %standard-phases
515 (lambda* (#:key inputs outputs #:allow-other-keys)
516 (add-installed-pythonpath inputs outputs)
517 (invoke "pytest" "-vv" "test" "-k"
518 ;; This test will be fixed in the next version. See:
519 ;; https://github.com/python-hyper/hpack/issues/168.
520 "not test_get_by_index_out_of_range"))))))
522 `(("python-pytest" ,python-pytest)))
523 (home-page "https://hyper.rtfd.org")
524 (synopsis "Pure-Python HPACK header compression")
526 "This module contains a pure-Python HTTP/2 header encoding (HPACK) logic
527 for use in Python programs that implement HTTP/2.")
528 (license license:expat)))
530 (define-public python-h2
537 (uri (pypi-uri "h2" version))
539 (base32 "051gg30aca26rdxsmr9svwqm06pdz9bv21ch4n0lgi7jsvml2pw7"))))
540 (build-system python-build-system)
543 (modify-phases %standard-phases
545 (lambda* (#:key inputs outputs #:allow-other-keys)
546 (add-installed-pythonpath inputs outputs)
547 (invoke "pytest" "-vv" "test"))))))
549 `(("python-pytest" ,python-pytest)))
551 `(("python-hpack" ,python-hpack)
552 ("python-hyperframe" ,python-hyperframe)))
553 (home-page "https://github.com/python-hyper/hyper-h2")
554 (synopsis "HTTP/2 State-Machine based protocol implementation")
556 "This module contains a pure-Python implementation of a HTTP/2 protocol
557 stack. It does not provide a parsing layer, a network layer, or any rules
558 about concurrency. Instead, it's a purely in-memory solution, defined in
559 terms of data actions and HTTP/2 frames. This is one building block of a full
560 Python HTTP implementation.")
561 (license license:expat)))
563 (define-public python-sockjs-tornado
565 (name "python-sockjs-tornado")
570 (uri (pypi-uri "sockjs-tornado" version))
573 "15dgv6hw6c7h3m310alw1h6p5443lrm9pyqhcv2smc13fz1v04pc"))))
574 (build-system python-build-system)
576 `(;; There are no tests, and running the test phase requires missing
580 `(("python-tornado" ,python-tornado)))
581 (home-page "https://github.com/mrjoes/sockjs-tornado/")
583 "SockJS Python server implementation on top of the Tornado framework")
585 "SockJS-tornado provides the server-side counterpart to a SockJS client
586 library, through the Tornado framework.
588 SockJS provides a low-latency, full-duplex, cross-domain communication channel
589 between a web browser and web server.")
590 (license license:expat)))
592 (define-public python2-sockjs-tornado
593 (package-with-python2 python-sockjs-tornado))
595 (define-public python-flask-babel
597 (name "python-flask-babel")
602 (uri (pypi-uri "Flask-Babel" version))
605 "0gmb165vkwv5v7dxsxa2i3zhafns0fh938m2zdcrv4d8z5l099yn"))))
606 (build-system python-build-system)
608 '(#:phases (modify-phases %standard-phases
611 (with-directory-excursion "tests"
612 (invoke "python" "tests.py")))))))
614 `(("python-flask" ,python-flask)
615 ("python-babel" ,python-babel)
616 ("python-jinja2" ,python-jinja2)
617 ("python-pytz" ,python-pytz)))
618 (home-page "https://github.com/python-babel/flask-babel")
619 (synopsis "Add i18n/l10n support to Flask applications")
620 (description "This package implements internationalization and localization
621 support for Flask. This is based on the Python babel module as well as pytz -
622 both of which are installed automatically if you install this library.")
623 (license license:bsd-3)))
625 (define-public python2-flask-babel
626 (package-with-python2 python-flask-babel))
628 (define-public python-html5lib
630 (name "python-html5lib")
635 (uri (pypi-uri "html5lib" version))
638 "0dipzfrycv6j1jw82v9b7d8lzggx3x8xngx6l4xrqkxwvg7hvjv6"))))
639 (build-system python-build-system)
641 `(("python-six" ,python-six)
642 ("python-webencodings" ,python-webencodings)))
644 `(#:test-target "check"))
646 "https://github.com/html5lib/html5lib-python")
648 "Python HTML parser based on the WHATWG HTML specifcation")
650 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
651 and written in Python.")
652 (license license:expat)))
654 (define-public python2-html5lib
655 (package-with-python2 python-html5lib))
657 ;; Needed for python-bleach, a dependency of python-notebook
658 (define-public python-html5lib-0.9
660 (inherit python-html5lib)
665 (uri (pypi-uri "html5lib" version))
668 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
670 (define-public python2-html5lib-0.9
671 (package-with-python2 python-html5lib-0.9))
673 (define-public python-html5-parser
675 (name "python-html5-parser")
679 (uri (pypi-uri "html5-parser" version))
682 "13yl3vnf3sxl05m0nhpngnrz3g1jvyahd33lys3m3hfb91l8zzi5"))))
683 (build-system python-build-system)
685 `(("pkg-config" ,pkg-config)))
687 `(("libxml2" ,libxml2)))
689 `(("python-lxml" ,python-lxml)
690 ("python-beautifulsoup4" ,python-beautifulsoup4)))
691 (home-page "https://html5-parser.readthedocs.io")
692 (synopsis "Fast C-based HTML5 parsing for Python")
693 (description "This package provides a fast implementation of the HTML5
694 parsing spec for Python. Parsing is done in C using a variant of the gumbo
695 parser. The gumbo parse tree is then transformed into an lxml tree, also in
696 C, yielding parse times that can be a thirtieth of the html5lib parse times.")
697 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
698 ;; indicate ASL2.0, including the LICENSE file for the whole project.
699 (license (list license:asl2.0 license:gpl3))))
701 (define-public python2-html5-parser
702 (package-with-python2 python-html5-parser))
704 (define-public python-pycurl
706 (name "python-pycurl")
711 (uri (string-append "https://dl.bintray.com/pycurl/pycurl/pycurl-"
714 (base32 "1cwlb76vddqp2mxqvjbhf367caddzy82rhangddjjhjqaj8x4zgc"))))
715 (build-system python-build-system)
717 ;; The tests attempt to access external web servers, so we cannot run
718 ;; them. Furthermore, they are skipped altogether when using Python 2.
720 #:phases (modify-phases %standard-phases
721 (add-before 'build 'configure-tls-backend
723 ;; XXX: PycURL fails to automatically determine which TLS
724 ;; backend to use when cURL is built with --disable-static.
725 ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
726 (setenv "PYCURL_SSL_LIBRARY" "gnutls")
729 `(("python-nose" ,python-nose)
730 ("python-bottle" ,python-bottle)))
734 (home-page "http://pycurl.io/")
735 (synopsis "Lightweight Python wrapper around libcurl")
736 (description "Pycurl is a lightweight wrapper around libcurl. It provides
737 high-speed transfers via libcurl and frequently outperforms alternatives.")
739 ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
740 ;; under the terms of LGPLv2.1+ or Expat.
741 (license (list license:lgpl2.1+ license:expat))))
743 (define-public python2-pycurl
744 (package-with-python2 python-pycurl))
746 (define-public python-webencodings
748 (name "python-webencodings")
752 (uri (pypi-uri "webencodings" version))
755 "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
756 (build-system python-build-system)
759 (modify-phases %standard-phases
762 (invoke "py.test" "-v" "webencodings/tests.py")
765 `(("python-pytest" ,python-pytest)))
766 (home-page "https://github.com/SimonSapin/python-webencodings")
767 (synopsis "Character encoding aliases for legacy web content")
769 "In order to be compatible with legacy web content when interpreting
770 something like @code{Content-Type: text/html; charset=latin1}, tools need
771 to use a particular set of aliases for encoding labels as well as some
772 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
773 the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
774 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
775 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
776 defines all such details so that implementations do not have to
777 reverse-engineer each other.
779 This module implements the Encoding standard and has encoding labels and
780 BOM detection, but the actual implementation for encoders and decoders
782 (license license:bsd-3)))
784 (define-public python2-webencodings
785 (package-with-python2 python-webencodings))
787 (define-public python-openid
789 (name "python-openid")
794 (uri (pypi-uri "python3-openid" version))
797 "00l5hrjh19740w00b3fnsqldnla41wbr2rics09dl4kyd1fkd3b2"))))
798 (build-system python-build-system)
801 (modify-phases %standard-phases
804 (invoke "coverage" "run" "-m"
805 "unittest" "openid.test.test_suite"))))))
806 (properties `((python2-variant . ,(delay python2-openid))))
808 `(("python-defusedxml" ,python-defusedxml)))
810 `(("python-coverage" ,python-coverage)
811 ("python-psycopg2" ,python-psycopg2)
812 ("python-django" ,python-django)))
813 (home-page "https://github.com/necaris/python3-openid")
814 (synopsis "OpenID support for servers and consumers")
815 (description "This library provides OpenID authentication for Python, both
816 for clients and servers.")
817 (license license:asl2.0)))
819 (define-public python2-openid
821 (name "python2-openid")
826 (uri (pypi-uri "python-openid" version))
829 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
830 (build-system python-build-system)
832 ;; Python 3 support is in `python3-openid`, a separate package.
834 ;; Tests aren't initialized correctly.
836 (home-page "https://github.com/openid/python-openid")
837 (synopsis "OpenID support for servers and consumers")
838 (description "This library provides OpenID authentication for Python, both
839 for clients and servers.")
840 (license license:asl2.0)))
842 (define-public python-cssutils
844 (name "python-cssutils")
849 (uri (pypi-uri "cssutils" version))
852 "1bxchrbqzapwijap0yhlxdil1w9bmwvgx77aizlkhc2mcxjg1z52"))))
853 (build-system python-build-system)
855 `(("unzip" ,unzip))) ; for unpacking the source
857 `(#:tests? #f)) ; tests require python-pbr < 1.7.0
858 (home-page "http://cthedot.de/cssutils/")
860 "CSS Cascading Style Sheets library for Python")
862 "Cssutils is a Python package for parsing and building CSS
863 Cascading Style Sheets. Currently it provides a DOM only and no rendering
865 (license license:lgpl3+)))
867 (define-public python2-cssutils
868 (package-with-python2 python-cssutils))
870 (define-public python-css-parser
872 (inherit python-cssutils)
873 (name "python-css-parser")
878 (uri (pypi-uri "css-parser" version ".tar.gz"))
881 "0i4xfykiffxzr4f6y0m2ggqvx1rzam6pw6krlr5k6ldf29akbay7"))))
882 (home-page "https://github.com/ebook-utils/css-parser")
883 (synopsis "Fork of cssutils modified for parsing ebooks")
885 "Css-parser is a fork of cssutils 1.0.2, updated and modified for parsing
886 ebooks, due to cssutils not receiving updates as of 1.0.2.")
887 (license license:lgpl3+)))
889 (define-public python2-css-parser
890 (package-with-python2 python-css-parser))
892 (define-public python-cssselect
894 (name "python-cssselect")
897 ;; The PyPI release does not contain tests.
900 (url "https://github.com/scrapy/cssselect")
901 (commit (string-append "v" version))))
902 (file-name (git-file-name name version))
905 "0xslrnhbrmgakp4xg6k26qffay3kqffp3a2z2sk27c65rwxa79kc"))))
906 (build-system python-build-system)
908 `(#:phases (modify-phases %standard-phases
911 (invoke "pytest" "-vv"))))))
913 `(("python-lxml" ,python-lxml)
914 ("python-pytest" ,python-pytest)))
915 (home-page "https://github.com/scrapy/cssselect")
916 (synopsis "CSS3 selector parser and translator to XPath 1.0")
918 "Cssselect ia a Python module that parses CSS3 Selectors and translates
919 them to XPath 1.0 expressions. Such expressions can be used in lxml or
920 another XPath engine to find the matching elements in an XML or HTML document.")
921 (license license:bsd-3)))
923 (define-public python2-cssselect
924 (package-with-python2 python-cssselect))
926 (define-public python-openid-cla
928 (name "python-openid-cla")
933 (uri (pypi-uri "python-openid-cla" version))
936 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
937 (build-system python-build-system)
938 (arguments '(#:tests? #f)) ; No tests.
939 (home-page "https://github.com/puiterwijk/python-openid-cla/")
940 (synopsis "Implementation of the OpenID CLA extension for python-openid")
941 (description "@code{openid-cla} is an implementation of the OpenID
942 contributor license agreement extension for python-openid.")
943 (license license:bsd-3)))
945 (define-public python2-openid-cla
946 (package-with-python2 python-openid-cla))
948 (define-public python-openid-teams
950 (name "python-openid-teams")
955 (uri (pypi-uri "python-openid-teams" version))
958 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
959 (build-system python-build-system)
960 (arguments '(#:tests? #f)) ; No tests.
961 (home-page "https://github.com/puiterwijk/python-openid-teams/")
962 (synopsis "Implementation of the OpenID teams extension for python-openid")
964 "@code{openid-teams} is an implementation of the OpenID
965 teams extension for python-openid.")
966 (license license:bsd-3)))
968 (define-public python2-openid-teams
969 (package-with-python2 python-openid-teams))
971 (define-public python-tornado
973 (name "python-tornado")
978 (uri (pypi-uri "tornado" version))
981 "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
982 (build-system python-build-system)
984 '(;; FIXME: Two tests error out with:
985 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
987 ;; (modify-phases %standard-phases
990 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
991 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
992 ;; (invoke "python" "-m" "tornado.test.runtests")
996 `(("python-certifi" ,python-certifi)))
997 (home-page "https://www.tornadoweb.org/")
998 (synopsis "Python web framework and asynchronous networking library")
1000 "Tornado is a Python web framework and asynchronous networking library,
1001 originally developed at FriendFeed. By using non-blocking network I/O,
1002 Tornado can scale to tens of thousands of open connections, making it ideal
1003 for long polling, WebSockets, and other applications that require a long-lived
1004 connection to each user.")
1005 (license license:asl2.0)
1006 (properties `((python2-variant . ,(delay python2-tornado))))))
1008 (define-public python-tornado-6
1010 (name "python-tornado")
1015 (uri (pypi-uri "tornado" version))
1018 "1p5n7sw4580pkybywg93p8ddqdj9lhhy72rzswfa801vlidx9qhg"))))
1019 (build-system python-build-system)
1022 (modify-phases %standard-phases
1025 (invoke "python" "-m" "tornado.test.runtests")
1028 `(("python-certifi" ,python-certifi)))
1029 (home-page "https://www.tornadoweb.org/")
1030 (synopsis "Python web framework and asynchronous networking library")
1032 "Tornado is a Python web framework and asynchronous networking library,
1033 originally developed at FriendFeed. By using non-blocking network I/O,
1034 Tornado can scale to tens of thousands of open connections, making it ideal
1035 for long polling, WebSockets, and other applications that require a long-lived
1036 connection to each user.")
1037 (license license:asl2.0)))
1039 (define-public python2-tornado
1040 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
1041 (package (inherit tornado)
1043 `(("python2-backport-ssl-match-hostname"
1044 ,python2-backport-ssl-match-hostname)
1045 ("python2-backports-abc" ,python2-backports-abc)
1046 ("python2-singledispatch" ,python2-singledispatch)
1047 ,@(package-propagated-inputs tornado))))))
1049 (define-public python-tornado-http-auth
1051 (name "python-tornado-http-auth")
1056 (uri (pypi-uri "tornado-http-auth" version))
1058 (base32 "0hyc5f0a09i5yb99pk4bxpg6w9ichbrb5cv7hc9hff7rxd8w0v0x"))))
1059 (build-system python-build-system)
1061 `(("python-tornado" ,python-tornado)))
1062 (home-page "https://github.com/gvalkov/tornado-http-auth")
1063 (synopsis "Digest and basic authentication module for Tornado")
1065 "Provides support for adding authentication to services using the Tornado
1066 web framework, either via the basic or digest authentication schemes.")
1067 (license license:asl2.0)))
1069 (define-public python-terminado
1071 (name "python-terminado")
1076 (uri (pypi-uri "terminado" version))
1079 "0yh69k6579g848rmjyllb5h75pkvgcy27r1l3yzgkf33wnnzkasm"))))
1080 (build-system python-build-system)
1082 `(("python-tornado" ,python-tornado)
1083 ("python-ptyprocess" ,python-ptyprocess)))
1085 `(("python-nose" ,python-nose)))
1088 (modify-phases %standard-phases
1090 (lambda _ (invoke "nosetests") #t)))))
1091 (home-page "https://github.com/takluyver/terminado")
1092 (synopsis "Terminals served to term.js using Tornado websockets")
1093 (description "This package provides a Tornado websocket backend for the
1094 term.js Javascript terminal emulator library.")
1095 (license license:bsd-2)
1096 (properties `((python2-variant . ,(delay python2-terminado))))))
1098 (define-public python2-terminado
1099 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
1100 (package (inherit terminado)
1102 `(("python2-backport-ssl-match-hostname"
1103 ,python2-backport-ssl-match-hostname)
1104 ("python2-futures" ,python2-futures)
1105 ,@(package-propagated-inputs terminado))))))
1107 (define-public python-wsgi-intercept
1109 (name "python-wsgi-intercept")
1113 (uri (pypi-uri "wsgi_intercept" version))
1116 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
1117 (build-system python-build-system)
1119 `(("python-six" ,python-six)))
1121 `(("python-pytest" ,python-pytest)
1122 ("python-httplib2" ,python-httplib2)
1123 ("python-requests" ,python-requests)
1124 ("python-urllib3" ,python-urllib3)))
1125 (synopsis "Puts a WSGI application in place of a real URI for testing")
1126 (description "Wsgi_intercept installs a WSGI application in place of a real
1127 URI for testing. Testing a WSGI application normally involves starting a
1128 server at a local host and port, then pointing your test code to that address.
1129 Instead, this library lets you intercept calls to any specific host/port
1130 combination and redirect them into a WSGI application importable by your test
1131 program. Thus, you can avoid spawning multiple processes or threads to test
1133 (home-page "https://github.com/cdent/wsgi-intercept")
1134 (license license:expat)))
1136 (define-public python-webob
1138 (name "python-webob")
1143 (uri (pypi-uri "WebOb" version))
1146 "026i3z99nr3px75isa9mbnky5i7rffiv4d124h5kxfjjsxz92fma"))))
1147 (build-system python-build-system)
1149 `(("python-nose" ,python-nose)))
1150 (home-page "https://webob.org/")
1151 (synopsis "WSGI request and response object")
1153 "WebOb provides wrappers around the WSGI request environment, and an
1154 object to help create WSGI responses.")
1155 (license license:expat)))
1157 (define-public python2-webob
1158 (package-with-python2 python-webob))
1160 (define-public python-zope-event
1162 (name "python-zope-event")
1167 (uri (pypi-uri "zope.event" version))
1170 "1ksbc726av9xacml6jhcfyn828hlhb9xlddpx6fcvnlvmpmpvhk9"))))
1171 (build-system python-build-system)
1172 (home-page "https://pypi.org/project/zope.event/")
1173 (synopsis "Event publishing system for Python")
1174 (description "Zope.event provides an event publishing API, intended for
1175 use by applications which are unaware of any subscribers to their events. It
1176 is a simple event-dispatching system on which more sophisticated event
1177 dispatching systems can be built.")
1178 (license license:zpl2.1)))
1180 (define-public python2-zope-event
1181 (package-with-python2 python-zope-event))
1183 (define-public python-zope-interface
1185 (name "python-zope-interface")
1190 (uri (pypi-uri "zope.interface" version))
1193 "03nrl6b8cb600dnnh46y149awvrm0gxyqgwq5hdw3lvys8mw9r20"))))
1194 (build-system python-build-system)
1195 (arguments '(#:tests? #f)) ; test suite can't find python-zope-testing
1197 `(("python-coverage" ,python-coverage)
1198 ("python-nose" ,python-nose)
1199 ("python-zope-event" ,python-zope-event)
1200 ("python-zope-testing" ,python-zope-testing)))
1201 (home-page "https://github.com/zopefoundation/zope.interface")
1202 (synopsis "Python implementation of the \"design by contract\"
1204 (description "Zope.interface provides an implementation of \"object
1205 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
1206 conforming to a given API or contract.")
1207 (license license:zpl2.1)))
1209 (define-public python2-zope-interface
1210 (package-with-python2 python-zope-interface))
1212 (define-public python-zope-exceptions
1214 (name "python-zope-exceptions")
1219 (uri (pypi-uri "zope.exceptions" version))
1222 "1nkgfwawswmyc6i0b8g3ymvja4mb507m8yhid8s4rbxq3dmqhwhd"))))
1223 (build-system python-build-system)
1226 (modify-phases %standard-phases
1229 (invoke "zope-testrunner" "--test-path=src"))))))
1231 `(("python-zope-testrunner" ,python-zope-testrunner-bootstrap)))
1233 `(("python-zope-interface" ,python-zope-interface)))
1234 (home-page "https://pypi.org/project/zope.exceptions/")
1235 (synopsis "Zope exceptions")
1236 (description "Zope.exceptions provides general-purpose exception types
1237 that have uses outside of the Zope framework.")
1238 (license license:zpl2.1)))
1240 (define-public python-zope-exceptions-bootstrap
1242 (inherit python-zope-exceptions)
1243 (arguments `(#:tests? #f))
1244 (propagated-inputs `())
1246 (properties `((hidden? . #t)))))
1248 (define-public python2-zope-exceptions
1249 (package-with-python2 python-zope-exceptions))
1251 (define-public python-zope-testing
1253 (name "python-zope-testing")
1258 (uri (pypi-uri "zope.testing" version))
1261 "1sh3c3i0m8n8fnhqiry0bk3rr356i56ry7calmn57s1pvv8yhsyn"))))
1262 (build-system python-build-system)
1263 (home-page "https://pypi.org/project/zope.testing/")
1264 (synopsis "Zope testing helpers")
1265 (description "Zope.testing provides a number of testing utilities for HTML
1266 forms, HTTP servers, regular expressions, and more.")
1267 (license license:zpl2.1)))
1269 (define-public python2-zope-testing
1270 (package-with-python2 python-zope-testing))
1272 (define-public python-zope-testrunner
1274 (name "python-zope-testrunner")
1279 (uri (pypi-uri "zope.testrunner" version))
1282 "0jyyf1dcz156q95x2y7yw2v420q2xn3cff0c5aci7hmdmcbn0gc7"))))
1283 (build-system python-build-system)
1285 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1287 `(("python-zope-testing" ,python-zope-testing)))
1289 `(("python-six" ,python-six)
1290 ("python-zope-exceptions" ,python-zope-exceptions)
1291 ("python-zope-interface" ,python-zope-interface)))
1292 (home-page "https://pypi.org/project/zope.testrunner/")
1293 (synopsis "Zope testrunner script")
1294 (description "Zope.testrunner provides a script for running Python
1296 (license license:zpl2.1)))
1298 (define-public python-zope-testrunner-bootstrap
1300 (inherit python-zope-testrunner)
1301 (arguments `(#:tests? #f))
1303 `(("python-six" ,python-six)
1304 ("python-zope-exceptions" ,python-zope-exceptions-bootstrap)))
1305 (properties `((hidden? . #t)))))
1307 (define-public python2-zope-testrunner
1308 (package-with-python2 python-zope-testrunner))
1310 (define-public python-zope-i18nmessageid
1312 (name "python-zope-i18nmessageid")
1317 (uri (pypi-uri "zope.i18nmessageid" version))
1320 "0ndhn4w1qgwkfbwf9vm2bgq418z5g0wmfsgl0d9nz62cd0mi8d4m"))))
1321 (build-system python-build-system)
1323 `(("python-coverage" ,python-coverage)
1324 ("python-zope-testrunner" ,python-zope-testrunner)))
1326 `(("python-six" ,python-six)))
1327 (home-page "https://pypi.org/project/zope.i18nmessageid/")
1328 (synopsis "Message identifiers for internationalization")
1329 (description "Zope.i18nmessageid provides facilities for declaring
1330 internationalized messages within program source text.")
1331 (license license:zpl2.1)))
1333 (define-public python2-zope-i18nmessageid
1334 (package-with-python2 python-zope-i18nmessageid))
1336 (define-public python-zope-schema
1338 (name "python-zope-schema")
1343 (uri (pypi-uri "zope.schema" version))
1346 "09jg47bxhfg1ahr1jxb5y0cbiszyk1j6fn1r1r7s6svjl3lbryr0"))))
1347 (build-system python-build-system)
1350 (modify-phases %standard-phases
1352 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1353 (add-installed-pythonpath inputs outputs)
1355 (invoke "zope-testrunner" "--test-path=src")
1358 `(("python-zope-event" ,python-zope-event)
1359 ("python-zope-interface" ,python-zope-interface)))
1361 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1362 ("python-zope-testing" ,python-zope-testing)
1363 ("python-zope-testrunner" ,python-zope-testrunner)))
1364 (home-page "https://pypi.org/project/zope.schema/")
1365 (synopsis "Zope data schemas")
1366 (description "Zope.scheme provides extensions to zope.interface for
1367 defining data schemas.")
1368 (license license:zpl2.1)))
1370 (define-public python2-zope-schema
1371 (package-with-python2 python-zope-schema))
1373 (define-public python-zope-configuration
1375 (name "python-zope-configuration")
1379 (uri (pypi-uri "zope.configuration" version))
1382 "0g6vrl7y27z9cj5xyrww9xlzk4npj55mgmlrcd9d2nj08jn2pw79"))))
1383 (build-system python-build-system)
1385 `(("python-manuel" ,python-manuel)
1386 ("python-zope-testing" ,python-zope-testing)
1387 ("python-zope-testrunner" ,python-zope-testrunner)))
1389 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1390 ("python-zope-interface" ,python-zope-interface)
1391 ("python-zope-schema" ,python-zope-schema)))
1392 (home-page "https://pypi.org/project/zope.configuration/")
1393 (synopsis "Zope Configuration Markup Language")
1394 (description "Zope.configuration implements ZCML, the Zope Configuration
1396 (license license:zpl2.1)))
1398 (define-public python-zope-configuration-bootstrap
1400 (inherit python-zope-configuration)
1401 (arguments `(#:tests? #f))
1403 (properties `((hidden? . #t)))))
1405 (define-public python2-zope-configuration
1406 (package-with-python2 python-zope-configuration))
1408 (define-public python-zope-copy
1410 (name "python-zope-copy")
1415 (uri (pypi-uri "zope.copy" version))
1418 "06m75434krl57n6p73c2qj55k5i3fixg887j8ss01ih6zw4rvfs7"))))
1419 (build-system python-build-system)
1422 (modify-phases %standard-phases
1425 (invoke "zope-testrunner" "--test-path=src" "\\[]"))))))
1427 `(("python-zope-interface" ,python-zope-interface)))
1429 `(("python-zope-component" ,python-zope-component-bootstrap)
1430 ("python-zope-location" ,python-zope-location-bootstrap)
1431 ("python-zope-testing" ,python-zope-testing)
1432 ("python-zope-testrunner" ,python-zope-testrunner)))
1433 (home-page "https://github.com/zopefoundation/zope.copy")
1434 (synopsis "Pluggable object copying mechanism")
1436 "This package provides a pluggable mechanism for copying persistent objects.")
1437 (license license:zpl2.1)))
1439 (define-public python-zope-proxy
1441 (name "python-zope-proxy")
1446 (uri (pypi-uri "zope.proxy" version))
1449 "14h7nyfbl5vpfk0rbviy4ygdfx0yx5kncvg6jpbdb0dhwna0ssm6"))))
1450 (build-system python-build-system)
1452 `(("python-zope-security" ,python-zope-security-bootstrap)
1453 ("python-zope-testrunner" ,python-zope-testrunner)))
1455 `(("python-zope-interface" ,python-zope-interface)))
1456 (home-page "https://pypi.org/project/zope.proxy/")
1457 (synopsis "Generic, transparent proxies")
1458 (description "Zope.proxy provides generic, transparent proxies for Python.
1459 Proxies are special objects which serve as mostly-transparent wrappers around
1460 another object, intervening in the apparent behavior of the wrapped object
1461 only when necessary to apply the policy (e.g., access checking, location
1462 brokering, etc.) for which the proxy is responsible.")
1463 (license license:zpl2.1)))
1465 (define-public python-zope-proxy-bootstrap
1467 (inherit python-zope-proxy)
1468 (arguments `(#:tests? #f))
1470 (properties `((hidden? . #t)))))
1472 (define-public python2-zope-proxy
1473 (package-with-python2 python-zope-proxy))
1475 (define-public python-zope-hookable
1477 (name "python-zope-hookable")
1482 (uri (pypi-uri "zope.hookable" version))
1485 "0hc82lfr7bk53nvbxvjkibkarngyrzgfk2i6bg8wshl0ly0pdl19"))))
1486 (build-system python-build-system)
1488 `(("python-coverage" ,python-coverage)
1489 ("python-zope-testing" ,python-zope-testing)))
1490 (home-page "https://github.com/zopefoundation/zope.hookable")
1491 (synopsis "Zope hookable")
1492 (description "This package supports the efficient creation of hookable
1493 objects, which are callable objects that are meant to be optionally replaced.
1494 The idea is that you create a function that does some default thing and make i
1495 hookable. Later, someone can modify what it does by calling its sethook method
1496 and changing its implementation. All users of the function, including those
1497 that imported it, will see the change.")
1498 (license license:zpl2.1)))
1500 (define-public python-zope-location
1502 (name "python-zope-location")
1507 (uri (pypi-uri "zope.location" version))
1510 "1b40pzl8v00d583d3gsxv1qjdw2dhghlgkbgxl3m07d5r3izj857"))))
1511 (build-system python-build-system)
1513 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1515 `(("python-zope-testrunner" ,python-zope-testrunner)))
1517 `(("python-zope-interface" ,python-zope-interface)
1518 ("python-zope-proxy" ,python-zope-proxy)
1519 ("python-zope-schema" ,python-zope-schema)))
1520 (home-page "https://pypi.org/project/zope.location/")
1521 (synopsis "Zope location library")
1522 (description "Zope.location implements the concept of \"locations\" in
1523 Zope3, which are are special objects that have a structural location.")
1524 (license license:zpl2.1)))
1526 (define-public python-zope-location-bootstrap
1528 (inherit python-zope-location)
1529 (arguments `(#:tests? #f))
1531 (properties `((hidden? . #t)))))
1533 (define-public python2-zope-location
1534 (package-with-python2 python-zope-location))
1536 (define-public python-zope-security
1538 (name "python-zope-security")
1543 (uri (pypi-uri "zope.security" version))
1546 "11lfw67cigscfax9c5j63xcvz2qcj724zx5fcdqyc94am2glim0h"))))
1547 (build-system python-build-system)
1549 `(("python-zope-component" ,python-zope-component)
1550 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1551 ("python-zope-interface" ,python-zope-interface)
1552 ("python-zope-location" ,python-zope-location)
1553 ("python-zope-proxy" ,python-zope-proxy)
1554 ("python-zope-schema" ,python-zope-schema)))
1556 `(("python-btrees" ,python-btrees)
1557 ("python-zope-component" ,python-zope-component-bootstrap)
1558 ("python-zope-configuration" ,python-zope-configuration-bootstrap)
1559 ("python-zope-location" ,python-zope-location-bootstrap)
1560 ("python-zope-testing" ,python-zope-testing)
1561 ("python-zope-testrunner" ,python-zope-testrunner)))
1562 (home-page "https://pypi.org/project/zope.security/")
1563 (synopsis "Zope security framework")
1564 (description "Zope.security provides a generic mechanism to implement
1565 security policies on Python objects.")
1566 (license license:zpl2.1)))
1568 (define-public python-zope-security-bootstrap
1570 (inherit python-zope-security)
1571 (arguments `(#:tests? #f))
1573 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1574 ("python-zope-interface" ,python-zope-interface)
1575 ("python-zope-proxy" ,python-zope-proxy-bootstrap)
1576 ("python-zope-schema" ,python-zope-schema)))
1578 (properties `((hidden? . #t)))))
1580 (define-public python2-zope-security
1581 (package-with-python2 python-zope-security))
1583 (define-public python-zope-component
1585 (name "python-zope-component")
1590 (uri (pypi-uri "zope.component" version))
1593 "14iwp95hh6q5dj4k9h1iw75cbp89bs27nany4dinyglb44c8jqli"))))
1594 (build-system python-build-system)
1597 (modify-phases %standard-phases
1599 (lambda* (#:key inputs outputs #:allow-other-keys)
1600 (add-installed-pythonpath inputs outputs)
1601 (invoke "python" "setup.py" "test"))))))
1603 `(("python-persistent" ,python-persistent)
1604 ("python-zope-configuration" ,python-zope-configuration-bootstrap)
1605 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1606 ("python-zope-location" ,python-zope-location-bootstrap)
1607 ("python-zope-proxy" ,python-zope-proxy-bootstrap)
1608 ("python-zope-security" ,python-zope-security-bootstrap)
1609 ("python-zope-testing" ,python-zope-testing)
1610 ("python-zope-testrunner" ,python-zope-testrunner)))
1612 `(("python-zope-deferredimport" ,python-zope-deferredimport)
1613 ("python-zope-deprecation" ,python-zope-deprecation)
1614 ("python-zope-event" ,python-zope-event)
1615 ("python-zope-hookable" ,python-zope-hookable)
1616 ("python-zope-interface" ,python-zope-interface)))
1617 (home-page "https://github.com/zopefoundation/zope.component")
1618 (synopsis "Zope Component Architecture")
1619 (description "Zope.component represents the core of the Zope Component
1620 Architecture. Together with the zope.interface package, it provides
1621 facilities for defining, registering and looking up components.")
1622 (license license:zpl2.1)))
1624 (define-public python-zope-component-bootstrap
1626 (inherit python-zope-component)
1627 (arguments `(#:tests? #f))
1629 (properties `((hidden? . #t)))))
1631 (define-public python2-zope-component
1632 (package-with-python2 python-zope-component))
1634 (define-public python-zope-deferredimport
1636 (name "python-zope-deferredimport")
1641 (uri (pypi-uri "zope.deferredimport" version))
1644 "1q89v54dwniiqypjbwywwdfjdr4kdkqlyqsgrpplgvsygdg39cjp"))))
1645 (build-system python-build-system)
1647 `(("python-zope-proxy" ,python-zope-proxy)))
1649 `(("python-zope-testrunner" ,python-zope-testrunner)))
1650 (home-page "https://github.com/zopefoundation/zope.deferredimport")
1651 (synopsis "Defer imports until used by code")
1653 "Often, especially for package modules, you want to import names for
1654 convenience, but not actually perform the imports until necessary. The
1655 @code{zope.deferredimport} package provided facilities for defining names in
1656 modules that will be imported from somewhere else when used. You can also cause
1657 deprecation warnings to be issued when a variable is used.")
1658 (license license:zpl2.1)))
1660 (define-public python-ndg-httpsclient
1662 (name "python-ndg-httpsclient")
1666 (uri (pypi-uri "ndg_httpsclient" version))
1669 "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
1670 (build-system python-build-system)
1672 '(;; The tests appear to require networking.
1675 `(("python-pyopenssl" ,python-pyopenssl)))
1676 (synopsis "HTTPS support for Python's httplib and urllib2")
1677 (description "This is a HTTPS client implementation for httplib and urllib2
1678 based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
1679 over the default provided with Python and, importantly, enables full
1680 verification of the SSL peer.")
1681 (home-page "https://github.com/cedadev/ndg_httpsclient/")
1682 (license license:bsd-3)))
1684 ;; python2-openssl requires special care, so package-with-python2 is
1686 (define-public python2-ndg-httpsclient
1687 (package (inherit python-ndg-httpsclient)
1688 (name "python2-ndg-httpsclient")
1690 (substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
1691 ((#:python _) python-2)))
1693 `(("python2-pyopenssl" ,python2-pyopenssl)))))
1695 (define-public python-websocket-client
1697 (name "python-websocket-client")
1702 (uri (pypi-uri "websocket_client" version))
1705 "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
1706 (build-system python-build-system)
1708 `(("python-six" ,python-six)))
1709 (home-page "https://github.com/liris/websocket-client")
1710 (synopsis "WebSocket client for Python")
1711 (description "The Websocket-client module provides the low level APIs for
1712 WebSocket usage in Python programs.")
1713 (properties `((python2-variant . ,(delay python2-websocket-client))))
1714 (license license:lgpl2.1+)))
1716 (define-public python2-websocket-client
1717 (let ((base (package-with-python2
1718 (strip-python2-variant python-websocket-client))))
1722 `(("python2-backport-ssl-match-hostname"
1723 ,python2-backport-ssl-match-hostname)
1724 ,@(package-native-inputs base))))))
1726 (define-public python-requests
1728 (name "python-requests")
1732 (uri (pypi-uri "requests" version))
1735 "1rhpg0jb08v0gd7f19jjiwlcdnxpmqi1fhvw7r4s9avddi4kvx5k"))))
1736 (build-system python-build-system)
1738 `(("python-certifi" ,python-certifi)
1739 ("python-chardet" ,python-chardet)
1740 ("python-idna" ,python-idna)
1741 ("python-urllib3" ,python-urllib3)))
1743 ;; FIXME: Some tests require network access.
1745 (home-page "http://python-requests.org/")
1746 (synopsis "Python HTTP library")
1748 "Requests is a Python HTTP client library. It aims to be easier to use
1749 than Python’s urllib2 library.")
1750 (license license:asl2.0)))
1752 ;; Some software requires an older version of Requests, notably Docker/Docker
1754 (define-public python-requests-2.20
1755 (package (inherit python-requests)
1759 (uri (pypi-uri "requests" version))
1762 "0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a"))))
1764 `(("python-urllib3" ,python-urllib3-1.24)
1765 ("python-idna" ,python-idna-2.7)
1766 ,@(package-propagated-inputs python-requests)))))
1768 ;; Some software requires an older version of Requests, notably Docker
1770 (define-public python-requests-2.7
1771 (package (inherit python-requests)
1775 (uri (pypi-uri "requests" version))
1778 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
1780 (define-public python2-requests
1781 (package-with-python2 python-requests))
1783 (define-public python-requests_ntlm
1785 (name "python-requests_ntlm")
1790 (uri (pypi-uri "requests_ntlm" version))
1793 "0wgbqzaq9w7bas16b7brdb75f91bh3275fb459093bk1ihpck2ci"))))
1794 (build-system python-build-system)
1796 `(("python-cryptography" ,python-cryptography)
1797 ("python-ntlm-auth" ,python-ntlm-auth)
1798 ("python-requests" ,python-requests)))
1799 (home-page "https://github.com/requests/requests-ntlm")
1801 "NTLM authentication support for Requests")
1803 "This package allows for HTTP NTLM authentication using the requests
1805 (license license:isc)))
1807 (define-public python-requests-mock
1809 (name "python-requests-mock")
1814 (uri (pypi-uri "requests-mock" version))
1817 "0jr997dvk6zbmhvbpcv3rajrgag69mcsm1ai3w3rgk2jdh6rg1mx"))))
1818 (build-system python-build-system)
1820 `(("python-requests" ,python-requests)
1821 ("python-six" ,python-six)))
1823 `(("python-pbr" ,python-pbr)
1824 ("python-discover" ,python-discover)
1825 ("python-docutils" ,python-docutils)
1826 ("python-fixtures" ,python-fixtures)
1827 ("python-mock" ,python-mock)
1828 ("python-sphinx" ,python-sphinx)
1829 ("python-testrepository" ,python-testrepository)
1830 ("python-testtools" ,python-testtools)))
1831 (home-page "https://requests-mock.readthedocs.org/")
1832 (synopsis "Mock out responses from the requests package")
1834 "This module provides a building block to stub out the HTTP requests
1835 portions of your testing code.")
1836 (properties `((python2-variant . ,(delay python2-requests-mock))))
1837 (license license:asl2.0)))
1839 (define-public python2-requests-mock
1840 (package (inherit (package-with-python2
1841 (strip-python2-variant python-requests-mock)))
1843 `(#:python ,python-2
1844 ;; FIXME: 'subunit.run discover: error: no such option: --list'
1847 (define-public python-requests-toolbelt
1849 (name "python-requests-toolbelt")
1853 (uri (pypi-uri "requests-toolbelt" version))
1856 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
1857 (build-system python-build-system)
1859 `(("python-betamax" ,python-betamax)
1860 ("python-mock" ,python-mock)
1861 ("python-pytest" ,python-pytest)))
1863 `(("python-requests" ,python-requests)))
1864 (synopsis "Extensions to python-requests")
1865 (description "This is a toolbelt of useful classes and functions to be used
1866 with python-requests.")
1867 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
1868 (license license:asl2.0)))
1870 (define-public python2-requests-toolbelt
1871 (package-with-python2 python-requests-toolbelt))
1873 (define-public python-oauthlib
1875 (name "python-oauthlib")
1879 (uri (pypi-uri "oauthlib" version))
1882 "163jg4a8f7c5ki655grrr47kgljy12wri3qly7ijf64sk1fjrqqc"))))
1883 (build-system python-build-system)
1885 `(#:phases (modify-phases %standard-phases
1888 (invoke "pytest" "-vv"))))))
1890 `(("python-pytest" ,python-pytest)
1891 ("python-pytest-cov" ,python-pytest-cov)
1892 ("python-mock" ,python-mock)))
1894 `(("python-cryptography" ,python-cryptography)
1895 ("python-pyjwt" ,python-pyjwt)
1896 ("python-blinker" ,python-blinker)))
1897 (home-page "https://github.com/oauthlib/oauthlib")
1898 (synopsis "OAuth implementation for Python")
1900 "Oauthlib is a generic, spec-compliant, thorough implementation of the
1901 OAuth request-signing logic.")
1902 (license license:bsd-3)))
1904 (define-public python2-oauthlib
1905 (package-with-python2 python-oauthlib))
1907 (define-public python-rauth
1909 (name "python-rauth")
1914 (uri (pypi-uri "rauth" version))
1917 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
1918 (build-system python-build-system)
1920 `(#:test-target "check"))
1922 `(("python-requests" ,python-requests)))
1923 (home-page "https://github.com/litl/rauth")
1924 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
1926 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
1927 provides service wrappers for convenient connection initialization and
1928 authenticated session objects providing things like keep-alive.")
1929 (license license:expat)
1930 (properties `((python2-variant . ,(delay python2-rauth))))))
1932 (define-public python2-rauth
1933 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
1936 (native-inputs `(("python2-unittest2" ,python2-unittest2)
1937 ,@(package-native-inputs base))))))
1939 (define-public python-urllib3
1941 (name "python-urllib3")
1946 (uri (pypi-uri "urllib3" version))
1949 "09rmjqm5syhhc8fx3v06h3yv6cqy0b1081jg8wm5grpwpr72j61h"))))
1950 (build-system python-build-system)
1951 (arguments `(#:tests? #f))
1953 `(;; These 5 inputs are used to build urrlib3[secure]
1954 ("python-certifi" ,python-certifi)
1955 ("python-cryptography" ,python-cryptography)
1956 ("python-idna" ,python-idna)
1957 ("python-ipaddress" ,python-ipaddress)
1958 ("python-pyopenssl" ,python-pyopenssl)
1959 ("python-pysocks" ,python-pysocks)))
1960 (home-page "https://urllib3.readthedocs.io/")
1961 (synopsis "HTTP library with thread-safe connection pooling")
1963 "Urllib3 supports features left out of urllib and urllib2 libraries. It
1964 can reuse the same socket connection for multiple requests, it can POST files,
1965 supports url redirection and retries, and also gzip and deflate decoding.")
1966 (license license:expat)))
1968 ;; Some software requires an older version of urllib3, notably Docker.
1969 (define-public python-urllib3-1.24
1970 (package (inherit python-urllib3)
1974 (uri (pypi-uri "urllib3" version))
1977 "1x0slqrv6kixkbcdnxbglvjliwhc1payavxjvk8fvbqjrnasd4r3"))))))
1980 (define-public python2-urllib3
1981 (package-with-python2 python-urllib3))
1983 (define-public awscli
1990 (uri (pypi-uri name version))
1993 "0p479mfs9r0m82a217pap8156ijwvhv6r3kqa4k267gd05wgvygm"))))
1994 (build-system python-build-system)
1996 ;; FIXME: The 'pypi' release does not contain tests.
1999 (modify-phases %standard-phases
2000 (add-after 'unpack 'fix-reference-to-groff
2002 (substitute* "awscli/help.py"
2003 (("if not self._exists_on_path\\('groff'\\):") "")
2004 (("raise ExecutableNotFoundError\\('groff'\\)") "")
2005 (("cmdline = \\['groff'")
2006 (string-append "cmdline = ['" (which "groff") "'")))
2009 `(("python-colorama" ,python-colorama)
2010 ("python-botocore" ,python-botocore)
2011 ("python-s3transfer" ,python-s3transfer)
2012 ("python-docutils" ,python-docutils)
2013 ("python-pyyaml" ,python-pyyaml)
2014 ("python-rsa" ,python-rsa)))
2016 `(("groff" ,groff)))
2017 (home-page "https://aws.amazon.com/cli/")
2018 (synopsis "Command line client for AWS")
2019 (description "AWS CLI provides a unified command line interface to the
2020 Amazon Web Services (AWS) API.")
2021 (license license:asl2.0)))
2023 (define-public python-wsgiproxy2
2025 (name "python-wsgiproxy2")
2030 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
2032 (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
2033 (build-system python-build-system)
2035 `(("python-webtest" ,python-webtest)))
2037 `(("python-requests" ,python-requests)
2038 ("python-six" ,python-six)
2039 ("python-urllib3" ,python-urllib3)
2040 ("python-webob" ,python-webob)))
2041 (home-page "https://github.com/gawel/WSGIProxy2/")
2042 (synopsis "WSGI Proxy with various http client backends")
2043 (description "WSGI turns HTTP requests into WSGI function calls.
2044 WSGIProxy turns WSGI function calls into HTTP requests.
2045 It also includes code to sign requests and pass private data,
2046 and to spawn subprocesses to handle requests.")
2047 (license license:expat)))
2049 (define-public python2-wsgiproxy2
2050 (package-with-python2 python-wsgiproxy2))
2052 (define-public python-pastedeploy
2054 (name "python-pastedeploy")
2059 (uri (pypi-uri "PasteDeploy" version))
2061 (base32 "16qsq5y6mryslmbp5pn35x4z8z3ndp5rpgl42h226879nrw9hmg7"))))
2062 (build-system python-build-system)
2064 '(#:test-target "pytest"))
2066 `(("python-pytest" ,python-pytest)
2067 ("python-pytest-runner" ,python-pytest-runner)))
2068 (home-page "https://pylonsproject.org/")
2070 "Load, configure, and compose WSGI applications and servers")
2072 "This tool provides code to load WSGI applications and servers from URIs;
2073 these URIs can refer to Python Eggs for INI-style configuration files. Paste
2074 Script provides commands to serve applications based on this configuration
2076 (license license:expat)))
2078 (define-public python2-pastedeploy
2079 (package-with-python2 python-pastedeploy))
2081 (define-public python-webtest
2083 (name "python-webtest")
2088 (uri (pypi-uri "WebTest" version))
2091 "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21"))))
2092 (build-system python-build-system)
2094 ;; Tests require python-pyquery, which creates a circular dependency.
2097 `(("python-waitress" ,python-waitress)
2098 ("python-webob" ,python-webob)
2099 ("python-six" ,python-six)
2100 ("python-beautifulsoup4" ,python-beautifulsoup4)))
2101 (home-page "https://docs.pylonsproject.org/projects/webtest/")
2102 (synopsis "Helper to test WSGI applications")
2103 (description "Webtest allows you to test your Python web applications
2104 without starting an HTTP server. It supports anything that supports the
2106 (license license:expat)))
2108 (define-public python2-webtest
2109 (package-with-python2 python-webtest))
2111 (define-public python-flask
2113 (name "python-flask")
2117 (uri (pypi-uri "Flask" version))
2120 "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf"))))
2121 (build-system python-build-system)
2124 (modify-phases %standard-phases
2127 (setenv "PYTHONPATH" (string-append "./build/lib:"
2128 (getenv "PYTHONPATH")))
2129 (invoke "pytest" "-vv" "tests"))))))
2131 `(("python-pytest" ,python-pytest)))
2133 `(("python-itsdangerous" ,python-itsdangerous)
2134 ("python-jinja2" ,python-jinja2)
2135 ("python-click" ,python-click)
2136 ("python-werkzeug" ,python-werkzeug)))
2137 (home-page "https://www.palletsprojects.com/p/flask/")
2138 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
2139 (description "Flask is a micro web framework based on the Werkzeug toolkit
2140 and Jinja2 template engine. It is called a micro framework because it does not
2141 presume or force a developer to use a particular tool or library.")
2142 (license license:bsd-3)))
2144 (define-public python2-flask
2145 (package-with-python2 python-flask))
2147 (define-public python-flask-wtf
2149 (name "python-flask-wtf")
2154 (uri (pypi-uri "Flask-WTF" version))
2157 "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"))))
2158 (build-system python-build-system)
2161 (modify-phases %standard-phases
2164 (setenv "PYTHONPATH" (string-append "./build/lib:"
2165 (getenv "PYTHONPATH")))
2166 (invoke "pytest" "-vv"))))))
2168 `(("python-flask-babel" ,python-flask-babel)
2169 ("python-babel" ,python-babel)
2170 ("python-wtforms" ,python-wtforms)))
2172 `(("python-pytest" ,python-pytest)))
2173 (home-page "https://github.com/lepture/flask-wtf")
2174 (synopsis "Simple integration of Flask and WTForms")
2175 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
2176 upload, and reCAPTCHA.")
2177 (license license:bsd-3)))
2179 (define-public python2-flask-wtf
2180 (package-with-python2 python-flask-wtf))
2182 (define-public python-flask-multistatic
2184 (name "python-flask-multistatic")
2189 (uri (pypi-uri "flask-multistatic" version))
2192 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
2193 (build-system python-build-system)
2195 `(("python-flask" ,python-flask)))
2196 (home-page "https://pagure.io/flask-multistatic")
2197 (synopsis "Flask plugin to allow overriding static files")
2198 (description "@code{flask-multistatic} is a flask plugin that adds support
2199 for overriding static files.")
2200 (license license:gpl3+)))
2202 (define-public python2-flask-multistatic
2203 (package-with-python2 python-flask-multistatic))
2205 (define-public python-cookies
2207 (name "python-cookies")
2211 (uri (pypi-uri "cookies" version))
2214 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
2215 (build-system python-build-system)
2217 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
2220 `(("python-pytest" ,python-pytest)))
2221 (synopsis "HTTP cookie parser and renderer")
2222 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
2224 (home-page "https://gitlab.com/sashahart/cookies")
2225 (license license:expat)))
2227 (define-public python2-cookies
2228 (package-with-python2 python-cookies))
2230 (define-public python-responses
2232 (name "python-responses")
2236 (uri (pypi-uri "responses" version))
2239 "147pacwkkqy3qf3hr33fnl1xbzgw0zsm3qppvvy9qhq8h069qbah"))))
2240 (build-system python-build-system)
2242 `(;; Test suite is not distributed:
2243 ;; https://github.com/getsentry/responses/issues/38
2246 `(("python-mock" ,python-mock)))
2248 `(("python-requests" ,python-requests)
2249 ("python-cookies" ,python-cookies)
2250 ("python-six" ,python-six)))
2251 (home-page "https://github.com/getsentry/responses")
2252 (synopsis "Utility for mocking out the `requests` Python library")
2253 (description "A utility library for mocking out the `requests` Python
2255 (license license:asl2.0)))
2257 (define-public python2-responses
2258 (package-with-python2 python-responses))
2260 (define-public python-grequests
2262 (name "python-grequests")
2267 (uri (pypi-uri "grequests" version))
2270 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
2271 (build-system python-build-system)
2273 `(("python-gevent" ,python-gevent)
2274 ("python-requests" ,python-requests)))
2276 `(("python-nose" ,python-nose)
2277 ("python-zope.interface" ,python-zope-interface)
2278 ("python-zope.event" ,python-zope-event)))
2279 (home-page "https://github.com/kennethreitz/grequests")
2280 (synopsis "Python library for asynchronous HTTP requests")
2281 (description "GRequests is a Python library that allows you to use
2282 @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
2283 (license license:bsd-2)))
2285 (define-public python-geventhttpclient
2287 (name "python-geventhttpclient")
2291 (uri (pypi-uri "geventhttpclient" version))
2294 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
2295 (modules '((guix build utils)))
2298 ;; Delete pre-compiled files.
2299 (for-each delete-file (find-files "src/geventhttpclient"
2302 (build-system python-build-system)
2305 (modify-phases %standard-phases
2306 (add-after 'unpack 'delete-network-tests
2308 (delete-file "src/geventhttpclient/tests/test_client.py")
2311 (lambda* (#:key inputs outputs #:allow-other-keys)
2312 (add-installed-pythonpath inputs outputs)
2313 (invoke "py.test" "src/geventhttpclient/tests" "-v"
2314 ;; Append the test modules to sys.path to avoid
2315 ;; namespace conflict which breaks SSL tests.
2316 "--import-mode=append"
2317 ;; XXX: Disable test fails with Python 3.8:
2318 ;; https://github.com/gwik/geventhttpclient/issues/119
2319 "-k" (string-append "not test_cookielib_compatibility"))
2322 `(("python-pytest" ,python-pytest)))
2324 `(("python-certifi" ,python-certifi)
2325 ("python-gevent" ,python-gevent)
2326 ("python-six" ,python-six)))
2327 (home-page "https://github.com/gwik/geventhttpclient")
2328 (synopsis "HTTP client library for gevent")
2329 (description "@code{python-geventhttpclient} is a high performance,
2330 concurrent HTTP client library for python using @code{gevent}.")
2331 (license license:expat)))
2333 (define-public python2-geventhttpclient
2334 (package-with-python2 python-geventhttpclient))
2336 (define-public python-requests-oauthlib
2338 (name "python-requests-oauthlib")
2343 (uri (pypi-uri "requests-oauthlib" version))
2346 "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
2347 (build-system python-build-system)
2350 (modify-phases %standard-phases
2351 ;; removes tests that require network access
2352 (add-before 'check 'pre-check
2354 (delete-file "tests/test_core.py")
2357 `(("python-pyjwt" ,python-pyjwt)
2358 ("python-requests-mock" ,python-requests-mock)
2359 ("python-mock" ,python-mock)))
2361 `(("python-oauthlib" ,python-oauthlib)
2362 ("python-requests" ,python-requests)))
2364 "https://github.com/requests/requests-oauthlib")
2366 "OAuthlib authentication support for Requests")
2368 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
2369 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
2370 (license license:isc)))
2372 (define-public python2-requests-oauthlib
2373 (package-with-python2 python-requests-oauthlib))
2375 (define-public python-url
2381 (uri (pypi-uri "url" version))
2384 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
2385 (build-system python-build-system)
2387 `(("python-publicsuffix" ,python-publicsuffix)))
2389 `(("python-coverage" ,python-coverage)
2390 ("python-nose" ,python-nose)))
2392 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
2393 (home-page "https://github.com/seomoz/url-py")
2394 (synopsis "URL Parsing")
2395 (description "Library for parsing urls.")
2396 (license license:expat)
2397 (properties `((python2-variant . ,(delay python2-url))))))
2399 (define-public python2-url
2400 (let ((base (package-with-python2 (strip-python2-variant python-url))))
2401 (package (inherit base)
2403 `(("python2-publicsuffix" ,python2-publicsuffix))))))
2405 (define-public python-cachecontrol
2407 (name "python-cachecontrol")
2412 ;; Pypi does not have tests.
2414 (url "https://github.com/ionrock/cachecontrol")
2415 (commit (string-append "v" version))))
2416 (file-name (git-file-name name version))
2419 "03lgc65sl04n0cgzmmgg99bk83f9i6k8yrmcd4hpl46q1pymn0kz"))))
2420 (build-system python-build-system)
2422 ;; Versions > 0.11.6 depend on CherryPy for testing.
2423 ;; It's too much work to package CherryPy for now.
2426 `(("python-requests" ,python-requests)
2427 ("python-msgpack" ,python-msgpack)
2428 ("python-lockfile" ,python-lockfile)))
2429 (home-page "https://github.com/ionrock/cachecontrol")
2430 (synopsis "The httplib2 caching algorithms for use with requests")
2431 (description "CacheControl is a port of the caching algorithms in
2432 @code{httplib2} for use with @code{requests} session objects.")
2433 (license license:asl2.0)))
2435 (define-public python2-cachecontrol
2436 (package-with-python2 python-cachecontrol))
2438 (define-public python-betamax
2440 (name "python-betamax")
2445 (uri (pypi-uri "betamax" version))
2448 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
2449 (build-system python-build-system)
2451 '(;; Many tests fail because they require networking.
2454 `(("python-requests" ,python-requests)))
2455 (home-page "https://github.com/sigmavirus24/betamax")
2456 (synopsis "Record HTTP interactions with python-requests")
2457 (description "Betamax will record your test suite's HTTP interactions and
2458 replay them during future tests. It is designed to work with python-requests.")
2459 (license license:expat)))
2461 (define-public python2-betamax
2462 (package-with-python2 python-betamax))
2464 (define-public python-betamax-matchers
2466 (name "python-betamax-matchers")
2471 (uri (pypi-uri "betamax-matchers" version))
2474 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
2475 (build-system python-build-system)
2477 `(("python-betamax" ,python-betamax)
2478 ("python-requests-toolbelt" ,python-requests-toolbelt)))
2479 (home-page "https://github.com/sigmavirus24/betamax_matchers")
2480 (synopsis "VCR imitation for python-requests")
2481 (description "@code{betamax-matchers} provides a set of Matchers for
2483 (license license:asl2.0)))
2485 (define-public python2-betamax-matchers
2486 (package-with-python2 python-betamax-matchers))
2488 (define-public python-s3transfer
2490 (name "python-s3transfer")
2494 (uri (pypi-uri "s3transfer" version))
2497 "08fhj73b1ai52hrs2q3nggshq3pswn1gq8ch3m009cb2v2vmqggj"))))
2498 (build-system python-build-system)
2501 (modify-phases %standard-phases
2502 (add-after 'unpack 'patch
2504 ;; There's a small issue with one test with Python 3.8, this
2505 ;; change has been suggested upstream:
2506 ;; https://github.com/boto/s3transfer/pull/164
2507 (substitute* "tests/unit/test_s3transfer.py"
2508 (("super\\(FailedDownloadParts, self\\)\\.submit\\(function\\)")
2509 "futures.Future()"))
2513 ;; Some of the 'integration' tests require network access or
2514 ;; login credentials.
2515 (invoke "nosetests" "--exclude=integration")
2518 `(("python-docutils" ,python-docutils)
2519 ("python-mock" ,python-mock)
2520 ("python-nose" ,python-nose)))
2522 `(("python-botocore" ,python-botocore)
2523 ("python-urllib3" ,python-urllib3)))
2524 (synopsis "Amazon S3 Transfer Manager")
2525 (description "S3transfer is a Python library for managing Amazon S3
2527 (home-page "https://github.com/boto/s3transfer")
2528 (license license:asl2.0)
2529 (properties `((python2-variant . ,(delay python2-s3transfer))))))
2531 (define-public python2-s3transfer
2532 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
2536 `(("python2-futures" ,python2-futures)
2537 ,@(package-native-inputs base))))))
2539 (define-public python-slimit
2541 (name "python-slimit")
2546 (uri (pypi-uri "slimit" version ".zip"))
2549 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
2550 (build-system python-build-system)
2552 `(("unzip" ,unzip)))
2554 `(("python-ply" ,python-ply)))
2555 (home-page "https://slimit.readthedocs.io/")
2556 (synopsis "JavaScript minifier, parser and lexer written in Python")
2558 "SlimIt is a JavaScript minifier written in Python. It compiles
2559 JavaScript into more compact code so that it downloads and runs faster.
2560 SlimIt also provides a library that includes a JavaScript parser, lexer,
2561 pretty printer and a tree visitor.")
2562 (license license:expat)))
2564 (define-public python-flask-restful
2566 (name "python-flask-restful")
2571 (uri (pypi-uri "Flask-RESTful" version))
2572 (patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
2575 "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
2576 (build-system python-build-system)
2578 `(("python-aniso8601" ,python-aniso8601)
2579 ("python-flask" ,python-flask)
2580 ("python-pycrypto" ,python-pycrypto)
2581 ("python-pytz" ,python-pytz)))
2583 `(;; Optional dependency of Flask. Tests need it.
2584 ("python-blinker" ,python-blinker)
2585 ("python-mock" ,python-mock) ; For tests
2586 ("python-nose" ,python-nose))) ;for tests
2588 "https://www.github.com/flask-restful/flask-restful/")
2590 "Flask module for creating REST APIs")
2592 "This package contains a Flask module for creating REST APIs.")
2593 (license license:bsd-3)))
2595 (define-public python-flask-basicauth
2597 (name "python-flask-basicauth")
2602 (uri (pypi-uri "Flask-BasicAuth" version))
2605 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
2606 (build-system python-build-system)
2608 `(("python-flask" ,python-flask)))
2610 "https://github.com/jpvanhal/flask-basicauth")
2612 "HTTP basic access authentication for Flask")
2614 "This package provides HTTP basic access authentication for Flask.")
2615 (license license:bsd-3)))
2617 (define-public python-flask-htpasswd
2619 (name "python-flask-htpasswd")
2624 (uri (pypi-uri "flask-htpasswd" version))
2627 "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
2628 (build-system python-build-system)
2630 `(("python-flask" ,python-flask)
2631 ("python-itsdangerous" ,python-itsdangerous)
2632 ("python-passlib" ,python-passlib)
2633 ("python-tox" ,python-tox)))
2634 (home-page "https://github.com/carsongee/flask-htpasswd")
2635 (synopsis "Basic authentication via htpasswd files in Flask applications")
2636 (description "This package provides Basic authentication via
2637 @file{htpasswd} files and access_token authentication in Flask
2639 (license license:bsd-3)))
2641 (define-public python-flask-sqlalchemy
2643 (name "python-flask-sqlalchemy")
2647 (uri (pypi-uri "Flask-SQLAlchemy" version))
2650 "1rgsj49gnx361hnb3vn6c1h17497qh22yc3r70l1r6w0mw71bixz"))))
2651 (build-system python-build-system)
2653 `(("python-flask" ,python-flask)
2654 ("python-sqlalchemy" ,python-sqlalchemy)))
2655 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
2656 (synopsis "Module adding SQLAlchemy support to your Flask application")
2658 "This package adds SQLAlchemy support to your Flask application.")
2659 (license license:bsd-3)))
2661 (define-public python-flask-restplus
2663 (name "python-flask-restplus")
2668 (uri (pypi-uri "flask-restplus" version))
2671 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2672 (build-system python-build-system)
2674 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2676 ;; (modify-phases %standard-phases
2679 ;; (invoke "nosetests")
2682 `(("python-aniso8601" ,python-aniso8601)
2683 ("python-flask" ,python-flask)
2684 ("python-jsonschema" ,python-jsonschema)
2685 ("python-pytz" ,python-pytz)
2686 ("python-six" ,python-six)))
2688 `(("python-tzlocal" ,python-tzlocal)
2689 ("python-blinker" ,python-blinker)
2690 ("python-nose" ,python-nose)
2691 ("python-rednose" ,python-rednose)))
2692 (home-page "https://github.com/noirbizarre/flask-restplus")
2693 (synopsis "Framework for documented API development with Flask")
2694 (description "This package provides a framework for API development with
2695 the Flask web framework in Python. It is similar to package
2696 @code{python-flask-restful} but supports the @code{python-swagger}
2697 documentation builder.")
2698 (license license:expat)))
2700 (define-public python-flask-restful-swagger
2702 (name "python-flask-restful-swagger")
2707 (uri (pypi-uri "flask-restful-swagger" version))
2710 "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
2711 (build-system python-build-system)
2712 (arguments '(#:tests? #f)) ;no tests
2714 `(("python-flask-restful" ,python-flask-restful)))
2715 (home-page "https://github.com/rantav/flask-restful-swagger")
2716 (synopsis "Extract Swagger specs from Flask-Restful projects")
2717 (description "This package lets you extract Swagger API documentation
2718 specs from your Flask-Restful projects.")
2719 (license license:expat)))
2721 (define-public python2-flask-restful-swagger
2722 (package-with-python2 python-flask-restful-swagger))
2724 (define-public python-htmlmin
2726 (name "python-htmlmin")
2731 (uri (pypi-uri "htmlmin" version))
2734 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
2736 `(#:tests? #f)) ; no tests
2737 (build-system python-build-system)
2738 (home-page "https://htmlmin.readthedocs.org/en/latest/")
2739 (synopsis "HTML minifier")
2740 (description "@code{htmlmin} is an HTML minifier that just works.
2741 It comes with safe defaults and easily configurable options.")
2742 (license license:bsd-3)))
2744 (define-public python2-htmlmin
2745 (package-with-python2 python-htmlmin))
2747 (define-public python-flask-htmlmin
2749 (name "python-flask-htmlmin")
2754 (uri (pypi-uri "Flask-HTMLmin" version))
2757 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
2759 `(("python-flask" ,python-flask)
2760 ("python-htmlmin" ,python-htmlmin)))
2761 (build-system python-build-system)
2762 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
2763 (synopsis "HTML response minifier for Flask")
2765 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
2766 (license license:bsd-3)))
2768 (define-public python2-flask-htmlmin
2769 (package-with-python2 python-flask-htmlmin))
2771 (define-public python-jsmin
2773 (name "python-jsmin")
2778 (uri (pypi-uri "jsmin" version))
2781 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
2782 (build-system python-build-system)
2783 (home-page "https://github.com/tikitu/jsmin/")
2784 (synopsis "Python JavaScript minifier")
2786 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
2787 on the command line.")
2788 (license license:expat)))
2790 (define-public python-flask-login
2792 (name "python-flask-login")
2798 (url "https://github.com/maxcountryman/flask-login")
2800 (file-name (git-file-name name version))
2802 (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
2803 (build-system python-build-system)
2805 `(("python-flask" ,python-flask)))
2808 `(("python-blinker" ,python-blinker)
2809 ("python-coverage" ,python-coverage)
2810 ("python-mock" ,python-mock)
2811 ("python-pycodestyle" ,python-pycodestyle)
2812 ("python-pyflakes" ,python-pyflakes)
2813 ("python-pytest" ,python-pytest)
2814 ("python-semantic-version" ,python-semantic-version)
2815 ("python-werkzeug" ,python-werkzeug)))
2816 (home-page "https://github.com/maxcountryman/flask-login")
2817 (synopsis "User session management for Flask")
2819 "@code{Flask-Login} provides user session management for Flask. It
2820 handles the common tasks of logging in, logging out, and remembering your
2821 users' sessions over extended periods of time.")
2822 (license license:expat)))
2824 (define-public python2-flask-login
2825 (package-with-python2 python-flask-login))
2827 (define-public python-oauth2client
2829 (name "python-oauth2client")
2834 (uri (pypi-uri "oauth2client" version))
2837 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
2838 (build-system python-build-system)
2842 `(("python-httplib2" ,python-httplib2)
2843 ("python-pyasn1" ,python-pyasn1)
2844 ("python-pyasn1-modules" ,python-pyasn1-modules)
2845 ("python-rsa" ,python-rsa)
2846 ("python-six" ,python-six)))
2847 (home-page "https://github.com/google/oauth2client/")
2848 (synopsis "OAuth 2.0 client library")
2849 (description "@code{python-oauth2client} provides an OAuth 2.0 client
2850 library for Python")
2851 (license license:asl2.0)))
2853 (define-public python2-oauth2client
2854 (package-with-python2 python-oauth2client))
2856 (define-public python-flask-oidc
2858 (name "python-flask-oidc")
2863 (uri (pypi-uri "flask-oidc" version))
2866 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
2867 (build-system python-build-system)
2869 `(("python-flask" ,python-flask)
2870 ("python-itsdangerous" ,python-itsdangerous)
2871 ("python-oauth2client" ,python-oauth2client)
2872 ("python-six" ,python-six)))
2874 `(("python-nose" ,python-nose)
2875 ("python-mock" ,python-mock)))
2876 (home-page "https://github.com/puiterwijk/flask-oidc")
2877 (synopsis "OpenID Connect extension for Flask")
2878 (description "@code{python-flask-oidc} provides an OpenID Connect extension
2880 (license license:bsd-2)))
2882 (define-public python-webassets
2884 (name "python-webassets")
2889 (uri (pypi-uri "webassets" version))
2892 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
2893 (build-system python-build-system)
2895 `(("python-jinja2" ,python-jinja2)
2896 ("python-mock" ,python-mock)
2897 ("python-nose" ,python-nose)
2898 ("python-pytest" ,python-pytest)))
2899 (home-page "https://github.com/miracle2k/webassets")
2900 (synopsis "Media asset management")
2901 (description "Merges, minifies and compresses Javascript and CSS files,
2902 supporting a variety of different filters, including YUI, jsmin, jspacker or
2903 CSS tidy. Also supports URL rewriting in CSS files.")
2904 (license license:bsd-2)))
2906 (define-public python-cssmin
2908 (name "python-cssmin")
2913 (uri (pypi-uri "cssmin" version))
2916 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
2917 (build-system python-build-system)
2918 (home-page "https://github.com/zacharyvoase/cssmin")
2919 (synopsis "Python port of the YUI CSS Compressor")
2920 (description "Python port of the YUI CSS Compressor.")
2921 (license (list license:expat license:bsd-3))))
2923 (define-public python2-cssmin
2924 (package-with-python2 python-cssmin))
2926 (define-public python-elasticsearch
2928 (name "python-elasticsearch")
2933 (uri (pypi-uri "elasticsearch" version))
2936 "0rnjvlhw4v3vg14l519qliy1s1zpmx3827q0xfviwvk42rr7hh01"))))
2937 (build-system python-build-system)
2939 `(("python-mock" ,python-mock)
2940 ("python-nosexcover" ,python-nosexcover)
2941 ("python-pyaml" ,python-pyaml)
2942 ("python-requests" ,python-requests)))
2944 `(("urllib3" ,python-urllib3)))
2946 ;; tests require the test_elasticsearch module but it is not distributed.
2948 (home-page "https://github.com/elastic/elasticsearch-py")
2949 (synopsis "Low-level client for Elasticsearch")
2950 (description "Official low-level client for Elasticsearch. Its goal is to
2951 provide common ground for all Elasticsearch-related code in Python; because of
2952 this it tries to be opinion-free and very extendable.")
2953 (license license:expat)))
2955 (define-public python2-elasticsearch
2956 (package-with-python2 python-elasticsearch))
2958 (define-public python-flask-script
2960 (name "python-flask-script")
2965 (uri (pypi-uri "Flask-Script" version))
2968 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
2969 (build-system python-build-system)
2972 (modify-phases %standard-phases
2973 (add-after 'unpack 'patch-tests
2975 (substitute* "tests.py"
2976 (("flask\\.ext\\.script") "flask_script"))
2979 `(("python-flask" ,python-flask)
2980 ("python-argcomplete" ,python-argcomplete)
2981 ("python-werkzeug" ,python-werkzeug)))
2983 `(("python-pytest" ,python-pytest)))
2985 "https://github.com/smurfix/flask-script")
2986 (synopsis "Scripting support for Flask")
2987 (description "The Flask-Script extension provides support for writing
2988 external scripts in Flask. This includes running a development server,
2989 a customised Python shell, scripts to set up your database, cronjobs,
2990 and other command-line tasks that belong outside the web application
2992 (license license:bsd-3)))
2994 (define-public python2-flask-script
2995 (package-with-python2 python-flask-script))
2997 (define-public python-flask-migrate
2999 (name "python-flask-migrate")
3004 (uri (pypi-uri "Flask-Migrate" version))
3007 "1vip9ww6l18dxffjsggm83k71zkvihxpnhaswpv8klh95s6517d6"))))
3008 (build-system python-build-system)
3010 `(("python-flask" ,python-flask)
3011 ("python-alembic" ,python-alembic)
3012 ("python-sqlalchemy" ,python-sqlalchemy)
3013 ("python-flask-script" ,python-flask-script)
3014 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
3015 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
3016 (synopsis "SQLAlchemy database migrations for Flask programs using
3018 (description "This package contains SQLAlchemy database migration tools
3019 for Flask programs that are using @code{python-alembic}.")
3020 (license license:expat)))
3022 (define-public python-genshi
3024 (name "python-genshi")
3030 (url "https://github.com/edgewall/genshi")
3032 (file-name (git-file-name name version))
3034 (base32 "04bw7nd4wyn8ixnhik57hny2xpjjpn80k5hp6691inix5gc6rxaf"))))
3035 (build-system python-build-system)
3036 (home-page "https://genshi.edgewall.org/")
3037 (synopsis "Toolkit for generation of output for the web")
3038 (description "Genshi is a Python library that provides an integrated set
3039 of components for parsing, generating, and processing HTML, XML or other
3040 textual content for output generation on the web.")
3041 (license license:bsd-3)))
3043 (define-public python2-genshi
3044 (package-with-python2 python-genshi))
3046 (define-public python-flask-principal
3048 (name "python-flask-principal")
3053 (uri (pypi-uri "Flask-Principal" version))
3056 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
3057 (build-system python-build-system)
3059 `(("python-blinker" ,python-blinker)))
3061 `(("python-flask" ,python-flask)
3062 ("python-nose" ,python-nose)))
3063 (home-page "https://pythonhosted.org/Flask-Principal/")
3064 (synopsis "Identity management for Flask")
3065 (description "@code{flask_principal} is a identity management library for
3066 Flask. It supports managing both authentication and authorization data in a
3067 thread-local variable.")
3068 (license license:expat)))
3070 (define-public python2-flask-principal
3071 (package-with-python2 python-flask-principal))
3073 (define-public python-flask-httpauth
3075 (name "python-flask-httpauth")
3080 (uri (pypi-uri "Flask-HTTPAuth" version))
3083 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
3084 (build-system python-build-system)
3086 `(("python-flask" ,python-flask)))
3087 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
3088 (synopsis "Basic and Digest HTTP authentication for Flask routes")
3089 (description "@code{flask_httpauth} provides Basic and Digest HTTP
3090 authentication for Flask routes.")
3091 (license license:expat)))
3093 (define-public python2-flask-httpauth
3094 (package-with-python2 python-flask-httpauth))
3096 (define-public python-uritemplate
3098 (name "python-uritemplate")
3103 (uri (pypi-uri "uritemplate" version))
3106 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
3107 (build-system python-build-system)
3108 (home-page "https://uritemplate.readthedocs.org")
3109 (synopsis "Library to deal with URI Templates")
3110 (description "@code{uritemplate} provides Python library to deal with URI
3112 (license license:bsd-2)))
3114 (define-public python2-uritemplate
3115 (package-with-python2 python-uritemplate))
3117 (define-public python-publicsuffix
3119 (name "python-publicsuffix")
3123 (uri (pypi-uri "publicsuffix" version))
3126 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
3127 (build-system python-build-system)
3129 `(#:tests? #f)) ; tests use the internet
3130 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
3131 (synopsis "Get suffix for a domain name")
3132 (description "Get a public suffix for a domain name using the Public Suffix
3134 (license license:expat)))
3136 (define-public python2-publicsuffix
3137 (package-with-python2 python-publicsuffix))
3139 (define-public python-publicsuffix2
3141 (name "python-publicsuffix2")
3142 (version "2.20191221")
3146 (uri (pypi-uri "publicsuffix2" version))
3148 (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
3149 (build-system python-build-system)
3152 (modify-phases %standard-phases
3153 (add-after 'unpack 'ignore-maintainer-inputs
3155 ;; Comment out a demand for python-requests, which is used only by
3156 ;; the unused ‘update_psl’ helper command.
3157 (substitute* "setup.py"
3158 (("'requests " match)
3159 (format #f "# ~a" match)))
3161 #:tests? #f)) ; the test suite requires network access
3162 (home-page "https://github.com/pombredanne/python-publicsuffix2")
3163 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
3164 (description "Get a public suffix for a domain name using the Public Suffix
3165 List. Forked from and using the same API as the publicsuffix package.")
3166 (license (list license:expat license:mpl2.0))))
3168 (define-public python2-publicsuffix2
3169 (package-with-python2 python-publicsuffix2))
3171 (define-public python-werkzeug
3173 (name "python-werkzeug")
3178 (uri (pypi-uri "Werkzeug" version))
3181 "15kh0z61klp62mrc1prka13xsshxn0rsp1j1s2964iw86yisi6qn"))))
3182 (build-system python-build-system)
3185 (modify-phases %standard-phases
3187 (add-after 'install 'check
3188 (lambda* (#:key inputs outputs #:allow-other-keys)
3189 (add-installed-pythonpath inputs outputs)
3190 (invoke "python" "-m" "pytest"))))))
3192 `(("python-requests" ,python-requests)))
3194 `(("python-pytest" ,python-pytest)
3195 ("python-pytest-timeout" ,python-pytest-timeout)))
3196 (home-page "https://www.palletsprojects.org/p/werkzeug/")
3197 (synopsis "Utilities for WSGI applications")
3198 (description "One of the most advanced WSGI utility modules. It includes a
3199 powerful debugger, full-featured request and response objects, HTTP utilities to
3200 handle entity tags, cache control headers, HTTP dates, cookie handling, file
3201 uploads, a powerful URL routing system and a bunch of community-contributed
3203 (license license:x11)))
3205 (define-public python2-werkzeug
3206 (package-with-python2 python-werkzeug))
3208 (define-public python-bottle
3210 (name "python-bottle")
3215 (uri (pypi-uri "bottle" version))
3218 "17pn43kzr7m6czjbm4nda7kzs4ap9mmb30qfbhifyzas2i5vf688"))))
3219 (build-system python-build-system)
3220 (home-page "http://bottlepy.org/")
3221 (synopsis "WSGI framework for small web-applications.")
3222 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
3223 (license license:expat)))
3225 (define-public python2-bottle
3226 (package-with-python2 python-bottle))
3228 (define-public python-wtforms
3230 (name "python-wtforms")
3235 (uri (pypi-uri "WTForms" version ".zip"))
3238 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
3239 (build-system python-build-system)
3242 (modify-phases %standard-phases
3243 (add-after 'unpack 'remove-django-test
3244 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
3248 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
3249 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
3252 `(("unzip" ,unzip)))
3253 (home-page "http://wtforms.simplecodes.com/")
3255 "Form validation and rendering library for Python web development")
3257 "WTForms is a flexible forms validation and rendering library
3258 for Python web development. It is very similar to the web form API
3259 available in Django, but is a standalone package.")
3260 (license license:bsd-3)))
3262 (define-public python2-wtforms
3263 (package-with-python2 python-wtforms))
3265 (define-public python-paste
3267 (name "python-paste")
3272 (uri (pypi-uri "Paste" version))
3275 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
3276 (patches (search-patches "python-paste-remove-timing-test.patch"))
3277 (modules '((guix build utils)))
3280 ;; This test calls out to the internet.
3281 (delete-file "tests/test_proxy.py") #t))))
3282 (build-system python-build-system)
3284 `(("python-pytest" ,python-pytest)
3285 ("python-pytest-runner" ,python-pytest-runner)
3286 ("python-nose" ,python-nose)))
3288 `(("python-six" ,python-six)))
3289 (home-page "https://pythonpaste.readthedocs.io/")
3291 "Python web development tools, focusing on WSGI")
3293 "Paste provides a variety of web development tools and middleware which
3294 can be nested together to build web applications. Paste's design closely
3295 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
3296 (license license:expat)))
3298 (define-public python2-paste
3299 (package-with-python2 python-paste))
3301 (define-public python-pastescript
3303 (name "python-pastescript")
3308 (uri (pypi-uri "PasteScript" version))
3311 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
3312 (build-system python-build-system)
3314 `(("python-nose" ,python-nose)))
3316 `(("python-paste" ,python-paste)
3317 ("python-pastedeploy" ,python-pastedeploy)))
3318 (home-page (string-append "https://web.archive.org/web/20161025192515/"
3319 "http://pythonpaste.org/script/"))
3321 '(;; Unfortunately, this requires the latest unittest2,
3322 ;; but that requires traceback2 which requires linecache2 which requires
3323 ;; unittest2. So we're skipping tests for now.
3324 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
3325 ;; so in theory we could get around this situation somehow.)
3328 "Pluggable command line tool for serving web applications and more")
3330 "PasteScript is a plugin-friendly command line tool which provides a
3331 variety of features, from launching web applications to bootstrapping project
3333 (license license:expat)))
3335 (define-public python2-pastescript
3336 (package-with-python2 python-pastescript))
3338 (define-public python2-urlgrabber
3340 (name "python2-urlgrabber")
3345 (uri (pypi-uri "urlgrabber" version))
3347 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
3348 (build-system python-build-system)
3349 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
3350 (home-page "http://urlgrabber.baseurl.org")
3351 (synopsis "High-level cross protocol url-grabber")
3352 (description "@code{urlgrabber} is Python2 library that unifies access to
3353 files available on web, FTP or locally. It supports HTTP, FTP and file://
3354 protocols, it supports features like HTTP keep-alive, reget, throttling and
3356 (license license:lgpl2.1+)))
3358 (define-public python-pycares
3360 (name "python-pycares")
3365 (uri (pypi-uri "pycares" version))
3368 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
3369 (build-system python-build-system)
3371 `(#:tests? #f)) ;tests require internet access
3372 (home-page "https://github.com/saghul/pycares")
3373 (synopsis "Python interface for @code{c-ares}")
3374 (description "@code{pycares} is a Python module which provides an
3375 interface to @code{c-ares}, a C library that performs DNS requests and
3376 name resolutions asynchronously.")
3377 (license license:expat)))
3379 (define-public python-yarl
3381 (name "python-yarl")
3386 (uri (pypi-uri "yarl" version))
3389 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
3390 (build-system python-build-system)
3392 `(("python-pytest" ,python-pytest)
3393 ("python-pytest-runner" ,python-pytest-runner)))
3395 `(("python-idna" ,python-idna)
3396 ("python-multidict" ,python-multidict)))
3397 (home-page "https://github.com/aio-libs/yarl/")
3398 (synopsis "Yet another URL library")
3399 (description "@code{yarl} module provides handy @code{URL} class
3400 for URL parsing and changing.")
3401 (license license:asl2.0)))
3403 (define-public python-google-api-client
3405 (name "python-google-api-client")
3410 (uri (pypi-uri "google-api-python-client" version))
3413 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
3414 (build-system python-build-system)
3416 '(#:tests? #f)) ; tests require internet access
3418 `(("python-httplib2" ,python-httplib2)
3419 ("python-six" ,python-six)
3420 ("python-oauth2client" ,python-oauth2client)
3421 ("python-uritemplate" ,python-uritemplate)))
3422 (home-page "https://github.com/google/google-api-python-client")
3423 (synopsis "Core Python library for accessing Google APIs")
3424 (description "Python client library for Google's discovery based APIs")
3425 (license license:asl2.0)))
3427 (define-public python2-google-api-client
3428 (package-with-python2 python-google-api-client))
3430 (define-public python-hawkauthlib
3432 (name "python-hawkauthlib")
3437 (uri (pypi-uri "hawkauthlib" version))
3440 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
3441 (build-system python-build-system)
3443 `(("python-requests" ,python-requests)
3444 ("python-webob" ,python-webob)))
3445 (home-page "https://github.com/mozilla-services/hawkauthlib")
3446 (synopsis "Hawk Access Authentication protocol")
3448 "This is a low-level Python library for implementing Hawk Access Authentication,
3449 a simple HTTP request-signing scheme.")
3450 (license license:mpl2.0)))
3452 (define-public python-pybrowserid
3454 (name "python-pybrowserid")
3459 (uri (pypi-uri "PyBrowserID" version))
3462 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
3463 (build-system python-build-system)
3465 `(("python-requests" ,python-requests)))
3467 `(("python-mock" ,python-mock)))
3468 (home-page "https://github.com/mozilla/PyBrowserID")
3469 (synopsis "Python library for the BrowserID protocol")
3471 "This is a Python client library for the BrowserID protocol that
3472 underlies Mozilla Persona.")
3473 (license license:mpl2.0)))
3475 (define-public python-pyfxa
3477 (name "python-pyfxa")
3482 (uri (pypi-uri "PyFxA" version))
3485 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
3486 (build-system python-build-system)
3487 (arguments '(#:tests? #f)) ; 17 tests require network access
3489 `(("python-cryptography" ,python-cryptography)
3490 ("python-hawkauthlib" ,python-hawkauthlib)
3491 ("python-pybrowserid" ,python-pybrowserid)
3492 ("python-requests" ,python-requests)
3493 ("python-six" ,python-six)))
3495 `(("python-grequests" ,python-grequests)
3496 ("python-mock" ,python-mock)
3497 ("python-responses" ,python-responses)
3498 ("python-unittest2" ,python-unittest2)))
3499 (home-page "https://github.com/mozilla/PyFxA")
3500 (synopsis "Firefox Accounts client library for Python")
3502 "This is a Python library for interacting with the Firefox Accounts
3504 (license license:mpl2.0)))
3506 (define-public python-hyperlink
3508 (name "python-hyperlink")
3513 (uri (pypi-uri "hyperlink" version))
3516 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
3517 (build-system python-build-system)
3519 `(("python-idna" ,python-idna)))
3520 (home-page "https://github.com/python-hyper/hyperlink")
3521 (synopsis "Python module to create immutable URLs according to spec")
3522 (description "This package provides a Python module to create immutable, and
3523 correct URLs for Python according to RFCs 3986 and 3987.")
3524 (license license:expat)))
3526 (define-public python-treq
3528 (name "python-treq")
3533 (uri (pypi-uri "treq" version))
3536 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
3537 (build-system python-build-system)
3539 `(("python-attrs" ,python-attrs)
3540 ("python-idna" ,python-idna)
3541 ("python-incremental" ,python-incremental)
3542 ("python-requests" ,python-requests)
3543 ("python-service-identity" ,python-service-identity)
3544 ("python-twisted" ,python-twisted)))
3545 (home-page "https://github.com/twisted/treq")
3546 (synopsis "Requests-like API built on top of twisted.web's Agent")
3547 (description "This package provides an HTTP library inspired by
3548 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
3549 high level API for making HTTP requests when using Twisted.")
3550 (license license:expat)))
3552 (define-public python-autobahn
3554 (name "python-autobahn")
3559 (uri (pypi-uri "autobahn" version))
3562 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
3563 (build-system python-build-system)
3565 ;; The tests fail to run:
3566 ;; https://github.com/crossbario/autobahn-python/issues/1117
3569 `(("python-cffi" ,python-cffi)
3570 ("python-twisted" ,python-twisted)
3571 ("python-txaio" ,python-txaio)))
3572 (home-page "https://crossbar.io/autobahn/")
3573 (synopsis "Web Application Messaging Protocol implementation")
3574 (description "This package provides an implementation of the @dfn{Web Application
3575 Messaging Protocol} (WAMP). WAMP connects components in distributed
3576 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
3577 Calls (rRPC). It is ideal for distributed, multi-client and server applications
3578 such as IoT applications or multi-user database-driven business applications.")
3579 (license license:expat)))
3581 (define-public python-ws4py
3583 (name "python-ws4py")
3588 (uri (pypi-uri "ws4py" version))
3591 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
3592 (build-system python-build-system)
3595 (modify-phases %standard-phases
3596 (add-after 'unpack 'python3.7-compatibility
3598 (substitute* '("ws4py/server/tulipserver.py"
3599 "ws4py/async_websocket.py")
3601 "asyncio.ensure_future"))
3603 ;; We don't have a package for cherrypy.
3604 (add-after 'unpack 'remove-cherrypy-support
3606 (delete-file "ws4py/server/cherrypyserver.py")
3609 `(("python-gevent" ,python-gevent)
3610 ("python-tornado" ,python-tornado)))
3611 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
3612 (synopsis "WebSocket client and server library")
3614 "This package provides a WebSocket client and server library for
3616 (license license:bsd-3)))
3618 (define-public python-slugify
3620 (name "python-slugify")
3625 (uri (pypi-uri "python-slugify" version))
3627 (base32 "0w22fapghmzk3xdasc4dn7h8sl58l08d1h5zbf72dh80drv1g9b9"))))
3629 `(("python-unidecode" ,python-unidecode)))
3632 (modify-phases %standard-phases
3635 (invoke "python" "test.py"))))))
3636 (build-system python-build-system)
3637 (home-page "https://github.com/un33k/python-slugify")
3638 (synopsis "Python Slugify application that handles Unicode")
3639 (description "This package provides a @command{slufigy} command and
3640 library to create slugs from unicode strings while keeping it DRY.")
3641 (license license:expat)))
3643 (define-public python-branca
3645 (name "python-branca")
3650 (uri (pypi-uri "branca" version))
3653 "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
3654 (build-system python-build-system)
3656 `(("python-jinja2" ,python-jinja2)
3657 ("python-six" ,python-six)))
3659 `(("python-pytest" ,python-pytest)))
3660 (home-page "https://github.com/python-visualization/branca")
3661 (synopsis "Generate complex HTML+JS pages with Python")
3662 (description "Generate complex HTML+JS pages with Python")
3663 (license license:expat)))
3665 (define-public python-tinycss2
3667 (name "python-tinycss2")
3672 (uri (pypi-uri "tinycss2" version))
3673 (patches (search-patches "python-tinycss2-flake8-compat.patch"))
3675 (base32 "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4"))))
3676 (build-system python-build-system)
3679 (modify-phases %standard-phases
3681 (lambda _ (invoke "pytest"))))))
3683 `(("python-webencodings" ,python-webencodings)))
3685 `(("python-pytest-flake8" ,python-pytest-flake8)
3686 ("python-pytest-isort" ,python-pytest-isort)
3687 ("python-pytest-runner" ,python-pytest-runner)))
3688 (home-page "https://tinycss2.readthedocs.io/")
3689 (synopsis "Low-level CSS parser for Python")
3690 (description "@code{tinycss2} can parse strings, return Python objects
3691 representing tokens and blocks, and generate CSS strings corresponding to
3694 Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
3695 grammar of CSS but doesn’t know specific rules, properties or values supported
3696 in various CSS modules.")
3697 (license license:bsd-3)))
3699 (define-public python-cssselect2
3701 (name "python-cssselect2")
3706 (uri (pypi-uri "cssselect2" version))
3708 (base32 "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h"))))
3709 (build-system python-build-system)
3712 (modify-phases %standard-phases
3714 (lambda _ (invoke "pytest"))))))
3716 `(("python-tinycss2" ,python-tinycss2)))
3718 `(("python-pytest-cov" ,python-pytest-cov)
3719 ("python-pytest-flake8" ,python-pytest-flake8)
3720 ("python-pytest-isort" ,python-pytest-isort)
3721 ("python-pytest-runner" ,python-pytest-runner)))
3722 (home-page "https://cssselect2.readthedocs.io/")
3723 (synopsis "CSS selectors for Python ElementTree")
3724 (description "@code{cssselect2} is a straightforward implementation of
3725 CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
3726 ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
3728 Unlike the Python package @code{cssselect}, it does not translate selectors to
3729 XPath and therefore does not have all the correctness corner cases that are
3730 hard or impossible to fix in cssselect.")
3731 (license license:bsd-3)))
3733 (define-public gunicorn
3740 (uri (pypi-uri "gunicorn" version))
3743 "09n6fc019bgrvph1s5h1lwhn2avcsprw6ncd203qhra3i8mvn10r"))))
3744 (outputs '("out" "doc"))
3745 (build-system python-build-system)
3748 (modify-phases %standard-phases
3749 (add-after 'build 'build-doc
3751 (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
3752 (delete-file "docs/build/texinfo/Makefile")
3753 (delete-file "docs/build/texinfo/Gunicorn.texi")
3757 (setenv "PYTHONPATH"
3758 (string-append ".:" (getenv "PYTHONPATH")))
3760 (add-after 'install 'install-doc
3761 (lambda* (#:key outputs #:allow-other-keys)
3762 (let* ((doc (string-append (assoc-ref outputs "doc")
3763 "/share/doc/" ,name "-" ,version))
3764 (html (string-append doc "/html"))
3765 (info (string-append doc "/info"))
3766 (examples (string-append doc "/examples")))
3770 (copy-recursively "docs/build/html" html)
3771 (copy-recursively "docs/build/texinfo" info)
3772 (copy-recursively "examples" examples)
3773 (for-each (lambda (file)
3774 (copy-file file (string-append doc "/" file)))
3775 '("README.rst" "NOTICE" "LICENSE" "THANKS")))
3778 `(("binutils" ,binutils) ;; for ctypes.util.find_library()
3779 ("python-aiohttp", python-aiohttp)
3780 ("python-pytest" ,python-pytest)
3781 ("python-pytest-cov" ,python-pytest-cov)
3782 ("python-sphinx" ,python-sphinx)
3783 ("texinfo" ,texinfo)))
3784 (home-page "https://gunicorn.org/")
3785 (synopsis "Python WSGI HTTP Server for UNIX")
3786 (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
3787 Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
3788 Unicorn project. The Gunicorn server is broadly compatible with
3789 various web frameworks, simply implemented, light on server resources,
3790 and fairly speedy.")
3791 (license license:expat)))
3793 ;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
3795 (define-public gunicorn-bootstrap
3799 (arguments `(#:tests? #f))
3800 (properties '((hidden? . #t)))
3801 (native-inputs `())))
3803 (define-public python-translation-finder
3805 (name "python-translation-finder")
3810 (uri (pypi-uri "translation-finder" version))
3813 "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
3814 (build-system python-build-system)
3817 (modify-phases %standard-phases
3818 (add-before 'build 'remove-failing-test
3820 (delete-file "translation_finder/test_api.py")
3823 `(("python-chardet" ,python-chardet)
3824 ("python-pathlib2" ,python-pathlib2)
3825 ("python-ruamel.yaml" ,python-ruamel.yaml)
3826 ("python-six" ,python-six)))
3828 `(("python-codecov" ,python-codecov)
3829 ("python-codacy-coverage" ,python-codacy-coverage)
3830 ("python-pytest-cov" ,python-pytest-cov)
3831 ("python-pytest-runner" ,python-pytest-runner)
3832 ("python-twine" ,python-twine)))
3833 (home-page "https://weblate.org/")
3834 (synopsis "Translation file finder for Weblate")
3835 (description "This package provides a function to find translation file in
3836 the source code of a project. It supports many translation file formats and
3837 is part of the Weblate translation platform.")
3838 (license license:gpl3+)))
3840 (define-public python-gitlab
3842 (name "python-gitlab")
3847 (uri (pypi-uri "python-gitlab" version))
3850 "0zl6kz8v8cg1bcy2r78b2snb0lpw0b573gdx2x1ps0nhsh75l4j5"))))
3851 (build-system python-build-system)
3853 `(("python-requests" ,python-requests)
3854 ("python-six" ,python-six)))
3856 `(("python-httmock" ,python-httmock)
3857 ("python-mock" ,python-mock)))
3859 "https://github.com/python-gitlab/python-gitlab")
3860 (synopsis "Interact with GitLab API")
3861 (description "This package provides an extended library for interacting
3862 with GitLab instances through their API.")
3863 (license license:lgpl3+)))
3865 (define-public python-path-and-address
3867 (name "python-path-and-address")
3871 ;; The source distributed on PyPI doesn't include tests.
3874 (url "https://github.com/joeyespo/path-and-address")
3875 (commit (string-append "v" version))))
3876 (file-name (git-file-name name version))
3879 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
3880 (build-system python-build-system)
3883 (modify-phases %standard-phases
3885 (lambda* (#:key inputs outputs #:allow-other-keys)
3886 (add-installed-pythonpath inputs outputs)
3887 (invoke "py.test"))))))
3889 `(("python-pytest" ,python-pytest)))
3890 (home-page "https://github.com/joeyespo/path-and-address")
3891 (synopsis "Functions for command-line server tools used by humans")
3892 (description "Path-and-address resolves ambiguities of command-line
3893 interfaces, inferring which argument is the path, and which is the address.")
3894 (license license:expat)))
3897 ;; No release by upstream for quite some time, some bugs fixed since. See:
3898 ;; https://github.com/joeyespo/grip/issues/304
3899 (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
3902 (version (git-version "4.5.2" "1" commit))
3907 (url "https://github.com/joeyespo/grip")
3909 (file-name (git-file-name name version))
3912 "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
3913 (build-system python-build-system)
3915 `(("python-docopt" ,python-docopt)
3916 ("python-flask" ,python-flask)
3917 ("python-markdown" ,python-markdown)
3918 ("python-path-and-address" ,python-path-and-address)
3919 ("python-pygments" ,python-pygments)
3920 ("python-requests" ,python-requests)))
3922 `(("python-pytest" ,python-pytest)
3923 ("python-responses" ,python-responses)))
3926 (modify-phases %standard-phases
3928 (lambda* (#:key inputs outputs #:allow-other-keys)
3929 (add-installed-pythonpath inputs outputs)
3930 (setenv "PATH" (string-append
3932 (assoc-ref %outputs "out") "/bin"))
3933 (invoke "py.test" "-m" "not assumption"))))))
3934 (home-page "https://github.com/joeyespo/grip")
3935 (synopsis "Preview Markdown files using the GitHub API")
3936 (description "Grip is a command-line server application written in Python
3937 that uses the GitHub Markdown API to render a local Markdown file. The styles
3938 and rendering come directly from GitHub, so you'll know exactly how it will
3939 appear. Changes you make to the file will be instantly reflected in the browser
3940 without requiring a page refresh.")
3941 (license license:expat))))
3943 (define-public python-port-for
3945 (name "python-port-for")
3950 (uri (pypi-uri "port-for" version))
3953 "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
3954 (build-system python-build-system)
3957 (modify-phases %standard-phases
3958 (add-after 'unpack 'use-urllib3
3960 (substitute* "port_for/_download_ranges.py"
3961 (("urllib2") "urllib3"))
3964 `(("python-urllib3" ,python-urllib3)))
3966 `(("python-mock" ,python-mock)))
3967 (home-page "https://github.com/kmike/port-for/")
3968 (synopsis "TCP localhost port finder and association manager")
3970 "This package provides a utility that helps with local TCP ports
3971 management. It can find an unused TCP localhost port and remember the
3973 (license license:expat)))
3975 (define-public python-livereload
3977 (name "python-livereload")
3982 (uri (pypi-uri "livereload" version))
3985 "0rhggz185bxc3zjnfpmhcvibyzi86i624za1lfh7x7ajsxw4y9c9"))))
3986 (build-system python-build-system)
3988 `(("python-six" ,python-six)
3989 ("python-tornado" ,python-tornado)))
3990 (home-page "https://github.com/lepture/python-livereload")
3991 (synopsis "Python LiveReload")
3993 "Python LiveReload provides a command line utility, @command{livereload},
3994 for starting a web server in a directory. It can trigger arbitrary commands
3995 and serve updated contents upon changes to the directory.")
3996 (license license:bsd-3)))
3998 (define-public python-vf-1
4000 (name "python-vf-1")
4005 (uri (pypi-uri "VF-1" version))
4008 "0xlqsaxsiayk1sd07kpz8abbcnab582y29a1y4882fq6j4gma5xi"))))
4009 (build-system python-build-system)
4010 (home-page "https://github.com/solderpunk/VF-1")
4011 (synopsis "Command line gopher client")
4012 (description "@code{VF-1} is a command line gopher client with
4013 @acronym{TLS, Transport Layer Security} support.")
4014 (license license:bsd-2)))
4016 (define-public python-websockets
4018 (name "python-websockets")
4023 (uri (pypi-uri "websockets" version))
4026 "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw"))))
4027 (build-system python-build-system)
4028 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
4029 (home-page "https://github.com/aaugustin/websockets")
4031 "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
4033 "@code{websockets} is a library for building WebSocket servers and clients
4034 in Python with a focus on correctness and simplicity.
4036 Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
4037 it provides an elegant coroutine-based API.")
4038 (license license:bsd-3)))
4040 (define-public python-selenium
4042 (name "python-selenium")
4047 (uri (pypi-uri "selenium" version))
4050 "039hf9knvl4s3hp21bzwsp1g5ri9gxsh504dp48lc6nr1av35byy"))))
4051 (build-system python-build-system)
4053 `(("python-urllib3" ,python-urllib3)))
4055 "https://github.com/SeleniumHQ/selenium/")
4056 (synopsis "Python bindings for Selenium")
4057 (description "Selenium enables web browser automation.
4058 Selenium specifically provides infrastructure for the W3C WebDriver specification
4059 — a platform and language-neutral coding interface compatible with all
4060 major web browsers.")
4061 (license license:asl2.0)))
4063 (define-public python-rapidjson
4065 (name "python-rapidjson")
4070 (uri (pypi-uri "python-rapidjson" version))
4073 "18cl2dhx3gds5vg52jxmh9wjlbiy8dx06c3n482rfpdi9dzbv05d"))
4074 (modules '((guix build utils)))
4076 '(begin (delete-file-recursively "rapidjson") #t))))
4077 (build-system python-build-system)
4080 (list (string-append "--rj-include-dir="
4081 (assoc-ref %build-inputs "rapidjson")
4082 "/include/rapidjson"))
4084 (modify-phases %standard-phases
4086 (lambda* (#:key inputs #:allow-other-keys)
4087 (invoke "python" "setup.py" "build"
4088 (string-append "--rj-include-dir="
4089 (assoc-ref %build-inputs "rapidjson")
4090 "/include/rapidjson"))))
4092 (lambda* (#:key inputs outputs #:allow-other-keys)
4093 (add-installed-pythonpath inputs outputs)
4094 ;; Some tests are broken.
4095 (delete-file "tests/test_base_types.py")
4096 (delete-file "tests/test_validator.py")
4097 (invoke "python" "-m" "pytest" "tests"))))))
4099 `(("rapidjson" ,rapidjson)
4100 ("python-pytest" ,python-pytest)
4101 ("python-pytz" ,python-pytz)))
4102 (home-page "https://github.com/python-rapidjson/python-rapidjson")
4103 (synopsis "Python wrapper around rapidjson")
4104 (description "This package provides a python wrapper around rapidjson.")
4105 (license license:expat)))
4107 (define-public python-venusian
4109 (name "python-venusian")
4114 (uri (pypi-uri "venusian" version))
4116 (base32 "0f7f67dkgxxcjfhpdd5frb9pszkf04lyzzpn5069q0xi89r2p17n"))))
4117 (build-system python-build-system)
4119 `(("python-pytest" ,python-pytest)
4120 ("python-runner" ,python-pytest-runner)
4121 ("python-pytest-cov" ,python-pytest-cov)))
4122 (arguments '(#:test-target "pytest"))
4123 (home-page "https://docs.pylonsproject.org/projects/venusian")
4124 (synopsis "Library for defering decorator actions")
4126 "Venusian is a library which allows framework authors to defer decorator
4127 actions. Instead of taking actions when a function (or class) decorator is
4128 executed at import time, you can defer the action usually taken by the
4129 decorator until a separate scan phase.")
4130 (license license:repoze)))
4132 (define-public python-zope-deprecation
4134 (name "python-zope-deprecation")
4138 (uri (pypi-uri "zope.deprecation" version))
4141 "1pz2cv7gv9y1r3m0bdv7ks1alagmrn5msm5spwdzkb2by0w36i8d"))))
4142 (build-system python-build-system)
4144 (propagated-inputs `())
4145 (home-page "https://zopedeprecation.readthedocs.io/")
4146 (synopsis "Function for marking deprecations")
4147 (description "The @code{zope.deprecation} module provides a function for
4148 marking modules, classes, functions, methods and properties as deprecated,
4149 displaying warnings when usaged in application code.")
4150 (license license:zpl2.1)))
4152 (define-public python-translationstring
4154 (name "python-translationstring")
4158 (uri (pypi-uri "translationstring" version))
4161 "0bdpcnd9pv0131dl08h4zbcwmgc45lyvq3pa224xwan5b3x4rr2f"))))
4162 (build-system python-build-system)
4163 (home-page "http://docs.pylonsproject.org/projects/translationstring")
4164 (synopsis "Internationalization tooling for the Pylons project")
4165 (description "This package provides a library used by various Pylons
4166 project packages for internationalization (i18n) duties related to
4168 (license license:repoze)))
4170 (define-public python-plaster
4172 (name "python-plaster")
4176 (uri (pypi-uri "plaster" version))
4179 "1hy8k0nv2mxq94y5aysk6hjk9ryb4bsd13g83m60hcyzxz3wflc3"))))
4180 (build-system python-build-system)
4182 `(("python-pytest" ,python-pytest)))
4183 (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
4184 (synopsis "Configuration loader for multiple config file formats")
4186 "Plaster is a loader interface around multiple config file formats. It
4187 exists to define a common API for applications to use when they wish to load
4188 configuration. The library itself does not aim to handle anything except a
4189 basic API that applications may use to find and load configuration settings.
4190 Any specific constraints should be implemented in a pluggable loader which can
4191 be registered via an entrypoint.")
4192 (license license:repoze)))
4194 (define-public python-plaster-pastedeploy
4196 (name "python-plaster-pastedeploy")
4200 (uri (pypi-uri "plaster_pastedeploy" version))
4203 "1zg7gcsvc1kzay1ry5p699rg2qavfsxqwl17mqxzr0gzw6j9679r"))))
4204 (build-system python-build-system)
4206 `(("python-pytest" ,python-pytest)))
4208 `(("python-plaster" ,python-plaster)
4209 ("python-pastedeploy" ,python-pastedeploy)))
4210 (home-page "https://github.com/Pylons/plaster_pastedeploy")
4211 (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
4213 "This plugin for @code{python-plaster} adds support for PasteDeploy
4214 syntax, it provides a plaster @code{Loader} object that can parse ini files
4215 according to the standard set by PasteDeploy ")
4216 (license license:expat)))
4218 (define-public python-hupper
4220 (name "python-hupper")
4224 (uri (pypi-uri "hupper" version))
4227 "0am0p6g5cz6xmcaf04xq8q6dzdd9qz0phj6gcmpsckf2mcyza61q"))))
4228 (build-system python-build-system)
4229 (arguments '(#:test-target "pytest"))
4231 `(("python-pytest" ,python-pytest)
4232 ("python-pytest-runner" ,python-pytest-runner)
4233 ("python-watchdog" ,python-watchdog)
4234 ("python-mock" ,python-mock)
4235 ("python-pytest-cov" ,python-pytest-cov)))
4237 `(("python-pytz" ,python-pytz)))
4238 (home-page "https://readthedocs.org/projects/hupper")
4239 (synopsis "Integrated process monitor tracking changes to imported Python files")
4241 "Hupper is an integrated process monitor that will track changes to any
4242 imported Python files in sys.modules as well as custom paths. When files are
4243 changed the process is restarted.")
4244 (license license:expat)))
4246 (define-public python-pyramid
4248 (name "python-pyramid")
4252 (uri (pypi-uri "pyramid" version))
4255 "0rkxs1ajycg2zh1c94xlmls56mx5m161sn8112skj0amza6cn36q"))))
4256 (build-system python-build-system)
4258 `(("python-hupper" ,python-hupper)
4259 ("python-plaster-pastedeploy" ,python-plaster-pastedeploy)
4260 ("python-translationstring" ,python-translationstring)
4261 ("python-venusian" ,python-venusian)
4262 ("python-webob" ,python-webob)
4263 ("python-zope-deprecation" ,python-zope-deprecation)
4264 ("python-zope-interface" ,python-zope-interface)
4265 ("python-webtest" ,python-webtest)
4266 ("python-zope-component" ,python-zope-component)
4267 ("python-plaster" ,python-plaster)))
4268 (home-page "https://trypyramid.com/")
4269 (synopsis "Python web-framework suitable for small and large sites")
4271 "Pyramid makes it easy to write web applications. From minimal
4272 request/response web apps to larger, grown applications.")
4273 (license license:repoze)))
4275 (define-public python-random-user-agent
4277 (name "python-random-user-agent")
4282 (uri (pypi-uri "random_user_agent" version))
4285 "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
4286 (build-system python-build-system)
4287 (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
4288 (synopsis "List of user agents")
4290 "This package provides a list of user agents, from a collection of more
4291 than 326,000 known user-agents. Users can pick a random one, or select one
4293 (license license:expat)))
4295 (define-public python-flask-restx
4297 (name "python-flask-restx")
4300 ;; We fetch from the Git repo because there are no tests in the PyPI
4305 (url "https://github.com/python-restx/flask-restx")
4307 (file-name (git-file-name name version))
4309 (base32 "0xf2vkmdngp9cv9klznizai4byxjcf0iqh1pr4b83nann0jxqwy7"))))
4310 (build-system python-build-system)
4312 `(("python-aniso8601" ,python-aniso8601)
4313 ("python-flask" ,python-flask)
4314 ("python-jsonschema" ,python-jsonschema)
4315 ("python-pytz" ,python-pytz)))
4317 `(("python-blinker" ,python-blinker)
4318 ("python-faker" ,python-faker)
4319 ("python-pytest" ,python-pytest)
4320 ("python-pytest-benchmark"
4321 ,python-pytest-benchmark)
4322 ("python-pytest-flask" ,python-pytest-flask)
4323 ("python-pytest-mock" ,python-pytest-mock)))
4326 (modify-phases %standard-phases
4329 (invoke "pytest" "--benchmark-skip" "-k"
4330 ;; Those tests need internet access
4331 "not test_check and not test_valid_value_check"))))))
4332 (home-page "https://github.com/python-restx/flask-restx")
4334 "Framework for fast, easy and documented API development with Flask")
4336 "Flask-RESTX is an extension for Flask that adds support for quickly building
4337 REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
4338 with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
4339 decorators and tools to describe your API and expose its documentation properly using
4341 (license license:bsd-3)))
4343 (define-public python-manuel
4345 (name "python-manuel")
4350 (uri (pypi-uri "manuel" version))
4353 "1bdzay7j70fly5fy6wbdi8fbrxjrrlxnxnw226rwry1c8a351rpy"))))
4354 (build-system python-build-system)
4356 `(("python-six" ,python-six)))
4358 `(("python-zope-testing" ,python-zope-testing)))
4359 (home-page "https://pypi.org/project/manuel/")
4360 (synopsis "Build tested documentation")
4362 "Manuel lets you mix and match traditional doctests with custom test syntax.")
4363 (license license:asl2.0)))
4365 (define-public python-persistent
4367 (name "python-persistent")
4372 (uri (pypi-uri "persistent" version))
4375 "0imm9ji03lhkpcfmhid7x5209ix8g2rlgki9ik1qxks4b8sm8gzq"))))
4376 (build-system python-build-system)
4378 `(("python-cffi" ,python-cffi)
4379 ("python-zope-interface" ,python-zope-interface)))
4381 `(("python-manuel" ,python-manuel)
4382 ("python-zope-testrunner" ,python-zope-testrunner)))
4383 (home-page "https://github.com/zopefoundation/persistent/")
4384 (synopsis "Translucent persistent objects")
4385 (description "This package contains a generic persistence implementation for
4386 Python. It forms the core protocol for making objects interact
4387 \"transparently\" with a database such as the ZODB.")
4388 (license license:zpl2.1)))
4390 (define-public python-btrees
4392 (name "python-btrees")
4397 (uri (pypi-uri "BTrees" version))
4400 "0iiq0g9k1g6qgqq84q9h6639vlvzznk1rgdm0rfcnnqkbkmsbr3w"))))
4401 (build-system python-build-system)
4403 `(("python-persistent" ,python-persistent)
4404 ("python-zope-interface" ,python-zope-interface)))
4406 `(("python-persistent" ,python-persistent)
4407 ("python-transaction" ,python-transaction)
4408 ("python-zope-testrunner" ,python-zope-testrunner)))
4409 (home-page "https://github.com/zopefoundation/BTrees")
4410 (synopsis "Scalable persistent object containers")
4412 "This package contains a set of persistent object containers built around a
4413 modified BTree data structure. The trees are optimized for use inside ZODB's
4414 \"optimistic concurrency\" paradigm, and include explicit resolution of
4415 conflicts detected by that mechanism.")
4416 (license license:zpl2.1)))
4418 (define-public python-transaction
4420 (name "python-transaction")
4425 (uri (pypi-uri "transaction" version))
4428 "0bdaks31bgfh78wnj3sij24bfysmqk25crsis6amz8kzrc0d82iv"))))
4429 (build-system python-build-system)
4431 `(("python-zope-interface" ,python-zope-interface)))
4433 `(("python-coverage" ,python-coverage)
4434 ("python-mock" ,python-mock)
4435 ("python-nose" ,python-nose)))
4436 (home-page "https://github.com/zopefoundation/transaction")
4437 (synopsis "Transaction management for Python")
4438 (description "This package contains a generic transaction implementation
4439 for Python. It is mainly used by the ZODB.")
4440 (license license:zpl2.1)))
4442 (define-public python-robot-detection
4444 (name "python-robot-detection")
4449 (uri (pypi-uri "robot-detection" version))
4452 "1xd2jm3yn31bnk1kqzggils2rxj26ylxsfz3ap7bhr3ilhnbg3rx"))))
4453 (build-system python-build-system)
4454 (arguments '(#:tests? #f)) ; Tests not shipped in pypi release.
4455 (propagated-inputs `(("python-six" ,python-six)))
4456 (home-page "https://github.com/rory/robot-detection")
4457 (synopsis "Detect web crawlers")
4459 "@code{robot_detection} is a python module to detect if a given HTTP User
4460 Agent is a web crawler. It uses the list of registered robots from
4461 @url{http://www.robotstxt.org}.")
4462 (license license:gpl3+)))
4464 (define-public python-pysolr
4466 (name "python-pysolr")
4471 (uri (pypi-uri "pysolr" version))
4474 "1rj5jmscvxjwcmlfi6hmkj44l4x6n3ln5p7d8d18j566hzmmzw3f"))))
4475 (build-system python-build-system)
4477 '(#:tests? #f)) ; Tests require network access.
4479 `(("python-requests" ,python-requests)))
4481 `(("python-setuptools-scm" ,python-setuptools-scm)))
4482 (home-page "https://github.com/django-haystack/pysolr/")
4483 (synopsis "Lightweight python wrapper for Apache Solr")
4485 "This module provides an interface that queries the Apache Solr server
4486 using a pure Python implementation.")
4487 (license license:bsd-3)))
4489 (define-public python-http-ece
4491 (name "python-http-ece")
4497 (url "https://github.com/web-push-libs/encrypted-content-encoding")
4498 (commit (string-append "v" version))))
4499 (file-name (git-file-name name version))
4502 "0bp4cc0xc123i72h80ax3qz3ixfwx3j7pw343kc7i6kdvfi8klx7"))))
4503 (build-system python-build-system)
4506 (modify-phases %standard-phases
4507 (add-after 'unpack 'change-directory
4508 (lambda _ (chdir "python") #t)))))
4510 `(("python-cryptography" ,python-cryptography)))
4512 `(("python-coverage" ,python-coverage)
4513 ("python-flake8" ,python-flake8)
4514 ("python-mock" ,python-mock)
4515 ("python-nose" ,python-nose)))
4516 (home-page "https://github.com/web-push-libs/encrypted-content-encoding")
4517 (synopsis "Encrypted Content Encoding for HTTP")
4519 "This package provices a simple implementation of Encrypted Content
4520 Encoding for HTTP.")
4521 (license license:expat)))