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