python312Packages.prometheus-fastapi-instrumentator: init at 7.0.0

This commit is contained in:
Ben Darwin
2024-06-18 15:22:58 -04:00
parent 0e2ddadf23
commit fdcb3bc46d
2 changed files with 58 additions and 0 deletions
@@ -0,0 +1,56 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, devtools
, fastapi
, httpx
, poetry-core
, prometheus-client
, requests
, starlette
}:
buildPythonPackage rec {
pname = "prometheus-fastapi-instrumentator";
version = "7.0.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "trallnag";
repo = "prometheus-fastapi-instrumentator";
rev = "refs/tags/v${version}";
hash = "sha256-yvKdhQdbY0+jEc8TEHNNgtdnqE0abnd4MN/JZFQwQ2E=";
};
build-system = [
poetry-core
];
dependencies = [
prometheus-client
starlette
];
nativeCheckInputs = [
devtools
fastapi
httpx
pytestCheckHook
requests
];
pythonImportsCheck = [ "prometheus_fastapi_instrumentator" ];
meta = {
description = "Instrument FastAPI with Prometheus metrics";
homepage = "https://github.com/trallnag/prometheus-fastapi-instrumentator";
changelog = "https://github.com/trallnag/prometheus-fastapi-instrumentator/blob/${src.rev}/CHANGELOG.md";
license = with lib.licenses; [ isc bsd3 ];
maintainers = with lib.maintainers; [ bcdarwin ];
platforms = lib.platforms.linux; # numerous test failures on Darwin
};
}
+2
View File
@@ -10400,6 +10400,8 @@ self: super: with self; {
prometheus-client = callPackage ../development/python-modules/prometheus-client { };
prometheus-fastapi-instrumentator = callPackage ../development/python-modules/prometheus-fastapi-instrumentator { };
prometheus-flask-exporter = callPackage ../development/python-modules/prometheus-flask-exporter { };
prometrix = callPackage ../development/python-modules/prometrix { };