Skip to content

Commit

Permalink
python312Packages.prometheus-fastapi-instrumentator: init at 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bcdarwin committed Jun 4, 2024
1 parent 0e2ddad commit 21a7ade
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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=";
};

nativeBuildInputs = [
poetry-core
];

propagatedBuildInputs = [
prometheus-client
starlette
];

nativeCheckInputs = [
devtools
fastapi
httpx
pytestCheckHook
requests
];

pythonImportsCheck = [ "prometheus_fastapi_instrumentator" ];

meta = with lib; {
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 = [ licenses.isc licenses.bsd3 ];
maintainers = with maintainers; [ bcdarwin ];
platforms = platforms.linux; # numerous test failures on Darwin
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit 21a7ade

Please sign in to comment.