1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
{
lib,
aiohttp,
aioresponses,
buildPythonPackage,
fetchFromGitHub,
pandas,
pytestCheckHook,
requests,
requests-mock,
setuptools,
}:
buildPythonPackage rec {
pname = "alpha-vantage";
version = "3.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "RomelTorres";
repo = "alpha_vantage";
tag = "v${version}";
hash = "sha256-Ae9WqEsAjJcD62NZOPh6a49g1wY4KMswzixDAZEtWkw=";
};
postPatch = ''
# Files are only linked
rm alpha_vantage/async_support/*
cp alpha_vantage/{cryptocurrencies.py,foreignexchange.py,techindicators.py,timeseries.py} alpha_vantage/async_support/
'';
build-system = [ setuptools ];
dependencies = [
aiohttp
requests
];
optional-dependencies = {
pandas = [
pandas
];
};
nativeCheckInputs = [
aioresponses
requests-mock
pytestCheckHook
]
++ lib.concatAttrValues optional-dependencies;
# Starting with 3.0.0 most tests require an API key
doCheck = false;
pythonImportsCheck = [ "alpha_vantage" ];
meta = {
description = "Python module for the Alpha Vantage API";
homepage = "https://github.com/RomelTorres/alpha_vantage";
changelog = "https://github.com/RomelTorres/alpha_vantage/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
|