From patchwork Tue Nov 23 19:22:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Felipe X-Patchwork-Id: 34774 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1F3AC27BBE9; Tue, 23 Nov 2021 19:23:26 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7070E27BBEA for ; Tue, 23 Nov 2021 19:23:25 +0000 (GMT) Received: from localhost ([::1]:56180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpbO0-0008Hn-HA for patchwork@mira.cbaines.net; Tue, 23 Nov 2021 14:23:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpbNf-0008Fx-6f for guix-patches@gnu.org; Tue, 23 Nov 2021 14:23:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpbNe-000299-ND for guix-patches@gnu.org; Tue, 23 Nov 2021 14:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mpbNe-00034v-Jj for guix-patches@gnu.org; Tue, 23 Nov 2021 14:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52064] [PATCH] gnu: Add python-sodapy. Resent-From: Luis Felipe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 Nov 2021 19:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52064 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52064@debbugs.gnu.org X-Debbugs-Original-To: Luis Felipe via Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.163769537611802 (code B ref -1); Tue, 23 Nov 2021 19:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Nov 2021 19:22:56 +0000 Received: from localhost ([127.0.0.1]:52294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpbNR-000348-KC for submit@debbugs.gnu.org; Tue, 23 Nov 2021 14:22:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:57548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpbNP-000340-4s for submit@debbugs.gnu.org; Tue, 23 Nov 2021 14:22:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpbNO-00083J-WB for guix-patches@gnu.org; Tue, 23 Nov 2021 14:22:47 -0500 Received: from mail-0201.mail-europe.com ([51.77.79.158]:59655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpbNK-00025L-4e for guix-patches@gnu.org; Tue, 23 Nov 2021 14:22:46 -0500 Date: Tue, 23 Nov 2021 19:22:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1637695349; bh=fcGw0XeIqmWLN4kHpRrvQHJqkz/KbUj0f0b5SOWE1rU=; h=Date:To:From:Reply-To:Subject:From; b=H9Kn+BTqHxVTYqJ1mBxtJhqbX9ppN38knWU0BHwtpLjnLUH+BZ2w+S36gHrujU3gk FxXbBi5E8+tnxF7Aks7+EWIQ/bMNRVLt4qv9cXtH9BMXhdFjm8rP6KH7LXfGCt1a+M oYHDUQGsqySLHbnFzt1SdWmhRNtePrFXkGUbKUhw= Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=51.77.79.158; envelope-from=luis.felipe.la@protonmail.com; helo=mail-0201.mail-europe.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) AC_FROM_MANY_DOTS=0.553, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Luis Felipe X-ACL-Warn: , Luis Felipe via Guix-patches X-Patchwork-Original-From: Luis Felipe via Guix-patches via From: Luis Felipe X-getmail-retrieved-from-mailbox: Patches Hi, this is a new package pretty much imported by Guix from Pypi. I installed it, tried it out with the following code in a Python interpreter, and it worked. ~~~ from sodapy import Socrata client = Socrata("www.datos.gov.co", None) # First 100 results, returned as JSON from API / converted to Python list of # dictionaries by sodapy. results = client.get("gt2j-8ykr", limit=100) results ~~~ I then generated the attached patch by following the packaging videos (https://guix.gnu.org/en/videos/2020/packaging-part-one/). I hope it works (but I can make changes if it doesn't), --- Luis Felipe López Acevedo https://luis-felipe.gitlab.io/ From 8f605da8ac3157b467cc2fcc6b5ec83cfa436daf Mon Sep 17 00:00:00 2001 From: Luis Felipe Date: Tue, 23 Nov 2021 13:30:04 -0500 Subject: [PATCH] gnu: Add python-sodapy. * gnu/packages/python-web.scm (python-sodapy): New variable. --- gnu/packages/python-web.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 4ddf89c207..71fc0549aa 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -46,6 +46,7 @@ ;;; Copyright © 2021 Pradana Aumars ;;; Copyright © 2021 Arun Isaac ;;; Copyright © 2021 jgart +;;; Copyright © 2021 Luis Felipe López Acevedo ;;; ;;; This file is part of GNU Guix. ;;; @@ -6348,3 +6349,20 @@ (define-public python-flask-combo-jsonapi Flask-RESTful to quickly build APIs that fit the complexity of existing real-life projects with legacy data and diverse storage providers.") (license license:expat))) + +(define-public python-sodapy + (package + (name "python-sodapy") + (version "2.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sodapy" version)) + (sha256 + (base32 "03ywf14fplgrz15ci6lvj1kmbrd0sghvcmjbnarx4036q7ph3rs4")))) + (build-system python-build-system) + (propagated-inputs `(("python-requests" ,python-requests))) + (home-page "https://github.com/xmunoz/sodapy") + (synopsis "Python library for the Socrata Open Data API") + (description "Python library for the Socrata Open Data API.") + (license license:expat))) -- 2.33.0