2020-04-24 23:36:52 +00:00
|
|
|
|
{ lib
|
2022-10-30 15:09:59 +00:00
|
|
|
|
, blinker
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, botocore
|
2022-10-30 15:09:59 +00:00
|
|
|
|
, buildPythonPackage
|
|
|
|
|
, fetchFromGitHub
|
2024-04-21 15:54:59 +00:00
|
|
|
|
, pytest-env
|
2022-10-30 15:09:59 +00:00
|
|
|
|
, pytest-mock
|
|
|
|
|
, pytestCheckHook
|
|
|
|
|
, pythonOlder
|
2024-04-21 15:54:59 +00:00
|
|
|
|
, setuptools
|
2022-10-30 15:09:59 +00:00
|
|
|
|
, typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
|
pname = "pynamodb";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
version = "6.0.0";
|
2022-10-30 15:09:59 +00:00
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "pynamodb";
|
|
|
|
|
repo = "PynamoDB";
|
|
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
hash = "sha256-Ag/ivZ2SDYX0kwXbExt3kE/pMJgfoGc6gWoy+Rr6GTw=";
|
2022-10-30 15:09:59 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
|
build-system = [
|
|
|
|
|
setuptools
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
dependencies = [
|
2022-10-30 15:09:59 +00:00
|
|
|
|
botocore
|
2024-04-21 15:54:59 +00:00
|
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
2022-10-30 15:09:59 +00:00
|
|
|
|
typing-extensions
|
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
|
optional-dependencies = {
|
2022-10-30 15:09:59 +00:00
|
|
|
|
signal = [
|
|
|
|
|
blinker
|
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
|
nativeCheckInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
|
pytest-env
|
2022-10-30 15:09:59 +00:00
|
|
|
|
pytest-mock
|
|
|
|
|
pytestCheckHook
|
2024-04-21 15:54:59 +00:00
|
|
|
|
] ++ optional-dependencies.signal;
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
|
"pynamodb"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
|
# Tests requires credentials or network access
|
|
|
|
|
"test_binary_attribute_update"
|
|
|
|
|
"test_binary_set_attribute_update"
|
|
|
|
|
"test_connection_integration"
|
|
|
|
|
"test_make_api_call__happy_path"
|
|
|
|
|
"test_model_integration"
|
|
|
|
|
"test_sign_request"
|
|
|
|
|
"test_table_integration"
|
|
|
|
|
"test_transact"
|
2024-04-21 15:54:59 +00:00
|
|
|
|
# require a local dynamodb instance
|
|
|
|
|
"test_create_table"
|
|
|
|
|
"test_create_table__incompatible_indexes"
|
2022-10-30 15:09:59 +00:00
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-10-30 15:09:59 +00:00
|
|
|
|
description = "Interface for Amazon’s DynamoDB";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
longDescription = ''
|
|
|
|
|
DynamoDB is a great NoSQL service provided by Amazon, but the API is
|
|
|
|
|
verbose. PynamoDB presents you with a simple, elegant API.
|
|
|
|
|
'';
|
|
|
|
|
homepage = "http://jlafon.io/pynamodb.html";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
changelog = "https://github.com/pynamodb/PynamoDB/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
license = licenses.mit;
|
2022-10-30 15:09:59 +00:00
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|