1{
2 lib,
3 beautifulsoup4,
4 buildPythonPackage,
5 cryptography,
6 curl-cffi,
7 fetchFromGitHub,
8 frozendict,
9 html5lib,
10 lxml,
11 multitasking,
12 numpy,
13 pandas,
14 peewee,
15 platformdirs,
16 pytz,
17 requests-cache,
18 requests-ratelimiter,
19 requests,
20 scipy,
21 setuptools,
22}:
23
24buildPythonPackage rec {
25 pname = "yfinance";
26 version = "0.2.58";
27 pyproject = true;
28
29 src = fetchFromGitHub {
30 owner = "ranaroussi";
31 repo = "yfinance";
32 tag = version;
33 hash = "sha256-Xndky4sMVn0sPH4CFdLuwcfhPzMXtH4rdakQdve3RK0=";
34 };
35
36 build-system = [ setuptools ];
37
38 dependencies = [
39 beautifulsoup4
40 cryptography
41 curl-cffi
42 frozendict
43 html5lib
44 lxml
45 multitasking
46 numpy
47 pandas
48 peewee
49 platformdirs
50 pytz
51 requests
52 ];
53
54 optional-dependencies = {
55 nospam = [
56 requests-cache
57 requests-ratelimiter
58 ];
59 repair = [
60 scipy
61 ];
62 };
63
64 # Tests require internet access
65 doCheck = false;
66
67 pythonImportsCheck = [ "yfinance" ];
68
69 meta = with lib; {
70 description = "Module to doiwnload Yahoo! Finance market data";
71 homepage = "https://github.com/ranaroussi/yfinance";
72 changelog = "https://github.com/ranaroussi/yfinance/blob/${src.tag}/CHANGELOG.rst";
73 license = licenses.asl20;
74 maintainers = with maintainers; [ drewrisinger ];
75 };
76}