gnu: Add python-requests_ntlm.
[jackhill/guix/guix.git] / gnu / packages / python-web.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 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 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 ;;;
38 ;;; This file is part of GNU Guix.
39 ;;;
40 ;;; GNU Guix is free software; you can redistribute it and/or modify it
41 ;;; under the terms of the GNU General Public License as published by
42 ;;; the Free Software Foundation; either version 3 of the License, or (at
43 ;;; your option) any later version.
44 ;;;
45 ;;; GNU Guix is distributed in the hope that it will be useful, but
46 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
47 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 ;;; GNU General Public License for more details.
49 ;;;
50 ;;; You should have received a copy of the GNU General Public License
51 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52
53 (define-module (gnu packages python-web)
54 #:use-module (guix packages)
55 #:use-module (guix download)
56 #:use-module (guix git-download)
57 #:use-module (guix build-system python)
58 #:use-module (guix utils)
59 #:use-module (gnu packages)
60 #:use-module (gnu packages base)
61 #:use-module (gnu packages check)
62 #:use-module (gnu packages compression)
63 #:use-module (gnu packages curl)
64 #:use-module (gnu packages databases)
65 #:use-module (gnu packages django)
66 #:use-module (gnu packages groff)
67 #:use-module (gnu packages libffi)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages python-check)
71 #:use-module (gnu packages python-crypto)
72 #:use-module (gnu packages python-xyz)
73 #:use-module (gnu packages serialization)
74 #:use-module (gnu packages sphinx)
75 #:use-module (gnu packages texinfo)
76 #:use-module (gnu packages tls)
77 #:use-module (gnu packages time)
78 #:use-module (gnu packages web)
79 #:use-module (gnu packages xml)
80 #:use-module ((guix licenses) #:prefix license:)
81 #:use-module (srfi srfi-1))
82
83 (define-public python-aiohttp
84 (package
85 (name "python-aiohttp")
86 (version "3.6.2")
87 (source
88 (origin
89 (method url-fetch)
90 (uri (pypi-uri "aiohttp" version))
91 (sha256
92 (base32
93 "09pkw6f1790prnrq0k8cqgnf1qy57ll8lpmc6kld09q7zw4vi6i5"))))
94 (build-system python-build-system)
95 (arguments
96 `(#:tests? #f)) ;missing pytest-timeout
97 (propagated-inputs
98 `(("python-aiodns" ,python-aiodns)
99 ("python-async-timeout" ,python-async-timeout)
100 ("python-attrs" ,python-attrs)
101 ("python-chardet" ,python-chardet)
102 ("python-idna-ssl" ,python-idna-ssl)
103 ("python-multidict" ,python-multidict)
104 ("python-yarl" ,python-yarl)))
105 (home-page "https://github.com/aio-libs/aiohttp/")
106 (synopsis "Async HTTP client/server framework (asyncio)")
107 (description "@code{aiohttp} is an asynchronous HTTP client/server
108 framework.
109
110 Its main features are:
111 @itemize
112 @item Supports both client and server side of HTTP protocol.
113 @item Supports both client and server Web-Sockets out-of-the-box without the
114 Callback Hell.
115 @item Web-server has middlewares and pluggable routing.
116 @end itemize")
117 (license license:asl2.0)))
118
119 (define-public python-aiohttp-socks
120 (package
121 (name "python-aiohttp-socks")
122 (version "0.2.2")
123 (source
124 (origin
125 (method url-fetch)
126 (uri (pypi-uri "aiohttp_socks" version))
127 (sha256
128 (base32
129 "0473702jk66xrgpm28wbdgpnak4v0dh2qmdjw7ky7hf3lwwqkggf"))))
130 (build-system python-build-system)
131 (propagated-inputs
132 `(("python-aiohttp" ,python-aiohttp)))
133 (home-page "https://github.com/romis2012/aiohttp-socks")
134 (synopsis "SOCKS proxy connector for aiohttp")
135 (description "This package provides a SOCKS proxy connector for
136 aiohttp. It supports SOCKS4(a) and SOCKS5.")
137 (license license:asl2.0)))
138
139 (define-public python-aiodns
140 (package
141 (name "python-aiodns")
142 (version "1.1.1")
143 (source
144 (origin
145 (method url-fetch)
146 (uri (pypi-uri "aiodns" version))
147 (sha256
148 (base32
149 "1snr5paql8dgvc676n8xq460wypjsb1xj53cf3px1s4wczf7lryq"))))
150 (build-system python-build-system)
151 (inputs
152 `(("python-pycares" ,python-pycares)))
153 (arguments
154 `(#:tests? #f)) ;tests require internet access
155 (home-page "http://github.com/saghul/aiodns")
156 (synopsis "Simple DNS resolver for asyncio")
157 (description "@code{aiodns} provides a simple way for doing
158 asynchronous DNS resolutions with a synchronous looking interface by
159 using @url{https://github.com/saghul/pycares,pycares}.")
160 (license license:expat)))
161
162 (define-public python-aiorpcx
163 (package
164 (name "python-aiorpcx")
165 (version "0.18.3")
166 (source
167 (origin
168 (method url-fetch)
169 (uri (pypi-uri "aiorpcX" version))
170 (sha256
171 (base32
172 "0k545hc7wl6sh1svydzbv6x7sx5pig2pqkl3yxs9riwmvzawx9xp"))))
173 (build-system python-build-system)
174 (propagated-inputs
175 `(("python-attrs" ,python-attrs)))
176 (home-page "https://github.com/kyuupichan/aiorpcX")
177 (synopsis "Generic asyncio RPC implementation")
178 (description
179 "The aiorpcX library is a generic asyncio implementation of RPC suitable
180 for an application that is a client, server or both.
181
182 The package includes a module with full coverage of JSON RPC versions 1.0 and
183 2.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
184 comes with a SOCKS proxy client.")
185 (license (list license:expat license:bsd-2))))
186
187 (define-public python-falcon
188 (package
189 (name "python-falcon")
190 (version "1.4.1")
191 (source
192 (origin
193 (method url-fetch)
194 (uri (pypi-uri "falcon" version))
195 (sha256
196 (base32
197 "1i0vmqsk24z4biirqhpvas9h28wy7nmpy3jvnb6rz2imq04zd09r"))))
198 (build-system python-build-system)
199 (arguments
200 `(#:phases
201 (modify-phases %standard-phases
202 (replace 'check
203 (lambda _
204 (invoke "pytest"))))))
205 (propagated-inputs
206 `(("python-mimeparse" ,python-mimeparse)
207 ("python-six" ,python-six)))
208 (native-inputs
209 `(("python-cython" ,python-cython) ;for faster binaries
210 ("python-pytest" ,python-pytest)
211 ("python-pyyaml" ,python-pyyaml)
212 ("python-requests" ,python-requests)
213 ("python-testtools" ,python-testtools)
214 ("python-jsonschema" ,python-jsonschema)
215 ("python-msgpack" ,python-msgpack)))
216 (home-page "https://falconframework.org")
217 (synopsis
218 "Web framework for building APIs and application backends")
219 (description
220 "Falcon is a web API framework for building microservices, application
221 backends and higher-level frameworks. Among its features are:
222 @itemize
223 @item Optimized and extensible code base
224 @item Routing via URI templates and REST-inspired resource
225 classes
226 @item Access to headers and bodies through request and response
227 classes
228 @item Request processing via middleware components and hooks
229 @item Idiomatic HTTP error responses
230 @item Straightforward exception handling
231 @item Unit testing support through WSGI helpers and mocks
232 @item Compatible with both CPython and PyPy
233 @item Cython support for better performance when used with CPython
234 @end itemize")
235 (license license:asl2.0)))
236
237 (define-public python2-falcon
238 (package-with-python2 python-falcon))
239
240 (define-public python-falcon-cors
241 (package
242 (name "python-falcon-cors")
243 (version "1.1.7")
244 (source
245 (origin
246 (method url-fetch)
247 (uri (pypi-uri "falcon-cors" version))
248 (sha256
249 (base32
250 "12pym7hwsbd8b0c1azn95nas8gm3f1qpr6lpyx0958xm65ffr20p"))))
251 (build-system python-build-system)
252 (native-inputs
253 `(("python-falcon" ,python-falcon)))
254 (home-page
255 "https://github.com/lwcolton/falcon-cors")
256 (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
257 (description "This middleware provides @dfn{cross-origin resource
258 sharing} (CORS) support for Falcon. It allows applying a specially crafted
259 CORS object to the incoming requests, enabling the ability to serve resources
260 over a different origin than that of the web application.")
261 (license license:asl2.0)))
262
263 (define-public python2-falcon-cors
264 (package-with-python2 python-falcon-cors))
265
266 (define-public python-furl
267 (package
268 (name "python-furl")
269 (version "0.5.6")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (pypi-uri "furl" version))
274 (sha256
275 (base32
276 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
277 (build-system python-build-system)
278 (propagated-inputs
279 `(("python-six" ,python-six)
280 ("python-orderedmultidict" ,python-orderedmultidict)))
281 (native-inputs
282 `(("python-pycodestyle" ,python-pycodestyle)))
283 (home-page "https://github.com/gruns/furl")
284 (synopsis "URL manipulation in Python")
285 (description "Furl provides an easy-to-use alternative to the
286 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
287 (license license:unlicense)))
288
289 (define-public python2-furl
290 (package-with-python2 python-furl))
291
292 (define-public python-httplib2
293 (package
294 (name "python-httplib2")
295 (version "0.9.2")
296 (source
297 (origin
298 (method url-fetch)
299 (uri (pypi-uri "httplib2" version))
300 (sha256
301 (base32
302 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
303 (build-system python-build-system)
304 (home-page "https://github.com/jcgregorio/httplib2")
305 (synopsis "Comprehensive HTTP client library")
306 (description
307 "A comprehensive HTTP client library supporting many features left out of
308 other HTTP libraries.")
309 (license license:expat)))
310
311 (define-public python2-httplib2
312 (package-with-python2 python-httplib2))
313
314 (define-public httpie
315 (package
316 (name "httpie")
317 (version "2.0.0")
318 (source
319 (origin
320 (method url-fetch)
321 (uri (pypi-uri "httpie" version))
322 (sha256
323 (base32
324 "02bw20cwv3a1lzrn919dk25dq4v81x6q786zlrqsqzhsdxszj14c"))))
325 (build-system python-build-system)
326 (arguments
327 ;; The tests attempt to access external web servers, so we cannot run them.
328 '(#:tests? #f))
329 (propagated-inputs
330 `(("python-colorama" ,python-colorama)
331 ("python-pygments" ,python-pygments)
332 ("python-requests" ,python-requests)))
333 (home-page "https://httpie.org/")
334 (synopsis "cURL-like tool for humans")
335 (description
336 "A command line HTTP client with an intuitive UI, JSON support,
337 syntax highlighting, wget-like downloads, plugins, and more. It consists of
338 a single http command designed for painless debugging and interaction with
339 HTTP servers, RESTful APIs, and web services.")
340 (license license:bsd-3)))
341
342 (define-public python-html2text
343 (package
344 (name "python-html2text")
345 (version "2019.8.11")
346 (source
347 (origin
348 (method url-fetch)
349 (uri (pypi-uri "html2text" version))
350 (sha256
351 (base32
352 "0ppgjplg06kmv9sj0x8p7acczcq2mcfgk1jdjwm4w5w40b0vj5pm"))))
353 (build-system python-build-system)
354 (arguments
355 '(#:phases
356 (modify-phases %standard-phases
357 (replace 'check
358 (lambda _
359 (invoke "pytest" "test/"))))))
360 (native-inputs
361 `(("python-pytest" ,python-pytest)))
362 (home-page "https://github.com/Alir3z4/html2text")
363 (synopsis "Convert HTML into plain text")
364 (description "html2text takes HTML and converts it into plain ASCII text
365 which is also valid markdown. html2text was originally written by Aaron
366 Swartz.")
367 (license license:gpl3+)))
368
369 (define-public python2-html2text
370 (package-with-python2 python-html2text))
371
372 (define-public python-mechanicalsoup
373 (package
374 (name "python-mechanicalsoup")
375 (version "0.11.0")
376 (source
377 (origin
378 (method url-fetch)
379 (uri (pypi-uri "MechanicalSoup" version))
380 (sha256
381 (base32 "0k59wwk75q7nz6i6gynvzhagy02ql0bv7py3qqcwgjw7607yq4i7"))))
382 (build-system python-build-system)
383 (arguments
384 ;; TODO: Enable tests when python-flake8@3.5 hits master.
385 `(#:tests? #f))
386 (propagated-inputs
387 `(("python-beautifulsoup4" ,python-beautifulsoup4)
388 ("python-lxml" ,python-lxml)
389 ("python-requests" ,python-requests)
390 ("python-six" ,python-six)))
391 ;; (native-inputs
392 ;; ;; For tests.
393 ;; `(("python-pytest-flake8" ,python-pytest-flake8)
394 ;; ("python-pytest-httpbin" ,python-pytest-httpbin)
395 ;; ("python-pytest-mock" ,python-pytest-mock)
396 ;; ("python-pytest-runner" ,python-pytest-runner)
397 ;; ("python-requests-mock" ,python-requests-mock)))
398 (home-page "https://mechanicalsoup.readthedocs.io/")
399 (synopsis "Python library for automating website interaction")
400 (description
401 "MechanicalSoup is a Python library for automating interaction with
402 websites. It automatically stores and sends cookies, follows redirects, and can
403 follow links and submit forms. It doesn’t do JavaScript.")
404 (license license:expat)))
405
406 (define-public python2-mechanicalsoup
407 (package-with-python2 python-mechanicalsoup))
408
409 (define-public python-sockjs-tornado
410 (package
411 (name "python-sockjs-tornado")
412 (version "1.0.6")
413 (source
414 (origin
415 (method url-fetch)
416 (uri (pypi-uri "sockjs-tornado" version))
417 (sha256
418 (base32
419 "15dgv6hw6c7h3m310alw1h6p5443lrm9pyqhcv2smc13fz1v04pc"))))
420 (build-system python-build-system)
421 (arguments
422 `(;; There are no tests, and running the test phase requires missing
423 ;; dependencies
424 #:tests? #f))
425 (propagated-inputs
426 `(("python-tornado" ,python-tornado)))
427 (home-page "https://github.com/mrjoes/sockjs-tornado/")
428 (synopsis
429 "SockJS Python server implementation on top of the Tornado framework")
430 (description
431 "SockJS-tornado provides the server-side counterpart to a SockJS client
432 library, through the Tornado framework.
433
434 SockJS provides a low-latency, full-duplex, cross-domain communication channel
435 between a web browser and web server.")
436 (license license:expat)))
437
438 (define-public python2-sockjs-tornado
439 (package-with-python2 python-sockjs-tornado))
440
441 (define-public python-flask-babel
442 (package
443 (name "python-flask-babel")
444 (version "1.0.0")
445 (source
446 (origin
447 (method url-fetch)
448 (uri (pypi-uri "Flask-Babel" version))
449 (sha256
450 (base32
451 "0gmb165vkwv5v7dxsxa2i3zhafns0fh938m2zdcrv4d8z5l099yn"))))
452 (build-system python-build-system)
453 (arguments
454 '(#:phases (modify-phases %standard-phases
455 (replace 'check
456 (lambda _
457 (with-directory-excursion "tests"
458 (invoke "python" "tests.py")))))))
459 (propagated-inputs
460 `(("python-flask" ,python-flask)
461 ("python-babel" ,python-babel)
462 ("python-jinja2" ,python-jinja2)
463 ("python-pytz" ,python-pytz)))
464 (home-page "https://github.com/python-babel/flask-babel")
465 (synopsis "Add i18n/l10n support to Flask applications")
466 (description "This package implements internationalization and localization
467 support for Flask. This is based on the Python babel module as well as pytz -
468 both of which are installed automatically if you install this library.")
469 (license license:bsd-3)))
470
471 (define-public python2-flask-babel
472 (package-with-python2 python-flask-babel))
473
474 (define-public python-html5lib
475 (package
476 (name "python-html5lib")
477 (version "1.0.1")
478 (source
479 (origin
480 (method url-fetch)
481 (uri (pypi-uri "html5lib" version))
482 (sha256
483 (base32
484 "0dipzfrycv6j1jw82v9b7d8lzggx3x8xngx6l4xrqkxwvg7hvjv6"))))
485 (build-system python-build-system)
486 (propagated-inputs
487 `(("python-six" ,python-six)
488 ("python-webencodings" ,python-webencodings)))
489 (arguments
490 `(#:test-target "check"))
491 (home-page
492 "https://github.com/html5lib/html5lib-python")
493 (synopsis
494 "Python HTML parser based on the WHATWG HTML specifcation")
495 (description
496 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
497 and written in Python.")
498 (license license:expat)))
499
500 (define-public python2-html5lib
501 (package-with-python2 python-html5lib))
502
503 ;; Needed for python-bleach, a dependency of python-notebook
504 (define-public python-html5lib-0.9
505 (package
506 (inherit python-html5lib)
507 (version "0.999")
508 (source
509 (origin
510 (method url-fetch)
511 (uri (pypi-uri "html5lib" version))
512 (sha256
513 (base32
514 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
515
516 (define-public python2-html5lib-0.9
517 (package-with-python2 python-html5lib-0.9))
518
519 (define-public python-html5-parser
520 (package
521 (name "python-html5-parser")
522 (version "0.4.5")
523 (source (origin
524 (method url-fetch)
525 (uri (pypi-uri "html5-parser" version))
526 (sha256
527 (base32
528 "01mx33sx4dhl4kj6wc48nj6jz7ry60rkhjv0s6k8h5xmjf5yy0x9"))))
529 (build-system python-build-system)
530 (native-inputs
531 `(("pkg-config" ,pkg-config)))
532 (inputs
533 `(("libxml2" ,libxml2)))
534 (propagated-inputs
535 `(("python-lxml" ,python-lxml)
536 ("python-beautifulsoup4" ,python-beautifulsoup4)))
537 (home-page "https://html5-parser.readthedocs.io")
538 (synopsis "Fast C-based HTML5 parsing for Python")
539 (description "This package provides a fast implementation of the HTML5
540 parsing spec for Python. Parsing is done in C using a variant of the gumbo
541 parser. The gumbo parse tree is then transformed into an lxml tree, also in
542 C, yielding parse times that can be a thirtieth of the html5lib parse times.")
543 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
544 ;; indicate ASL2.0, including the LICENSE file for the whole project.
545 (license (list license:asl2.0 license:gpl3))))
546
547 (define-public python2-html5-parser
548 (package-with-python2 python-html5-parser))
549
550 (define-public python-pycurl
551 (package
552 (name "python-pycurl")
553 (version "7.43.0.2")
554 (source
555 (origin
556 (method url-fetch)
557 (uri (string-append "https://dl.bintray.com/pycurl/pycurl/pycurl-"
558 version ".tar.gz"))
559 (sha256
560 (base32 "1915kb04k1j4y6k1dx1sgnbddxrl9r1n4q928if2lkrdm73xy30g"))))
561 (build-system python-build-system)
562 (arguments
563 ;; The tests attempt to access external web servers, so we cannot run
564 ;; them. Furthermore, they are skipped altogether when using Python 2.
565 '(#:tests? #f
566 #:phases (modify-phases %standard-phases
567 (add-before 'build 'configure-tls-backend
568 (lambda _
569 ;; XXX: PycURL fails to automatically determine which TLS
570 ;; backend to use when cURL is built with --disable-static.
571 ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
572 (setenv "PYCURL_SSL_LIBRARY" "gnutls")
573 #t)))))
574 (native-inputs
575 `(("python-nose" ,python-nose)
576 ("python-bottle" ,python-bottle)))
577 (inputs
578 `(("curl" ,curl)
579 ("gnutls" ,gnutls)))
580 (home-page "http://pycurl.io/")
581 (synopsis "Lightweight Python wrapper around libcurl")
582 (description "Pycurl is a lightweight wrapper around libcurl. It provides
583 high-speed transfers via libcurl and frequently outperforms alternatives.")
584
585 ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
586 ;; under the terms of LGPLv2.1+ or Expat.
587 (license (list license:lgpl2.1+ license:expat))))
588
589 (define-public python2-pycurl
590 (package-with-python2 python-pycurl))
591
592 (define-public python-webencodings
593 (package
594 (name "python-webencodings")
595 (version "0.5.1")
596 (source (origin
597 (method url-fetch)
598 (uri (pypi-uri "webencodings" version))
599 (sha256
600 (base32
601 "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
602 (build-system python-build-system)
603 (arguments
604 '(#:phases
605 (modify-phases %standard-phases
606 (replace 'check
607 (lambda _
608 (invoke "py.test" "-v" "webencodings/tests.py")
609 #t)))))
610 (native-inputs
611 `(("python-pytest" ,python-pytest)))
612 (home-page "https://github.com/SimonSapin/python-webencodings")
613 (synopsis "Character encoding aliases for legacy web content")
614 (description
615 "In order to be compatible with legacy web content when interpreting
616 something like @code{Content-Type: text/html; charset=latin1}, tools need
617 to use a particular set of aliases for encoding labels as well as some
618 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
619 the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
620 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
621 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
622 defines all such details so that implementations do not have to
623 reverse-engineer each other.
624
625 This module implements the Encoding standard and has encoding labels and
626 BOM detection, but the actual implementation for encoders and decoders
627 is Python’s.")
628 (license license:bsd-3)))
629
630 (define-public python2-webencodings
631 (package-with-python2 python-webencodings))
632
633 (define-public python-openid
634 (package
635 (name "python-openid")
636 (version "3.1.0")
637 (source
638 (origin
639 (method url-fetch)
640 (uri (pypi-uri "python3-openid" version))
641 (sha256
642 (base32
643 "00l5hrjh19740w00b3fnsqldnla41wbr2rics09dl4kyd1fkd3b2"))))
644 (build-system python-build-system)
645 (arguments
646 `(#:phases
647 (modify-phases %standard-phases
648 (replace 'check
649 (lambda _
650 (invoke "coverage" "run" "-m"
651 "unittest" "openid.test.test_suite"))))))
652 (properties `((python2-variant . ,(delay python2-openid))))
653 (propagated-inputs
654 `(("python-defusedxml" ,python-defusedxml)))
655 (native-inputs
656 `(("python-coverage" ,python-coverage)
657 ("python-psycopg2" ,python-psycopg2)
658 ("python-django" ,python-django)))
659 (home-page "https://github.com/necaris/python3-openid")
660 (synopsis "OpenID support for servers and consumers")
661 (description "This library provides OpenID authentication for Python, both
662 for clients and servers.")
663 (license license:asl2.0)))
664
665 (define-public python2-openid
666 (package
667 (name "python2-openid")
668 (version "2.2.5")
669 (source
670 (origin
671 (method url-fetch)
672 (uri (pypi-uri "python-openid" version))
673 (sha256
674 (base32
675 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
676 (build-system python-build-system)
677 (arguments
678 ;; Python 3 support is in `python3-openid`, a separate package.
679 `(#:python ,python-2
680 ;; Tests aren't initialized correctly.
681 #:tests? #f))
682 (home-page "https://github.com/openid/python-openid")
683 (synopsis "OpenID support for servers and consumers")
684 (description "This library provides OpenID authentication for Python, both
685 for clients and servers.")
686 (license license:asl2.0)))
687
688 (define-public python-cssutils
689 (package
690 (name "python-cssutils")
691 (version "1.0.2")
692 (source
693 (origin
694 (method url-fetch)
695 (uri (pypi-uri "cssutils" version))
696 (sha256
697 (base32
698 "1bxchrbqzapwijap0yhlxdil1w9bmwvgx77aizlkhc2mcxjg1z52"))))
699 (build-system python-build-system)
700 (native-inputs
701 `(("unzip" ,unzip))) ; for unpacking the source
702 (arguments
703 `(#:tests? #f)) ; tests require python-pbr < 1.7.0
704 (home-page "http://cthedot.de/cssutils/")
705 (synopsis
706 "CSS Cascading Style Sheets library for Python")
707 (description
708 "Cssutils is a Python package for parsing and building CSS
709 Cascading Style Sheets. Currently it provides a DOM only and no rendering
710 options.")
711 (license license:lgpl3+)))
712
713 (define-public python2-cssutils
714 (package-with-python2 python-cssutils))
715
716 (define-public python-css-parser
717 (package
718 (inherit python-cssutils)
719 (name "python-css-parser")
720 (version "1.0.4")
721 (source
722 (origin
723 (method url-fetch)
724 (uri (pypi-uri "css-parser" version ".tar.gz"))
725 (sha256
726 (base32
727 "0i4xfykiffxzr4f6y0m2ggqvx1rzam6pw6krlr5k6ldf29akbay7"))))
728 (home-page "https://github.com/ebook-utils/css-parser")
729 (synopsis "Fork of cssutils modified for parsing ebooks")
730 (description
731 "Css-parser is a fork of cssutils 1.0.2, updated and modified for parsing
732 ebooks, due to cssutils not receiving updates as of 1.0.2.")
733 (license license:lgpl3+)))
734
735 (define-public python2-css-parser
736 (package-with-python2 python-css-parser))
737
738 (define-public python-cssselect
739 (package
740 (name "python-cssselect")
741 (version "0.9.2")
742 (source
743 (origin
744 (method url-fetch)
745 (uri (pypi-uri "cssselect" version))
746 (sha256
747 (base32
748 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
749 (build-system python-build-system)
750 (arguments
751 ;; tests fail with message
752 ;; AttributeError: 'module' object has no attribute 'tests'
753 `(#:tests? #f))
754 (home-page
755 "https://pythonhosted.org/cssselect/")
756 (synopsis
757 "CSS3 selector parser and translator to XPath 1.0")
758 (description
759 "Cssselect ia a Python module that parses CSS3 Selectors and translates
760 them to XPath 1.0 expressions. Such expressions can be used in lxml or
761 another XPath engine to find the matching elements in an XML or HTML document.")
762 (license license:bsd-3)))
763
764 (define-public python2-cssselect
765 (package-with-python2 python-cssselect))
766
767 (define-public python-openid-cla
768 (package
769 (name "python-openid-cla")
770 (version "1.2")
771 (source
772 (origin
773 (method url-fetch)
774 (uri (pypi-uri "python-openid-cla" version))
775 (sha256
776 (base32
777 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
778 (build-system python-build-system)
779 (arguments '(#:tests? #f)) ; No tests.
780 (home-page "https://github.com/puiterwijk/python-openid-cla/")
781 (synopsis "Implementation of the OpenID CLA extension for python-openid")
782 (description "@code{openid-cla} is an implementation of the OpenID
783 contributor license agreement extension for python-openid.")
784 (license license:bsd-3)))
785
786 (define-public python2-openid-cla
787 (package-with-python2 python-openid-cla))
788
789 (define-public python-openid-teams
790 (package
791 (name "python-openid-teams")
792 (version "1.1")
793 (source
794 (origin
795 (method url-fetch)
796 (uri (pypi-uri "python-openid-teams" version))
797 (sha256
798 (base32
799 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
800 (build-system python-build-system)
801 (arguments '(#:tests? #f)) ; No tests.
802 (home-page "https://github.com/puiterwijk/python-openid-teams/")
803 (synopsis "Implementation of the OpenID teams extension for python-openid")
804 (description
805 "@code{openid-teams} is an implementation of the OpenID
806 teams extension for python-openid.")
807 (license license:bsd-3)))
808
809 (define-public python2-openid-teams
810 (package-with-python2 python-openid-teams))
811
812 (define-public python-tornado
813 (package
814 (name "python-tornado")
815 (version "5.1.1")
816 (source
817 (origin
818 (method url-fetch)
819 (uri (pypi-uri "tornado" version))
820 (sha256
821 (base32
822 "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
823 (build-system python-build-system)
824 (arguments
825 '(;; FIXME: Two tests error out with:
826 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
827 ;; #:phases
828 ;; (modify-phases %standard-phases
829 ;; (replace 'check
830 ;; (lambda _
831 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
832 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
833 ;; (invoke "python" "-m" "tornado.test.runtests")
834 ;; #t)))
835 #:tests? #f))
836 (native-inputs
837 `(("python-certifi" ,python-certifi)))
838 (home-page "https://www.tornadoweb.org/")
839 (synopsis "Python web framework and asynchronous networking library")
840 (description
841 "Tornado is a Python web framework and asynchronous networking library,
842 originally developed at FriendFeed. By using non-blocking network I/O,
843 Tornado can scale to tens of thousands of open connections, making it ideal
844 for long polling, WebSockets, and other applications that require a long-lived
845 connection to each user.")
846 (license license:asl2.0)
847 (properties `((python2-variant . ,(delay python2-tornado))))))
848
849 (define-public python2-tornado
850 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
851 (package (inherit tornado)
852 (propagated-inputs
853 `(("python2-backport-ssl-match-hostname"
854 ,python2-backport-ssl-match-hostname)
855 ("python2-backports-abc" ,python2-backports-abc)
856 ("python2-singledispatch" ,python2-singledispatch)
857 ,@(package-propagated-inputs tornado))))))
858
859 (define-public python-tornado-http-auth
860 (package
861 (name "python-tornado-http-auth")
862 (version "1.1.1")
863 (source
864 (origin
865 (method url-fetch)
866 (uri (pypi-uri "tornado-http-auth" version))
867 (sha256
868 (base32 "0hyc5f0a09i5yb99pk4bxpg6w9ichbrb5cv7hc9hff7rxd8w0v0x"))))
869 (build-system python-build-system)
870 (propagated-inputs
871 `(("python-tornado" ,python-tornado)))
872 (home-page "https://github.com/gvalkov/tornado-http-auth")
873 (synopsis "Digest and basic authentication module for Tornado")
874 (description
875 "Provides support for adding authentication to services using the Tornado
876 web framework, either via the basic or digest authentication schemes.")
877 (license license:asl2.0)))
878
879 (define-public python-terminado
880 (package
881 (name "python-terminado")
882 (version "0.8.1")
883 (source
884 (origin
885 (method url-fetch)
886 (uri (pypi-uri "terminado" version))
887 (sha256
888 (base32
889 "0yh69k6579g848rmjyllb5h75pkvgcy27r1l3yzgkf33wnnzkasm"))))
890 (build-system python-build-system)
891 (propagated-inputs
892 `(("python-tornado" ,python-tornado)
893 ("python-ptyprocess" ,python-ptyprocess)))
894 (native-inputs
895 `(("python-nose" ,python-nose)))
896 (arguments
897 `(#:phases
898 (modify-phases %standard-phases
899 (replace 'check
900 (lambda _ (invoke "nosetests") #t)))))
901 (home-page "https://github.com/takluyver/terminado")
902 (synopsis "Terminals served to term.js using Tornado websockets")
903 (description "This package provides a Tornado websocket backend for the
904 term.js Javascript terminal emulator library.")
905 (license license:bsd-2)
906 (properties `((python2-variant . ,(delay python2-terminado))))))
907
908 (define-public python2-terminado
909 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
910 (package (inherit terminado)
911 (propagated-inputs
912 `(("python2-backport-ssl-match-hostname"
913 ,python2-backport-ssl-match-hostname)
914 ("python2-futures" ,python2-futures)
915 ,@(package-propagated-inputs terminado))))))
916
917 (define-public python-wsgi-intercept
918 (package
919 (name "python-wsgi-intercept")
920 (version "1.2.2")
921 (source (origin
922 (method url-fetch)
923 (uri (pypi-uri "wsgi_intercept" version))
924 (sha256
925 (base32
926 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
927 (build-system python-build-system)
928 (propagated-inputs
929 `(("python-six" ,python-six)))
930 (native-inputs
931 `(("python-pytest" ,python-pytest)
932 ("python-httplib2" ,python-httplib2)
933 ("python-requests" ,python-requests)
934 ("python-urllib3" ,python-urllib3)))
935 (synopsis "Puts a WSGI application in place of a real URI for testing")
936 (description "Wsgi_intercept installs a WSGI application in place of a real
937 URI for testing. Testing a WSGI application normally involves starting a
938 server at a local host and port, then pointing your test code to that address.
939 Instead, this library lets you intercept calls to any specific host/port
940 combination and redirect them into a WSGI application importable by your test
941 program. Thus, you can avoid spawning multiple processes or threads to test
942 your Web app.")
943 (home-page "https://github.com/cdent/wsgi-intercept")
944 (license license:expat)))
945
946 (define-public python-webob
947 (package
948 (name "python-webob")
949 (version "1.5.1")
950 (source
951 (origin
952 (method url-fetch)
953 (uri (pypi-uri "WebOb" version))
954 (sha256
955 (base32
956 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
957 (build-system python-build-system)
958 (native-inputs
959 `(("python-nose" ,python-nose)))
960 (home-page "https://webob.org/")
961 (synopsis "WSGI request and response object")
962 (description
963 "WebOb provides wrappers around the WSGI request environment, and an
964 object to help create WSGI responses.")
965 (license license:expat)))
966
967 (define-public python2-webob
968 (package-with-python2 python-webob))
969
970 (define-public python-zope-event
971 (package
972 (name "python-zope-event")
973 (version "4.4")
974 (source
975 (origin
976 (method url-fetch)
977 (uri (pypi-uri "zope.event" version))
978 (sha256
979 (base32
980 "1ksbc726av9xacml6jhcfyn828hlhb9xlddpx6fcvnlvmpmpvhk9"))))
981 (build-system python-build-system)
982 (home-page "https://pypi.org/project/zope.event/")
983 (synopsis "Event publishing system for Python")
984 (description "Zope.event provides an event publishing API, intended for
985 use by applications which are unaware of any subscribers to their events. It
986 is a simple event-dispatching system on which more sophisticated event
987 dispatching systems can be built.")
988 (license license:zpl2.1)))
989
990 (define-public python2-zope-event
991 (package-with-python2 python-zope-event))
992
993 (define-public python-zope-interface
994 (package
995 (name "python-zope-interface")
996 (version "4.7.2")
997 (source
998 (origin
999 (method url-fetch)
1000 (uri (pypi-uri "zope.interface" version))
1001 (sha256
1002 (base32
1003 "0r9kvb1q3lxrdhxabliv9nwhjsdmn1n0vcjv93rlqkyb7yyh24gx"))))
1004 (build-system python-build-system)
1005 (native-inputs
1006 `(("python-zope-event" ,python-zope-event)))
1007 (home-page "https://github.com/zopefoundation/zope.interface")
1008 (synopsis "Python implementation of the \"design by contract\"
1009 methodology")
1010 (description "Zope.interface provides an implementation of \"object
1011 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
1012 conforming to a given API or contract.")
1013 (license license:zpl2.1)))
1014
1015 (define-public python2-zope-interface
1016 (package-with-python2 python-zope-interface))
1017
1018 (define-public python-zope-exceptions
1019 (package
1020 (name "python-zope-exceptions")
1021 (version "4.3")
1022 (source
1023 (origin
1024 (method url-fetch)
1025 (uri (pypi-uri "zope.exceptions" version))
1026 (sha256
1027 (base32
1028 "04bjskwas17yscl8bs3l44maxspw1gdji0zcmr499fs420y9r9az"))))
1029 (build-system python-build-system)
1030 (arguments
1031 '(#:tests? #f)) ; circular dependency with zope.testrunner
1032 (propagated-inputs
1033 `(("python-zope-interface" ,python-zope-interface)))
1034 (home-page "https://pypi.org/project/zope.exceptions/")
1035 (synopsis "Zope exceptions")
1036 (description "Zope.exceptions provides general-purpose exception types
1037 that have uses outside of the Zope framework.")
1038 (license license:zpl2.1)))
1039
1040 (define-public python2-zope-exceptions
1041 (package-with-python2 python-zope-exceptions))
1042
1043 (define-public python-zope-testing
1044 (package
1045 (name "python-zope-testing")
1046 (version "4.7")
1047 (source
1048 (origin
1049 (method url-fetch)
1050 (uri (pypi-uri "zope.testing" version))
1051 (sha256
1052 (base32
1053 "1sh3c3i0m8n8fnhqiry0bk3rr356i56ry7calmn57s1pvv8yhsyn"))))
1054 (build-system python-build-system)
1055 (home-page "https://pypi.org/project/zope.testing/")
1056 (synopsis "Zope testing helpers")
1057 (description "Zope.testing provides a number of testing utilities for HTML
1058 forms, HTTP servers, regular expressions, and more.")
1059 (license license:zpl2.1)))
1060
1061 (define-public python2-zope-testing
1062 (package-with-python2 python-zope-testing))
1063
1064 (define-public python-zope-testrunner
1065 (package
1066 (name "python-zope-testrunner")
1067 (version "5.1")
1068 (source
1069 (origin
1070 (method url-fetch)
1071 (uri (pypi-uri "zope.testrunner" version))
1072 (sha256
1073 (base32
1074 "0w3q66cy4crpj7c0hw0vvvvwf3g931rnvw7wwa20av7yqvv6ajim"))))
1075 (build-system python-build-system)
1076 (arguments
1077 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1078 (native-inputs
1079 `(("python-zope-testing" ,python-zope-testing)))
1080 (propagated-inputs
1081 `(("python-six" ,python-six)
1082 ("python-zope-exceptions" ,python-zope-exceptions)
1083 ("python-zope-interface" ,python-zope-interface)))
1084 (home-page "https://pypi.org/project/zope.testrunner/")
1085 (synopsis "Zope testrunner script")
1086 (description "Zope.testrunner provides a script for running Python
1087 tests.")
1088 (license license:zpl2.1)))
1089
1090 (define-public python2-zope-testrunner
1091 (package-with-python2 python-zope-testrunner))
1092
1093 (define-public python-zope-i18nmessageid
1094 (package
1095 (name "python-zope-i18nmessageid")
1096 (version "5.0.1")
1097 (source
1098 (origin
1099 (method url-fetch)
1100 (uri (pypi-uri "zope.i18nmessageid" version))
1101 (sha256
1102 (base32
1103 "0ndhn4w1qgwkfbwf9vm2bgq418z5g0wmfsgl0d9nz62cd0mi8d4m"))))
1104 (build-system python-build-system)
1105 (native-inputs
1106 `(("python-coverage" ,python-coverage)
1107 ("python-zope-testrunner" ,python-zope-testrunner)))
1108 (propagated-inputs
1109 `(("python-six" ,python-six)))
1110 (home-page "https://pypi.org/project/zope.i18nmessageid/")
1111 (synopsis "Message identifiers for internationalization")
1112 (description "Zope.i18nmessageid provides facilities for declaring
1113 internationalized messages within program source text.")
1114 (license license:zpl2.1)))
1115
1116 (define-public python2-zope-i18nmessageid
1117 (package-with-python2 python-zope-i18nmessageid))
1118
1119 (define-public python-zope-schema
1120 (package
1121 (name "python-zope-schema")
1122 (version "5.0.1")
1123 (source
1124 (origin
1125 (method url-fetch)
1126 (uri (pypi-uri "zope.schema" version))
1127 (sha256
1128 (base32
1129 "0q93j0x52a42khw12al90jw2bk0wly3jwghql3a25zpwwxvn24ya"))))
1130 (build-system python-build-system)
1131 (arguments
1132 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
1133 (propagated-inputs
1134 `(("python-zope-event" ,python-zope-event)
1135 ("python-zope-interface" ,python-zope-interface)))
1136 (native-inputs
1137 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1138 ("python-zope-testing" ,python-zope-testing)
1139 ("python-zope-testrunner" ,python-zope-testrunner)))
1140 (home-page "https://pypi.org/project/zope.schema/")
1141 (synopsis "Zope data schemas")
1142 (description "Zope.scheme provides extensions to zope.interface for
1143 defining data schemas.")
1144 (license license:zpl2.1)))
1145
1146 (define-public python2-zope-schema
1147 (package-with-python2 python-zope-schema))
1148
1149 (define-public python-zope-configuration
1150 (package
1151 (name "python-zope-configuration")
1152 (version "4.3.1")
1153 (source (origin
1154 (method url-fetch)
1155 (uri (pypi-uri "zope.configuration" version))
1156 (sha256
1157 (base32
1158 "1qb88764fd7nkkmqv7fl9bxd1jirynkg5vbqkpqdiffnkxzp85kf"))))
1159 (build-system python-build-system)
1160 (arguments
1161 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1162 (native-inputs
1163 `(("python-zope-testing" ,python-zope-testing)
1164 ("python-zope-testrunner" ,python-zope-testrunner)))
1165 (propagated-inputs
1166 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1167 ("python-zope-interface" ,python-zope-interface)
1168 ("python-zope-schema" ,python-zope-schema)))
1169 (home-page "https://pypi.org/project/zope.configuration/")
1170 (synopsis "Zope Configuration Markup Language")
1171 (description "Zope.configuration implements ZCML, the Zope Configuration
1172 Markup Language.")
1173 (license license:zpl2.1)))
1174
1175 (define-public python2-zope-configuration
1176 (package-with-python2 python-zope-configuration))
1177
1178 (define-public python-zope-proxy
1179 (package
1180 (name "python-zope-proxy")
1181 (version "4.3.4")
1182 (source
1183 (origin
1184 (method url-fetch)
1185 (uri (pypi-uri "zope.proxy" version))
1186 (sha256
1187 (base32
1188 "1g0rcfnbchpvqhm76aixqlz544dawrgmy8gw9zwmijhk6wfl9f26"))))
1189 (build-system python-build-system)
1190 (arguments
1191 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1192 (native-inputs
1193 `(("python-zope-testrunner" ,python-zope-testrunner)))
1194 (propagated-inputs
1195 `(("python-zope-interface" ,python-zope-interface)))
1196 (home-page "https://pypi.org/project/zope.proxy/")
1197 (synopsis "Generic, transparent proxies")
1198 (description "Zope.proxy provides generic, transparent proxies for Python.
1199 Proxies are special objects which serve as mostly-transparent wrappers around
1200 another object, intervening in the apparent behavior of the wrapped object
1201 only when necessary to apply the policy (e.g., access checking, location
1202 brokering, etc.) for which the proxy is responsible.")
1203 (license license:zpl2.1)))
1204
1205 (define-public python2-zope-proxy
1206 (package-with-python2 python-zope-proxy))
1207
1208 (define-public python-zope-location
1209 (package
1210 (name "python-zope-location")
1211 (version "4.2")
1212 (source
1213 (origin
1214 (method url-fetch)
1215 (uri (pypi-uri "zope.location" version))
1216 (sha256
1217 (base32
1218 "1b40pzl8v00d583d3gsxv1qjdw2dhghlgkbgxl3m07d5r3izj857"))))
1219 (build-system python-build-system)
1220 (arguments
1221 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1222 (native-inputs
1223 `(("python-zope-testrunner" ,python-zope-testrunner)))
1224 (propagated-inputs
1225 `(("python-zope-interface" ,python-zope-interface)
1226 ("python-zope-proxy" ,python-zope-proxy)
1227 ("python-zope-schema" ,python-zope-schema)))
1228 (home-page "https://pypi.org/project/zope.location/")
1229 (synopsis "Zope location library")
1230 (description "Zope.location implements the concept of \"locations\" in
1231 Zope3, which are are special objects that have a structural location.")
1232 (license license:zpl2.1)))
1233
1234 (define-public python2-zope-location
1235 (package-with-python2 python-zope-location))
1236
1237 (define-public python-zope-security
1238 (package
1239 (name "python-zope-security")
1240 (version "5.1.0")
1241 (source
1242 (origin
1243 (method url-fetch)
1244 (uri (pypi-uri "zope.security" version))
1245 (sha256
1246 (base32
1247 "1npfrgnm202v48wavpwn3450dsn7az12lfww95vbhxyjl11f14yb"))))
1248 (build-system python-build-system)
1249 (arguments
1250 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
1251 (propagated-inputs
1252 `(("python-zope-component" ,python-zope-component)
1253 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1254 ("python-zope-interface" ,python-zope-interface)
1255 ("python-zope-location" ,python-zope-location)
1256 ("python-zope-proxy" ,python-zope-proxy)
1257 ("python-zope-schema" ,python-zope-schema)))
1258 (native-inputs
1259 `(("python-zope-configuration" ,python-zope-configuration)
1260 ("python-zope-testrunner" ,python-zope-testrunner)
1261 ("python-zope-testing" ,python-zope-testing)))
1262 (home-page "https://pypi.org/project/zope.security/")
1263 (synopsis "Zope security framework")
1264 (description "Zope.security provides a generic mechanism to implement
1265 security policies on Python objects.")
1266 (license license:zpl2.1)))
1267
1268 (define-public python2-zope-security
1269 (package-with-python2 python-zope-security))
1270
1271 (define-public python-zope-component
1272 (package
1273 (name "python-zope-component")
1274 (version "4.3.0")
1275 (source
1276 (origin
1277 (method url-fetch)
1278 (uri (pypi-uri "zope.component" version))
1279 (sha256
1280 (base32
1281 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
1282 (build-system python-build-system)
1283 (arguments
1284 ;; Skip tests due to circular dependency with python-zope-security.
1285 '(#:tests? #f))
1286 (native-inputs
1287 `(("python-zope-testing" ,python-zope-testing)))
1288 (propagated-inputs
1289 `(("python-zope-event" ,python-zope-event)
1290 ("python-zope-interface" ,python-zope-interface)
1291 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1292 ("python-zope-configuration" ,python-zope-configuration)))
1293 (home-page "https://github.com/zopefoundation/zope.component")
1294 (synopsis "Zope Component Architecture")
1295 (description "Zope.component represents the core of the Zope Component
1296 Architecture. Together with the zope.interface package, it provides
1297 facilities for defining, registering and looking up components.")
1298 (license license:zpl2.1)))
1299
1300 (define-public python2-zope-component
1301 (package-with-python2 python-zope-component))
1302
1303 (define-public python-ndg-httpsclient
1304 (package
1305 (name "python-ndg-httpsclient")
1306 (version "0.5.1")
1307 (source (origin
1308 (method url-fetch)
1309 (uri (pypi-uri "ndg_httpsclient" version))
1310 (sha256
1311 (base32
1312 "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
1313 (build-system python-build-system)
1314 (arguments
1315 '(;; The tests appear to require networking.
1316 #:tests? #f))
1317 (propagated-inputs
1318 `(("python-pyopenssl" ,python-pyopenssl)))
1319 (synopsis "HTTPS support for Python's httplib and urllib2")
1320 (description "This is a HTTPS client implementation for httplib and urllib2
1321 based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
1322 over the default provided with Python and, importantly, enables full
1323 verification of the SSL peer.")
1324 (home-page "https://github.com/cedadev/ndg_httpsclient/")
1325 (license license:bsd-3)))
1326
1327 ;; python2-openssl requires special care, so package-with-python2 is
1328 ;; insufficient.
1329 (define-public python2-ndg-httpsclient
1330 (package (inherit python-ndg-httpsclient)
1331 (name "python2-ndg-httpsclient")
1332 (arguments
1333 (substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
1334 ((#:python _) python-2)))
1335 (propagated-inputs
1336 `(("python2-pyopenssl" ,python2-pyopenssl)))))
1337
1338 (define-public python-websocket-client
1339 (package
1340 (name "python-websocket-client")
1341 (version "0.54.0")
1342 (source
1343 (origin
1344 (method url-fetch)
1345 (uri (pypi-uri "websocket_client" version))
1346 (sha256
1347 (base32
1348 "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
1349 (build-system python-build-system)
1350 (propagated-inputs
1351 `(("python-six" ,python-six)))
1352 (home-page "https://github.com/liris/websocket-client")
1353 (synopsis "WebSocket client for Python")
1354 (description "The Websocket-client module provides the low level APIs for
1355 WebSocket usage in Python programs.")
1356 (properties `((python2-variant . ,(delay python2-websocket-client))))
1357 (license license:lgpl2.1+)))
1358
1359 (define-public python2-websocket-client
1360 (let ((base (package-with-python2
1361 (strip-python2-variant python-websocket-client))))
1362 (package
1363 (inherit base)
1364 (native-inputs
1365 `(("python2-backport-ssl-match-hostname"
1366 ,python2-backport-ssl-match-hostname)
1367 ,@(package-native-inputs base))))))
1368
1369 (define-public python-requests
1370 (package
1371 (name "python-requests")
1372 (version "2.22.0")
1373 (source (origin
1374 (method url-fetch)
1375 (uri (pypi-uri "requests" version))
1376 (sha256
1377 (base32
1378 "1d5ybh11jr5sm7xp6mz8fyc7vrp4syifds91m7sj60xalal0gq0i"))))
1379 (build-system python-build-system)
1380 (propagated-inputs
1381 `(("python-certifi" ,python-certifi)
1382 ("python-chardet" ,python-chardet)
1383 ("python-idna" ,python-idna)
1384 ("python-urllib3" ,python-urllib3)))
1385 (arguments
1386 ;; FIXME: Some tests require network access.
1387 '(#:tests? #f))
1388 (home-page "http://python-requests.org/")
1389 (synopsis "Python HTTP library")
1390 (description
1391 "Requests is a Python HTTP client library. It aims to be easier to use
1392 than Python’s urllib2 library.")
1393 (license license:asl2.0)))
1394
1395 ;; Some software requires an older version of Requests, notably Docker/Docker
1396 ;; Compose.
1397 (define-public python-requests-2.20
1398 (package (inherit python-requests)
1399 (version "2.20.1")
1400 (source (origin
1401 (method url-fetch)
1402 (uri (pypi-uri "requests" version))
1403 (sha256
1404 (base32
1405 "0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a"))))
1406 (propagated-inputs
1407 `(("python-urllib3" ,python-urllib3-1.24)
1408 ("python-idna" ,python-idna-2.7)
1409 ,@(package-propagated-inputs python-requests)))))
1410
1411 ;; Some software requires an older version of Requests, notably Docker
1412 ;; Compose.
1413 (define-public python-requests-2.7
1414 (package (inherit python-requests)
1415 (version "2.7.0")
1416 (source (origin
1417 (method url-fetch)
1418 (uri (pypi-uri "requests" version))
1419 (sha256
1420 (base32
1421 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
1422
1423 (define-public python2-requests
1424 (package-with-python2 python-requests))
1425
1426 (define-public python-requests_ntlm
1427 (package
1428 (name "python-requests_ntlm")
1429 (version "1.1.0")
1430 (source
1431 (origin
1432 (method url-fetch)
1433 (uri (pypi-uri "requests_ntlm" version))
1434 (sha256
1435 (base32
1436 "0wgbqzaq9w7bas16b7brdb75f91bh3275fb459093bk1ihpck2ci"))))
1437 (build-system python-build-system)
1438 (propagated-inputs
1439 `(("python-cryptography" ,python-cryptography)
1440 ("python-ntlm-auth" ,python-ntlm-auth)
1441 ("python-requests" ,python-requests)))
1442 (home-page "https://github.com/requests/requests-ntlm")
1443 (synopsis
1444 "NTLM authentication support for Requests")
1445 (description
1446 "This package allows for HTTP NTLM authentication using the requests
1447 library.")
1448 (license license:isc)))
1449
1450 (define-public python-requests-mock
1451 (package
1452 (name "python-requests-mock")
1453 (version "1.3.0")
1454 (source
1455 (origin
1456 (method url-fetch)
1457 (uri (pypi-uri "requests-mock" version))
1458 (sha256
1459 (base32
1460 "0jr997dvk6zbmhvbpcv3rajrgag69mcsm1ai3w3rgk2jdh6rg1mx"))))
1461 (build-system python-build-system)
1462 (propagated-inputs
1463 `(("python-requests" ,python-requests)
1464 ("python-six" ,python-six)))
1465 (native-inputs
1466 `(("python-pbr" ,python-pbr)
1467 ("python-discover" ,python-discover)
1468 ("python-docutils" ,python-docutils)
1469 ("python-fixtures" ,python-fixtures)
1470 ("python-mock" ,python-mock)
1471 ("python-sphinx" ,python-sphinx)
1472 ("python-testrepository" ,python-testrepository)
1473 ("python-testtools" ,python-testtools)))
1474 (home-page "https://requests-mock.readthedocs.org/")
1475 (synopsis "Mock out responses from the requests package")
1476 (description
1477 "This module provides a building block to stub out the HTTP requests
1478 portions of your testing code.")
1479 (properties `((python2-variant . ,(delay python2-requests-mock))))
1480 (license license:asl2.0)))
1481
1482 (define-public python2-requests-mock
1483 (package (inherit (package-with-python2
1484 (strip-python2-variant python-requests-mock)))
1485 (arguments
1486 `(#:python ,python-2
1487 ;; FIXME: 'subunit.run discover: error: no such option: --list'
1488 #:tests? #f))))
1489
1490 (define-public python-requests-toolbelt
1491 (package
1492 (name "python-requests-toolbelt")
1493 (version "0.8.0")
1494 (source (origin
1495 (method url-fetch)
1496 (uri (pypi-uri "requests-toolbelt" version))
1497 (sha256
1498 (base32
1499 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
1500 (build-system python-build-system)
1501 (native-inputs
1502 `(("python-betamax" ,python-betamax)
1503 ("python-mock" ,python-mock)
1504 ("python-pytest" ,python-pytest)))
1505 (propagated-inputs
1506 `(("python-requests" ,python-requests)))
1507 (synopsis "Extensions to python-requests")
1508 (description "This is a toolbelt of useful classes and functions to be used
1509 with python-requests.")
1510 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
1511 (license license:asl2.0)))
1512
1513 (define-public python2-requests-toolbelt
1514 (package-with-python2 python-requests-toolbelt))
1515
1516 (define-public python-oauthlib
1517 (package
1518 (name "python-oauthlib")
1519 (version "3.0.1")
1520 (source (origin
1521 (method url-fetch)
1522 (uri (pypi-uri "oauthlib" version))
1523 (sha256
1524 (base32
1525 "163jg4a8f7c5ki655grrr47kgljy12wri3qly7ijf64sk1fjrqqc"))))
1526 (build-system python-build-system)
1527 (arguments
1528 `(#:phases (modify-phases %standard-phases
1529 (replace 'check
1530 (lambda _
1531 (invoke "pytest" "-vv"))))))
1532 (native-inputs
1533 `(("python-pytest" ,python-pytest)
1534 ("python-pytest-cov" ,python-pytest-cov)
1535 ("python-mock" ,python-mock)))
1536 (propagated-inputs
1537 `(("python-cryptography" ,python-cryptography)
1538 ("python-pyjwt" ,python-pyjwt)
1539 ("python-blinker" ,python-blinker)))
1540 (home-page "https://github.com/oauthlib/oauthlib")
1541 (synopsis "OAuth implementation for Python")
1542 (description
1543 "Oauthlib is a generic, spec-compliant, thorough implementation of the
1544 OAuth request-signing logic.")
1545 (license license:bsd-3)))
1546
1547 (define-public python2-oauthlib
1548 (package-with-python2 python-oauthlib))
1549
1550 (define-public python-rauth
1551 (package
1552 (name "python-rauth")
1553 (version "0.7.3")
1554 (source
1555 (origin
1556 (method url-fetch)
1557 (uri (pypi-uri "rauth" version))
1558 (sha256
1559 (base32
1560 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
1561 (build-system python-build-system)
1562 (arguments
1563 `(#:test-target "check"))
1564 (propagated-inputs
1565 `(("python-requests" ,python-requests)))
1566 (home-page "https://github.com/litl/rauth")
1567 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
1568 (description
1569 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
1570 provides service wrappers for convenient connection initialization and
1571 authenticated session objects providing things like keep-alive.")
1572 (license license:expat)
1573 (properties `((python2-variant . ,(delay python2-rauth))))))
1574
1575 (define-public python2-rauth
1576 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
1577 (package
1578 (inherit base)
1579 (native-inputs `(("python2-unittest2" ,python2-unittest2)
1580 ,@(package-native-inputs base))))))
1581
1582 (define-public python-urllib3
1583 (package
1584 (name "python-urllib3")
1585 (version "1.25.3")
1586 (source
1587 (origin
1588 (method url-fetch)
1589 (uri (pypi-uri "urllib3" version))
1590 (sha256
1591 (base32
1592 "0cij8qcvvpj62g1q8n785qjkdymfh4b7vf45si4sw64l41rr3rfv"))))
1593 (build-system python-build-system)
1594 (arguments `(#:tests? #f))
1595 (propagated-inputs
1596 `(;; These 5 inputs are used to build urrlib3[secure]
1597 ("python-certifi" ,python-certifi)
1598 ("python-cryptography" ,python-cryptography)
1599 ("python-idna" ,python-idna)
1600 ("python-ipaddress" ,python-ipaddress)
1601 ("python-pyopenssl" ,python-pyopenssl)
1602 ("python-pysocks" ,python-pysocks)))
1603 (home-page "https://urllib3.readthedocs.io/")
1604 (synopsis "HTTP library with thread-safe connection pooling")
1605 (description
1606 "Urllib3 supports features left out of urllib and urllib2 libraries. It
1607 can reuse the same socket connection for multiple requests, it can POST files,
1608 supports url redirection and retries, and also gzip and deflate decoding.")
1609 (license license:expat)))
1610
1611 ;; Some software requires an older version of urllib3, notably Docker.
1612 (define-public python-urllib3-1.24
1613 (package (inherit python-urllib3)
1614 (version "1.24.3")
1615 (source (origin
1616 (method url-fetch)
1617 (uri (pypi-uri "urllib3" version))
1618 (sha256
1619 (base32
1620 "1x0slqrv6kixkbcdnxbglvjliwhc1payavxjvk8fvbqjrnasd4r3"))))))
1621
1622
1623 (define-public python2-urllib3
1624 (package-with-python2 python-urllib3))
1625
1626 (define-public awscli
1627 (package
1628 (name "awscli")
1629 (version "1.18.6")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (pypi-uri name version))
1634 (sha256
1635 (base32
1636 "0p479mfs9r0m82a217pap8156ijwvhv6r3kqa4k267gd05wgvygm"))))
1637 (build-system python-build-system)
1638 (arguments
1639 ;; FIXME: The 'pypi' release does not contain tests.
1640 '(#:tests? #f
1641 #:phases
1642 (modify-phases %standard-phases
1643 (add-after 'unpack 'fix-reference-to-groff
1644 (lambda _
1645 (substitute* "awscli/help.py"
1646 (("if not self._exists_on_path\\('groff'\\):") "")
1647 (("raise ExecutableNotFoundError\\('groff'\\)") "")
1648 (("cmdline = \\['groff'")
1649 (string-append "cmdline = ['" (which "groff") "'")))
1650 #t)))))
1651 (propagated-inputs
1652 `(("python-colorama" ,python-colorama)
1653 ("python-botocore" ,python-botocore)
1654 ("python-s3transfer" ,python-s3transfer)
1655 ("python-docutils" ,python-docutils)
1656 ("python-pyyaml" ,python-pyyaml)
1657 ("python-rsa" ,python-rsa)))
1658 (native-inputs
1659 `(("groff" ,groff)))
1660 (home-page "https://aws.amazon.com/cli/")
1661 (synopsis "Command line client for AWS")
1662 (description "AWS CLI provides a unified command line interface to the
1663 Amazon Web Services (AWS) API.")
1664 (license license:asl2.0)))
1665
1666 (define-public python-wsgiproxy2
1667 (package
1668 (name "python-wsgiproxy2")
1669 (version "0.4.6")
1670 (source
1671 (origin
1672 (method url-fetch)
1673 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
1674 (sha256
1675 (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
1676 (build-system python-build-system)
1677 (native-inputs
1678 `(("python-webtest" ,python-webtest)))
1679 (propagated-inputs
1680 `(("python-requests" ,python-requests)
1681 ("python-six" ,python-six)
1682 ("python-urllib3" ,python-urllib3)
1683 ("python-webob" ,python-webob)))
1684 (home-page "https://github.com/gawel/WSGIProxy2/")
1685 (synopsis "WSGI Proxy with various http client backends")
1686 (description "WSGI turns HTTP requests into WSGI function calls.
1687 WSGIProxy turns WSGI function calls into HTTP requests.
1688 It also includes code to sign requests and pass private data,
1689 and to spawn subprocesses to handle requests.")
1690 (license license:expat)))
1691
1692 (define-public python2-wsgiproxy2
1693 (package-with-python2 python-wsgiproxy2))
1694
1695 (define-public python-pastedeploy
1696 (package
1697 (name "python-pastedeploy")
1698 (version "1.5.2")
1699 (source
1700 (origin
1701 (method url-fetch)
1702 (uri (pypi-uri "PasteDeploy" version))
1703 (sha256
1704 (base32
1705 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
1706 (build-system python-build-system)
1707 (native-inputs
1708 `(("python-nose" ,python-nose)))
1709 (home-page "https://pylonsproject.org/")
1710 (synopsis
1711 "Load, configure, and compose WSGI applications and servers")
1712 (description
1713 "This tool provides code to load WSGI applications and servers from URIs;
1714 these URIs can refer to Python Eggs for INI-style configuration files. Paste
1715 Script provides commands to serve applications based on this configuration
1716 file.")
1717 (license license:expat)))
1718
1719 (define-public python2-pastedeploy
1720 (package-with-python2 python-pastedeploy))
1721
1722 (define-public python-webtest
1723 (package
1724 (name "python-webtest")
1725 (version "2.0.33")
1726 (source
1727 (origin
1728 (method url-fetch)
1729 (uri (pypi-uri "WebTest" version))
1730 (sha256
1731 (base32
1732 "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21"))))
1733 (build-system python-build-system)
1734 (arguments
1735 ;; Tests require python-pyquery, which creates a circular dependency.
1736 `(#:tests? #f))
1737 (propagated-inputs
1738 `(("python-waitress" ,python-waitress)
1739 ("python-webob" ,python-webob)
1740 ("python-six" ,python-six)
1741 ("python-beautifulsoup4" ,python-beautifulsoup4)))
1742 (home-page "https://docs.pylonsproject.org/projects/webtest/")
1743 (synopsis "Helper to test WSGI applications")
1744 (description "Webtest allows you to test your Python web applications
1745 without starting an HTTP server. It supports anything that supports the
1746 minimum of WSGI.")
1747 (license license:expat)))
1748
1749 (define-public python2-webtest
1750 (package-with-python2 python-webtest))
1751
1752 (define-public python-flask
1753 (package
1754 (name "python-flask")
1755 (version "1.1.1")
1756 (source (origin
1757 (method url-fetch)
1758 (uri (pypi-uri "Flask" version))
1759 (sha256
1760 (base32
1761 "0ljdjgyjn7vh8ic1n1dc2l1cl421i6pr3kx5sz2w5irhyfbg3y8k"))))
1762 (build-system python-build-system)
1763 (arguments
1764 '(#:phases
1765 (modify-phases %standard-phases
1766 (replace 'check
1767 (lambda _
1768 (setenv "PYTHONPATH" (string-append "./build/lib:"
1769 (getenv "PYTHONPATH")))
1770 (invoke "pytest" "-vv" "tests"))))))
1771 (native-inputs
1772 `(("python-pytest" ,python-pytest)))
1773 (propagated-inputs
1774 `(("python-itsdangerous" ,python-itsdangerous)
1775 ("python-jinja2" ,python-jinja2)
1776 ("python-click" ,python-click)
1777 ("python-werkzeug" ,python-werkzeug)))
1778 (home-page "https://www.palletsprojects.com/p/flask/")
1779 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
1780 (description "Flask is a micro web framework based on the Werkzeug toolkit
1781 and Jinja2 template engine. It is called a micro framework because it does not
1782 presume or force a developer to use a particular tool or library.")
1783 (license license:bsd-3)))
1784
1785 (define-public python2-flask
1786 (package-with-python2 python-flask))
1787
1788 (define-public python-flask-wtf
1789 (package
1790 (name "python-flask-wtf")
1791 (version "0.14.3")
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (pypi-uri "Flask-WTF" version))
1796 (sha256
1797 (base32
1798 "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"))))
1799 (build-system python-build-system)
1800 (arguments
1801 '(#:phases
1802 (modify-phases %standard-phases
1803 (replace 'check
1804 (lambda _
1805 (setenv "PYTHONPATH" (string-append "./build/lib:"
1806 (getenv "PYTHONPATH")))
1807 (invoke "pytest" "-vv"))))))
1808 (propagated-inputs
1809 `(("python-flask-babel" ,python-flask-babel)
1810 ("python-babel" ,python-babel)
1811 ("python-wtforms" ,python-wtforms)))
1812 (native-inputs
1813 `(("python-pytest" ,python-pytest)))
1814 (home-page "https://github.com/lepture/flask-wtf")
1815 (synopsis "Simple integration of Flask and WTForms")
1816 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
1817 upload, and reCAPTCHA.")
1818 (license license:bsd-3)))
1819
1820 (define-public python2-flask-wtf
1821 (package-with-python2 python-flask-wtf))
1822
1823 (define-public python-flask-multistatic
1824 (package
1825 (name "python-flask-multistatic")
1826 (version "1.0")
1827 (source
1828 (origin
1829 (method url-fetch)
1830 (uri (pypi-uri "flask-multistatic" version))
1831 (sha256
1832 (base32
1833 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
1834 (build-system python-build-system)
1835 (propagated-inputs
1836 `(("python-flask" ,python-flask)))
1837 (home-page "https://pagure.io/flask-multistatic")
1838 (synopsis "Flask plugin to allow overriding static files")
1839 (description "@code{flask-multistatic} is a flask plugin that adds support
1840 for overriding static files.")
1841 (license license:gpl3+)))
1842
1843 (define-public python2-flask-multistatic
1844 (package-with-python2 python-flask-multistatic))
1845
1846 (define-public python-cookies
1847 (package
1848 (name "python-cookies")
1849 (version "2.2.1")
1850 (source (origin
1851 (method url-fetch)
1852 (uri (pypi-uri "cookies" version))
1853 (sha256
1854 (base32
1855 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
1856 (build-system python-build-system)
1857 (arguments
1858 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
1859 #:tests? #f))
1860 (native-inputs
1861 `(("python-pytest" ,python-pytest)))
1862 (synopsis "HTTP cookie parser and renderer")
1863 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
1864 Python.")
1865 (home-page "https://gitlab.com/sashahart/cookies")
1866 (license license:expat)))
1867
1868 (define-public python2-cookies
1869 (package-with-python2 python-cookies))
1870
1871 (define-public python-responses
1872 (package
1873 (name "python-responses")
1874 (version "0.10.6")
1875 (source (origin
1876 (method url-fetch)
1877 (uri (pypi-uri "responses" version))
1878 (sha256
1879 (base32
1880 "147pacwkkqy3qf3hr33fnl1xbzgw0zsm3qppvvy9qhq8h069qbah"))))
1881 (build-system python-build-system)
1882 (arguments
1883 `(;; Test suite is not distributed:
1884 ;; https://github.com/getsentry/responses/issues/38
1885 #:tests? #f))
1886 (native-inputs
1887 `(("python-mock" ,python-mock)))
1888 (propagated-inputs
1889 `(("python-requests" ,python-requests)
1890 ("python-cookies" ,python-cookies)
1891 ("python-six" ,python-six)))
1892 (home-page "https://github.com/getsentry/responses")
1893 (synopsis "Utility for mocking out the `requests` Python library")
1894 (description "A utility library for mocking out the `requests` Python
1895 library.")
1896 (license license:asl2.0)))
1897
1898 (define-public python2-responses
1899 (package-with-python2 python-responses))
1900
1901 (define-public python-grequests
1902 (package
1903 (name "python-grequests")
1904 (version "0.3.0")
1905 (source
1906 (origin
1907 (method url-fetch)
1908 (uri (pypi-uri "grequests" version))
1909 (sha256
1910 (base32
1911 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
1912 (build-system python-build-system)
1913 (propagated-inputs
1914 `(("python-gevent" ,python-gevent)
1915 ("python-requests" ,python-requests)))
1916 (native-inputs
1917 `(("python-nose" ,python-nose)))
1918 (home-page "https://github.com/kennethreitz/grequests")
1919 (synopsis "Python library for asynchronous HTTP requests")
1920 (description "GRequests is a Python library that allows you to use
1921 @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
1922 (license license:bsd-2)))
1923
1924 (define-public python-geventhttpclient
1925 (package
1926 (name "python-geventhttpclient")
1927 (version "1.3.1")
1928 (source (origin
1929 (method url-fetch)
1930 (uri (pypi-uri "geventhttpclient" version))
1931 (sha256
1932 (base32
1933 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
1934 (modules '((guix build utils)))
1935 (snippet
1936 '(begin
1937 ;; Delete pre-compiled files.
1938 (for-each delete-file (find-files "src/geventhttpclient"
1939 ".*\\.pyc"))
1940 #t))))
1941 (build-system python-build-system)
1942 (arguments
1943 '(#:phases
1944 (modify-phases %standard-phases
1945 (add-after 'unpack 'delete-network-tests
1946 (lambda _
1947 (delete-file "src/geventhttpclient/tests/test_client.py")
1948 #t))
1949 (delete 'check)
1950 (add-after 'install 'check
1951 (lambda* (#:key inputs outputs #:allow-other-keys)
1952 (add-installed-pythonpath inputs outputs)
1953 (invoke "py.test" "src/geventhttpclient/tests" "-v"
1954 ;; Append the test modules to sys.path to avoid
1955 ;; namespace conflict which breaks SSL tests.
1956 "--import-mode=append")
1957 #t)))))
1958 (native-inputs
1959 `(("python-pytest" ,python-pytest)))
1960 (propagated-inputs
1961 `(("python-certifi" ,python-certifi)
1962 ("python-gevent" ,python-gevent)
1963 ("python-six" ,python-six)))
1964 (home-page "https://github.com/gwik/geventhttpclient")
1965 (synopsis "HTTP client library for gevent")
1966 (description "@code{python-geventhttpclient} is a high performance,
1967 concurrent HTTP client library for python using @code{gevent}.")
1968 (license license:expat)))
1969
1970 (define-public python2-geventhttpclient
1971 (package-with-python2 python-geventhttpclient))
1972
1973 (define-public python-requests-oauthlib
1974 (package
1975 (name "python-requests-oauthlib")
1976 (version "1.2.0")
1977 (source
1978 (origin
1979 (method url-fetch)
1980 (uri (pypi-uri "requests-oauthlib" version))
1981 (sha256
1982 (base32
1983 "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
1984 (build-system python-build-system)
1985 (arguments
1986 `(#:phases
1987 (modify-phases %standard-phases
1988 ;; removes tests that require network access
1989 (add-before 'check 'pre-check
1990 (lambda _
1991 (delete-file "tests/test_core.py")
1992 #t)))))
1993 (native-inputs
1994 `(("python-pyjwt" ,python-pyjwt)
1995 ("python-requests-mock" ,python-requests-mock)
1996 ("python-mock" ,python-mock)))
1997 (propagated-inputs
1998 `(("python-oauthlib" ,python-oauthlib)
1999 ("python-requests" ,python-requests)))
2000 (home-page
2001 "https://github.com/requests/requests-oauthlib")
2002 (synopsis
2003 "OAuthlib authentication support for Requests")
2004 (description
2005 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
2006 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
2007 (license license:isc)))
2008
2009 (define-public python2-requests-oauthlib
2010 (package-with-python2 python-requests-oauthlib))
2011
2012 (define-public python-url
2013 (package
2014 (name "python-url")
2015 (version "0.2.0")
2016 (source (origin
2017 (method url-fetch)
2018 (uri (pypi-uri "url" version))
2019 (sha256
2020 (base32
2021 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
2022 (build-system python-build-system)
2023 (propagated-inputs
2024 `(("python-publicsuffix" ,python-publicsuffix)))
2025 (native-inputs
2026 `(("python-coverage" ,python-coverage)
2027 ("python-nose" ,python-nose)))
2028 (arguments
2029 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
2030 (home-page "https://github.com/seomoz/url-py")
2031 (synopsis "URL Parsing")
2032 (description "Library for parsing urls.")
2033 (license license:expat)
2034 (properties `((python2-variant . ,(delay python2-url))))))
2035
2036 (define-public python2-url
2037 (let ((base (package-with-python2 (strip-python2-variant python-url))))
2038 (package (inherit base)
2039 (propagated-inputs
2040 `(("python2-publicsuffix" ,python2-publicsuffix))))))
2041
2042 (define-public python-cachecontrol
2043 (package
2044 (name "python-cachecontrol")
2045 (version "0.12.5")
2046 (source
2047 (origin
2048 (method git-fetch)
2049 ;; Pypi does not have tests.
2050 (uri (git-reference
2051 (url "https://github.com/ionrock/cachecontrol")
2052 (commit (string-append "v" version))))
2053 (file-name (git-file-name name version))
2054 (sha256
2055 (base32
2056 "03lgc65sl04n0cgzmmgg99bk83f9i6k8yrmcd4hpl46q1pymn0kz"))))
2057 (build-system python-build-system)
2058 (arguments
2059 ;; Versions > 0.11.6 depend on CherryPy for testing.
2060 ;; It's too much work to package CherryPy for now.
2061 `(#:tests? #f))
2062 (propagated-inputs
2063 `(("python-requests" ,python-requests)
2064 ("python-msgpack" ,python-msgpack)
2065 ("python-lockfile" ,python-lockfile)))
2066 (home-page "https://github.com/ionrock/cachecontrol")
2067 (synopsis "The httplib2 caching algorithms for use with requests")
2068 (description "CacheControl is a port of the caching algorithms in
2069 @code{httplib2} for use with @code{requests} session objects.")
2070 (license license:asl2.0)))
2071
2072 (define-public python2-cachecontrol
2073 (package-with-python2 python-cachecontrol))
2074
2075 (define-public python-betamax
2076 (package
2077 (name "python-betamax")
2078 (version "0.8.1")
2079 (source
2080 (origin
2081 (method url-fetch)
2082 (uri (pypi-uri "betamax" version))
2083 (sha256
2084 (base32
2085 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
2086 (build-system python-build-system)
2087 (arguments
2088 '(;; Many tests fail because they require networking.
2089 #:tests? #f))
2090 (propagated-inputs
2091 `(("python-requests" ,python-requests)))
2092 (home-page "https://github.com/sigmavirus24/betamax")
2093 (synopsis "Record HTTP interactions with python-requests")
2094 (description "Betamax will record your test suite's HTTP interactions and
2095 replay them during future tests. It is designed to work with python-requests.")
2096 (license license:expat)))
2097
2098 (define-public python2-betamax
2099 (package-with-python2 python-betamax))
2100
2101 (define-public python-betamax-matchers
2102 (package
2103 (name "python-betamax-matchers")
2104 (version "0.4.0")
2105 (source
2106 (origin
2107 (method url-fetch)
2108 (uri (pypi-uri "betamax-matchers" version))
2109 (sha256
2110 (base32
2111 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
2112 (build-system python-build-system)
2113 (propagated-inputs
2114 `(("python-betamax" ,python-betamax)
2115 ("python-requests-toolbelt" ,python-requests-toolbelt)))
2116 (home-page "https://github.com/sigmavirus24/betamax_matchers")
2117 (synopsis "VCR imitation for python-requests")
2118 (description "@code{betamax-matchers} provides a set of Matchers for
2119 Betamax.")
2120 (license license:asl2.0)))
2121
2122 (define-public python2-betamax-matchers
2123 (package-with-python2 python-betamax-matchers))
2124
2125 (define-public python-s3transfer
2126 (package
2127 (name "python-s3transfer")
2128 (version "0.2.0")
2129 (source (origin
2130 (method url-fetch)
2131 (uri (pypi-uri "s3transfer" version))
2132 (sha256
2133 (base32
2134 "08fhj73b1ai52hrs2q3nggshq3pswn1gq8ch3m009cb2v2vmqggj"))))
2135 (build-system python-build-system)
2136 (arguments
2137 `(#:phases
2138 (modify-phases %standard-phases
2139 (replace 'check
2140 (lambda _
2141 ;; Some of the 'integration' tests require network access or
2142 ;; login credentials.
2143 (invoke "nosetests" "--exclude=integration")
2144 #t)))))
2145 (native-inputs
2146 `(("python-docutils" ,python-docutils)
2147 ("python-mock" ,python-mock)
2148 ("python-nose" ,python-nose)))
2149 (propagated-inputs
2150 `(("python-botocore" ,python-botocore)
2151 ("python-urllib3" ,python-urllib3)))
2152 (synopsis "Amazon S3 Transfer Manager")
2153 (description "S3transfer is a Python library for managing Amazon S3
2154 transfers.")
2155 (home-page "https://github.com/boto/s3transfer")
2156 (license license:asl2.0)
2157 (properties `((python2-variant . ,(delay python2-s3transfer))))))
2158
2159 (define-public python2-s3transfer
2160 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
2161 (package
2162 (inherit base)
2163 (native-inputs
2164 `(("python2-futures" ,python2-futures)
2165 ,@(package-native-inputs base))))))
2166
2167 (define-public python-slimit
2168 (package
2169 (name "python-slimit")
2170 (version "0.8.1")
2171 (source
2172 (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "slimit" version ".zip"))
2175 (sha256
2176 (base32
2177 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
2178 (build-system python-build-system)
2179 (native-inputs
2180 `(("unzip" ,unzip)))
2181 (propagated-inputs
2182 `(("python-ply" ,python-ply)))
2183 (home-page "https://slimit.readthedocs.io/")
2184 (synopsis "JavaScript minifier, parser and lexer written in Python")
2185 (description
2186 "SlimIt is a JavaScript minifier written in Python. It compiles
2187 JavaScript into more compact code so that it downloads and runs faster.
2188 SlimIt also provides a library that includes a JavaScript parser, lexer,
2189 pretty printer and a tree visitor.")
2190 (license license:expat)))
2191
2192 (define-public python-flask-restful
2193 (package
2194 (name "python-flask-restful")
2195 (version "0.3.8")
2196 (source
2197 (origin
2198 (method url-fetch)
2199 (uri (pypi-uri "Flask-RESTful" version))
2200 (patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
2201 (sha256
2202 (base32
2203 "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
2204 (build-system python-build-system)
2205 (propagated-inputs
2206 `(("python-aniso8601" ,python-aniso8601)
2207 ("python-flask" ,python-flask)
2208 ("python-pycrypto" ,python-pycrypto)
2209 ("python-pytz" ,python-pytz)))
2210 (native-inputs
2211 `(;; Optional dependency of Flask. Tests need it.
2212 ("python-blinker" ,python-blinker)
2213 ("python-mock" ,python-mock) ; For tests
2214 ("python-nose" ,python-nose))) ;for tests
2215 (home-page
2216 "https://www.github.com/flask-restful/flask-restful/")
2217 (synopsis
2218 "Flask module for creating REST APIs")
2219 (description
2220 "This package contains a Flask module for creating REST APIs.")
2221 (license license:bsd-3)))
2222
2223 (define-public python-flask-basicauth
2224 (package
2225 (name "python-flask-basicauth")
2226 (version "0.2.0")
2227 (source
2228 (origin
2229 (method url-fetch)
2230 (uri (pypi-uri "Flask-BasicAuth" version))
2231 (sha256
2232 (base32
2233 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
2234 (build-system python-build-system)
2235 (propagated-inputs
2236 `(("python-flask" ,python-flask)))
2237 (home-page
2238 "https://github.com/jpvanhal/flask-basicauth")
2239 (synopsis
2240 "HTTP basic access authentication for Flask")
2241 (description
2242 "This package provides HTTP basic access authentication for Flask.")
2243 (license license:bsd-3)))
2244
2245 (define-public python-flask-htpasswd
2246 (package
2247 (name "python-flask-htpasswd")
2248 (version "0.3.1")
2249 (source
2250 (origin
2251 (method url-fetch)
2252 (uri (pypi-uri "flask-htpasswd" version))
2253 (sha256
2254 (base32
2255 "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
2256 (build-system python-build-system)
2257 (propagated-inputs
2258 `(("python-flask" ,python-flask)
2259 ("python-itsdangerous" ,python-itsdangerous)
2260 ("python-passlib" ,python-passlib)
2261 ("python-tox" ,python-tox)))
2262 (home-page "http://github.com/carsongee/flask-htpasswd")
2263 (synopsis "Basic authentication via htpasswd files in Flask applications")
2264 (description "This package provides Basic authentication via
2265 @file{htpasswd} files and access_token authentication in Flask
2266 applications.")
2267 (license license:bsd-3)))
2268
2269 (define-public python-flask-sqlalchemy
2270 (package
2271 (name "python-flask-sqlalchemy")
2272 (version "2.4.0")
2273 (source (origin
2274 (method url-fetch)
2275 (uri (pypi-uri "Flask-SQLAlchemy" version))
2276 (sha256
2277 (base32
2278 "0nnllf0ddbh9jlhngnyjj98lbxgxr1csaplllx0caw98syq0k5hc"))))
2279 (build-system python-build-system)
2280 (propagated-inputs
2281 `(("python-flask" ,python-flask)
2282 ("python-sqlalchemy" ,python-sqlalchemy)))
2283 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
2284 (synopsis "Module adding SQLAlchemy support to your Flask application")
2285 (description
2286 "This package adds SQLAlchemy support to your Flask application.")
2287 (license license:bsd-3)))
2288
2289 (define-public python-flask-restplus
2290 (package
2291 (name "python-flask-restplus")
2292 (version "0.9.2")
2293 (source
2294 (origin
2295 (method url-fetch)
2296 (uri (pypi-uri "flask-restplus" version))
2297 (sha256
2298 (base32
2299 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2300 (build-system python-build-system)
2301 (arguments
2302 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2303 ;; #:phases
2304 ;; (modify-phases %standard-phases
2305 ;; (replace 'check
2306 ;; (lambda _
2307 ;; (invoke "nosetests")
2308 ;; #t)))))
2309 (propagated-inputs
2310 `(("python-aniso8601" ,python-aniso8601)
2311 ("python-flask" ,python-flask)
2312 ("python-jsonschema" ,python-jsonschema)
2313 ("python-pytz" ,python-pytz)
2314 ("python-six" ,python-six)))
2315 (native-inputs
2316 `(("python-tzlocal" ,python-tzlocal)
2317 ("python-blinker" ,python-blinker)
2318 ("python-nose" ,python-nose)
2319 ("python-rednose" ,python-rednose)))
2320 (home-page "https://github.com/noirbizarre/flask-restplus")
2321 (synopsis "Framework for documented API development with Flask")
2322 (description "This package provides a framework for API development with
2323 the Flask web framework in Python. It is similar to package
2324 @code{python-flask-restful} but supports the @code{python-swagger}
2325 documentation builder.")
2326 (license license:expat)))
2327
2328 (define-public python-flask-restful-swagger
2329 (package
2330 (name "python-flask-restful-swagger")
2331 (version "0.20.1")
2332 (source
2333 (origin
2334 (method url-fetch)
2335 (uri (pypi-uri "flask-restful-swagger" version))
2336 (sha256
2337 (base32
2338 "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
2339 (build-system python-build-system)
2340 (arguments '(#:tests? #f)) ;no tests
2341 (propagated-inputs
2342 `(("python-flask-restful" ,python-flask-restful)))
2343 (home-page "https://github.com/rantav/flask-restful-swagger")
2344 (synopsis "Extract Swagger specs from Flask-Restful projects")
2345 (description "This package lets you extract Swagger API documentation
2346 specs from your Flask-Restful projects.")
2347 (license license:expat)))
2348
2349 (define-public python2-flask-restful-swagger
2350 (package-with-python2 python-flask-restful-swagger))
2351
2352 (define-public python-htmlmin
2353 (package
2354 (name "python-htmlmin")
2355 (version "0.1.12")
2356 (source
2357 (origin
2358 (method url-fetch)
2359 (uri (pypi-uri "htmlmin" version))
2360 (sha256
2361 (base32
2362 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
2363 (arguments
2364 `(#:tests? #f)) ; no tests
2365 (build-system python-build-system)
2366 (home-page "https://htmlmin.readthedocs.org/en/latest/")
2367 (synopsis "HTML minifier")
2368 (description "@code{htmlmin} is an HTML minifier that just works.
2369 It comes with safe defaults and easily configurable options.")
2370 (license license:bsd-3)))
2371
2372 (define-public python2-htmlmin
2373 (package-with-python2 python-htmlmin))
2374
2375 (define-public python-flask-htmlmin
2376 (package
2377 (name "python-flask-htmlmin")
2378 (version "1.2")
2379 (source
2380 (origin
2381 (method url-fetch)
2382 (uri (pypi-uri "Flask-HTMLmin" version))
2383 (sha256
2384 (base32
2385 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
2386 (propagated-inputs
2387 `(("python-flask" ,python-flask)
2388 ("python-htmlmin" ,python-htmlmin)))
2389 (build-system python-build-system)
2390 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
2391 (synopsis "HTML response minifier for Flask")
2392 (description
2393 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
2394 (license license:bsd-3)))
2395
2396 (define-public python2-flask-htmlmin
2397 (package-with-python2 python-flask-htmlmin))
2398
2399 (define-public python-jsmin
2400 (package
2401 (name "python-jsmin")
2402 (version "2.2.2")
2403 (source
2404 (origin
2405 (method url-fetch)
2406 (uri (pypi-uri "jsmin" version))
2407 (sha256
2408 (base32
2409 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
2410 (build-system python-build-system)
2411 (home-page "https://github.com/tikitu/jsmin/")
2412 (synopsis "Python JavaScript minifier")
2413 (description
2414 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
2415 on the command line.")
2416 (license license:expat)))
2417
2418 (define-public python-flask-login
2419 (package
2420 (name "python-flask-login")
2421 (version "0.5.0")
2422 (source
2423 (origin
2424 (method git-fetch)
2425 (uri (git-reference
2426 (url "https://github.com/maxcountryman/flask-login.git")
2427 (commit version)))
2428 (file-name (git-file-name name version))
2429 (sha256
2430 (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
2431 (build-system python-build-system)
2432 (propagated-inputs
2433 `(("python-flask" ,python-flask)))
2434 (native-inputs
2435 ;; For tests.
2436 `(("python-blinker" ,python-blinker)
2437 ("python-coverage" ,python-coverage)
2438 ("python-mock" ,python-mock)
2439 ("python-pycodestyle" ,python-pycodestyle)
2440 ("python-pyflakes" ,python-pyflakes)
2441 ("python-pytest" ,python-pytest)
2442 ("python-semantic-version" ,python-semantic-version)
2443 ("python-werkzeug" ,python-werkzeug)))
2444 (home-page "https://github.com/maxcountryman/flask-login")
2445 (synopsis "User session management for Flask")
2446 (description
2447 "@code{Flask-Login} provides user session management for Flask. It
2448 handles the common tasks of logging in, logging out, and remembering your
2449 users' sessions over extended periods of time.")
2450 (license license:expat)))
2451
2452 (define-public python2-flask-login
2453 (package-with-python2 python-flask-login))
2454
2455 (define-public python-oauth2client
2456 (package
2457 (name "python-oauth2client")
2458 (version "4.0.0")
2459 (source
2460 (origin
2461 (method url-fetch)
2462 (uri (pypi-uri "oauth2client" version))
2463 (sha256
2464 (base32
2465 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
2466 (build-system python-build-system)
2467 (arguments
2468 `(#:tests? #f))
2469 (propagated-inputs
2470 `(("python-httplib2" ,python-httplib2)
2471 ("python-pyasn1" ,python-pyasn1)
2472 ("python-pyasn1-modules" ,python-pyasn1-modules)
2473 ("python-rsa" ,python-rsa)
2474 ("python-six" ,python-six)))
2475 (home-page "https://github.com/google/oauth2client/")
2476 (synopsis "OAuth 2.0 client library")
2477 (description "@code{python-oauth2client} provides an OAuth 2.0 client
2478 library for Python")
2479 (license license:asl2.0)))
2480
2481 (define-public python2-oauth2client
2482 (package-with-python2 python-oauth2client))
2483
2484 (define-public python-flask-oidc
2485 (package
2486 (name "python-flask-oidc")
2487 (version "1.1.1")
2488 (source
2489 (origin
2490 (method url-fetch)
2491 (uri (pypi-uri "flask-oidc" version))
2492 (sha256
2493 (base32
2494 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
2495 (build-system python-build-system)
2496 (propagated-inputs
2497 `(("python-flask" ,python-flask)
2498 ("python-itsdangerous" ,python-itsdangerous)
2499 ("python-oauth2client" ,python-oauth2client)
2500 ("python-six" ,python-six)))
2501 (native-inputs
2502 `(("python-nose" ,python-nose)
2503 ("python-mock" ,python-mock)))
2504 (home-page "https://github.com/puiterwijk/flask-oidc")
2505 (synopsis "OpenID Connect extension for Flask")
2506 (description "@code{python-flask-oidc} provides an OpenID Connect extension
2507 for Flask.")
2508 (license license:bsd-2)))
2509
2510 (define-public python-webassets
2511 (package
2512 (name "python-webassets")
2513 (version "0.12.1")
2514 (source
2515 (origin
2516 (method url-fetch)
2517 (uri (pypi-uri "webassets" version))
2518 (sha256
2519 (base32
2520 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
2521 (build-system python-build-system)
2522 (native-inputs
2523 `(("python-jinja2" ,python-jinja2)
2524 ("python-mock" ,python-mock)
2525 ("python-nose" ,python-nose)
2526 ("python-pytest" ,python-pytest)))
2527 (home-page "https://github.com/miracle2k/webassets")
2528 (synopsis "Media asset management")
2529 (description "Merges, minifies and compresses Javascript and CSS files,
2530 supporting a variety of different filters, including YUI, jsmin, jspacker or
2531 CSS tidy. Also supports URL rewriting in CSS files.")
2532 (license license:bsd-2)))
2533
2534 (define-public python-cssmin
2535 (package
2536 (name "python-cssmin")
2537 (version "0.2.0")
2538 (source
2539 (origin
2540 (method url-fetch)
2541 (uri (pypi-uri "cssmin" version))
2542 (sha256
2543 (base32
2544 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
2545 (build-system python-build-system)
2546 (home-page "https://github.com/zacharyvoase/cssmin")
2547 (synopsis "Python port of the YUI CSS Compressor")
2548 (description "Python port of the YUI CSS Compressor.")
2549 (license (list license:expat license:bsd-3))))
2550
2551 (define-public python2-cssmin
2552 (package-with-python2 python-cssmin))
2553
2554 (define-public python-elasticsearch
2555 (package
2556 (name "python-elasticsearch")
2557 (version "7.1.0")
2558 (source
2559 (origin
2560 (method url-fetch)
2561 (uri (pypi-uri "elasticsearch" version))
2562 (sha256
2563 (base32
2564 "0rnjvlhw4v3vg14l519qliy1s1zpmx3827q0xfviwvk42rr7hh01"))))
2565 (build-system python-build-system)
2566 (native-inputs
2567 `(("python-mock" ,python-mock)
2568 ("python-nosexcover" ,python-nosexcover)
2569 ("python-pyaml" ,python-pyaml)
2570 ("python-requests" ,python-requests)))
2571 (propagated-inputs
2572 `(("urllib3" ,python-urllib3)))
2573 (arguments
2574 ;; tests require the test_elasticsearch module but it is not distributed.
2575 `(#:tests? #f))
2576 (home-page "https://github.com/elastic/elasticsearch-py")
2577 (synopsis "Low-level client for Elasticsearch")
2578 (description "Official low-level client for Elasticsearch. Its goal is to
2579 provide common ground for all Elasticsearch-related code in Python; because of
2580 this it tries to be opinion-free and very extendable.")
2581 (license license:expat)))
2582
2583 (define-public python2-elasticsearch
2584 (package-with-python2 python-elasticsearch))
2585
2586 (define-public python-flask-script
2587 (package
2588 (name "python-flask-script")
2589 (version "2.0.6")
2590 (source
2591 (origin
2592 (method url-fetch)
2593 (uri (pypi-uri "Flask-Script" version))
2594 (sha256
2595 (base32
2596 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
2597 (build-system python-build-system)
2598 (arguments
2599 `(#:phases
2600 (modify-phases %standard-phases
2601 (add-after 'unpack 'patch-tests
2602 (lambda _
2603 (substitute* "tests.py"
2604 (("flask\\.ext\\.script") "flask_script"))
2605 #t)))))
2606 (propagated-inputs
2607 `(("python-flask" ,python-flask)
2608 ("python-argcomplete" ,python-argcomplete)
2609 ("python-werkzeug" ,python-werkzeug)))
2610 (native-inputs
2611 `(("python-pytest" ,python-pytest)))
2612 (home-page
2613 "https://github.com/smurfix/flask-script")
2614 (synopsis "Scripting support for Flask")
2615 (description "The Flask-Script extension provides support for writing
2616 external scripts in Flask. This includes running a development server,
2617 a customised Python shell, scripts to set up your database, cronjobs,
2618 and other command-line tasks that belong outside the web application
2619 itself.")
2620 (license license:bsd-3)))
2621
2622 (define-public python2-flask-script
2623 (package-with-python2 python-flask-script))
2624
2625 (define-public python-flask-migrate
2626 (package
2627 (name "python-flask-migrate")
2628 (version "2.5.3")
2629 (source
2630 (origin
2631 (method url-fetch)
2632 (uri (pypi-uri "Flask-Migrate" version))
2633 (sha256
2634 (base32
2635 "1vip9ww6l18dxffjsggm83k71zkvihxpnhaswpv8klh95s6517d6"))))
2636 (build-system python-build-system)
2637 (propagated-inputs
2638 `(("python-flask" ,python-flask)
2639 ("python-alembic" ,python-alembic)
2640 ("python-sqlalchemy" ,python-sqlalchemy)
2641 ("python-flask-script" ,python-flask-script)
2642 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
2643 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
2644 (synopsis "SQLAlchemy database migrations for Flask programs using
2645 Alembic")
2646 (description "This package contains SQLAlchemy database migration tools
2647 for Flask programs that are using @code{python-alembic}.")
2648 (license license:expat)))
2649
2650 (define-public python-genshi
2651 (package
2652 (name "python-genshi")
2653 (version "0.7.2")
2654 (source
2655 (origin
2656 (method git-fetch)
2657 (uri (git-reference
2658 (url "https://github.com/edgewall/genshi.git")
2659 (commit version)))
2660 (file-name (git-file-name name version))
2661 (sha256
2662 (base32 "06rch30x10l105k5b6rahd839lkhmgrzn6691wbci0cb2fzps32w"))))
2663 (build-system python-build-system)
2664 (home-page "https://genshi.edgewall.org/")
2665 (synopsis "Toolkit for generation of output for the web")
2666 (description "Genshi is a Python library that provides an integrated set
2667 of components for parsing, generating, and processing HTML, XML or other
2668 textual content for output generation on the web.")
2669 (license license:bsd-3)))
2670
2671 (define-public python2-genshi
2672 (package-with-python2 python-genshi))
2673
2674 (define-public python-flask-principal
2675 (package
2676 (name "python-flask-principal")
2677 (version "0.4.0")
2678 (source
2679 (origin
2680 (method url-fetch)
2681 (uri (pypi-uri "Flask-Principal" version))
2682 (sha256
2683 (base32
2684 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
2685 (build-system python-build-system)
2686 (propagated-inputs
2687 `(("python-blinker" ,python-blinker)))
2688 (native-inputs
2689 `(("python-flask" ,python-flask)
2690 ("python-nose" ,python-nose)))
2691 (home-page "https://pythonhosted.org/Flask-Principal/")
2692 (synopsis "Identity management for Flask")
2693 (description "@code{flask_principal} is a identity management library for
2694 Flask. It supports managing both authentication and authorization data in a
2695 thread-local variable.")
2696 (license license:expat)))
2697
2698 (define-public python2-flask-principal
2699 (package-with-python2 python-flask-principal))
2700
2701 (define-public python-flask-httpauth
2702 (package
2703 (name "python-flask-httpauth")
2704 (version "3.2.3")
2705 (source
2706 (origin
2707 (method url-fetch)
2708 (uri (pypi-uri "Flask-HTTPAuth" version))
2709 (sha256
2710 (base32
2711 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
2712 (build-system python-build-system)
2713 (native-inputs
2714 `(("python-flask" ,python-flask)))
2715 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
2716 (synopsis "Basic and Digest HTTP authentication for Flask routes")
2717 (description "@code{flask_httpauth} provides Basic and Digest HTTP
2718 authentication for Flask routes.")
2719 (license license:expat)))
2720
2721 (define-public python2-flask-httpauth
2722 (package-with-python2 python-flask-httpauth))
2723
2724 (define-public python-uritemplate
2725 (package
2726 (name "python-uritemplate")
2727 (version "3.0.0")
2728 (source
2729 (origin
2730 (method url-fetch)
2731 (uri (pypi-uri "uritemplate" version))
2732 (sha256
2733 (base32
2734 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
2735 (build-system python-build-system)
2736 (home-page "https://uritemplate.readthedocs.org")
2737 (synopsis "Library to deal with URI Templates")
2738 (description "@code{uritemplate} provides Python library to deal with URI
2739 Templates.")
2740 (license license:bsd-2)))
2741
2742 (define-public python2-uritemplate
2743 (package-with-python2 python-uritemplate))
2744
2745 (define-public python-publicsuffix
2746 (package
2747 (name "python-publicsuffix")
2748 (version "1.1.0")
2749 (source (origin
2750 (method url-fetch)
2751 (uri (pypi-uri "publicsuffix" version))
2752 (sha256
2753 (base32
2754 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
2755 (build-system python-build-system)
2756 (arguments
2757 `(#:tests? #f)) ; tests use the internet
2758 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
2759 (synopsis "Get suffix for a domain name")
2760 (description "Get a public suffix for a domain name using the Public Suffix
2761 List.")
2762 (license license:expat)))
2763
2764 (define-public python2-publicsuffix
2765 (package-with-python2 python-publicsuffix))
2766
2767 (define-public python-publicsuffix2
2768 (package
2769 (name "python-publicsuffix2")
2770 (version "2.20191221")
2771 (source
2772 (origin
2773 (method url-fetch)
2774 (uri (pypi-uri "publicsuffix2" version))
2775 (sha256
2776 (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
2777 (build-system python-build-system)
2778 (arguments
2779 '(#:phases
2780 (modify-phases %standard-phases
2781 (add-after 'unpack 'ignore-maintainer-inputs
2782 (lambda _
2783 ;; Comment out a demand for python-requests, which is used only by
2784 ;; the unused ‘update_psl’ helper command.
2785 (substitute* "setup.py"
2786 (("'requests " match)
2787 (format "# ~a" match)))
2788 #t)))
2789 #:tests? #f)) ; the test suite requires network access
2790 (home-page "https://github.com/pombredanne/python-publicsuffix2")
2791 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
2792 (description "Get a public suffix for a domain name using the Public Suffix
2793 List. Forked from and using the same API as the publicsuffix package.")
2794 (license (list license:expat license:mpl2.0))))
2795
2796 (define-public python2-publicsuffix2
2797 (package-with-python2 python-publicsuffix2))
2798
2799 (define-public python-werkzeug
2800 (package
2801 (name "python-werkzeug")
2802 (version "1.0.0")
2803 (source
2804 (origin
2805 (method url-fetch)
2806 (uri (pypi-uri "Werkzeug" version))
2807 (sha256
2808 (base32
2809 "15kh0z61klp62mrc1prka13xsshxn0rsp1j1s2964iw86yisi6qn"))))
2810 (build-system python-build-system)
2811 (arguments
2812 '(#:phases
2813 (modify-phases %standard-phases
2814 (delete 'check)
2815 (add-after 'install 'check
2816 (lambda* (#:key inputs outputs #:allow-other-keys)
2817 (add-installed-pythonpath inputs outputs)
2818 (invoke "python" "-m" "pytest"))))))
2819 (propagated-inputs
2820 `(("python-requests" ,python-requests)))
2821 (native-inputs
2822 `(("python-pytest" ,python-pytest)
2823 ("python-pytest-timeout" ,python-pytest-timeout)))
2824 (home-page "https://www.palletsprojects.org/p/werkzeug/")
2825 (synopsis "Utilities for WSGI applications")
2826 (description "One of the most advanced WSGI utility modules. It includes a
2827 powerful debugger, full-featured request and response objects, HTTP utilities to
2828 handle entity tags, cache control headers, HTTP dates, cookie handling, file
2829 uploads, a powerful URL routing system and a bunch of community-contributed
2830 addon modules.")
2831 (license license:x11)))
2832
2833 (define-public python2-werkzeug
2834 (package-with-python2 python-werkzeug))
2835
2836 (define-public python-bottle
2837 (package
2838 (name "python-bottle")
2839 (version "0.12.13")
2840 (source
2841 (origin
2842 (method url-fetch)
2843 (uri (pypi-uri "bottle" version))
2844 (sha256
2845 (base32
2846 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
2847 (build-system python-build-system)
2848 (home-page "http://bottlepy.org/")
2849 (synopsis "WSGI framework for small web-applications.")
2850 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
2851 (license license:expat)))
2852
2853 (define-public python2-bottle
2854 (package-with-python2 python-bottle))
2855
2856 (define-public python-wtforms
2857 (package
2858 (name "python-wtforms")
2859 (version "2.1")
2860 (source
2861 (origin
2862 (method url-fetch)
2863 (uri (pypi-uri "WTForms" version ".zip"))
2864 (sha256
2865 (base32
2866 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
2867 (build-system python-build-system)
2868 (arguments
2869 '(#:phases
2870 (modify-phases %standard-phases
2871 (add-after 'unpack 'remove-django-test
2872 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
2873 (lambda _
2874 (substitute*
2875 "tests/runtests.py"
2876 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
2877 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
2878 #t)))))
2879 (native-inputs
2880 `(("unzip" ,unzip)))
2881 (home-page "http://wtforms.simplecodes.com/")
2882 (synopsis
2883 "Form validation and rendering library for Python web development")
2884 (description
2885 "WTForms is a flexible forms validation and rendering library
2886 for Python web development. It is very similar to the web form API
2887 available in Django, but is a standalone package.")
2888 (license license:bsd-3)))
2889
2890 (define-public python2-wtforms
2891 (package-with-python2 python-wtforms))
2892
2893 (define-public python-paste
2894 (package
2895 (name "python-paste")
2896 (version "3.0.6")
2897 (source
2898 (origin
2899 (method url-fetch)
2900 (uri (pypi-uri "Paste" version))
2901 (sha256
2902 (base32
2903 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
2904 (patches (search-patches "python-paste-remove-timing-test.patch"))
2905 (modules '((guix build utils)))
2906 (snippet
2907 '(begin
2908 ;; This test calls out to the internet.
2909 (delete-file "tests/test_proxy.py") #t))))
2910 (build-system python-build-system)
2911 (native-inputs
2912 `(("python-pytest" ,python-pytest)
2913 ("python-pytest-runner" ,python-pytest-runner)
2914 ("python-nose" ,python-nose)))
2915 (propagated-inputs
2916 `(("python-six" ,python-six)))
2917 (home-page "https://pythonpaste.readthedocs.io/")
2918 (synopsis
2919 "Python web development tools, focusing on WSGI")
2920 (description
2921 "Paste provides a variety of web development tools and middleware which
2922 can be nested together to build web applications. Paste's design closely
2923 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
2924 (license license:expat)))
2925
2926 (define-public python2-paste
2927 (package-with-python2 python-paste))
2928
2929 (define-public python-pastescript
2930 (package
2931 (name "python-pastescript")
2932 (version "2.0.2")
2933 (source
2934 (origin
2935 (method url-fetch)
2936 (uri (pypi-uri "PasteScript" version))
2937 (sha256
2938 (base32
2939 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
2940 (build-system python-build-system)
2941 (native-inputs
2942 `(("python-nose" ,python-nose)))
2943 (propagated-inputs
2944 `(("python-paste" ,python-paste)
2945 ("python-pastedeploy" ,python-pastedeploy)))
2946 (home-page (string-append "https://web.archive.org/web/20161025192515/"
2947 "http://pythonpaste.org/script/"))
2948 (arguments
2949 '(;; Unfortunately, this requires the latest unittest2,
2950 ;; but that requires traceback2 which requires linecache2 which requires
2951 ;; unittest2. So we're skipping tests for now.
2952 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
2953 ;; so in theory we could get around this situation somehow.)
2954 #:tests? #f))
2955 (synopsis
2956 "Pluggable command line tool for serving web applications and more")
2957 (description
2958 "PasteScript is a plugin-friendly command line tool which provides a
2959 variety of features, from launching web applications to bootstrapping project
2960 layouts.")
2961 (license license:expat)))
2962
2963 (define-public python2-pastescript
2964 (package-with-python2 python-pastescript))
2965
2966 (define-public python2-urlgrabber
2967 (package
2968 (name "python2-urlgrabber")
2969 (version "3.10.2")
2970 (source
2971 (origin
2972 (method url-fetch)
2973 (uri (pypi-uri "urlgrabber" version))
2974 (sha256
2975 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
2976 (build-system python-build-system)
2977 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
2978 (home-page "http://urlgrabber.baseurl.org")
2979 (synopsis "High-level cross protocol url-grabber")
2980 (description "@code{urlgrabber} is Python2 library that unifies access to
2981 files available on web, FTP or locally. It supports HTTP, FTP and file://
2982 protocols, it supports features like HTTP keep-alive, reget, throttling and
2983 more.")
2984 (license license:lgpl2.1+)))
2985
2986 (define-public python-pycares
2987 (package
2988 (name "python-pycares")
2989 (version "2.3.0")
2990 (source
2991 (origin
2992 (method url-fetch)
2993 (uri (pypi-uri "pycares" version))
2994 (sha256
2995 (base32
2996 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
2997 (build-system python-build-system)
2998 (arguments
2999 `(#:tests? #f)) ;tests require internet access
3000 (home-page "http://github.com/saghul/pycares")
3001 (synopsis "Python interface for @code{c-ares}")
3002 (description "@code{pycares} is a Python module which provides an
3003 interface to @code{c-ares}, a C library that performs DNS requests and
3004 name resolutions asynchronously.")
3005 (license license:expat)))
3006
3007 (define-public python-yarl
3008 (package
3009 (name "python-yarl")
3010 (version "1.1.1")
3011 (source
3012 (origin
3013 (method url-fetch)
3014 (uri (pypi-uri "yarl" version))
3015 (sha256
3016 (base32
3017 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
3018 (build-system python-build-system)
3019 (native-inputs
3020 `(("python-pytest" ,python-pytest)
3021 ("python-pytest-runner" ,python-pytest-runner)))
3022 (propagated-inputs
3023 `(("python-idna" ,python-idna)
3024 ("python-multidict" ,python-multidict)))
3025 (home-page "https://github.com/aio-libs/yarl/")
3026 (synopsis "Yet another URL library")
3027 (description "@code{yarl} module provides handy @code{URL} class
3028 for URL parsing and changing.")
3029 (license license:asl2.0)))
3030
3031 (define-public python-google-api-client
3032 (package
3033 (name "python-google-api-client")
3034 (version "1.6.7")
3035 (source
3036 (origin
3037 (method url-fetch)
3038 (uri (pypi-uri "google-api-python-client" version))
3039 (sha256
3040 (base32
3041 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
3042 (build-system python-build-system)
3043 (arguments
3044 '(#:tests? #f)) ; tests require internet access
3045 (native-inputs
3046 `(("python-httplib2" ,python-httplib2)
3047 ("python-six" ,python-six)
3048 ("python-oauth2client" ,python-oauth2client)
3049 ("python-uritemplate" ,python-uritemplate)))
3050 (home-page "https://github.com/google/google-api-python-client")
3051 (synopsis "Core Python library for accessing Google APIs")
3052 (description "Python client library for Google's discovery based APIs")
3053 (license license:asl2.0)))
3054
3055 (define-public python2-google-api-client
3056 (package-with-python2 python-google-api-client))
3057
3058 (define-public python-hawkauthlib
3059 (package
3060 (name "python-hawkauthlib")
3061 (version "2.0.0")
3062 (source
3063 (origin
3064 (method url-fetch)
3065 (uri (pypi-uri "hawkauthlib" version))
3066 (sha256
3067 (base32
3068 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
3069 (build-system python-build-system)
3070 (propagated-inputs
3071 `(("python-requests" ,python-requests)
3072 ("python-webob" ,python-webob)))
3073 (home-page "https://github.com/mozilla-services/hawkauthlib")
3074 (synopsis "Hawk Access Authentication protocol")
3075 (description
3076 "This is a low-level Python library for implementing Hawk Access Authentication,
3077 a simple HTTP request-signing scheme.")
3078 (license license:mpl2.0)))
3079
3080 (define-public python-pybrowserid
3081 (package
3082 (name "python-pybrowserid")
3083 (version "0.14.0")
3084 (source
3085 (origin
3086 (method url-fetch)
3087 (uri (pypi-uri "PyBrowserID" version))
3088 (sha256
3089 (base32
3090 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
3091 (build-system python-build-system)
3092 (propagated-inputs
3093 `(("python-requests" ,python-requests)))
3094 (native-inputs
3095 `(("python-mock" ,python-mock)))
3096 (home-page "https://github.com/mozilla/PyBrowserID")
3097 (synopsis "Python library for the BrowserID protocol")
3098 (description
3099 "This is a Python client library for the BrowserID protocol that
3100 underlies Mozilla Persona.")
3101 (license license:mpl2.0)))
3102
3103 (define-public python-pyfxa
3104 (package
3105 (name "python-pyfxa")
3106 (version "0.6.0")
3107 (source
3108 (origin
3109 (method url-fetch)
3110 (uri (pypi-uri "PyFxA" version))
3111 (sha256
3112 (base32
3113 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
3114 (build-system python-build-system)
3115 (arguments '(#:tests? #f)) ; 17 tests require network access
3116 (propagated-inputs
3117 `(("python-cryptography" ,python-cryptography)
3118 ("python-hawkauthlib" ,python-hawkauthlib)
3119 ("python-pybrowserid" ,python-pybrowserid)
3120 ("python-requests" ,python-requests)
3121 ("python-six" ,python-six)))
3122 (native-inputs
3123 `(("python-grequests" ,python-grequests)
3124 ("python-mock" ,python-mock)
3125 ("python-responses" ,python-responses)
3126 ("python-unittest2" ,python-unittest2)))
3127 (home-page "https://github.com/mozilla/PyFxA")
3128 (synopsis "Firefox Accounts client library for Python")
3129 (description
3130 "This is a Python library for interacting with the Firefox Accounts
3131 ecosystem.")
3132 (license license:mpl2.0)))
3133
3134 (define-public python-hyperlink
3135 (package
3136 (name "python-hyperlink")
3137 (version "19.0.0")
3138 (source
3139 (origin
3140 (method url-fetch)
3141 (uri (pypi-uri "hyperlink" version))
3142 (sha256
3143 (base32
3144 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
3145 (build-system python-build-system)
3146 (propagated-inputs
3147 `(("python-idna" ,python-idna)))
3148 (home-page "https://github.com/python-hyper/hyperlink")
3149 (synopsis "Python module to create immutable URLs according to spec")
3150 (description "This package provides a Python module to create immutable, and
3151 correct URLs for Python according to RFCs 3986 and 3987.")
3152 (license license:expat)))
3153
3154 (define-public python-treq
3155 (package
3156 (name "python-treq")
3157 (version "18.6.0")
3158 (source
3159 (origin
3160 (method url-fetch)
3161 (uri (pypi-uri "treq" version))
3162 (sha256
3163 (base32
3164 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
3165 (build-system python-build-system)
3166 (propagated-inputs
3167 `(("python-attrs" ,python-attrs)
3168 ("python-idna" ,python-idna)
3169 ("python-incremental" ,python-incremental)
3170 ("python-requests" ,python-requests)
3171 ("python-service-identity" ,python-service-identity)
3172 ("python-twisted" ,python-twisted)))
3173 (home-page "https://github.com/twisted/treq")
3174 (synopsis "Requests-like API built on top of twisted.web's Agent")
3175 (description "This package provides an HTTP library inspired by
3176 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
3177 high level API for making HTTP requests when using Twisted.")
3178 (license license:expat)))
3179
3180 (define-public python-autobahn
3181 (package
3182 (name "python-autobahn")
3183 (version "19.2.1")
3184 (source
3185 (origin
3186 (method url-fetch)
3187 (uri (pypi-uri "autobahn" version))
3188 (sha256
3189 (base32
3190 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
3191 (build-system python-build-system)
3192 (arguments
3193 ;; The tests fail to run:
3194 ;; https://github.com/crossbario/autobahn-python/issues/1117
3195 `(#:tests? #f))
3196 (propagated-inputs
3197 `(("python-cffi" ,python-cffi)
3198 ("python-twisted" ,python-twisted)
3199 ("python-txaio" ,python-txaio)))
3200 (home-page "https://crossbar.io/autobahn/")
3201 (synopsis "Web Application Messaging Protocol implementation")
3202 (description "This package provides an implementation of the @dfn{Web Application
3203 Messaging Protocol} (WAMP). WAMP connects components in distributed
3204 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
3205 Calls (rRPC). It is ideal for distributed, multi-client and server applications
3206 such as IoT applications or multi-user database-driven business applications.")
3207 (license license:expat)))
3208
3209 (define-public python-ws4py
3210 (package
3211 (name "python-ws4py")
3212 (version "0.5.1")
3213 (source
3214 (origin
3215 (method url-fetch)
3216 (uri (pypi-uri "ws4py" version))
3217 (sha256
3218 (base32
3219 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
3220 (build-system python-build-system)
3221 (arguments
3222 `(#:phases
3223 (modify-phases %standard-phases
3224 (add-after 'unpack 'python3.7-compatibility
3225 (lambda _
3226 (substitute* '("ws4py/server/tulipserver.py"
3227 "ws4py/async_websocket.py")
3228 (("asyncio.async")
3229 "asyncio.ensure_future"))
3230 #t))
3231 ;; We don't have a package for cherrypy.
3232 (add-after 'unpack 'remove-cherrypy-support
3233 (lambda _
3234 (delete-file "ws4py/server/cherrypyserver.py")
3235 #t)))))
3236 (propagated-inputs
3237 `(("python-gevent" ,python-gevent)
3238 ("python-tornado" ,python-tornado)))
3239 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
3240 (synopsis "WebSocket client and server library")
3241 (description
3242 "This package provides a WebSocket client and server library for
3243 Python.")
3244 (license license:bsd-3)))
3245
3246 ;; kaldi-gstreamer-server does not yet work with python-ws4py > 0.3.2
3247 (define-public python2-ws4py-for-kaldi-gstreamer-server
3248 (package (inherit python-ws4py)
3249 (name "python2-ws4py")
3250 (version "0.3.2")
3251 (source
3252 (origin
3253 (method url-fetch)
3254 (uri (pypi-uri "ws4py" version))
3255 (sha256
3256 (base32
3257 "12ys3dv98awhrxd570vla3hqgzq3avjhq4yafhghhq3a942y1928"))))
3258 (build-system python-build-system)
3259 (arguments
3260 `(#:python ,python-2
3261 #:phases
3262 (modify-phases %standard-phases
3263 ;; We don't have a package for cherrypy.
3264 (add-after 'unpack 'remove-cherrypy-support
3265 (lambda _
3266 (delete-file "ws4py/server/cherrypyserver.py")
3267 #t)))))
3268 (propagated-inputs
3269 `(("python-gevent" ,python2-gevent)
3270 ("python-tornado" ,python2-tornado)))))
3271
3272 (define-public python-slugify
3273 (package
3274 (name "python-slugify")
3275 (version "3.0.4")
3276 (source
3277 (origin
3278 (method url-fetch)
3279 (uri (pypi-uri "python-slugify" version))
3280 (sha256
3281 (base32 "0dv97yi5fq074q5qyqbin09pmi8ixg36caf5nkpw2bqkd8jh6pap"))
3282 (patches
3283 (search-patches "python-slugify-depend-on-unidecode.patch"))))
3284 (native-inputs
3285 `(("python-wheel" ,python-wheel)))
3286 (propagated-inputs
3287 `(("python-unidecode" ,python-unidecode)))
3288 (arguments
3289 `(#:phases
3290 (modify-phases %standard-phases
3291 (replace 'check
3292 (lambda _
3293 (invoke "python" "test.py"))))))
3294 (build-system python-build-system)
3295 (home-page "https://github.com/un33k/python-slugify")
3296 (synopsis "Python Slugify application that handles Unicode")
3297 (description "This package provides a @command{slufigy} command and
3298 library to create slugs from unicode strings while keeping it DRY.")
3299 (license license:expat)))
3300
3301 (define-public python-branca
3302 (package
3303 (name "python-branca")
3304 (version "0.3.1")
3305 (source
3306 (origin
3307 (method url-fetch)
3308 (uri (pypi-uri "branca" version))
3309 (sha256
3310 (base32
3311 "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
3312 (build-system python-build-system)
3313 (propagated-inputs
3314 `(("python-jinja2" ,python-jinja2)
3315 ("python-six" ,python-six)))
3316 (native-inputs
3317 `(("python-pytest" ,python-pytest)))
3318 (home-page "https://github.com/python-visualization/branca")
3319 (synopsis "Generate complex HTML+JS pages with Python")
3320 (description "Generate complex HTML+JS pages with Python")
3321 (license license:expat)))
3322
3323 (define-public python-tinycss2
3324 (package
3325 (name "python-tinycss2")
3326 (version "1.0.2")
3327 (source
3328 (origin
3329 (method url-fetch)
3330 (uri (pypi-uri "tinycss2" version))
3331 (sha256
3332 (base32 "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4"))))
3333 (build-system python-build-system)
3334 (arguments
3335 `(#:phases
3336 (modify-phases %standard-phases
3337 (replace 'check
3338 (lambda _ (invoke "pytest"))))))
3339 (propagated-inputs
3340 `(("python-webencodings" ,python-webencodings)))
3341 (native-inputs
3342 `(("python-pytest-flake8" ,python-pytest-flake8)
3343 ("python-pytest-isort" ,python-pytest-isort)
3344 ("python-pytest-runner" ,python-pytest-runner)))
3345 (home-page "https://tinycss2.readthedocs.io/")
3346 (synopsis "Low-level CSS parser for Python")
3347 (description "@code{tinycss2} can parse strings, return Python objects
3348 representing tokens and blocks, and generate CSS strings corresponding to
3349 these objects.
3350
3351 Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
3352 grammar of CSS but doesn’t know specific rules, properties or values supported
3353 in various CSS modules.")
3354 (license license:bsd-3)))
3355
3356 (define-public python-cssselect2
3357 (package
3358 (name "python-cssselect2")
3359 (version "0.2.2")
3360 (source
3361 (origin
3362 (method url-fetch)
3363 (uri (pypi-uri "cssselect2" version))
3364 (sha256
3365 (base32 "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h"))))
3366 (build-system python-build-system)
3367 (arguments
3368 `(#:phases
3369 (modify-phases %standard-phases
3370 (replace 'check
3371 (lambda _ (invoke "pytest"))))))
3372 (propagated-inputs
3373 `(("python-tinycss2" ,python-tinycss2)))
3374 (native-inputs
3375 `(("python-pytest-cov" ,python-pytest-cov)
3376 ("python-pytest-flake8" ,python-pytest-flake8)
3377 ("python-pytest-isort" ,python-pytest-isort)
3378 ("python-pytest-runner" ,python-pytest-runner)))
3379 (home-page "https://cssselect2.readthedocs.io/")
3380 (synopsis "CSS selectors for Python ElementTree")
3381 (description "@code{cssselect2} is a straightforward implementation of
3382 CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
3383 ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
3384
3385 Unlike the Python package @code{cssselect}, it does not translate selectors to
3386 XPath and therefore does not have all the correctness corner cases that are
3387 hard or impossible to fix in cssselect.")
3388 (license license:bsd-3)))
3389
3390 (define-public gunicorn
3391 (package
3392 (name "gunicorn")
3393 (version "20.0.0")
3394 (source
3395 (origin
3396 (method url-fetch)
3397 (uri (pypi-uri "gunicorn" version))
3398 (sha256
3399 (base32
3400 "0l1zm8a0vz8ws3lkn8q9a0f93ipdzyvlf2zlwdj5xyadh6jdwsgg"))))
3401 (outputs '("out" "doc"))
3402 (build-system python-build-system)
3403 (arguments
3404 `(#:phases
3405 (modify-phases %standard-phases
3406 (add-after 'build 'build-doc
3407 (lambda _
3408 (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
3409 (delete-file "docs/build/texinfo/Makefile")
3410 (delete-file "docs/build/texinfo/Gunicorn.texi")
3411 #t))
3412 (replace 'check
3413 (lambda _
3414 (setenv "PYTHONPATH"
3415 (string-append ".:" (getenv "PYTHONPATH")))
3416 ;; Remove test modules failing due to libc not found due to
3417 ;; section '.dynamic' not found in libc.so
3418 (delete-file "tests/test_arbiter.py")
3419 (delete-file "tests/test_config.py")
3420 (delete-file "tests/test_sock.py")
3421 (invoke "pytest")))
3422 (add-after 'install 'install-doc
3423 (lambda* (#:key outputs #:allow-other-keys)
3424 (let* ((doc (string-append (assoc-ref outputs "doc")
3425 "/share/doc/" ,name "-" ,version))
3426 (html (string-append doc "/html"))
3427 (info (string-append doc "/info"))
3428 (examples (string-append doc "/examples")))
3429 (mkdir-p html)
3430 (mkdir-p info)
3431 (mkdir-p examples)
3432 (copy-recursively "docs/build/html" html)
3433 (copy-recursively "docs/build/texinfo" info)
3434 (copy-recursively "examples" examples)
3435 (for-each (lambda (file)
3436 (copy-file file (string-append doc "/" file)))
3437 '("README.rst" "NOTICE" "LICENSE" "THANKS")))
3438 #t)))))
3439 (native-inputs
3440 `(("binutils" ,binutils) ;; for ctypes.util.find_library()
3441 ("python-aiohttp", python-aiohttp)
3442 ("python-pytest" ,python-pytest)
3443 ("python-pytest-cov" ,python-pytest-cov)
3444 ("python-sphinx" ,python-sphinx)
3445 ("texinfo" ,texinfo)))
3446 (home-page "https://gunicorn.org/")
3447 (synopsis "Python WSGI HTTP Server for UNIX")
3448 (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
3449 Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
3450 Unicorn project. The Gunicorn server is broadly compatible with
3451 various web frameworks, simply implemented, light on server resources,
3452 and fairly speedy.")
3453 (license license:expat)))
3454
3455 (define-public python-translation-finder
3456 (package
3457 (name "python-translation-finder")
3458 (version "1.7")
3459 (source
3460 (origin
3461 (method url-fetch)
3462 (uri (pypi-uri "translation-finder" version))
3463 (sha256
3464 (base32
3465 "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
3466 (build-system python-build-system)
3467 (arguments
3468 `(#:phases
3469 (modify-phases %standard-phases
3470 (add-before 'build 'remove-failing-test
3471 (lambda _
3472 (delete-file "translation_finder/test_api.py")
3473 #t)))))
3474 (propagated-inputs
3475 `(("python-chardet" ,python-chardet)
3476 ("python-pathlib2" ,python-pathlib2)
3477 ("python-ruamel.yaml" ,python-ruamel.yaml)
3478 ("python-six" ,python-six)))
3479 (native-inputs
3480 `(("python-codecov" ,python-codecov)
3481 ("python-codacy-coverage" ,python-codacy-coverage)
3482 ("python-pytest-cov" ,python-pytest-cov)
3483 ("python-pytest-runner" ,python-pytest-runner)
3484 ("python-twine" ,python-twine)))
3485 (home-page "https://weblate.org/")
3486 (synopsis "Translation file finder for Weblate")
3487 (description "This package provides a function to find translation file in
3488 the source code of a project. It supports many translation file formats and
3489 is part of the Weblate translation platform.")
3490 (license license:gpl3+)))
3491
3492 (define-public python-gitlab
3493 (package
3494 (name "python-gitlab")
3495 (version "1.15.0")
3496 (source
3497 (origin
3498 (method url-fetch)
3499 (uri (pypi-uri "python-gitlab" version))
3500 (sha256
3501 (base32
3502 "0zl6kz8v8cg1bcy2r78b2snb0lpw0b573gdx2x1ps0nhsh75l4j5"))))
3503 (build-system python-build-system)
3504 (propagated-inputs
3505 `(("python-requests" ,python-requests)
3506 ("python-six" ,python-six)))
3507 (native-inputs
3508 `(("python-httmock" ,python-httmock)
3509 ("python-mock" ,python-mock)))
3510 (home-page
3511 "https://github.com/python-gitlab/python-gitlab")
3512 (synopsis "Interact with GitLab API")
3513 (description "This package provides an extended library for interacting
3514 with GitLab instances through their API.")
3515 (license license:lgpl3+)))
3516
3517 (define-public python-path-and-address
3518 (package
3519 (name "python-path-and-address")
3520 (version "2.0.1")
3521 (source
3522 (origin
3523 ;; The source distributed on PyPI doesn't include tests.
3524 (method git-fetch)
3525 (uri (git-reference
3526 (url "https://github.com/joeyespo/path-and-address")
3527 (commit (string-append "v" version))))
3528 (file-name (git-file-name name version))
3529 (sha256
3530 (base32
3531 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
3532 (build-system python-build-system)
3533 (arguments
3534 `(#:phases
3535 (modify-phases %standard-phases
3536 (replace 'check
3537 (lambda* (#:key inputs outputs #:allow-other-keys)
3538 (add-installed-pythonpath inputs outputs)
3539 (invoke "py.test"))))))
3540 (native-inputs
3541 `(("python-pytest" ,python-pytest)))
3542 (home-page "https://github.com/joeyespo/path-and-address")
3543 (synopsis "Functions for command-line server tools used by humans")
3544 (description "Path-and-address resolves ambiguities of command-line
3545 interfaces, inferring which argument is the path, and which is the address.")
3546 (license license:expat)))
3547
3548 (define-public grip
3549 ;; No release by upstream for quite some time, some bugs fixed since. See:
3550 ;; https://github.com/joeyespo/grip/issues/304
3551 (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
3552 (package
3553 (name "grip")
3554 (version (git-version "4.5.2" "1" commit))
3555 (source
3556 (origin
3557 (method git-fetch)
3558 (uri (git-reference
3559 (url "https://github.com/joeyespo/grip")
3560 (commit commit)))
3561 (file-name (git-file-name name version))
3562 (sha256
3563 (base32
3564 "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
3565 (build-system python-build-system)
3566 (propagated-inputs
3567 `(("python-docopt" ,python-docopt)
3568 ("python-flask" ,python-flask)
3569 ("python-markdown" ,python-markdown)
3570 ("python-path-and-address" ,python-path-and-address)
3571 ("python-pygments" ,python-pygments)
3572 ("python-requests" ,python-requests)))
3573 (native-inputs
3574 `(("python-pytest" ,python-pytest)
3575 ("python-responses" ,python-responses)))
3576 (arguments
3577 `(#:phases
3578 (modify-phases %standard-phases
3579 (replace 'check
3580 (lambda* (#:key inputs outputs #:allow-other-keys)
3581 (add-installed-pythonpath inputs outputs)
3582 (setenv "PATH" (string-append
3583 (getenv "PATH") ":"
3584 (assoc-ref %outputs "out") "/bin"))
3585 (invoke "py.test" "-m" "not assumption"))))))
3586 (home-page "https://github.com/joeyespo/grip")
3587 (synopsis "Preview Markdown files using the GitHub API")
3588 (description "Grip is a command-line server application written in Python
3589 that uses the GitHub Markdown API to render a local Markdown file. The styles
3590 and rendering come directly from GitHub, so you'll know exactly how it will
3591 appear. Changes you make to the file will be instantly reflected in the browser
3592 without requiring a page refresh.")
3593 (license license:expat))))