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