summaryrefslogtreecommitdiff
path: root/gnu/packages/python-web.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r--gnu/packages/python-web.scm227
1 files changed, 186 insertions, 41 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index c7437316cc..4e06d5ed85 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016, 2017, 2020 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
-;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2017, 2021 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
@@ -91,6 +91,74 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (srfi srfi-1))
+(define-public python-prawcore
+ (package
+ (name "python-prawcore")
+ (version "2.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "prawcore" version))
+ (sha256
+ (base32 "1l9nrn4s03xl8fvkyybdk86bm9cyyk43alkxf9g014a9ynvdk65l"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-betamax" ,python-betamax)
+ ("python-betamax-matchers" ,python-betamax-matchers)
+ ("python-betamax-serializers" ,python-betamax-serializers)
+ ("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
+ ("python-testfixtures" ,python-testfixtures)))
+ (propagated-inputs
+ `(("python-requests" ,python-requests)))
+ (synopsis "Core component of PRAW")
+ (description "PRAWcore is a low-level communication layer used by PRAW.")
+ (home-page "https://praw.readthedocs.io/en/latest/")
+ (license license:bsd-2)))
+
+(define-public python-praw
+ (package
+ (name "python-praw")
+ (version "7.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "praw" version))
+ (sha256
+ (base32 "0ll1a0n8xs8gykizdsfrw63jp6bc39ab0pk3yzwcak96fyxh0ij3"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (with-directory-excursion "tests"
+ ;; Require networking.
+ (for-each delete-file-recursively
+ '("integration/models" "unit/models"))
+ ;; https://github.com/praw-dev/praw/issues/1699
+ ;; #issuecomment-795336704
+ (delete-file "unit/test_config.py"))
+ #t))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest"))
+ #t)))))
+ (native-inputs
+ `(("python-betamax" ,python-betamax)
+ ("python-betamax-matchers" ,python-betamax-matchers)
+ ("python-pytest" ,python-pytest)))
+ (propagated-inputs
+ `(("python-prawcore" ,python-prawcore)
+ ("python-websocket-client" ,python-websocket-client)))
+ (synopsis "Python Reddit API Wrapper")
+ (description "PRAW is a Python package that allows for simple access to
+Reddit’s API. It aims to be easy to use and internally follows all of Reddit’s
+API rules.")
+ (home-page "https://praw.readthedocs.io/en/latest/")
+ (license license:bsd-2)))
+
(define-public python-aiohttp
(package
(name "python-aiohttp")
@@ -541,9 +609,6 @@ over a different origin than that of the web application.")
@code{urllib} and @code{urlparse} modules for manipulating URLs.")
(license license:unlicense)))
-(define-public python2-furl
- (package-with-python2 python-furl))
-
(define-public python-httplib2
(package
(name "python-httplib2")
@@ -626,8 +691,7 @@ Swartz.")
(define-public python2-html2text
(let ((base (package-with-python2 python-html2text)))
- (package
- (inherit base)
+ (package/inherit base
;; This is the last version with support for Python 2.
(version "2019.8.11")
(source (origin
@@ -933,9 +997,6 @@ support for Flask. This is based on the Python babel module as well as pytz -
both of which are installed automatically if you install this library.")
(license license:bsd-3)))
-(define-public python2-flask-babel
- (package-with-python2 python-flask-babel))
-
(define-public python-flask-cors
(package
(name "python-flask-cors")
@@ -1637,7 +1698,7 @@ connection to each user.")
(define-public python2-tornado
(let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
- (package (inherit tornado)
+ (package/inherit tornado
(propagated-inputs
`(("python2-backport-ssl-match-hostname"
,python2-backport-ssl-match-hostname)
@@ -1696,7 +1757,7 @@ term.js Javascript terminal emulator library.")
(define-public python2-terminado
(let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
- (package (inherit terminado)
+ (package/inherit terminado
(propagated-inputs
`(("python2-backport-ssl-match-hostname"
,python2-backport-ssl-match-hostname)
@@ -2283,7 +2344,7 @@ verification of the SSL peer.")
;; python2-openssl requires special care, so package-with-python2 is
;; insufficient.
(define-public python2-ndg-httpsclient
- (package (inherit python-ndg-httpsclient)
+ (package/inherit python-ndg-httpsclient
(name "python2-ndg-httpsclient")
(arguments
(substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
@@ -2315,8 +2376,7 @@ WebSocket usage in Python programs.")
(define-public python2-websocket-client
(let ((base (package-with-python2
(strip-python2-variant python-websocket-client))))
- (package
- (inherit base)
+ (package/inherit base
(native-inputs
`(("python2-backport-ssl-match-hostname"
,python2-backport-ssl-match-hostname)
@@ -2622,8 +2682,7 @@ authenticated session objects providing things like keep-alive.")
(define-public python2-rauth
(let ((base (package-with-python2 (strip-python2-variant python-rauth))))
- (package
- (inherit base)
+ (package/inherit base
(native-inputs `(("python2-unittest2" ,python2-unittest2)
,@(package-native-inputs base))))))
@@ -2638,6 +2697,7 @@ authenticated session objects providing things like keep-alive.")
(sha256
(base32
"024yldjwjavps39yb77sc422z8fa9bn20wcqrcncjwrqjab8y60r"))))
+ (replacement python-urllib3/fixed)
(build-system python-build-system)
(arguments `(#:tests? #f))
(propagated-inputs
@@ -2656,6 +2716,17 @@ supports url redirection and retries, and also gzip and deflate decoding.")
(properties `((python2-variant . ,(delay python2-urllib3))))
(license license:expat)))
+(define python-urllib3/fixed
+ (package/inherit python-urllib3
+ (version "1.26.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "urllib3" version))
+ (sha256
+ (base32
+ "0dw9w9bs3hmr5dp3r3h43jyzzb1g1046ag7lj8pqf58i4kvj3c77"))))))
+
;; Some software requires an older version of urllib3, notably Docker.
(define-public python-urllib3-1.24
(package (inherit python-urllib3)
@@ -2836,9 +2907,6 @@ and Jinja2 template engine. It is called a micro framework because it does not
presume or force a developer to use a particular tool or library.")
(license license:bsd-3)))
-(define-public python2-flask
- (package-with-python2 python-flask))
-
(define-public python-flask-wtf
(package
(name "python-flask-wtf")
@@ -2869,9 +2937,6 @@ presume or force a developer to use a particular tool or library.")
upload, and reCAPTCHA.")
(license license:bsd-3)))
-(define-public python2-flask-wtf
- (package-with-python2 python-flask-wtf))
-
(define-public python-flask-multistatic
(package
(name "python-flask-multistatic")
@@ -2892,9 +2957,6 @@ upload, and reCAPTCHA.")
for overriding static files.")
(license license:gpl3+)))
-(define-public python2-flask-multistatic
- (package-with-python2 python-flask-multistatic))
-
(define-public python-cookies
(package
(name "python-cookies")
@@ -3107,7 +3169,7 @@ provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients."
(define-public python2-url
(let ((base (package-with-python2 (strip-python2-variant python-url))))
- (package (inherit base)
+ (package/inherit base
(propagated-inputs
`(("python2-publicsuffix" ,python2-publicsuffix))))))
@@ -3204,6 +3266,26 @@ Betamax.")
(define-public python2-betamax-matchers
(package-with-python2 python-betamax-matchers))
+(define-public python-betamax-serializers
+ (package
+ (name "python-betamax-serializers")
+ (version "0.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "betamax-serializers" version))
+ (sha256
+ (base32 "0ja9isbjmzzhxdj69s0kdsvw8nkp073w6an6a4liy5vk3fdl2p1l"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-betamax" ,python-betamax)
+ ("python-pyyaml" ,python-pyyaml)))
+ (synopsis "Set of third-party serializers for Betamax")
+ (description "Betamax-Serializers are an experimental set of Serializers for
+Betamax that may possibly end up in the main package.")
+ (home-page "https://gitlab.com/betamax/serializers")
+ (license license:asl2.0)))
+
(define-public python-s3transfer
(package
(name "python-s3transfer")
@@ -3249,8 +3331,7 @@ transfers.")
(define-public python2-s3transfer
(let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
- (package
- (inherit base)
+ (package/inherit base
(native-inputs
`(("python2-futures" ,python2-futures)
,@(package-native-inputs base))))))
@@ -3490,9 +3571,6 @@ It comes with safe defaults and easily configurable options.")
"Minify @code{text/html} MIME type responses when using @code{Flask}.")
(license license:bsd-3)))
-(define-public python2-flask-htmlmin
- (package-with-python2 python-flask-htmlmin))
-
(define-public python-jsmin
(package
(name "python-jsmin")
@@ -3546,9 +3624,6 @@ handles the common tasks of logging in, logging out, and remembering your
users' sessions over extended periods of time.")
(license license:expat)))
-(define-public python2-flask-login
- (package-with-python2 python-flask-login))
-
(define-public python-oauth2client
(package
(name "python-oauth2client")
@@ -3690,6 +3765,29 @@ this it tries to be opinion-free and very extendable.")
(define-public python2-elasticsearch
(package-with-python2 python-elasticsearch))
+(define-public python-engineio
+ (package
+ (name "python-engineio")
+ (version "4.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python-engineio" version))
+ (sha256
+ (base32
+ "0xqkjjxbxakz9fd7v94rkr2r5r9nrkap2c3gf3abbd0j6ld5qmxv"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-aiohttp" ,python-aiohttp)
+ ("python-requests" ,python-requests)
+ ("python-websocket-client" ,python-websocket-client)))
+ (arguments '(#:tests? #f)) ; Tests not included in release tarball.
+ (home-page "https://github.com/miguelgrinberg/python-engineio/")
+ (synopsis "Engine.IO server")
+ (description "Python implementation of the Engine.IO realtime client and
+server.")
+ (license license:expat)))
+
(define-public python-flask-script
(package
(name "python-flask-script")
@@ -5355,6 +5453,27 @@ decorators and tools to describe your API and expose its documentation properly
Swagger.")
(license license:bsd-3)))
+(define-public python-flask-socketio
+ (package
+ (name "python-flask-socketio")
+ (version "5.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "Flask-SocketIO" version))
+ (sha256
+ (base32
+ "09r2gpj2nbn72v2zaf6xsvlazln77pgqzp2pg2021nja47sijhsw"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-flask" ,python-flask)
+ ("python-socketio" ,python-socketio)))
+ (arguments '(#:tests? #f)) ; Tests not included in release tarball.
+ (home-page "https://github.com/miguelgrinberg/Flask-SocketIO/")
+ (synopsis "Socket.IO integration for Flask applications")
+ (description "Socket.IO integration for Flask applications")
+ (license license:expat)))
+
(define-public python-manuel
(package
(name "python-manuel")
@@ -5635,14 +5754,14 @@ as a Python package.")
(define-public python-sanic
(package
(name "python-sanic")
- (version "20.9.1")
+ (version "20.12.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "sanic" version))
(sha256
(base32
- "06p0lsxqbfbka2yaqlpp0bg5pf7ma44zi6kq7qbb6hhry48dp1w6"))))
+ "1c02gdp1j18xny9jd33fp0w57qqi7g66zwmaykv2dhcks96f5mxr"))))
(build-system python-build-system)
(arguments
'(#:phases
@@ -5651,9 +5770,8 @@ as a Python package.")
;; Allow using recent dependencies.
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "setup.py"
- (("httpcore==0.3.0") "httpcore")
(("pytest==5.2.1") "pytest")
- (("multidict==5.0.0") "multidict")
+ (("multidict>=5.0,<6.0") "multidict")
(("httpx==0\\.15\\.4") "httpx"))
#t))
(replace 'check
@@ -5679,19 +5797,46 @@ as a Python package.")
("python-pytest-benchmark" ,python-pytest-benchmark)
("python-pytest-sanic" ,python-pytest-sanic)
("python-pytest-sugar" ,python-pytest-sugar)
+ ("python-pytest-asyncio" ,python-pytest-asyncio)
("python-urllib3" ,python-urllib3)
("python-uvicorn" ,python-uvicorn)))
(home-page
- "https://github.com/huge-success/sanic/")
+ "https://github.com/sanic-org/sanic/")
(synopsis
- "Async Python 3.6+ web server/framework")
+ "Async Python web server/framework")
(description
- "Sanic is a Python 3.6+ web server and web framework
+ "Sanic is a Python web server and web framework
that's written to go fast. It allows the usage of the
@code{async/await} syntax added in Python 3.5, which makes
your code non-blocking and speedy.")
(license license:expat)))
+(define-public python-socketio
+ (package
+ (name "python-socketio")
+ (version "5.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python-socketio" version))
+ (sha256
+ (base32
+ "14vhpxdn54lz54mhcqlgcks0ssbws9gd1y7ii16a2g3gpfdc531k"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-aiohttp" ,python-aiohttp)
+ ("python-bidict" ,python-bidict)
+ ("python-engineio" ,python-engineio)
+ ("python-requests" ,python-requests)
+ ("python-websocket-client" ,python-websocket-client)
+ ("python-websockets" ,python-websockets)))
+ (arguments '(#:tests? #f)) ; Tests not included in release tarball.
+ (home-page "https://github.com/miguelgrinberg/python-socketio/")
+ (synopsis "Python Socket.IO server")
+ (description
+ "Python implementation of the Socket.IO realtime client and server.")
+ (license license:expat)))
+
(define-public python-socks
(package
(name "python-socks")