diff mbox series

[bug#54601] Add python-flask-compress and python-flask-seasurf

Message ID MzC86GU--3-2@tutanota.com
State New
Headers show
Series [bug#54601] Add python-flask-compress and python-flask-seasurf | expand

Commit Message

iyzsong--- via Guix-patches via March 27, 2022, 8:49 p.m. UTC
Mar 27, 2022, 19:47 by maximedevos@telenet.be:

> kiasoc5--- via Guix-patches via schreef op zo 27-03-2022 om 21:43
> [+0200]:
>
>> +    (synopsis
>> +      "Compress responses in your Flask app with gzip, deflate or
>> brotli.")
>> +    (description
>> +      "Compress responses in your Flask app with gzip, deflate or
>> brotli.")
>>
>
> The description is missing, and ‘do foo in your Brand(TM) app’ reads
> like marketing.  ’(guix)Synopses and Descriptions’ recommends longer,
> and more descriptive, descriptions.  E.g., what do ‘responses’ mean
> here?  Is it Flask-exclusive, or can it also be used outside a Flask
> context?
>
Forgot to check that. Please see updated patches. Also removed unneeded python-tox input.

> Greetings,
> Maxime.
>

Comments

M March 28, 2022, 12:22 p.m. UTC | #1
kiasoc5@tutanota.com schreef op zo 27-03-2022 om 22:49 [+0200]:
> +    (synopsis "Compress Flask application responses and static
> files.")
> +    (description
> +     "Compress Flask application responses and static files with
> gzip, deflate and brotli without
> +a server (like Nginx). Flask-Compress both adds the various headers
> required for a compressed response
> +and compresses the response data. Internally, every time a request
> is made the extension will check
> +if it matches one of the compressible MIME types and whether the
> client and the server use some common
> +compression algorithm, and will automatically attach the appropriate
> headers.")

The new descriptions look nice.

Greetings,
Maxime.
diff mbox series

Patch

From 7406000b099aca3dfaa2cf152e2b4fa1581e60f6 Mon Sep 17 00:00:00 2001
From: kiasoc5 <kiasoc5@tutanota.com>
Date: Sun, 27 Mar 2022 15:27:59 -0400
Subject: [PATCH 2/2] gnu: Add python-flask-seasurf.

* gnu/packages/python-web.scm (python-flask-seasurf): New variable.
---
 gnu/packages/python-web.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 38164d8243..3b70ea7843 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -6411,3 +6411,30 @@  (define-public python-flask-compress
 if it matches one of the compressible MIME types and whether the client and the server use some common
 compression algorithm, and will automatically attach the appropriate headers.")
     (license license:expat)))
+
+(define-public python-flask-seasurf
+  (package
+    (name "python-flask-seasurf")
+    (version "0.3.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "Flask-SeaSurf" version))
+              (sha256
+               (base32
+                "04yfwln40iji7vn517mmkflnzxy7wa11yfhs124rch4s7pqhvygz"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda* (#:key tests? #:allow-other-keys)
+                      (when tests?
+                        (invoke "python" "-m" "unittest")))))))
+    (propagated-inputs (list python-flask))
+    (home-page "https://github.com/maxcountryman/flask-seasurf")
+    (synopsis "Cross-site request forgery (CSRF) extension for Flask.")
+    (description
+     "SeaSurf is a Flask extension for preventing cross-site request forgery (CSRF).
+CSRF attacks are problematic because the mechanism they use is relatively easy to exploit. This
+extension attempts to aid you in securing your application from such attacks. This extension is
+based on the Django middleware.")
+    (license license:bsd-3)))
-- 
2.35.1