diff mbox series

[bug#51432,4/4] gnu: Add flask-combo-jsonapi

Message ID a5afd7ee3981d2b8c4af3cfc909a4083@selfhosted.xyz
State Accepted
Headers show
Series None | expand

Commit Message

david larsson Oct. 27, 2021, 6:44 p.m. UTC
On 2021-10-27 13:02, david larsson wrote:
> On 2021-10-27 12:52, david larsson wrote:
>> Hi!
>> This patch series is to add python-flask-combo-jsonapi and necessary
>> dependencies.
>> 
>> Best regards,
>> David
> 
> Finally, adds the package flask-combo-jsonapi.

Version 2 of this patch, fixing the synopsis according to coding 
standards max 80 chars.

Comments

Tobias Geerinckx-Rice Nov. 3, 2021, 1:46 p.m. UTC | #1
David,

> Version 2 of this patch, fixing the synopsis according to coding
> standards max 80 chars.

Thanks!  Be sure to run ‘guix lint’ on each package as well.

> +       (method url-fetch)
> +       (uri (string-append
> +             "https://github.com/AdCombo/flask-combo-jsonapi/archive/"
> +             version ".tar.gz"))

GitHub /archive/ have proven unstable in the past: they can be 
regenerated at GitHub's discretion and no longer match our hash.

I replaced url-fetch with git-fetch.

> +    (native-inputs `(("python-coverage" ,python-coverage)

This alignment is at least inconsistent with propagated-inputs 
above.  Furthermore I simply dislike it, so I changed it :-)

> +    (native-inputs
> +     `(("python-coverage" ,python-coverage)

I shortened the description a smidge and rewrote the following 
sentence fragment:

> +    (description
> +     "Flask extension to create REST web api according to 
> JSON:API 1.0
> +specification with Flask, Marshmallow and data provider of your
> +choice (SQLAlchemy, MongoDB, ...)")

as:

+    (description
+     "Flask-COMBO-JSONAPI is a Python Flask extension for 
building REST Web APIs
+compliant with the @uref{https://jsonapi.org, JSON:API 1.0} 
specification.
+
+It tries to combine the power of Flask-Restless with the 
flexibility of
+Flask-RESTful to quickly build APIs that fit the complexity of 
existing
+real-life projects with legacy data and diverse storage 
providers.")

I deliberately removed the reference to MongoDB because it's not 
of any particular significance and non-free.  I also removed 
several more gratuitous references in Guix proper.

Kind regards,

T G-R
diff mbox series

Patch

From 4397008d2bdc559a072bbb98c99ba8d6d6cf4b87 Mon Sep 17 00:00:00 2001
From: David Larsson <david.larsson@selfhosted.xyz>
Date: Wed, 27 Oct 2021 09:04:40 +0200
Subject: [PATCH 4/4] gnu: Add flask-combo-jsonapi.

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

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index a38ed5c268..55561f7b47 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -6249,3 +6249,39 @@  communicate with Microsoft Azure Storage services.")
 comments, or tags from HTML snippets, extract base url from HTML snippets,
 translate entities on HTML strings, among other things.")
     (license license:bsd-3)))
+
+(define-public python-flask-combo-jsonapi
+  (package
+    (name "python-flask-combo-jsonapi")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/AdCombo/flask-combo-jsonapi/archive/"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "1sygp9rx7zb1dbjxhb11mpas0c0px4md7mvi9pwbh1s1rr1glm3m"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-flask" ,python-flask)
+       ("python-marshmallow" ,python-marshmallow-3.2)
+       ("python-marshmallow-jsonapi" ,python-marshmallow-jsonapi)
+       ("python-simplejson" ,python-simplejson)
+       ("python-sqlalchemy" ,python-sqlalchemy-1.3)
+       ("python-apispec" ,python-apispec)
+       ("python-simplejson" ,python-simplejson)
+       ("python-six" ,python-six)))
+    (native-inputs `(("python-coverage" ,python-coverage)
+                     ("python-coveralls" ,python-coveralls)
+                     ("python-pytest" ,python-pytest)
+                     ("python-pytest-runner" ,python-pytest-runner)))
+    (home-page "https://github.com/AdCombo/flask-combo-jsonapi")
+    (synopsis
+     "Flask extension to quickly create a REST web api using JSON:API 1.0 spec")
+    (description
+     "Flask extension to create REST web api according to JSON:API 1.0
+specification with Flask, Marshmallow and data provider of your
+choice (SQLAlchemy, MongoDB, ...)")
+    (license license:expat)))
-- 
2.31.0