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