1{ lib
2, appdirs
3, buildPythonPackage
4, fetchFromGitHub
5, multitasking
6, numpy
7, pandas
8, pythonOlder
9, requests
10, lxml
11}:
12
13buildPythonPackage rec {
14 pname = "yfinance";
15 version = "0.1.77";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "ranaroussi";
22 repo = pname;
23 rev = "refs/tags/${version}";
24 hash = "sha256-gg9wX3WWacS5BmbR1wgdicFxhPN5b45KH0+obWmJ65g=";
25 };
26
27 propagatedBuildInputs = [
28 appdirs
29 multitasking
30 numpy
31 pandas
32 requests
33 lxml
34 ];
35
36 # Tests require internet access
37 doCheck = false;
38
39 pythonImportsCheck = [
40 "yfinance"
41 ];
42
43 meta = with lib; {
44 description = "Yahoo! Finance market data downloader (+faster Pandas Datareader)";
45 homepage = "https://aroussi.com/post/python-yahoo-finance";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ drewrisinger ];
48 };
49}