1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 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 ng0 <ng0@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>
39 ;;; This file is part of GNU Guix.
41 ;;; GNU Guix is free software; you can redistribute it and/or modify it
42 ;;; under the terms of the GNU General Public License as published by
43 ;;; the Free Software Foundation; either version 3 of the License, or (at
44 ;;; your option) any later version.
46 ;;; GNU Guix is distributed in the hope that it will be useful, but
47 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
48 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49 ;;; GNU General Public License for more details.
51 ;;; You should have received a copy of the GNU General Public License
52 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
54 (define-module (gnu packages python-web)
55 #:use-module (guix packages)
56 #:use-module (guix download)
57 #:use-module (guix git-download)
58 #:use-module (guix build-system python)
59 #:use-module (guix utils)
60 #:use-module (gnu packages)
61 #:use-module (gnu packages base)
62 #:use-module (gnu packages check)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages curl)
65 #:use-module (gnu packages databases)
66 #:use-module (gnu packages django)
67 #:use-module (gnu packages groff)
68 #:use-module (gnu packages libffi)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages python)
71 #:use-module (gnu packages python-check)
72 #:use-module (gnu packages python-crypto)
73 #:use-module (gnu packages python-xyz)
74 #:use-module (gnu packages serialization)
75 #:use-module (gnu packages sphinx)
76 #:use-module (gnu packages texinfo)
77 #:use-module (gnu packages tls)
78 #:use-module (gnu packages time)
79 #:use-module (gnu packages web)
80 #:use-module (gnu packages xml)
81 #:use-module ((guix licenses) #:prefix license:)
82 #:use-module (srfi srfi-1))
84 (define-public python-aiohttp
86 (name "python-aiohttp")
91 (uri (pypi-uri "aiohttp" version))
94 "09pkw6f1790prnrq0k8cqgnf1qy57ll8lpmc6kld09q7zw4vi6i5"))
95 (patches (search-patches "python-aiohttp-3.6.2-no-warning-fail.patch"))))
96 (build-system python-build-system)
99 (modify-phases %standard-phases
100 (add-after 'unpack 'fix-tests
102 ;; disable brotli tests, because we’re not providing that optional library
103 (substitute* "tests/test_http_parser.py"
104 ((" async def test_feed_eof_no_err_brotli")
105 " @pytest.mark.xfail\n async def test_feed_eof_no_err_brotli"))
106 ;; make sure the timestamp of this file is > 1990, because a few
107 ;; tests like test_static_file_if_modified_since_past_date depend on it
108 (invoke "touch" "-d" "2020-01-01" "tests/data.unknown_mime_type")
110 ;; FIXME: These tests are failing due to deprecation warnings
111 ;; in Python 3.8. Remove this when updating to aiohttp >= 3.7.
112 ;; https://github.com/aio-libs/aiohttp/issues/4477
113 ;; https://github.com/aio-libs/aiohttp/issues/4525
114 (with-directory-excursion "tests"
115 (for-each delete-file '("test_client_session.py"
117 "test_web_middleware.py"
118 "test_web_protocol.py"
119 "test_web_urldispatcher.py")))
122 `(("python-aiodns" ,python-aiodns)
123 ("python-async-timeout" ,python-async-timeout)
124 ("python-attrs" ,python-attrs)
125 ("python-chardet" ,python-chardet)
126 ("python-idna-ssl" ,python-idna-ssl)
127 ("python-multidict" ,python-multidict)
128 ("python-yarl" ,python-yarl)))
130 `(("python-pytest-runner" ,python-pytest-runner)
131 ("python-pytest-xdit" ,python-pytest-xdist)
132 ("python-pytest-timeout" ,python-pytest-timeout)
133 ("python-pytest-forked" ,python-pytest-forked)
134 ("python-pytest-mock" ,python-pytest-mock)
135 ("gunicorn" ,gunicorn-bootstrap)
136 ("python-freezegun" ,python-freezegun)
137 ("python-async-generator" ,python-async-generator)))
138 (home-page "https://github.com/aio-libs/aiohttp/")
139 (synopsis "Async HTTP client/server framework (asyncio)")
140 (description "@code{aiohttp} is an asynchronous HTTP client/server
143 Its main features are:
145 @item Supports both client and server side of HTTP protocol.
146 @item Supports both client and server Web-Sockets out-of-the-box without the
148 @item Web-server has middlewares and pluggable routing.
150 (license license:asl2.0)))
152 (define-public python-aiohttp-socks
154 (name "python-aiohttp-socks")
159 (uri (pypi-uri "aiohttp_socks" version))
162 "0473702jk66xrgpm28wbdgpnak4v0dh2qmdjw7ky7hf3lwwqkggf"))))
163 (build-system python-build-system)
165 `(("python-aiohttp" ,python-aiohttp)))
166 (home-page "https://github.com/romis2012/aiohttp-socks")
167 (synopsis "SOCKS proxy connector for aiohttp")
168 (description "This package provides a SOCKS proxy connector for
169 aiohttp. It supports SOCKS4(a) and SOCKS5.")
170 (license license:asl2.0)))
172 (define-public python-aiodns
174 (name "python-aiodns")
179 (uri (pypi-uri "aiodns" version))
182 "1snr5paql8dgvc676n8xq460wypjsb1xj53cf3px1s4wczf7lryq"))))
183 (build-system python-build-system)
185 `(("python-pycares" ,python-pycares)))
187 `(#:tests? #f)) ;tests require internet access
188 (home-page "http://github.com/saghul/aiodns")
189 (synopsis "Simple DNS resolver for asyncio")
190 (description "@code{aiodns} provides a simple way for doing
191 asynchronous DNS resolutions with a synchronous looking interface by
192 using @url{https://github.com/saghul/pycares,pycares}.")
193 (license license:expat)))
195 (define-public python-aiorpcx
197 (name "python-aiorpcx")
202 (uri (pypi-uri "aiorpcX" version))
205 "0k545hc7wl6sh1svydzbv6x7sx5pig2pqkl3yxs9riwmvzawx9xp"))))
206 (build-system python-build-system)
208 `(("python-attrs" ,python-attrs)))
209 (home-page "https://github.com/kyuupichan/aiorpcX")
210 (synopsis "Generic asyncio RPC implementation")
212 "The aiorpcX library is a generic asyncio implementation of RPC suitable
213 for an application that is a client, server or both.
215 The package includes a module with full coverage of JSON RPC versions 1.0 and
216 2.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
217 comes with a SOCKS proxy client.")
218 (license (list license:expat license:bsd-2))))
220 (define-public python-falcon
222 (name "python-falcon")
227 (uri (pypi-uri "falcon" version))
230 "1i0vmqsk24z4biirqhpvas9h28wy7nmpy3jvnb6rz2imq04zd09r"))))
231 (build-system python-build-system)
234 (modify-phases %standard-phases
237 (invoke "pytest"))))))
239 `(("python-mimeparse" ,python-mimeparse)
240 ("python-six" ,python-six)))
242 `(("python-cython" ,python-cython) ;for faster binaries
243 ("python-pytest" ,python-pytest)
244 ("python-pyyaml" ,python-pyyaml)
245 ("python-requests" ,python-requests)
246 ("python-testtools" ,python-testtools)
247 ("python-jsonschema" ,python-jsonschema)
248 ("python-msgpack" ,python-msgpack)))
249 (home-page "https://falconframework.org")
251 "Web framework for building APIs and application backends")
253 "Falcon is a web API framework for building microservices, application
254 backends and higher-level frameworks. Among its features are:
256 @item Optimized and extensible code base
257 @item Routing via URI templates and REST-inspired resource
259 @item Access to headers and bodies through request and response
261 @item Request processing via middleware components and hooks
262 @item Idiomatic HTTP error responses
263 @item Straightforward exception handling
264 @item Unit testing support through WSGI helpers and mocks
265 @item Compatible with both CPython and PyPy
266 @item Cython support for better performance when used with CPython
268 (license license:asl2.0)))
270 (define-public python2-falcon
271 (package-with-python2 python-falcon))
273 (define-public python-falcon-cors
275 (name "python-falcon-cors")
280 (uri (pypi-uri "falcon-cors" version))
283 "12pym7hwsbd8b0c1azn95nas8gm3f1qpr6lpyx0958xm65ffr20p"))))
284 (build-system python-build-system)
286 `(("python-falcon" ,python-falcon)))
288 "https://github.com/lwcolton/falcon-cors")
289 (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
290 (description "This middleware provides @dfn{cross-origin resource
291 sharing} (CORS) support for Falcon. It allows applying a specially crafted
292 CORS object to the incoming requests, enabling the ability to serve resources
293 over a different origin than that of the web application.")
294 (license license:asl2.0)))
296 (define-public python2-falcon-cors
297 (package-with-python2 python-falcon-cors))
299 (define-public python-furl
306 (uri (pypi-uri "furl" version))
309 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
310 (build-system python-build-system)
312 `(("python-six" ,python-six)
313 ("python-orderedmultidict" ,python-orderedmultidict)))
315 `(("python-pycodestyle" ,python-pycodestyle)))
316 (home-page "https://github.com/gruns/furl")
317 (synopsis "URL manipulation in Python")
318 (description "Furl provides an easy-to-use alternative to the
319 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
320 (license license:unlicense)))
322 (define-public python2-furl
323 (package-with-python2 python-furl))
325 (define-public python-httplib2
327 (name "python-httplib2")
332 (uri (pypi-uri "httplib2" version))
335 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
336 (build-system python-build-system)
337 (home-page "https://github.com/jcgregorio/httplib2")
338 (synopsis "Comprehensive HTTP client library")
340 "A comprehensive HTTP client library supporting many features left out of
341 other HTTP libraries.")
342 (license license:expat)))
344 (define-public python2-httplib2
345 (package-with-python2 python-httplib2))
347 (define-public httpie
354 (uri (pypi-uri "httpie" version))
357 "02bw20cwv3a1lzrn919dk25dq4v81x6q786zlrqsqzhsdxszj14c"))))
358 (build-system python-build-system)
360 ;; The tests attempt to access external web servers, so we cannot run them.
363 `(("python-colorama" ,python-colorama)
364 ("python-pygments" ,python-pygments)
365 ("python-requests" ,python-requests)))
366 (home-page "https://httpie.org/")
367 (synopsis "cURL-like tool for humans")
369 "A command line HTTP client with an intuitive UI, JSON support,
370 syntax highlighting, wget-like downloads, plugins, and more. It consists of
371 a single http command designed for painless debugging and interaction with
372 HTTP servers, RESTful APIs, and web services.")
373 (license license:bsd-3)))
375 (define-public python-html2text
377 (name "python-html2text")
378 (version "2019.8.11")
382 (uri (pypi-uri "html2text" version))
385 "0ppgjplg06kmv9sj0x8p7acczcq2mcfgk1jdjwm4w5w40b0vj5pm"))))
386 (build-system python-build-system)
389 (modify-phases %standard-phases
392 (invoke "pytest" "test/"))))))
394 `(("python-pytest" ,python-pytest)))
395 (home-page "https://github.com/Alir3z4/html2text")
396 (synopsis "Convert HTML into plain text")
397 (description "html2text takes HTML and converts it into plain ASCII text
398 which is also valid markdown. html2text was originally written by Aaron
400 (license license:gpl3+)))
402 (define-public python2-html2text
403 (package-with-python2 python-html2text))
405 (define-public python-mechanicalsoup
407 (name "python-mechanicalsoup")
412 (uri (pypi-uri "MechanicalSoup" version))
414 (base32 "0k59wwk75q7nz6i6gynvzhagy02ql0bv7py3qqcwgjw7607yq4i7"))))
415 (build-system python-build-system)
417 ;; TODO: Enable tests when python-flake8@3.5 hits master.
420 `(("python-beautifulsoup4" ,python-beautifulsoup4)
421 ("python-lxml" ,python-lxml)
422 ("python-requests" ,python-requests)
423 ("python-six" ,python-six)))
426 ;; `(("python-pytest-flake8" ,python-pytest-flake8)
427 ;; ("python-pytest-httpbin" ,python-pytest-httpbin)
428 ;; ("python-pytest-mock" ,python-pytest-mock)
429 ;; ("python-pytest-runner" ,python-pytest-runner)
430 ;; ("python-requests-mock" ,python-requests-mock)))
431 (home-page "https://mechanicalsoup.readthedocs.io/")
432 (synopsis "Python library for automating website interaction")
434 "MechanicalSoup is a Python library for automating interaction with
435 websites. It automatically stores and sends cookies, follows redirects, and can
436 follow links and submit forms. It doesn’t do JavaScript.")
437 (license license:expat)))
439 (define-public python2-mechanicalsoup
440 (package-with-python2 python-mechanicalsoup))
442 (define-public python-sockjs-tornado
444 (name "python-sockjs-tornado")
449 (uri (pypi-uri "sockjs-tornado" version))
452 "15dgv6hw6c7h3m310alw1h6p5443lrm9pyqhcv2smc13fz1v04pc"))))
453 (build-system python-build-system)
455 `(;; There are no tests, and running the test phase requires missing
459 `(("python-tornado" ,python-tornado)))
460 (home-page "https://github.com/mrjoes/sockjs-tornado/")
462 "SockJS Python server implementation on top of the Tornado framework")
464 "SockJS-tornado provides the server-side counterpart to a SockJS client
465 library, through the Tornado framework.
467 SockJS provides a low-latency, full-duplex, cross-domain communication channel
468 between a web browser and web server.")
469 (license license:expat)))
471 (define-public python2-sockjs-tornado
472 (package-with-python2 python-sockjs-tornado))
474 (define-public python-flask-babel
476 (name "python-flask-babel")
481 (uri (pypi-uri "Flask-Babel" version))
484 "0gmb165vkwv5v7dxsxa2i3zhafns0fh938m2zdcrv4d8z5l099yn"))))
485 (build-system python-build-system)
487 '(#:phases (modify-phases %standard-phases
490 (with-directory-excursion "tests"
491 (invoke "python" "tests.py")))))))
493 `(("python-flask" ,python-flask)
494 ("python-babel" ,python-babel)
495 ("python-jinja2" ,python-jinja2)
496 ("python-pytz" ,python-pytz)))
497 (home-page "https://github.com/python-babel/flask-babel")
498 (synopsis "Add i18n/l10n support to Flask applications")
499 (description "This package implements internationalization and localization
500 support for Flask. This is based on the Python babel module as well as pytz -
501 both of which are installed automatically if you install this library.")
502 (license license:bsd-3)))
504 (define-public python2-flask-babel
505 (package-with-python2 python-flask-babel))
507 (define-public python-html5lib
509 (name "python-html5lib")
514 (uri (pypi-uri "html5lib" version))
517 "0dipzfrycv6j1jw82v9b7d8lzggx3x8xngx6l4xrqkxwvg7hvjv6"))))
518 (build-system python-build-system)
520 `(("python-six" ,python-six)
521 ("python-webencodings" ,python-webencodings)))
523 `(#:test-target "check"))
525 "https://github.com/html5lib/html5lib-python")
527 "Python HTML parser based on the WHATWG HTML specifcation")
529 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
530 and written in Python.")
531 (license license:expat)))
533 (define-public python2-html5lib
534 (package-with-python2 python-html5lib))
536 ;; Needed for python-bleach, a dependency of python-notebook
537 (define-public python-html5lib-0.9
539 (inherit python-html5lib)
544 (uri (pypi-uri "html5lib" version))
547 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
549 (define-public python2-html5lib-0.9
550 (package-with-python2 python-html5lib-0.9))
552 (define-public python-html5-parser
554 (name "python-html5-parser")
558 (uri (pypi-uri "html5-parser" version))
561 "01mx33sx4dhl4kj6wc48nj6jz7ry60rkhjv0s6k8h5xmjf5yy0x9"))))
562 (build-system python-build-system)
564 `(("pkg-config" ,pkg-config)))
566 `(("libxml2" ,libxml2)))
568 `(("python-lxml" ,python-lxml)
569 ("python-beautifulsoup4" ,python-beautifulsoup4)))
570 (home-page "https://html5-parser.readthedocs.io")
571 (synopsis "Fast C-based HTML5 parsing for Python")
572 (description "This package provides a fast implementation of the HTML5
573 parsing spec for Python. Parsing is done in C using a variant of the gumbo
574 parser. The gumbo parse tree is then transformed into an lxml tree, also in
575 C, yielding parse times that can be a thirtieth of the html5lib parse times.")
576 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
577 ;; indicate ASL2.0, including the LICENSE file for the whole project.
578 (license (list license:asl2.0 license:gpl3))))
580 (define-public python2-html5-parser
581 (package-with-python2 python-html5-parser))
583 (define-public python-pycurl
585 (name "python-pycurl")
590 (uri (string-append "https://dl.bintray.com/pycurl/pycurl/pycurl-"
593 (base32 "1915kb04k1j4y6k1dx1sgnbddxrl9r1n4q928if2lkrdm73xy30g"))))
594 (build-system python-build-system)
596 ;; The tests attempt to access external web servers, so we cannot run
597 ;; them. Furthermore, they are skipped altogether when using Python 2.
599 #:phases (modify-phases %standard-phases
600 (add-before 'build 'configure-tls-backend
602 ;; XXX: PycURL fails to automatically determine which TLS
603 ;; backend to use when cURL is built with --disable-static.
604 ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
605 (setenv "PYCURL_SSL_LIBRARY" "gnutls")
608 `(("python-nose" ,python-nose)
609 ("python-bottle" ,python-bottle)))
613 (home-page "http://pycurl.io/")
614 (synopsis "Lightweight Python wrapper around libcurl")
615 (description "Pycurl is a lightweight wrapper around libcurl. It provides
616 high-speed transfers via libcurl and frequently outperforms alternatives.")
618 ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
619 ;; under the terms of LGPLv2.1+ or Expat.
620 (license (list license:lgpl2.1+ license:expat))))
622 (define-public python2-pycurl
623 (package-with-python2 python-pycurl))
625 (define-public python-webencodings
627 (name "python-webencodings")
631 (uri (pypi-uri "webencodings" version))
634 "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
635 (build-system python-build-system)
638 (modify-phases %standard-phases
641 (invoke "py.test" "-v" "webencodings/tests.py")
644 `(("python-pytest" ,python-pytest)))
645 (home-page "https://github.com/SimonSapin/python-webencodings")
646 (synopsis "Character encoding aliases for legacy web content")
648 "In order to be compatible with legacy web content when interpreting
649 something like @code{Content-Type: text/html; charset=latin1}, tools need
650 to use a particular set of aliases for encoding labels as well as some
651 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
652 the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
653 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
654 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
655 defines all such details so that implementations do not have to
656 reverse-engineer each other.
658 This module implements the Encoding standard and has encoding labels and
659 BOM detection, but the actual implementation for encoders and decoders
661 (license license:bsd-3)))
663 (define-public python2-webencodings
664 (package-with-python2 python-webencodings))
666 (define-public python-openid
668 (name "python-openid")
673 (uri (pypi-uri "python3-openid" version))
676 "00l5hrjh19740w00b3fnsqldnla41wbr2rics09dl4kyd1fkd3b2"))))
677 (build-system python-build-system)
680 (modify-phases %standard-phases
683 (invoke "coverage" "run" "-m"
684 "unittest" "openid.test.test_suite"))))))
685 (properties `((python2-variant . ,(delay python2-openid))))
687 `(("python-defusedxml" ,python-defusedxml)))
689 `(("python-coverage" ,python-coverage)
690 ("python-psycopg2" ,python-psycopg2)
691 ("python-django" ,python-django)))
692 (home-page "https://github.com/necaris/python3-openid")
693 (synopsis "OpenID support for servers and consumers")
694 (description "This library provides OpenID authentication for Python, both
695 for clients and servers.")
696 (license license:asl2.0)))
698 (define-public python2-openid
700 (name "python2-openid")
705 (uri (pypi-uri "python-openid" version))
708 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
709 (build-system python-build-system)
711 ;; Python 3 support is in `python3-openid`, a separate package.
713 ;; Tests aren't initialized correctly.
715 (home-page "https://github.com/openid/python-openid")
716 (synopsis "OpenID support for servers and consumers")
717 (description "This library provides OpenID authentication for Python, both
718 for clients and servers.")
719 (license license:asl2.0)))
721 (define-public python-cssutils
723 (name "python-cssutils")
728 (uri (pypi-uri "cssutils" version))
731 "1bxchrbqzapwijap0yhlxdil1w9bmwvgx77aizlkhc2mcxjg1z52"))))
732 (build-system python-build-system)
734 `(("unzip" ,unzip))) ; for unpacking the source
736 `(#:tests? #f)) ; tests require python-pbr < 1.7.0
737 (home-page "http://cthedot.de/cssutils/")
739 "CSS Cascading Style Sheets library for Python")
741 "Cssutils is a Python package for parsing and building CSS
742 Cascading Style Sheets. Currently it provides a DOM only and no rendering
744 (license license:lgpl3+)))
746 (define-public python2-cssutils
747 (package-with-python2 python-cssutils))
749 (define-public python-css-parser
751 (inherit python-cssutils)
752 (name "python-css-parser")
757 (uri (pypi-uri "css-parser" version ".tar.gz"))
760 "0i4xfykiffxzr4f6y0m2ggqvx1rzam6pw6krlr5k6ldf29akbay7"))))
761 (home-page "https://github.com/ebook-utils/css-parser")
762 (synopsis "Fork of cssutils modified for parsing ebooks")
764 "Css-parser is a fork of cssutils 1.0.2, updated and modified for parsing
765 ebooks, due to cssutils not receiving updates as of 1.0.2.")
766 (license license:lgpl3+)))
768 (define-public python2-css-parser
769 (package-with-python2 python-css-parser))
771 (define-public python-cssselect
773 (name "python-cssselect")
778 (uri (pypi-uri "cssselect" version))
781 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
782 (build-system python-build-system)
784 ;; tests fail with message
785 ;; AttributeError: 'module' object has no attribute 'tests'
788 "https://pythonhosted.org/cssselect/")
790 "CSS3 selector parser and translator to XPath 1.0")
792 "Cssselect ia a Python module that parses CSS3 Selectors and translates
793 them to XPath 1.0 expressions. Such expressions can be used in lxml or
794 another XPath engine to find the matching elements in an XML or HTML document.")
795 (license license:bsd-3)))
797 (define-public python2-cssselect
798 (package-with-python2 python-cssselect))
800 (define-public python-openid-cla
802 (name "python-openid-cla")
807 (uri (pypi-uri "python-openid-cla" version))
810 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
811 (build-system python-build-system)
812 (arguments '(#:tests? #f)) ; No tests.
813 (home-page "https://github.com/puiterwijk/python-openid-cla/")
814 (synopsis "Implementation of the OpenID CLA extension for python-openid")
815 (description "@code{openid-cla} is an implementation of the OpenID
816 contributor license agreement extension for python-openid.")
817 (license license:bsd-3)))
819 (define-public python2-openid-cla
820 (package-with-python2 python-openid-cla))
822 (define-public python-openid-teams
824 (name "python-openid-teams")
829 (uri (pypi-uri "python-openid-teams" version))
832 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
833 (build-system python-build-system)
834 (arguments '(#:tests? #f)) ; No tests.
835 (home-page "https://github.com/puiterwijk/python-openid-teams/")
836 (synopsis "Implementation of the OpenID teams extension for python-openid")
838 "@code{openid-teams} is an implementation of the OpenID
839 teams extension for python-openid.")
840 (license license:bsd-3)))
842 (define-public python2-openid-teams
843 (package-with-python2 python-openid-teams))
845 (define-public python-tornado
847 (name "python-tornado")
852 (uri (pypi-uri "tornado" version))
855 "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
856 (build-system python-build-system)
858 '(;; FIXME: Two tests error out with:
859 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
861 ;; (modify-phases %standard-phases
864 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
865 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
866 ;; (invoke "python" "-m" "tornado.test.runtests")
870 `(("python-certifi" ,python-certifi)))
871 (home-page "https://www.tornadoweb.org/")
872 (synopsis "Python web framework and asynchronous networking library")
874 "Tornado is a Python web framework and asynchronous networking library,
875 originally developed at FriendFeed. By using non-blocking network I/O,
876 Tornado can scale to tens of thousands of open connections, making it ideal
877 for long polling, WebSockets, and other applications that require a long-lived
878 connection to each user.")
879 (license license:asl2.0)
880 (properties `((python2-variant . ,(delay python2-tornado))))))
882 (define-public python-tornado-6
884 (name "python-tornado")
889 (uri (pypi-uri "tornado" version))
892 "1p5n7sw4580pkybywg93p8ddqdj9lhhy72rzswfa801vlidx9qhg"))))
893 (build-system python-build-system)
896 (modify-phases %standard-phases
899 (invoke "python" "-m" "tornado.test.runtests")
902 `(("python-certifi" ,python-certifi)))
903 (home-page "https://www.tornadoweb.org/")
904 (synopsis "Python web framework and asynchronous networking library")
906 "Tornado is a Python web framework and asynchronous networking library,
907 originally developed at FriendFeed. By using non-blocking network I/O,
908 Tornado can scale to tens of thousands of open connections, making it ideal
909 for long polling, WebSockets, and other applications that require a long-lived
910 connection to each user.")
911 (license license:asl2.0)))
913 (define-public python2-tornado
914 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
915 (package (inherit tornado)
917 `(("python2-backport-ssl-match-hostname"
918 ,python2-backport-ssl-match-hostname)
919 ("python2-backports-abc" ,python2-backports-abc)
920 ("python2-singledispatch" ,python2-singledispatch)
921 ,@(package-propagated-inputs tornado))))))
923 (define-public python-tornado-http-auth
925 (name "python-tornado-http-auth")
930 (uri (pypi-uri "tornado-http-auth" version))
932 (base32 "0hyc5f0a09i5yb99pk4bxpg6w9ichbrb5cv7hc9hff7rxd8w0v0x"))))
933 (build-system python-build-system)
935 `(("python-tornado" ,python-tornado)))
936 (home-page "https://github.com/gvalkov/tornado-http-auth")
937 (synopsis "Digest and basic authentication module for Tornado")
939 "Provides support for adding authentication to services using the Tornado
940 web framework, either via the basic or digest authentication schemes.")
941 (license license:asl2.0)))
943 (define-public python-terminado
945 (name "python-terminado")
950 (uri (pypi-uri "terminado" version))
953 "0yh69k6579g848rmjyllb5h75pkvgcy27r1l3yzgkf33wnnzkasm"))))
954 (build-system python-build-system)
956 `(("python-tornado" ,python-tornado)
957 ("python-ptyprocess" ,python-ptyprocess)))
959 `(("python-nose" ,python-nose)))
962 (modify-phases %standard-phases
964 (lambda _ (invoke "nosetests") #t)))))
965 (home-page "https://github.com/takluyver/terminado")
966 (synopsis "Terminals served to term.js using Tornado websockets")
967 (description "This package provides a Tornado websocket backend for the
968 term.js Javascript terminal emulator library.")
969 (license license:bsd-2)
970 (properties `((python2-variant . ,(delay python2-terminado))))))
972 (define-public python2-terminado
973 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
974 (package (inherit terminado)
976 `(("python2-backport-ssl-match-hostname"
977 ,python2-backport-ssl-match-hostname)
978 ("python2-futures" ,python2-futures)
979 ,@(package-propagated-inputs terminado))))))
981 (define-public python-wsgi-intercept
983 (name "python-wsgi-intercept")
987 (uri (pypi-uri "wsgi_intercept" version))
990 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
991 (build-system python-build-system)
993 `(("python-six" ,python-six)))
995 `(("python-pytest" ,python-pytest)
996 ("python-httplib2" ,python-httplib2)
997 ("python-requests" ,python-requests)
998 ("python-urllib3" ,python-urllib3)))
999 (synopsis "Puts a WSGI application in place of a real URI for testing")
1000 (description "Wsgi_intercept installs a WSGI application in place of a real
1001 URI for testing. Testing a WSGI application normally involves starting a
1002 server at a local host and port, then pointing your test code to that address.
1003 Instead, this library lets you intercept calls to any specific host/port
1004 combination and redirect them into a WSGI application importable by your test
1005 program. Thus, you can avoid spawning multiple processes or threads to test
1007 (home-page "https://github.com/cdent/wsgi-intercept")
1008 (license license:expat)))
1010 (define-public python-webob
1012 (name "python-webob")
1017 (uri (pypi-uri "WebOb" version))
1020 "1cpqskanmvwia8wqlpcr3ykyxysynjdnbl5namvpg8vw6jnkv1dh"))))
1021 (build-system python-build-system)
1023 `(("python-nose" ,python-nose)))
1024 (home-page "https://webob.org/")
1025 (synopsis "WSGI request and response object")
1027 "WebOb provides wrappers around the WSGI request environment, and an
1028 object to help create WSGI responses.")
1029 (license license:expat)))
1031 (define-public python2-webob
1032 (package-with-python2 python-webob))
1034 (define-public python-zope-event
1036 (name "python-zope-event")
1041 (uri (pypi-uri "zope.event" version))
1044 "1ksbc726av9xacml6jhcfyn828hlhb9xlddpx6fcvnlvmpmpvhk9"))))
1045 (build-system python-build-system)
1046 (home-page "https://pypi.org/project/zope.event/")
1047 (synopsis "Event publishing system for Python")
1048 (description "Zope.event provides an event publishing API, intended for
1049 use by applications which are unaware of any subscribers to their events. It
1050 is a simple event-dispatching system on which more sophisticated event
1051 dispatching systems can be built.")
1052 (license license:zpl2.1)))
1054 (define-public python2-zope-event
1055 (package-with-python2 python-zope-event))
1057 (define-public python-zope-interface
1059 (name "python-zope-interface")
1064 (uri (pypi-uri "zope.interface" version))
1067 "0r9kvb1q3lxrdhxabliv9nwhjsdmn1n0vcjv93rlqkyb7yyh24gx"))))
1068 (build-system python-build-system)
1070 `(("python-zope-event" ,python-zope-event)))
1071 (home-page "https://github.com/zopefoundation/zope.interface")
1072 (synopsis "Python implementation of the \"design by contract\"
1074 (description "Zope.interface provides an implementation of \"object
1075 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
1076 conforming to a given API or contract.")
1077 (license license:zpl2.1)))
1079 (define-public python2-zope-interface
1080 (package-with-python2 python-zope-interface))
1082 (define-public python-zope-exceptions
1084 (name "python-zope-exceptions")
1089 (uri (pypi-uri "zope.exceptions" version))
1092 "04bjskwas17yscl8bs3l44maxspw1gdji0zcmr499fs420y9r9az"))))
1093 (build-system python-build-system)
1095 '(#:tests? #f)) ; circular dependency with zope.testrunner
1097 `(("python-zope-interface" ,python-zope-interface)))
1098 (home-page "https://pypi.org/project/zope.exceptions/")
1099 (synopsis "Zope exceptions")
1100 (description "Zope.exceptions provides general-purpose exception types
1101 that have uses outside of the Zope framework.")
1102 (license license:zpl2.1)))
1104 (define-public python2-zope-exceptions
1105 (package-with-python2 python-zope-exceptions))
1107 (define-public python-zope-testing
1109 (name "python-zope-testing")
1114 (uri (pypi-uri "zope.testing" version))
1117 "1sh3c3i0m8n8fnhqiry0bk3rr356i56ry7calmn57s1pvv8yhsyn"))))
1118 (build-system python-build-system)
1119 (home-page "https://pypi.org/project/zope.testing/")
1120 (synopsis "Zope testing helpers")
1121 (description "Zope.testing provides a number of testing utilities for HTML
1122 forms, HTTP servers, regular expressions, and more.")
1123 (license license:zpl2.1)))
1125 (define-public python2-zope-testing
1126 (package-with-python2 python-zope-testing))
1128 (define-public python-zope-testrunner
1130 (name "python-zope-testrunner")
1135 (uri (pypi-uri "zope.testrunner" version))
1138 "0w3q66cy4crpj7c0hw0vvvvwf3g931rnvw7wwa20av7yqvv6ajim"))))
1139 (build-system python-build-system)
1141 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1143 `(("python-zope-testing" ,python-zope-testing)))
1145 `(("python-six" ,python-six)
1146 ("python-zope-exceptions" ,python-zope-exceptions)
1147 ("python-zope-interface" ,python-zope-interface)))
1148 (home-page "https://pypi.org/project/zope.testrunner/")
1149 (synopsis "Zope testrunner script")
1150 (description "Zope.testrunner provides a script for running Python
1152 (license license:zpl2.1)))
1154 (define-public python2-zope-testrunner
1155 (package-with-python2 python-zope-testrunner))
1157 (define-public python-zope-i18nmessageid
1159 (name "python-zope-i18nmessageid")
1164 (uri (pypi-uri "zope.i18nmessageid" version))
1167 "0ndhn4w1qgwkfbwf9vm2bgq418z5g0wmfsgl0d9nz62cd0mi8d4m"))))
1168 (build-system python-build-system)
1170 `(("python-coverage" ,python-coverage)
1171 ("python-zope-testrunner" ,python-zope-testrunner)))
1173 `(("python-six" ,python-six)))
1174 (home-page "https://pypi.org/project/zope.i18nmessageid/")
1175 (synopsis "Message identifiers for internationalization")
1176 (description "Zope.i18nmessageid provides facilities for declaring
1177 internationalized messages within program source text.")
1178 (license license:zpl2.1)))
1180 (define-public python2-zope-i18nmessageid
1181 (package-with-python2 python-zope-i18nmessageid))
1183 (define-public python-zope-schema
1185 (name "python-zope-schema")
1190 (uri (pypi-uri "zope.schema" version))
1193 "0q93j0x52a42khw12al90jw2bk0wly3jwghql3a25zpwwxvn24ya"))))
1194 (build-system python-build-system)
1196 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
1198 `(("python-zope-event" ,python-zope-event)
1199 ("python-zope-interface" ,python-zope-interface)))
1201 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1202 ("python-zope-testing" ,python-zope-testing)
1203 ("python-zope-testrunner" ,python-zope-testrunner)))
1204 (home-page "https://pypi.org/project/zope.schema/")
1205 (synopsis "Zope data schemas")
1206 (description "Zope.scheme provides extensions to zope.interface for
1207 defining data schemas.")
1208 (license license:zpl2.1)))
1210 (define-public python2-zope-schema
1211 (package-with-python2 python-zope-schema))
1213 (define-public python-zope-configuration
1215 (name "python-zope-configuration")
1219 (uri (pypi-uri "zope.configuration" version))
1222 "1qb88764fd7nkkmqv7fl9bxd1jirynkg5vbqkpqdiffnkxzp85kf"))))
1223 (build-system python-build-system)
1225 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1227 `(("python-zope-testing" ,python-zope-testing)
1228 ("python-zope-testrunner" ,python-zope-testrunner)))
1230 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1231 ("python-zope-interface" ,python-zope-interface)
1232 ("python-zope-schema" ,python-zope-schema)))
1233 (home-page "https://pypi.org/project/zope.configuration/")
1234 (synopsis "Zope Configuration Markup Language")
1235 (description "Zope.configuration implements ZCML, the Zope Configuration
1237 (license license:zpl2.1)))
1239 (define-public python2-zope-configuration
1240 (package-with-python2 python-zope-configuration))
1242 (define-public python-zope-proxy
1244 (name "python-zope-proxy")
1249 (uri (pypi-uri "zope.proxy" version))
1252 "1g0rcfnbchpvqhm76aixqlz544dawrgmy8gw9zwmijhk6wfl9f26"))))
1253 (build-system python-build-system)
1255 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1257 `(("python-zope-testrunner" ,python-zope-testrunner)))
1259 `(("python-zope-interface" ,python-zope-interface)))
1260 (home-page "https://pypi.org/project/zope.proxy/")
1261 (synopsis "Generic, transparent proxies")
1262 (description "Zope.proxy provides generic, transparent proxies for Python.
1263 Proxies are special objects which serve as mostly-transparent wrappers around
1264 another object, intervening in the apparent behavior of the wrapped object
1265 only when necessary to apply the policy (e.g., access checking, location
1266 brokering, etc.) for which the proxy is responsible.")
1267 (license license:zpl2.1)))
1269 (define-public python2-zope-proxy
1270 (package-with-python2 python-zope-proxy))
1272 (define-public python-zope-location
1274 (name "python-zope-location")
1279 (uri (pypi-uri "zope.location" version))
1282 "1b40pzl8v00d583d3gsxv1qjdw2dhghlgkbgxl3m07d5r3izj857"))))
1283 (build-system python-build-system)
1285 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1287 `(("python-zope-testrunner" ,python-zope-testrunner)))
1289 `(("python-zope-interface" ,python-zope-interface)
1290 ("python-zope-proxy" ,python-zope-proxy)
1291 ("python-zope-schema" ,python-zope-schema)))
1292 (home-page "https://pypi.org/project/zope.location/")
1293 (synopsis "Zope location library")
1294 (description "Zope.location implements the concept of \"locations\" in
1295 Zope3, which are are special objects that have a structural location.")
1296 (license license:zpl2.1)))
1298 (define-public python2-zope-location
1299 (package-with-python2 python-zope-location))
1301 (define-public python-zope-security
1303 (name "python-zope-security")
1308 (uri (pypi-uri "zope.security" version))
1311 "1npfrgnm202v48wavpwn3450dsn7az12lfww95vbhxyjl11f14yb"))))
1312 (build-system python-build-system)
1314 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
1316 `(("python-zope-component" ,python-zope-component)
1317 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1318 ("python-zope-interface" ,python-zope-interface)
1319 ("python-zope-location" ,python-zope-location)
1320 ("python-zope-proxy" ,python-zope-proxy)
1321 ("python-zope-schema" ,python-zope-schema)))
1323 `(("python-zope-configuration" ,python-zope-configuration)
1324 ("python-zope-testrunner" ,python-zope-testrunner)
1325 ("python-zope-testing" ,python-zope-testing)))
1326 (home-page "https://pypi.org/project/zope.security/")
1327 (synopsis "Zope security framework")
1328 (description "Zope.security provides a generic mechanism to implement
1329 security policies on Python objects.")
1330 (license license:zpl2.1)))
1332 (define-public python2-zope-security
1333 (package-with-python2 python-zope-security))
1335 (define-public python-zope-component
1337 (name "python-zope-component")
1342 (uri (pypi-uri "zope.component" version))
1345 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
1346 (build-system python-build-system)
1348 ;; Skip tests due to circular dependency with python-zope-security.
1351 `(("python-zope-testing" ,python-zope-testing)))
1353 `(("python-zope-event" ,python-zope-event)
1354 ("python-zope-interface" ,python-zope-interface)
1355 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1356 ("python-zope-configuration" ,python-zope-configuration)))
1357 (home-page "https://github.com/zopefoundation/zope.component")
1358 (synopsis "Zope Component Architecture")
1359 (description "Zope.component represents the core of the Zope Component
1360 Architecture. Together with the zope.interface package, it provides
1361 facilities for defining, registering and looking up components.")
1362 (license license:zpl2.1)))
1364 (define-public python2-zope-component
1365 (package-with-python2 python-zope-component))
1367 (define-public python-ndg-httpsclient
1369 (name "python-ndg-httpsclient")
1373 (uri (pypi-uri "ndg_httpsclient" version))
1376 "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
1377 (build-system python-build-system)
1379 '(;; The tests appear to require networking.
1382 `(("python-pyopenssl" ,python-pyopenssl)))
1383 (synopsis "HTTPS support for Python's httplib and urllib2")
1384 (description "This is a HTTPS client implementation for httplib and urllib2
1385 based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
1386 over the default provided with Python and, importantly, enables full
1387 verification of the SSL peer.")
1388 (home-page "https://github.com/cedadev/ndg_httpsclient/")
1389 (license license:bsd-3)))
1391 ;; python2-openssl requires special care, so package-with-python2 is
1393 (define-public python2-ndg-httpsclient
1394 (package (inherit python-ndg-httpsclient)
1395 (name "python2-ndg-httpsclient")
1397 (substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
1398 ((#:python _) python-2)))
1400 `(("python2-pyopenssl" ,python2-pyopenssl)))))
1402 (define-public python-websocket-client
1404 (name "python-websocket-client")
1409 (uri (pypi-uri "websocket_client" version))
1412 "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
1413 (build-system python-build-system)
1415 `(("python-six" ,python-six)))
1416 (home-page "https://github.com/liris/websocket-client")
1417 (synopsis "WebSocket client for Python")
1418 (description "The Websocket-client module provides the low level APIs for
1419 WebSocket usage in Python programs.")
1420 (properties `((python2-variant . ,(delay python2-websocket-client))))
1421 (license license:lgpl2.1+)))
1423 (define-public python2-websocket-client
1424 (let ((base (package-with-python2
1425 (strip-python2-variant python-websocket-client))))
1429 `(("python2-backport-ssl-match-hostname"
1430 ,python2-backport-ssl-match-hostname)
1431 ,@(package-native-inputs base))))))
1433 (define-public python-requests
1435 (name "python-requests")
1439 (uri (pypi-uri "requests" version))
1442 "1d5ybh11jr5sm7xp6mz8fyc7vrp4syifds91m7sj60xalal0gq0i"))))
1443 (build-system python-build-system)
1445 `(("python-certifi" ,python-certifi)
1446 ("python-chardet" ,python-chardet)
1447 ("python-idna" ,python-idna)
1448 ("python-urllib3" ,python-urllib3)))
1450 ;; FIXME: Some tests require network access.
1452 (home-page "http://python-requests.org/")
1453 (synopsis "Python HTTP library")
1455 "Requests is a Python HTTP client library. It aims to be easier to use
1456 than Python’s urllib2 library.")
1457 (license license:asl2.0)))
1459 ;; Some software requires an older version of Requests, notably Docker/Docker
1461 (define-public python-requests-2.20
1462 (package (inherit python-requests)
1466 (uri (pypi-uri "requests" version))
1469 "0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a"))))
1471 `(("python-urllib3" ,python-urllib3-1.24)
1472 ("python-idna" ,python-idna-2.7)
1473 ,@(package-propagated-inputs python-requests)))))
1475 ;; Some software requires an older version of Requests, notably Docker
1477 (define-public python-requests-2.7
1478 (package (inherit python-requests)
1482 (uri (pypi-uri "requests" version))
1485 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
1487 (define-public python2-requests
1488 (package-with-python2 python-requests))
1490 (define-public python-requests_ntlm
1492 (name "python-requests_ntlm")
1497 (uri (pypi-uri "requests_ntlm" version))
1500 "0wgbqzaq9w7bas16b7brdb75f91bh3275fb459093bk1ihpck2ci"))))
1501 (build-system python-build-system)
1503 `(("python-cryptography" ,python-cryptography)
1504 ("python-ntlm-auth" ,python-ntlm-auth)
1505 ("python-requests" ,python-requests)))
1506 (home-page "https://github.com/requests/requests-ntlm")
1508 "NTLM authentication support for Requests")
1510 "This package allows for HTTP NTLM authentication using the requests
1512 (license license:isc)))
1514 (define-public python-requests-mock
1516 (name "python-requests-mock")
1521 (uri (pypi-uri "requests-mock" version))
1524 "0jr997dvk6zbmhvbpcv3rajrgag69mcsm1ai3w3rgk2jdh6rg1mx"))))
1525 (build-system python-build-system)
1527 `(("python-requests" ,python-requests)
1528 ("python-six" ,python-six)))
1530 `(("python-pbr" ,python-pbr)
1531 ("python-discover" ,python-discover)
1532 ("python-docutils" ,python-docutils)
1533 ("python-fixtures" ,python-fixtures)
1534 ("python-mock" ,python-mock)
1535 ("python-sphinx" ,python-sphinx)
1536 ("python-testrepository" ,python-testrepository)
1537 ("python-testtools" ,python-testtools)))
1538 (home-page "https://requests-mock.readthedocs.org/")
1539 (synopsis "Mock out responses from the requests package")
1541 "This module provides a building block to stub out the HTTP requests
1542 portions of your testing code.")
1543 (properties `((python2-variant . ,(delay python2-requests-mock))))
1544 (license license:asl2.0)))
1546 (define-public python2-requests-mock
1547 (package (inherit (package-with-python2
1548 (strip-python2-variant python-requests-mock)))
1550 `(#:python ,python-2
1551 ;; FIXME: 'subunit.run discover: error: no such option: --list'
1554 (define-public python-requests-toolbelt
1556 (name "python-requests-toolbelt")
1560 (uri (pypi-uri "requests-toolbelt" version))
1563 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
1564 (build-system python-build-system)
1566 `(("python-betamax" ,python-betamax)
1567 ("python-mock" ,python-mock)
1568 ("python-pytest" ,python-pytest)))
1570 `(("python-requests" ,python-requests)))
1571 (synopsis "Extensions to python-requests")
1572 (description "This is a toolbelt of useful classes and functions to be used
1573 with python-requests.")
1574 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
1575 (license license:asl2.0)))
1577 (define-public python2-requests-toolbelt
1578 (package-with-python2 python-requests-toolbelt))
1580 (define-public python-oauthlib
1582 (name "python-oauthlib")
1586 (uri (pypi-uri "oauthlib" version))
1589 "163jg4a8f7c5ki655grrr47kgljy12wri3qly7ijf64sk1fjrqqc"))))
1590 (build-system python-build-system)
1592 `(#:phases (modify-phases %standard-phases
1595 (invoke "pytest" "-vv"))))))
1597 `(("python-pytest" ,python-pytest)
1598 ("python-pytest-cov" ,python-pytest-cov)
1599 ("python-mock" ,python-mock)))
1601 `(("python-cryptography" ,python-cryptography)
1602 ("python-pyjwt" ,python-pyjwt)
1603 ("python-blinker" ,python-blinker)))
1604 (home-page "https://github.com/oauthlib/oauthlib")
1605 (synopsis "OAuth implementation for Python")
1607 "Oauthlib is a generic, spec-compliant, thorough implementation of the
1608 OAuth request-signing logic.")
1609 (license license:bsd-3)))
1611 (define-public python2-oauthlib
1612 (package-with-python2 python-oauthlib))
1614 (define-public python-rauth
1616 (name "python-rauth")
1621 (uri (pypi-uri "rauth" version))
1624 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
1625 (build-system python-build-system)
1627 `(#:test-target "check"))
1629 `(("python-requests" ,python-requests)))
1630 (home-page "https://github.com/litl/rauth")
1631 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
1633 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
1634 provides service wrappers for convenient connection initialization and
1635 authenticated session objects providing things like keep-alive.")
1636 (license license:expat)
1637 (properties `((python2-variant . ,(delay python2-rauth))))))
1639 (define-public python2-rauth
1640 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
1643 (native-inputs `(("python2-unittest2" ,python2-unittest2)
1644 ,@(package-native-inputs base))))))
1646 (define-public python-urllib3
1648 (name "python-urllib3")
1653 (uri (pypi-uri "urllib3" version))
1656 "0cij8qcvvpj62g1q8n785qjkdymfh4b7vf45si4sw64l41rr3rfv"))))
1657 (build-system python-build-system)
1658 (arguments `(#:tests? #f))
1660 `(;; These 5 inputs are used to build urrlib3[secure]
1661 ("python-certifi" ,python-certifi)
1662 ("python-cryptography" ,python-cryptography)
1663 ("python-idna" ,python-idna)
1664 ("python-ipaddress" ,python-ipaddress)
1665 ("python-pyopenssl" ,python-pyopenssl)
1666 ("python-pysocks" ,python-pysocks)))
1667 (home-page "https://urllib3.readthedocs.io/")
1668 (synopsis "HTTP library with thread-safe connection pooling")
1670 "Urllib3 supports features left out of urllib and urllib2 libraries. It
1671 can reuse the same socket connection for multiple requests, it can POST files,
1672 supports url redirection and retries, and also gzip and deflate decoding.")
1673 (license license:expat)))
1675 ;; Some software requires an older version of urllib3, notably Docker.
1676 (define-public python-urllib3-1.24
1677 (package (inherit python-urllib3)
1681 (uri (pypi-uri "urllib3" version))
1684 "1x0slqrv6kixkbcdnxbglvjliwhc1payavxjvk8fvbqjrnasd4r3"))))))
1687 (define-public python2-urllib3
1688 (package-with-python2 python-urllib3))
1690 (define-public awscli
1697 (uri (pypi-uri name version))
1700 "0p479mfs9r0m82a217pap8156ijwvhv6r3kqa4k267gd05wgvygm"))))
1701 (build-system python-build-system)
1703 ;; FIXME: The 'pypi' release does not contain tests.
1706 (modify-phases %standard-phases
1707 (add-after 'unpack 'fix-reference-to-groff
1709 (substitute* "awscli/help.py"
1710 (("if not self._exists_on_path\\('groff'\\):") "")
1711 (("raise ExecutableNotFoundError\\('groff'\\)") "")
1712 (("cmdline = \\['groff'")
1713 (string-append "cmdline = ['" (which "groff") "'")))
1716 `(("python-colorama" ,python-colorama)
1717 ("python-botocore" ,python-botocore)
1718 ("python-s3transfer" ,python-s3transfer)
1719 ("python-docutils" ,python-docutils)
1720 ("python-pyyaml" ,python-pyyaml)
1721 ("python-rsa" ,python-rsa)))
1723 `(("groff" ,groff)))
1724 (home-page "https://aws.amazon.com/cli/")
1725 (synopsis "Command line client for AWS")
1726 (description "AWS CLI provides a unified command line interface to the
1727 Amazon Web Services (AWS) API.")
1728 (license license:asl2.0)))
1730 (define-public python-wsgiproxy2
1732 (name "python-wsgiproxy2")
1737 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
1739 (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
1740 (build-system python-build-system)
1742 `(("python-webtest" ,python-webtest)))
1744 `(("python-requests" ,python-requests)
1745 ("python-six" ,python-six)
1746 ("python-urllib3" ,python-urllib3)
1747 ("python-webob" ,python-webob)))
1748 (home-page "https://github.com/gawel/WSGIProxy2/")
1749 (synopsis "WSGI Proxy with various http client backends")
1750 (description "WSGI turns HTTP requests into WSGI function calls.
1751 WSGIProxy turns WSGI function calls into HTTP requests.
1752 It also includes code to sign requests and pass private data,
1753 and to spawn subprocesses to handle requests.")
1754 (license license:expat)))
1756 (define-public python2-wsgiproxy2
1757 (package-with-python2 python-wsgiproxy2))
1759 (define-public python-pastedeploy
1761 (name "python-pastedeploy")
1766 (uri (pypi-uri "PasteDeploy" version))
1768 (base32 "16qsq5y6mryslmbp5pn35x4z8z3ndp5rpgl42h226879nrw9hmg7"))))
1769 (build-system python-build-system)
1771 '(#:test-target "pytest"))
1773 `(("python-pytest" ,python-pytest)
1774 ("python-pytest-runner" ,python-pytest-runner)))
1775 (home-page "https://pylonsproject.org/")
1777 "Load, configure, and compose WSGI applications and servers")
1779 "This tool provides code to load WSGI applications and servers from URIs;
1780 these URIs can refer to Python Eggs for INI-style configuration files. Paste
1781 Script provides commands to serve applications based on this configuration
1783 (license license:expat)))
1785 (define-public python2-pastedeploy
1786 (package-with-python2 python-pastedeploy))
1788 (define-public python-webtest
1790 (name "python-webtest")
1795 (uri (pypi-uri "WebTest" version))
1798 "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21"))))
1799 (build-system python-build-system)
1801 ;; Tests require python-pyquery, which creates a circular dependency.
1804 `(("python-waitress" ,python-waitress)
1805 ("python-webob" ,python-webob)
1806 ("python-six" ,python-six)
1807 ("python-beautifulsoup4" ,python-beautifulsoup4)))
1808 (home-page "https://docs.pylonsproject.org/projects/webtest/")
1809 (synopsis "Helper to test WSGI applications")
1810 (description "Webtest allows you to test your Python web applications
1811 without starting an HTTP server. It supports anything that supports the
1813 (license license:expat)))
1815 (define-public python2-webtest
1816 (package-with-python2 python-webtest))
1818 (define-public python-flask
1820 (name "python-flask")
1824 (uri (pypi-uri "Flask" version))
1827 "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf"))))
1828 (build-system python-build-system)
1831 (modify-phases %standard-phases
1834 (setenv "PYTHONPATH" (string-append "./build/lib:"
1835 (getenv "PYTHONPATH")))
1836 (invoke "pytest" "-vv" "tests"))))))
1838 `(("python-pytest" ,python-pytest)))
1840 `(("python-itsdangerous" ,python-itsdangerous)
1841 ("python-jinja2" ,python-jinja2)
1842 ("python-click" ,python-click)
1843 ("python-werkzeug" ,python-werkzeug)))
1844 (home-page "https://www.palletsprojects.com/p/flask/")
1845 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
1846 (description "Flask is a micro web framework based on the Werkzeug toolkit
1847 and Jinja2 template engine. It is called a micro framework because it does not
1848 presume or force a developer to use a particular tool or library.")
1849 (license license:bsd-3)))
1851 (define-public python2-flask
1852 (package-with-python2 python-flask))
1854 (define-public python-flask-wtf
1856 (name "python-flask-wtf")
1861 (uri (pypi-uri "Flask-WTF" version))
1864 "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"))))
1865 (build-system python-build-system)
1868 (modify-phases %standard-phases
1871 (setenv "PYTHONPATH" (string-append "./build/lib:"
1872 (getenv "PYTHONPATH")))
1873 (invoke "pytest" "-vv"))))))
1875 `(("python-flask-babel" ,python-flask-babel)
1876 ("python-babel" ,python-babel)
1877 ("python-wtforms" ,python-wtforms)))
1879 `(("python-pytest" ,python-pytest)))
1880 (home-page "https://github.com/lepture/flask-wtf")
1881 (synopsis "Simple integration of Flask and WTForms")
1882 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
1883 upload, and reCAPTCHA.")
1884 (license license:bsd-3)))
1886 (define-public python2-flask-wtf
1887 (package-with-python2 python-flask-wtf))
1889 (define-public python-flask-multistatic
1891 (name "python-flask-multistatic")
1896 (uri (pypi-uri "flask-multistatic" version))
1899 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
1900 (build-system python-build-system)
1902 `(("python-flask" ,python-flask)))
1903 (home-page "https://pagure.io/flask-multistatic")
1904 (synopsis "Flask plugin to allow overriding static files")
1905 (description "@code{flask-multistatic} is a flask plugin that adds support
1906 for overriding static files.")
1907 (license license:gpl3+)))
1909 (define-public python2-flask-multistatic
1910 (package-with-python2 python-flask-multistatic))
1912 (define-public python-cookies
1914 (name "python-cookies")
1918 (uri (pypi-uri "cookies" version))
1921 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
1922 (build-system python-build-system)
1924 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
1927 `(("python-pytest" ,python-pytest)))
1928 (synopsis "HTTP cookie parser and renderer")
1929 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
1931 (home-page "https://gitlab.com/sashahart/cookies")
1932 (license license:expat)))
1934 (define-public python2-cookies
1935 (package-with-python2 python-cookies))
1937 (define-public python-responses
1939 (name "python-responses")
1943 (uri (pypi-uri "responses" version))
1946 "147pacwkkqy3qf3hr33fnl1xbzgw0zsm3qppvvy9qhq8h069qbah"))))
1947 (build-system python-build-system)
1949 `(;; Test suite is not distributed:
1950 ;; https://github.com/getsentry/responses/issues/38
1953 `(("python-mock" ,python-mock)))
1955 `(("python-requests" ,python-requests)
1956 ("python-cookies" ,python-cookies)
1957 ("python-six" ,python-six)))
1958 (home-page "https://github.com/getsentry/responses")
1959 (synopsis "Utility for mocking out the `requests` Python library")
1960 (description "A utility library for mocking out the `requests` Python
1962 (license license:asl2.0)))
1964 (define-public python2-responses
1965 (package-with-python2 python-responses))
1967 (define-public python-grequests
1969 (name "python-grequests")
1974 (uri (pypi-uri "grequests" version))
1977 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
1978 (build-system python-build-system)
1980 `(("python-gevent" ,python-gevent)
1981 ("python-requests" ,python-requests)))
1983 `(("python-nose" ,python-nose)))
1984 (home-page "https://github.com/kennethreitz/grequests")
1985 (synopsis "Python library for asynchronous HTTP requests")
1986 (description "GRequests is a Python library that allows you to use
1987 @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
1988 (license license:bsd-2)))
1990 (define-public python-geventhttpclient
1992 (name "python-geventhttpclient")
1996 (uri (pypi-uri "geventhttpclient" version))
1999 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
2000 (modules '((guix build utils)))
2003 ;; Delete pre-compiled files.
2004 (for-each delete-file (find-files "src/geventhttpclient"
2007 (build-system python-build-system)
2010 (modify-phases %standard-phases
2011 (add-after 'unpack 'delete-network-tests
2013 (delete-file "src/geventhttpclient/tests/test_client.py")
2016 (lambda* (#:key inputs outputs #:allow-other-keys)
2017 (add-installed-pythonpath inputs outputs)
2018 (invoke "py.test" "src/geventhttpclient/tests" "-v"
2019 ;; Append the test modules to sys.path to avoid
2020 ;; namespace conflict which breaks SSL tests.
2021 "--import-mode=append"
2022 ;; XXX: Disable test fails with Python 3.8:
2023 ;; https://github.com/gwik/geventhttpclient/issues/119
2024 "-k" (string-append "not test_cookielib_compatibility"))
2027 `(("python-pytest" ,python-pytest)))
2029 `(("python-certifi" ,python-certifi)
2030 ("python-gevent" ,python-gevent)
2031 ("python-six" ,python-six)))
2032 (home-page "https://github.com/gwik/geventhttpclient")
2033 (synopsis "HTTP client library for gevent")
2034 (description "@code{python-geventhttpclient} is a high performance,
2035 concurrent HTTP client library for python using @code{gevent}.")
2036 (license license:expat)))
2038 (define-public python2-geventhttpclient
2039 (package-with-python2 python-geventhttpclient))
2041 (define-public python-requests-oauthlib
2043 (name "python-requests-oauthlib")
2048 (uri (pypi-uri "requests-oauthlib" version))
2051 "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
2052 (build-system python-build-system)
2055 (modify-phases %standard-phases
2056 ;; removes tests that require network access
2057 (add-before 'check 'pre-check
2059 (delete-file "tests/test_core.py")
2062 `(("python-pyjwt" ,python-pyjwt)
2063 ("python-requests-mock" ,python-requests-mock)
2064 ("python-mock" ,python-mock)))
2066 `(("python-oauthlib" ,python-oauthlib)
2067 ("python-requests" ,python-requests)))
2069 "https://github.com/requests/requests-oauthlib")
2071 "OAuthlib authentication support for Requests")
2073 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
2074 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
2075 (license license:isc)))
2077 (define-public python2-requests-oauthlib
2078 (package-with-python2 python-requests-oauthlib))
2080 (define-public python-url
2086 (uri (pypi-uri "url" version))
2089 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
2090 (build-system python-build-system)
2092 `(("python-publicsuffix" ,python-publicsuffix)))
2094 `(("python-coverage" ,python-coverage)
2095 ("python-nose" ,python-nose)))
2097 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
2098 (home-page "https://github.com/seomoz/url-py")
2099 (synopsis "URL Parsing")
2100 (description "Library for parsing urls.")
2101 (license license:expat)
2102 (properties `((python2-variant . ,(delay python2-url))))))
2104 (define-public python2-url
2105 (let ((base (package-with-python2 (strip-python2-variant python-url))))
2106 (package (inherit base)
2108 `(("python2-publicsuffix" ,python2-publicsuffix))))))
2110 (define-public python-cachecontrol
2112 (name "python-cachecontrol")
2117 ;; Pypi does not have tests.
2119 (url "https://github.com/ionrock/cachecontrol")
2120 (commit (string-append "v" version))))
2121 (file-name (git-file-name name version))
2124 "03lgc65sl04n0cgzmmgg99bk83f9i6k8yrmcd4hpl46q1pymn0kz"))))
2125 (build-system python-build-system)
2127 ;; Versions > 0.11.6 depend on CherryPy for testing.
2128 ;; It's too much work to package CherryPy for now.
2131 `(("python-requests" ,python-requests)
2132 ("python-msgpack" ,python-msgpack)
2133 ("python-lockfile" ,python-lockfile)))
2134 (home-page "https://github.com/ionrock/cachecontrol")
2135 (synopsis "The httplib2 caching algorithms for use with requests")
2136 (description "CacheControl is a port of the caching algorithms in
2137 @code{httplib2} for use with @code{requests} session objects.")
2138 (license license:asl2.0)))
2140 (define-public python2-cachecontrol
2141 (package-with-python2 python-cachecontrol))
2143 (define-public python-betamax
2145 (name "python-betamax")
2150 (uri (pypi-uri "betamax" version))
2153 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
2154 (build-system python-build-system)
2156 '(;; Many tests fail because they require networking.
2159 `(("python-requests" ,python-requests)))
2160 (home-page "https://github.com/sigmavirus24/betamax")
2161 (synopsis "Record HTTP interactions with python-requests")
2162 (description "Betamax will record your test suite's HTTP interactions and
2163 replay them during future tests. It is designed to work with python-requests.")
2164 (license license:expat)))
2166 (define-public python2-betamax
2167 (package-with-python2 python-betamax))
2169 (define-public python-betamax-matchers
2171 (name "python-betamax-matchers")
2176 (uri (pypi-uri "betamax-matchers" version))
2179 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
2180 (build-system python-build-system)
2182 `(("python-betamax" ,python-betamax)
2183 ("python-requests-toolbelt" ,python-requests-toolbelt)))
2184 (home-page "https://github.com/sigmavirus24/betamax_matchers")
2185 (synopsis "VCR imitation for python-requests")
2186 (description "@code{betamax-matchers} provides a set of Matchers for
2188 (license license:asl2.0)))
2190 (define-public python2-betamax-matchers
2191 (package-with-python2 python-betamax-matchers))
2193 (define-public python-s3transfer
2195 (name "python-s3transfer")
2199 (uri (pypi-uri "s3transfer" version))
2202 "08fhj73b1ai52hrs2q3nggshq3pswn1gq8ch3m009cb2v2vmqggj"))))
2203 (build-system python-build-system)
2206 (modify-phases %standard-phases
2207 (add-after 'unpack 'patch
2209 ;; There's a small issue with one test with Python 3.8, this
2210 ;; change has been suggested upstream:
2211 ;; https://github.com/boto/s3transfer/pull/164
2212 (substitute* "tests/unit/test_s3transfer.py"
2213 (("super\\(FailedDownloadParts, self\\)\\.submit\\(function\\)")
2214 "futures.Future()"))
2218 ;; Some of the 'integration' tests require network access or
2219 ;; login credentials.
2220 (invoke "nosetests" "--exclude=integration")
2223 `(("python-docutils" ,python-docutils)
2224 ("python-mock" ,python-mock)
2225 ("python-nose" ,python-nose)))
2227 `(("python-botocore" ,python-botocore)
2228 ("python-urllib3" ,python-urllib3)))
2229 (synopsis "Amazon S3 Transfer Manager")
2230 (description "S3transfer is a Python library for managing Amazon S3
2232 (home-page "https://github.com/boto/s3transfer")
2233 (license license:asl2.0)
2234 (properties `((python2-variant . ,(delay python2-s3transfer))))))
2236 (define-public python2-s3transfer
2237 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
2241 `(("python2-futures" ,python2-futures)
2242 ,@(package-native-inputs base))))))
2244 (define-public python-slimit
2246 (name "python-slimit")
2251 (uri (pypi-uri "slimit" version ".zip"))
2254 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
2255 (build-system python-build-system)
2257 `(("unzip" ,unzip)))
2259 `(("python-ply" ,python-ply)))
2260 (home-page "https://slimit.readthedocs.io/")
2261 (synopsis "JavaScript minifier, parser and lexer written in Python")
2263 "SlimIt is a JavaScript minifier written in Python. It compiles
2264 JavaScript into more compact code so that it downloads and runs faster.
2265 SlimIt also provides a library that includes a JavaScript parser, lexer,
2266 pretty printer and a tree visitor.")
2267 (license license:expat)))
2269 (define-public python-flask-restful
2271 (name "python-flask-restful")
2276 (uri (pypi-uri "Flask-RESTful" version))
2277 (patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
2280 "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
2281 (build-system python-build-system)
2283 `(("python-aniso8601" ,python-aniso8601)
2284 ("python-flask" ,python-flask)
2285 ("python-pycrypto" ,python-pycrypto)
2286 ("python-pytz" ,python-pytz)))
2288 `(;; Optional dependency of Flask. Tests need it.
2289 ("python-blinker" ,python-blinker)
2290 ("python-mock" ,python-mock) ; For tests
2291 ("python-nose" ,python-nose))) ;for tests
2293 "https://www.github.com/flask-restful/flask-restful/")
2295 "Flask module for creating REST APIs")
2297 "This package contains a Flask module for creating REST APIs.")
2298 (license license:bsd-3)))
2300 (define-public python-flask-basicauth
2302 (name "python-flask-basicauth")
2307 (uri (pypi-uri "Flask-BasicAuth" version))
2310 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
2311 (build-system python-build-system)
2313 `(("python-flask" ,python-flask)))
2315 "https://github.com/jpvanhal/flask-basicauth")
2317 "HTTP basic access authentication for Flask")
2319 "This package provides HTTP basic access authentication for Flask.")
2320 (license license:bsd-3)))
2322 (define-public python-flask-htpasswd
2324 (name "python-flask-htpasswd")
2329 (uri (pypi-uri "flask-htpasswd" version))
2332 "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
2333 (build-system python-build-system)
2335 `(("python-flask" ,python-flask)
2336 ("python-itsdangerous" ,python-itsdangerous)
2337 ("python-passlib" ,python-passlib)
2338 ("python-tox" ,python-tox)))
2339 (home-page "http://github.com/carsongee/flask-htpasswd")
2340 (synopsis "Basic authentication via htpasswd files in Flask applications")
2341 (description "This package provides Basic authentication via
2342 @file{htpasswd} files and access_token authentication in Flask
2344 (license license:bsd-3)))
2346 (define-public python-flask-sqlalchemy
2348 (name "python-flask-sqlalchemy")
2352 (uri (pypi-uri "Flask-SQLAlchemy" version))
2355 "0nnllf0ddbh9jlhngnyjj98lbxgxr1csaplllx0caw98syq0k5hc"))))
2356 (build-system python-build-system)
2358 `(("python-flask" ,python-flask)
2359 ("python-sqlalchemy" ,python-sqlalchemy)))
2360 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
2361 (synopsis "Module adding SQLAlchemy support to your Flask application")
2363 "This package adds SQLAlchemy support to your Flask application.")
2364 (license license:bsd-3)))
2366 (define-public python-flask-restplus
2368 (name "python-flask-restplus")
2373 (uri (pypi-uri "flask-restplus" version))
2376 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2377 (build-system python-build-system)
2379 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2381 ;; (modify-phases %standard-phases
2384 ;; (invoke "nosetests")
2387 `(("python-aniso8601" ,python-aniso8601)
2388 ("python-flask" ,python-flask)
2389 ("python-jsonschema" ,python-jsonschema)
2390 ("python-pytz" ,python-pytz)
2391 ("python-six" ,python-six)))
2393 `(("python-tzlocal" ,python-tzlocal)
2394 ("python-blinker" ,python-blinker)
2395 ("python-nose" ,python-nose)
2396 ("python-rednose" ,python-rednose)))
2397 (home-page "https://github.com/noirbizarre/flask-restplus")
2398 (synopsis "Framework for documented API development with Flask")
2399 (description "This package provides a framework for API development with
2400 the Flask web framework in Python. It is similar to package
2401 @code{python-flask-restful} but supports the @code{python-swagger}
2402 documentation builder.")
2403 (license license:expat)))
2405 (define-public python-flask-restful-swagger
2407 (name "python-flask-restful-swagger")
2412 (uri (pypi-uri "flask-restful-swagger" version))
2415 "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
2416 (build-system python-build-system)
2417 (arguments '(#:tests? #f)) ;no tests
2419 `(("python-flask-restful" ,python-flask-restful)))
2420 (home-page "https://github.com/rantav/flask-restful-swagger")
2421 (synopsis "Extract Swagger specs from Flask-Restful projects")
2422 (description "This package lets you extract Swagger API documentation
2423 specs from your Flask-Restful projects.")
2424 (license license:expat)))
2426 (define-public python2-flask-restful-swagger
2427 (package-with-python2 python-flask-restful-swagger))
2429 (define-public python-htmlmin
2431 (name "python-htmlmin")
2436 (uri (pypi-uri "htmlmin" version))
2439 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
2441 `(#:tests? #f)) ; no tests
2442 (build-system python-build-system)
2443 (home-page "https://htmlmin.readthedocs.org/en/latest/")
2444 (synopsis "HTML minifier")
2445 (description "@code{htmlmin} is an HTML minifier that just works.
2446 It comes with safe defaults and easily configurable options.")
2447 (license license:bsd-3)))
2449 (define-public python2-htmlmin
2450 (package-with-python2 python-htmlmin))
2452 (define-public python-flask-htmlmin
2454 (name "python-flask-htmlmin")
2459 (uri (pypi-uri "Flask-HTMLmin" version))
2462 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
2464 `(("python-flask" ,python-flask)
2465 ("python-htmlmin" ,python-htmlmin)))
2466 (build-system python-build-system)
2467 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
2468 (synopsis "HTML response minifier for Flask")
2470 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
2471 (license license:bsd-3)))
2473 (define-public python2-flask-htmlmin
2474 (package-with-python2 python-flask-htmlmin))
2476 (define-public python-jsmin
2478 (name "python-jsmin")
2483 (uri (pypi-uri "jsmin" version))
2486 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
2487 (build-system python-build-system)
2488 (home-page "https://github.com/tikitu/jsmin/")
2489 (synopsis "Python JavaScript minifier")
2491 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
2492 on the command line.")
2493 (license license:expat)))
2495 (define-public python-flask-login
2497 (name "python-flask-login")
2503 (url "https://github.com/maxcountryman/flask-login.git")
2505 (file-name (git-file-name name version))
2507 (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
2508 (build-system python-build-system)
2510 `(("python-flask" ,python-flask)))
2513 `(("python-blinker" ,python-blinker)
2514 ("python-coverage" ,python-coverage)
2515 ("python-mock" ,python-mock)
2516 ("python-pycodestyle" ,python-pycodestyle)
2517 ("python-pyflakes" ,python-pyflakes)
2518 ("python-pytest" ,python-pytest)
2519 ("python-semantic-version" ,python-semantic-version)
2520 ("python-werkzeug" ,python-werkzeug)))
2521 (home-page "https://github.com/maxcountryman/flask-login")
2522 (synopsis "User session management for Flask")
2524 "@code{Flask-Login} provides user session management for Flask. It
2525 handles the common tasks of logging in, logging out, and remembering your
2526 users' sessions over extended periods of time.")
2527 (license license:expat)))
2529 (define-public python2-flask-login
2530 (package-with-python2 python-flask-login))
2532 (define-public python-oauth2client
2534 (name "python-oauth2client")
2539 (uri (pypi-uri "oauth2client" version))
2542 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
2543 (build-system python-build-system)
2547 `(("python-httplib2" ,python-httplib2)
2548 ("python-pyasn1" ,python-pyasn1)
2549 ("python-pyasn1-modules" ,python-pyasn1-modules)
2550 ("python-rsa" ,python-rsa)
2551 ("python-six" ,python-six)))
2552 (home-page "https://github.com/google/oauth2client/")
2553 (synopsis "OAuth 2.0 client library")
2554 (description "@code{python-oauth2client} provides an OAuth 2.0 client
2555 library for Python")
2556 (license license:asl2.0)))
2558 (define-public python2-oauth2client
2559 (package-with-python2 python-oauth2client))
2561 (define-public python-flask-oidc
2563 (name "python-flask-oidc")
2568 (uri (pypi-uri "flask-oidc" version))
2571 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
2572 (build-system python-build-system)
2574 `(("python-flask" ,python-flask)
2575 ("python-itsdangerous" ,python-itsdangerous)
2576 ("python-oauth2client" ,python-oauth2client)
2577 ("python-six" ,python-six)))
2579 `(("python-nose" ,python-nose)
2580 ("python-mock" ,python-mock)))
2581 (home-page "https://github.com/puiterwijk/flask-oidc")
2582 (synopsis "OpenID Connect extension for Flask")
2583 (description "@code{python-flask-oidc} provides an OpenID Connect extension
2585 (license license:bsd-2)))
2587 (define-public python-webassets
2589 (name "python-webassets")
2594 (uri (pypi-uri "webassets" version))
2597 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
2598 (build-system python-build-system)
2600 `(("python-jinja2" ,python-jinja2)
2601 ("python-mock" ,python-mock)
2602 ("python-nose" ,python-nose)
2603 ("python-pytest" ,python-pytest)))
2604 (home-page "https://github.com/miracle2k/webassets")
2605 (synopsis "Media asset management")
2606 (description "Merges, minifies and compresses Javascript and CSS files,
2607 supporting a variety of different filters, including YUI, jsmin, jspacker or
2608 CSS tidy. Also supports URL rewriting in CSS files.")
2609 (license license:bsd-2)))
2611 (define-public python-cssmin
2613 (name "python-cssmin")
2618 (uri (pypi-uri "cssmin" version))
2621 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
2622 (build-system python-build-system)
2623 (home-page "https://github.com/zacharyvoase/cssmin")
2624 (synopsis "Python port of the YUI CSS Compressor")
2625 (description "Python port of the YUI CSS Compressor.")
2626 (license (list license:expat license:bsd-3))))
2628 (define-public python2-cssmin
2629 (package-with-python2 python-cssmin))
2631 (define-public python-elasticsearch
2633 (name "python-elasticsearch")
2638 (uri (pypi-uri "elasticsearch" version))
2641 "0rnjvlhw4v3vg14l519qliy1s1zpmx3827q0xfviwvk42rr7hh01"))))
2642 (build-system python-build-system)
2644 `(("python-mock" ,python-mock)
2645 ("python-nosexcover" ,python-nosexcover)
2646 ("python-pyaml" ,python-pyaml)
2647 ("python-requests" ,python-requests)))
2649 `(("urllib3" ,python-urllib3)))
2651 ;; tests require the test_elasticsearch module but it is not distributed.
2653 (home-page "https://github.com/elastic/elasticsearch-py")
2654 (synopsis "Low-level client for Elasticsearch")
2655 (description "Official low-level client for Elasticsearch. Its goal is to
2656 provide common ground for all Elasticsearch-related code in Python; because of
2657 this it tries to be opinion-free and very extendable.")
2658 (license license:expat)))
2660 (define-public python2-elasticsearch
2661 (package-with-python2 python-elasticsearch))
2663 (define-public python-flask-script
2665 (name "python-flask-script")
2670 (uri (pypi-uri "Flask-Script" version))
2673 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
2674 (build-system python-build-system)
2677 (modify-phases %standard-phases
2678 (add-after 'unpack 'patch-tests
2680 (substitute* "tests.py"
2681 (("flask\\.ext\\.script") "flask_script"))
2684 `(("python-flask" ,python-flask)
2685 ("python-argcomplete" ,python-argcomplete)
2686 ("python-werkzeug" ,python-werkzeug)))
2688 `(("python-pytest" ,python-pytest)))
2690 "https://github.com/smurfix/flask-script")
2691 (synopsis "Scripting support for Flask")
2692 (description "The Flask-Script extension provides support for writing
2693 external scripts in Flask. This includes running a development server,
2694 a customised Python shell, scripts to set up your database, cronjobs,
2695 and other command-line tasks that belong outside the web application
2697 (license license:bsd-3)))
2699 (define-public python2-flask-script
2700 (package-with-python2 python-flask-script))
2702 (define-public python-flask-migrate
2704 (name "python-flask-migrate")
2709 (uri (pypi-uri "Flask-Migrate" version))
2712 "1vip9ww6l18dxffjsggm83k71zkvihxpnhaswpv8klh95s6517d6"))))
2713 (build-system python-build-system)
2715 `(("python-flask" ,python-flask)
2716 ("python-alembic" ,python-alembic)
2717 ("python-sqlalchemy" ,python-sqlalchemy)
2718 ("python-flask-script" ,python-flask-script)
2719 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
2720 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
2721 (synopsis "SQLAlchemy database migrations for Flask programs using
2723 (description "This package contains SQLAlchemy database migration tools
2724 for Flask programs that are using @code{python-alembic}.")
2725 (license license:expat)))
2727 (define-public python-genshi
2729 (name "python-genshi")
2735 (url "https://github.com/edgewall/genshi.git")
2737 (file-name (git-file-name name version))
2739 (base32 "04bw7nd4wyn8ixnhik57hny2xpjjpn80k5hp6691inix5gc6rxaf"))))
2740 (build-system python-build-system)
2741 (home-page "https://genshi.edgewall.org/")
2742 (synopsis "Toolkit for generation of output for the web")
2743 (description "Genshi is a Python library that provides an integrated set
2744 of components for parsing, generating, and processing HTML, XML or other
2745 textual content for output generation on the web.")
2746 (license license:bsd-3)))
2748 (define-public python2-genshi
2749 (package-with-python2 python-genshi))
2751 (define-public python-flask-principal
2753 (name "python-flask-principal")
2758 (uri (pypi-uri "Flask-Principal" version))
2761 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
2762 (build-system python-build-system)
2764 `(("python-blinker" ,python-blinker)))
2766 `(("python-flask" ,python-flask)
2767 ("python-nose" ,python-nose)))
2768 (home-page "https://pythonhosted.org/Flask-Principal/")
2769 (synopsis "Identity management for Flask")
2770 (description "@code{flask_principal} is a identity management library for
2771 Flask. It supports managing both authentication and authorization data in a
2772 thread-local variable.")
2773 (license license:expat)))
2775 (define-public python2-flask-principal
2776 (package-with-python2 python-flask-principal))
2778 (define-public python-flask-httpauth
2780 (name "python-flask-httpauth")
2785 (uri (pypi-uri "Flask-HTTPAuth" version))
2788 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
2789 (build-system python-build-system)
2791 `(("python-flask" ,python-flask)))
2792 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
2793 (synopsis "Basic and Digest HTTP authentication for Flask routes")
2794 (description "@code{flask_httpauth} provides Basic and Digest HTTP
2795 authentication for Flask routes.")
2796 (license license:expat)))
2798 (define-public python2-flask-httpauth
2799 (package-with-python2 python-flask-httpauth))
2801 (define-public python-uritemplate
2803 (name "python-uritemplate")
2808 (uri (pypi-uri "uritemplate" version))
2811 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
2812 (build-system python-build-system)
2813 (home-page "https://uritemplate.readthedocs.org")
2814 (synopsis "Library to deal with URI Templates")
2815 (description "@code{uritemplate} provides Python library to deal with URI
2817 (license license:bsd-2)))
2819 (define-public python2-uritemplate
2820 (package-with-python2 python-uritemplate))
2822 (define-public python-publicsuffix
2824 (name "python-publicsuffix")
2828 (uri (pypi-uri "publicsuffix" version))
2831 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
2832 (build-system python-build-system)
2834 `(#:tests? #f)) ; tests use the internet
2835 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
2836 (synopsis "Get suffix for a domain name")
2837 (description "Get a public suffix for a domain name using the Public Suffix
2839 (license license:expat)))
2841 (define-public python2-publicsuffix
2842 (package-with-python2 python-publicsuffix))
2844 (define-public python-publicsuffix2
2846 (name "python-publicsuffix2")
2847 (version "2.20191221")
2851 (uri (pypi-uri "publicsuffix2" version))
2853 (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
2854 (build-system python-build-system)
2857 (modify-phases %standard-phases
2858 (add-after 'unpack 'ignore-maintainer-inputs
2860 ;; Comment out a demand for python-requests, which is used only by
2861 ;; the unused ‘update_psl’ helper command.
2862 (substitute* "setup.py"
2863 (("'requests " match)
2864 (format #f "# ~a" match)))
2866 #:tests? #f)) ; the test suite requires network access
2867 (home-page "https://github.com/pombredanne/python-publicsuffix2")
2868 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
2869 (description "Get a public suffix for a domain name using the Public Suffix
2870 List. Forked from and using the same API as the publicsuffix package.")
2871 (license (list license:expat license:mpl2.0))))
2873 (define-public python2-publicsuffix2
2874 (package-with-python2 python-publicsuffix2))
2876 (define-public python-werkzeug
2878 (name "python-werkzeug")
2883 (uri (pypi-uri "Werkzeug" version))
2886 "15kh0z61klp62mrc1prka13xsshxn0rsp1j1s2964iw86yisi6qn"))))
2887 (build-system python-build-system)
2890 (modify-phases %standard-phases
2892 (add-after 'install 'check
2893 (lambda* (#:key inputs outputs #:allow-other-keys)
2894 (add-installed-pythonpath inputs outputs)
2895 (invoke "python" "-m" "pytest"))))))
2897 `(("python-requests" ,python-requests)))
2899 `(("python-pytest" ,python-pytest)
2900 ("python-pytest-timeout" ,python-pytest-timeout)))
2901 (home-page "https://www.palletsprojects.org/p/werkzeug/")
2902 (synopsis "Utilities for WSGI applications")
2903 (description "One of the most advanced WSGI utility modules. It includes a
2904 powerful debugger, full-featured request and response objects, HTTP utilities to
2905 handle entity tags, cache control headers, HTTP dates, cookie handling, file
2906 uploads, a powerful URL routing system and a bunch of community-contributed
2908 (license license:x11)))
2910 (define-public python2-werkzeug
2911 (package-with-python2 python-werkzeug))
2913 (define-public python-bottle
2915 (name "python-bottle")
2920 (uri (pypi-uri "bottle" version))
2923 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
2924 (build-system python-build-system)
2925 (home-page "http://bottlepy.org/")
2926 (synopsis "WSGI framework for small web-applications.")
2927 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
2928 (license license:expat)))
2930 (define-public python2-bottle
2931 (package-with-python2 python-bottle))
2933 (define-public python-wtforms
2935 (name "python-wtforms")
2940 (uri (pypi-uri "WTForms" version ".zip"))
2943 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
2944 (build-system python-build-system)
2947 (modify-phases %standard-phases
2948 (add-after 'unpack 'remove-django-test
2949 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
2953 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
2954 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
2957 `(("unzip" ,unzip)))
2958 (home-page "http://wtforms.simplecodes.com/")
2960 "Form validation and rendering library for Python web development")
2962 "WTForms is a flexible forms validation and rendering library
2963 for Python web development. It is very similar to the web form API
2964 available in Django, but is a standalone package.")
2965 (license license:bsd-3)))
2967 (define-public python2-wtforms
2968 (package-with-python2 python-wtforms))
2970 (define-public python-paste
2972 (name "python-paste")
2977 (uri (pypi-uri "Paste" version))
2980 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
2981 (patches (search-patches "python-paste-remove-timing-test.patch"))
2982 (modules '((guix build utils)))
2985 ;; This test calls out to the internet.
2986 (delete-file "tests/test_proxy.py") #t))))
2987 (build-system python-build-system)
2989 `(("python-pytest" ,python-pytest)
2990 ("python-pytest-runner" ,python-pytest-runner)
2991 ("python-nose" ,python-nose)))
2993 `(("python-six" ,python-six)))
2994 (home-page "https://pythonpaste.readthedocs.io/")
2996 "Python web development tools, focusing on WSGI")
2998 "Paste provides a variety of web development tools and middleware which
2999 can be nested together to build web applications. Paste's design closely
3000 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
3001 (license license:expat)))
3003 (define-public python2-paste
3004 (package-with-python2 python-paste))
3006 (define-public python-pastescript
3008 (name "python-pastescript")
3013 (uri (pypi-uri "PasteScript" version))
3016 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
3017 (build-system python-build-system)
3019 `(("python-nose" ,python-nose)))
3021 `(("python-paste" ,python-paste)
3022 ("python-pastedeploy" ,python-pastedeploy)))
3023 (home-page (string-append "https://web.archive.org/web/20161025192515/"
3024 "http://pythonpaste.org/script/"))
3026 '(;; Unfortunately, this requires the latest unittest2,
3027 ;; but that requires traceback2 which requires linecache2 which requires
3028 ;; unittest2. So we're skipping tests for now.
3029 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
3030 ;; so in theory we could get around this situation somehow.)
3033 "Pluggable command line tool for serving web applications and more")
3035 "PasteScript is a plugin-friendly command line tool which provides a
3036 variety of features, from launching web applications to bootstrapping project
3038 (license license:expat)))
3040 (define-public python2-pastescript
3041 (package-with-python2 python-pastescript))
3043 (define-public python2-urlgrabber
3045 (name "python2-urlgrabber")
3050 (uri (pypi-uri "urlgrabber" version))
3052 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
3053 (build-system python-build-system)
3054 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
3055 (home-page "http://urlgrabber.baseurl.org")
3056 (synopsis "High-level cross protocol url-grabber")
3057 (description "@code{urlgrabber} is Python2 library that unifies access to
3058 files available on web, FTP or locally. It supports HTTP, FTP and file://
3059 protocols, it supports features like HTTP keep-alive, reget, throttling and
3061 (license license:lgpl2.1+)))
3063 (define-public python-pycares
3065 (name "python-pycares")
3070 (uri (pypi-uri "pycares" version))
3073 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
3074 (build-system python-build-system)
3076 `(#:tests? #f)) ;tests require internet access
3077 (home-page "http://github.com/saghul/pycares")
3078 (synopsis "Python interface for @code{c-ares}")
3079 (description "@code{pycares} is a Python module which provides an
3080 interface to @code{c-ares}, a C library that performs DNS requests and
3081 name resolutions asynchronously.")
3082 (license license:expat)))
3084 (define-public python-yarl
3086 (name "python-yarl")
3091 (uri (pypi-uri "yarl" version))
3094 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
3095 (build-system python-build-system)
3097 `(("python-pytest" ,python-pytest)
3098 ("python-pytest-runner" ,python-pytest-runner)))
3100 `(("python-idna" ,python-idna)
3101 ("python-multidict" ,python-multidict)))
3102 (home-page "https://github.com/aio-libs/yarl/")
3103 (synopsis "Yet another URL library")
3104 (description "@code{yarl} module provides handy @code{URL} class
3105 for URL parsing and changing.")
3106 (license license:asl2.0)))
3108 (define-public python-google-api-client
3110 (name "python-google-api-client")
3115 (uri (pypi-uri "google-api-python-client" version))
3118 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
3119 (build-system python-build-system)
3121 '(#:tests? #f)) ; tests require internet access
3123 `(("python-httplib2" ,python-httplib2)
3124 ("python-six" ,python-six)
3125 ("python-oauth2client" ,python-oauth2client)
3126 ("python-uritemplate" ,python-uritemplate)))
3127 (home-page "https://github.com/google/google-api-python-client")
3128 (synopsis "Core Python library for accessing Google APIs")
3129 (description "Python client library for Google's discovery based APIs")
3130 (license license:asl2.0)))
3132 (define-public python2-google-api-client
3133 (package-with-python2 python-google-api-client))
3135 (define-public python-hawkauthlib
3137 (name "python-hawkauthlib")
3142 (uri (pypi-uri "hawkauthlib" version))
3145 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
3146 (build-system python-build-system)
3148 `(("python-requests" ,python-requests)
3149 ("python-webob" ,python-webob)))
3150 (home-page "https://github.com/mozilla-services/hawkauthlib")
3151 (synopsis "Hawk Access Authentication protocol")
3153 "This is a low-level Python library for implementing Hawk Access Authentication,
3154 a simple HTTP request-signing scheme.")
3155 (license license:mpl2.0)))
3157 (define-public python-pybrowserid
3159 (name "python-pybrowserid")
3164 (uri (pypi-uri "PyBrowserID" version))
3167 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
3168 (build-system python-build-system)
3170 `(("python-requests" ,python-requests)))
3172 `(("python-mock" ,python-mock)))
3173 (home-page "https://github.com/mozilla/PyBrowserID")
3174 (synopsis "Python library for the BrowserID protocol")
3176 "This is a Python client library for the BrowserID protocol that
3177 underlies Mozilla Persona.")
3178 (license license:mpl2.0)))
3180 (define-public python-pyfxa
3182 (name "python-pyfxa")
3187 (uri (pypi-uri "PyFxA" version))
3190 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
3191 (build-system python-build-system)
3192 (arguments '(#:tests? #f)) ; 17 tests require network access
3194 `(("python-cryptography" ,python-cryptography)
3195 ("python-hawkauthlib" ,python-hawkauthlib)
3196 ("python-pybrowserid" ,python-pybrowserid)
3197 ("python-requests" ,python-requests)
3198 ("python-six" ,python-six)))
3200 `(("python-grequests" ,python-grequests)
3201 ("python-mock" ,python-mock)
3202 ("python-responses" ,python-responses)
3203 ("python-unittest2" ,python-unittest2)))
3204 (home-page "https://github.com/mozilla/PyFxA")
3205 (synopsis "Firefox Accounts client library for Python")
3207 "This is a Python library for interacting with the Firefox Accounts
3209 (license license:mpl2.0)))
3211 (define-public python-hyperlink
3213 (name "python-hyperlink")
3218 (uri (pypi-uri "hyperlink" version))
3221 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
3222 (build-system python-build-system)
3224 `(("python-idna" ,python-idna)))
3225 (home-page "https://github.com/python-hyper/hyperlink")
3226 (synopsis "Python module to create immutable URLs according to spec")
3227 (description "This package provides a Python module to create immutable, and
3228 correct URLs for Python according to RFCs 3986 and 3987.")
3229 (license license:expat)))
3231 (define-public python-treq
3233 (name "python-treq")
3238 (uri (pypi-uri "treq" version))
3241 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
3242 (build-system python-build-system)
3244 `(("python-attrs" ,python-attrs)
3245 ("python-idna" ,python-idna)
3246 ("python-incremental" ,python-incremental)
3247 ("python-requests" ,python-requests)
3248 ("python-service-identity" ,python-service-identity)
3249 ("python-twisted" ,python-twisted)))
3250 (home-page "https://github.com/twisted/treq")
3251 (synopsis "Requests-like API built on top of twisted.web's Agent")
3252 (description "This package provides an HTTP library inspired by
3253 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
3254 high level API for making HTTP requests when using Twisted.")
3255 (license license:expat)))
3257 (define-public python-autobahn
3259 (name "python-autobahn")
3264 (uri (pypi-uri "autobahn" version))
3267 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
3268 (build-system python-build-system)
3270 ;; The tests fail to run:
3271 ;; https://github.com/crossbario/autobahn-python/issues/1117
3274 `(("python-cffi" ,python-cffi)
3275 ("python-twisted" ,python-twisted)
3276 ("python-txaio" ,python-txaio)))
3277 (home-page "https://crossbar.io/autobahn/")
3278 (synopsis "Web Application Messaging Protocol implementation")
3279 (description "This package provides an implementation of the @dfn{Web Application
3280 Messaging Protocol} (WAMP). WAMP connects components in distributed
3281 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
3282 Calls (rRPC). It is ideal for distributed, multi-client and server applications
3283 such as IoT applications or multi-user database-driven business applications.")
3284 (license license:expat)))
3286 (define-public python-ws4py
3288 (name "python-ws4py")
3293 (uri (pypi-uri "ws4py" version))
3296 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
3297 (build-system python-build-system)
3300 (modify-phases %standard-phases
3301 (add-after 'unpack 'python3.7-compatibility
3303 (substitute* '("ws4py/server/tulipserver.py"
3304 "ws4py/async_websocket.py")
3306 "asyncio.ensure_future"))
3308 ;; We don't have a package for cherrypy.
3309 (add-after 'unpack 'remove-cherrypy-support
3311 (delete-file "ws4py/server/cherrypyserver.py")
3314 `(("python-gevent" ,python-gevent)
3315 ("python-tornado" ,python-tornado)))
3316 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
3317 (synopsis "WebSocket client and server library")
3319 "This package provides a WebSocket client and server library for
3321 (license license:bsd-3)))
3323 (define-public python-slugify
3325 (name "python-slugify")
3330 (uri (pypi-uri "python-slugify" version))
3332 (base32 "0dv97yi5fq074q5qyqbin09pmi8ixg36caf5nkpw2bqkd8jh6pap"))
3334 (search-patches "python-slugify-depend-on-unidecode.patch"))))
3336 `(("python-wheel" ,python-wheel)))
3338 `(("python-unidecode" ,python-unidecode)))
3341 (modify-phases %standard-phases
3344 (invoke "python" "test.py"))))))
3345 (build-system python-build-system)
3346 (home-page "https://github.com/un33k/python-slugify")
3347 (synopsis "Python Slugify application that handles Unicode")
3348 (description "This package provides a @command{slufigy} command and
3349 library to create slugs from unicode strings while keeping it DRY.")
3350 (license license:expat)))
3352 (define-public python-branca
3354 (name "python-branca")
3359 (uri (pypi-uri "branca" version))
3362 "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
3363 (build-system python-build-system)
3365 `(("python-jinja2" ,python-jinja2)
3366 ("python-six" ,python-six)))
3368 `(("python-pytest" ,python-pytest)))
3369 (home-page "https://github.com/python-visualization/branca")
3370 (synopsis "Generate complex HTML+JS pages with Python")
3371 (description "Generate complex HTML+JS pages with Python")
3372 (license license:expat)))
3374 (define-public python-tinycss2
3376 (name "python-tinycss2")
3381 (uri (pypi-uri "tinycss2" version))
3383 (base32 "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4"))))
3384 (build-system python-build-system)
3387 (modify-phases %standard-phases
3389 (lambda _ (invoke "pytest"))))))
3391 `(("python-webencodings" ,python-webencodings)))
3393 `(("python-pytest-flake8" ,python-pytest-flake8)
3394 ("python-pytest-isort" ,python-pytest-isort)
3395 ("python-pytest-runner" ,python-pytest-runner)))
3396 (home-page "https://tinycss2.readthedocs.io/")
3397 (synopsis "Low-level CSS parser for Python")
3398 (description "@code{tinycss2} can parse strings, return Python objects
3399 representing tokens and blocks, and generate CSS strings corresponding to
3402 Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
3403 grammar of CSS but doesn’t know specific rules, properties or values supported
3404 in various CSS modules.")
3405 (license license:bsd-3)))
3407 (define-public python-cssselect2
3409 (name "python-cssselect2")
3414 (uri (pypi-uri "cssselect2" version))
3416 (base32 "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h"))))
3417 (build-system python-build-system)
3420 (modify-phases %standard-phases
3422 (lambda _ (invoke "pytest"))))))
3424 `(("python-tinycss2" ,python-tinycss2)))
3426 `(("python-pytest-cov" ,python-pytest-cov)
3427 ("python-pytest-flake8" ,python-pytest-flake8)
3428 ("python-pytest-isort" ,python-pytest-isort)
3429 ("python-pytest-runner" ,python-pytest-runner)))
3430 (home-page "https://cssselect2.readthedocs.io/")
3431 (synopsis "CSS selectors for Python ElementTree")
3432 (description "@code{cssselect2} is a straightforward implementation of
3433 CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
3434 ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
3436 Unlike the Python package @code{cssselect}, it does not translate selectors to
3437 XPath and therefore does not have all the correctness corner cases that are
3438 hard or impossible to fix in cssselect.")
3439 (license license:bsd-3)))
3441 (define-public gunicorn
3448 (uri (pypi-uri "gunicorn" version))
3451 "09n6fc019bgrvph1s5h1lwhn2avcsprw6ncd203qhra3i8mvn10r"))))
3452 (outputs '("out" "doc"))
3453 (build-system python-build-system)
3456 (modify-phases %standard-phases
3457 (add-after 'build 'build-doc
3459 (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
3460 (delete-file "docs/build/texinfo/Makefile")
3461 (delete-file "docs/build/texinfo/Gunicorn.texi")
3465 (setenv "PYTHONPATH"
3466 (string-append ".:" (getenv "PYTHONPATH")))
3468 (add-after 'install 'install-doc
3469 (lambda* (#:key outputs #:allow-other-keys)
3470 (let* ((doc (string-append (assoc-ref outputs "doc")
3471 "/share/doc/" ,name "-" ,version))
3472 (html (string-append doc "/html"))
3473 (info (string-append doc "/info"))
3474 (examples (string-append doc "/examples")))
3478 (copy-recursively "docs/build/html" html)
3479 (copy-recursively "docs/build/texinfo" info)
3480 (copy-recursively "examples" examples)
3481 (for-each (lambda (file)
3482 (copy-file file (string-append doc "/" file)))
3483 '("README.rst" "NOTICE" "LICENSE" "THANKS")))
3486 `(("binutils" ,binutils) ;; for ctypes.util.find_library()
3487 ("python-aiohttp", python-aiohttp)
3488 ("python-pytest" ,python-pytest)
3489 ("python-pytest-cov" ,python-pytest-cov)
3490 ("python-sphinx" ,python-sphinx)
3491 ("texinfo" ,texinfo)))
3492 (home-page "https://gunicorn.org/")
3493 (synopsis "Python WSGI HTTP Server for UNIX")
3494 (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
3495 Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
3496 Unicorn project. The Gunicorn server is broadly compatible with
3497 various web frameworks, simply implemented, light on server resources,
3498 and fairly speedy.")
3499 (license license:expat)))
3501 ;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
3503 (define-public gunicorn-bootstrap
3507 (arguments `(#:tests? #f))
3508 (properties '((hidden? . #t)))
3509 (native-inputs `())))
3511 (define-public python-translation-finder
3513 (name "python-translation-finder")
3518 (uri (pypi-uri "translation-finder" version))
3521 "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
3522 (build-system python-build-system)
3525 (modify-phases %standard-phases
3526 (add-before 'build 'remove-failing-test
3528 (delete-file "translation_finder/test_api.py")
3531 `(("python-chardet" ,python-chardet)
3532 ("python-pathlib2" ,python-pathlib2)
3533 ("python-ruamel.yaml" ,python-ruamel.yaml)
3534 ("python-six" ,python-six)))
3536 `(("python-codecov" ,python-codecov)
3537 ("python-codacy-coverage" ,python-codacy-coverage)
3538 ("python-pytest-cov" ,python-pytest-cov)
3539 ("python-pytest-runner" ,python-pytest-runner)
3540 ("python-twine" ,python-twine)))
3541 (home-page "https://weblate.org/")
3542 (synopsis "Translation file finder for Weblate")
3543 (description "This package provides a function to find translation file in
3544 the source code of a project. It supports many translation file formats and
3545 is part of the Weblate translation platform.")
3546 (license license:gpl3+)))
3548 (define-public python-gitlab
3550 (name "python-gitlab")
3555 (uri (pypi-uri "python-gitlab" version))
3558 "0zl6kz8v8cg1bcy2r78b2snb0lpw0b573gdx2x1ps0nhsh75l4j5"))))
3559 (build-system python-build-system)
3561 `(("python-requests" ,python-requests)
3562 ("python-six" ,python-six)))
3564 `(("python-httmock" ,python-httmock)
3565 ("python-mock" ,python-mock)))
3567 "https://github.com/python-gitlab/python-gitlab")
3568 (synopsis "Interact with GitLab API")
3569 (description "This package provides an extended library for interacting
3570 with GitLab instances through their API.")
3571 (license license:lgpl3+)))
3573 (define-public python-path-and-address
3575 (name "python-path-and-address")
3579 ;; The source distributed on PyPI doesn't include tests.
3582 (url "https://github.com/joeyespo/path-and-address")
3583 (commit (string-append "v" version))))
3584 (file-name (git-file-name name version))
3587 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
3588 (build-system python-build-system)
3591 (modify-phases %standard-phases
3593 (lambda* (#:key inputs outputs #:allow-other-keys)
3594 (add-installed-pythonpath inputs outputs)
3595 (invoke "py.test"))))))
3597 `(("python-pytest" ,python-pytest)))
3598 (home-page "https://github.com/joeyespo/path-and-address")
3599 (synopsis "Functions for command-line server tools used by humans")
3600 (description "Path-and-address resolves ambiguities of command-line
3601 interfaces, inferring which argument is the path, and which is the address.")
3602 (license license:expat)))
3605 ;; No release by upstream for quite some time, some bugs fixed since. See:
3606 ;; https://github.com/joeyespo/grip/issues/304
3607 (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
3610 (version (git-version "4.5.2" "1" commit))
3615 (url "https://github.com/joeyespo/grip")
3617 (file-name (git-file-name name version))
3620 "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
3621 (build-system python-build-system)
3623 `(("python-docopt" ,python-docopt)
3624 ("python-flask" ,python-flask)
3625 ("python-markdown" ,python-markdown)
3626 ("python-path-and-address" ,python-path-and-address)
3627 ("python-pygments" ,python-pygments)
3628 ("python-requests" ,python-requests)))
3630 `(("python-pytest" ,python-pytest)
3631 ("python-responses" ,python-responses)))
3634 (modify-phases %standard-phases
3636 (lambda* (#:key inputs outputs #:allow-other-keys)
3637 (add-installed-pythonpath inputs outputs)
3638 (setenv "PATH" (string-append
3640 (assoc-ref %outputs "out") "/bin"))
3641 (invoke "py.test" "-m" "not assumption"))))))
3642 (home-page "https://github.com/joeyespo/grip")
3643 (synopsis "Preview Markdown files using the GitHub API")
3644 (description "Grip is a command-line server application written in Python
3645 that uses the GitHub Markdown API to render a local Markdown file. The styles
3646 and rendering come directly from GitHub, so you'll know exactly how it will
3647 appear. Changes you make to the file will be instantly reflected in the browser
3648 without requiring a page refresh.")
3649 (license license:expat))))
3651 (define-public python-port-for
3653 (name "python-port-for")
3658 (uri (pypi-uri "port-for" version))
3661 "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
3662 (build-system python-build-system)
3665 (modify-phases %standard-phases
3666 (add-after 'unpack 'use-urllib3
3668 (substitute* "port_for/_download_ranges.py"
3669 (("urllib2") "urllib3"))
3672 `(("python-urllib3" ,python-urllib3)))
3674 `(("python-mock" ,python-mock)))
3675 (home-page "https://github.com/kmike/port-for/")
3676 (synopsis "TCP localhost port finder and association manager")
3678 "This package provides a utility that helps with local TCP ports
3679 management. It can find an unused TCP localhost port and remember the
3681 (license license:expat)))
3683 (define-public python-livereload
3685 (name "python-livereload")
3690 (uri (pypi-uri "livereload" version))
3693 "0rhggz185bxc3zjnfpmhcvibyzi86i624za1lfh7x7ajsxw4y9c9"))))
3694 (build-system python-build-system)
3696 `(("python-six" ,python-six)
3697 ("python-tornado" ,python-tornado)))
3698 (home-page "https://github.com/lepture/python-livereload")
3699 (synopsis "Python LiveReload")
3701 "Python LiveReload provides a command line utility, @command{livereload},
3702 for starting a web server in a directory. It can trigger arbitrary commands
3703 and serve updated contents upon changes to the directory.")
3704 (license license:bsd-3)))