unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: 64134@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#64134] [PATCH 03/17] gnu: Add python-yfinance.
Date: Sat, 17 Jun 2023 15:18:26 +0000	[thread overview]
Message-ID: <20230617151840.1748096-3-monego@posteo.net> (raw)
In-Reply-To: <20230617151840.1748096-1-monego@posteo.net>

* gnu/packages/finance.scm (python-yfinance): New variable.
---
 gnu/packages/finance.scm | 43 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 2a4929ccd0..769742c015 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -19,7 +19,7 @@
 ;;; Copyright © 2020 Christine Lemmer-Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2020 Tom Zander <tomz@freedommail.ch>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Carlo Holl <carloholl@gmail.com>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2021 ZmnSCPxj jxPCSnmZ <ZmnSCPxj@protonmail.com>
@@ -1034,6 +1034,47 @@ (define-public python-mnemonic
 of Bitcoin BIP-0039.")
     (license license:expat)))
 
+(define-public python-yfinance
+  (package
+    (name "python-yfinance")
+    (version "0.2.20")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "yfinance" version))
+              (sha256
+               (base32
+                "0p8m2445vyanpc7dk3fcfqis66217zn5kswh9f0ryjn3c2x5zsdr"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:tests? #f ;no tests in PyPI and they test the online API
+           #:phases #~(modify-phases %standard-phases
+                        ;; we have pytz==2022.1 and it's a core package
+                        (add-after 'unpack 'relax-pytz
+                          (lambda _
+                            (substitute* "setup.py"
+                              (("pytz>=2022.5")
+                               "pytz"))))
+                        ;; yfinance provides a sample script via entry_points
+                        ;; which breaks sanity-check.
+                        (delete 'sanity-check))))
+    (propagated-inputs (list python-appdirs
+                             python-beautifulsoup4
+                             python-cryptography
+                             python-frozendict
+                             python-html5lib
+                             python-lxml
+                             python-multitasking
+                             python-numpy
+                             python-pandas
+                             python-pytz
+                             python-requests))
+    (home-page "https://github.com/ranaroussi/yfinance")
+    (synopsis "Download market data from Yahoo! Finance API")
+    (description
+     "@code{yfinance} offers a threaded and Pythonic way to download market
+ data from Yahoo! finance.")
+    (license license:asl2.0)))
+
 (define-public python-u2flib-host
   ;; The package is obsolete and superseded by python-fido2, but
   ;; needed for python-ledgerblue@0.1.44.
-- 
2.34.1





  parent reply	other threads:[~2023-06-17 15:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-17 15:16 [bug#64134] [PATCH 00/17] Add some Python financial libraries Vinicius Monego
2023-06-17 15:18 ` [bug#64134] [PATCH 01/17] gnu: Add python-holidays Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 02/17] gnu: Add python-multitasking Vinicius Monego
2023-06-17 15:18   ` Vinicius Monego [this message]
2023-06-17 15:18   ` [bug#64134] [PATCH 04/17] gnu: Add python-pandas-datareader Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 05/17] gnu: Add python-ffn Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 06/17] gnu: Add python-bt Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 07/17] gnu: Add python-pyhdfe Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 08/17] gnu: Add python-interface-meta Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 09/17] gnu: Add python-arch Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 10/17] gnu: Add python-alpha-vantage Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 11/17] gnu: Add python-ascii-magic Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 12/17] gnu: Add python-degiro-connector Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 13/17] gnu: Add python-detecta Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 14/17] gnu: Add python-financedatabase Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 15/17] gnu: Add python-mstarpy Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 16/17] gnu: Add python-pandas-ta Vinicius Monego
2023-06-17 15:18   ` [bug#64134] [PATCH 17/17] gnu: Add python-vectorbt Vinicius Monego

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230617151840.1748096-3-monego@posteo.net \
    --to=monego@posteo.net \
    --cc=64134@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).