2020-07-18 16:06:22 +00:00
|
|
|
{ buildPythonPackage
|
2023-11-16 04:20:00 +00:00
|
|
|
, bleach
|
2020-07-18 16:06:22 +00:00
|
|
|
, certifi
|
|
|
|
, fetchPypi
|
|
|
|
, lib
|
|
|
|
, python-dateutil
|
|
|
|
, python-slugify
|
|
|
|
, six
|
|
|
|
, requests
|
|
|
|
, tqdm
|
|
|
|
, urllib3
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "kaggle";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.6.6";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-02-29 20:09:43 +00:00
|
|
|
sha256 = "sha256-24hxXMBhivJTtq/eIYga6ejm9ksxCs+yc/0T9KV1Igc=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
bleach
|
2020-07-18 16:06:22 +00:00
|
|
|
certifi
|
|
|
|
python-dateutil
|
|
|
|
python-slugify
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
tqdm
|
|
|
|
urllib3
|
2023-10-09 19:29:22 +00:00
|
|
|
bleach
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Tests try to access the network.
|
|
|
|
checkPhase = ''
|
|
|
|
export HOME="$TMP"
|
|
|
|
mkdir -p "$HOME/.kaggle/"
|
|
|
|
echo '{"username":"foobar","key":"00000000000000000000000000000000"}' > "$HOME/.kaggle/kaggle.json"
|
|
|
|
$out/bin/kaggle --help > /dev/null
|
|
|
|
'';
|
|
|
|
pythonImportsCheck = [ "kaggle" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Official API for https://www.kaggle.com, accessible using a command line tool implemented in Python 3";
|
|
|
|
homepage = "https://github.com/Kaggle/kaggle-api";
|
|
|
|
license = licenses.asl20;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ mbalatsko ];
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
}
|