python3Packages.censys: init at 1.1.0

This commit is contained in:
Fabian Affolter 2021-01-17 23:32:36 +01:00
parent 3f5d6b2e85
commit 7358662028
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,50 @@
{ lib
, backoff
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, requests
, pytestcov
, requests-mock
, parameterized
}:
buildPythonPackage rec {
pname = "censys";
version = "1.1.0";
src = fetchFromGitHub {
owner = "censys";
repo = "censys-python";
rev = "v${version}";
sha256 = "0vvd13g48i4alnqil98zc09zi5kv6l2s3kdfyg5syjxvq4lfd476";
};
propagatedBuildInputs = [
backoff
requests
];
checkInputs = [
pytestcov
pytestCheckHook
requests-mock
parameterized
];
# The tests want to write a configuration file
preCheck = ''
export HOME=$(mktemp -d)
mkdir -p $HOME
'';
# All other tests require an API key
pytestFlagsArray = [ "tests/test_config.py" ];
pythonImportsCheck = [ "censys" ];
meta = with lib; {
description = "Python API wrapper for the Censys Search Engine (censys.io)";
homepage = "https://github.com/censys/censys-python";
license = with licenses; [ asl20 ];
maintainers = [ maintainers.fab ];
};
}

View File

@ -1171,6 +1171,8 @@ in {
cement = callPackage ../development/python-modules/cement { };
censys = callPackage ../development/python-modules/censys { };
connect-box = callPackage ../development/python-modules/connect_box { };
cerberus = callPackage ../development/python-modules/cerberus { };