home-assistant: support azure_data_explorer component (#359438)

This commit is contained in:
Martin Weinelt 2024-11-27 02:43:23 +01:00 committed by GitHub
commit 36f0b3aeb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 121 additions and 1 deletions

View File

@ -0,0 +1,59 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
python-dateutil,
requests,
azure-identity,
msal,
ijson,
azure-core,
asgiref,
aiohttp,
pandas,
}:
buildPythonPackage rec {
pname = "azure-kusto-data";
version = "4.6.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-tfOnb6rFjTzg4af26gK5gk1185mejAiaDvetE/r4L0Q=";
};
build-system = [ setuptools ];
dependencies = [
python-dateutil
requests
azure-identity
msal
ijson
azure-core
];
optional-dependencies = {
pandas = [ pandas ];
aio = [
aiohttp
asgiref
];
};
# Tests require secret connection strings
# and a network connection.
doCheck = false;
pythonImportsCheck = [ "azure.kusto.data" ];
meta = {
changelog = "https://github.com/Azure/azure-kusto-python/releases/tag/v${version}";
description = "Kusto Data Client";
homepage = "https://github.com/Azure/azure-kusto-python";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
}

View File

@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
azure-kusto-data,
azure-storage-blob,
azure-storage-queue,
tenacity,
pandas,
}:
buildPythonPackage rec {
pname = "azure-kusto-ingest";
version = "4.6.1";
pyproject = true;
src = fetchFromGitHub {
owner = "Azure";
repo = "azure-kusto-python";
rev = "refs/tags/v${version}";
hash = "sha256-rm8G3/WAUlK1/80uk3uiTqDA5hUIr+VVZEmPe0mYBjI=";
};
sourceRoot = "${src.name}/azure-kusto-ingest";
build-system = [ setuptools ];
dependencies = [
azure-kusto-data
azure-storage-blob
azure-storage-queue
tenacity
];
optional-dependencies = {
pandas = [ pandas ];
};
# Tests require secret connection strings
# and a network connection.
doCheck = false;
pythonImportsCheck = [ "azure.kusto.ingest" ];
meta = {
changelog = "https://github.com/Azure/azure-kusto-python/releases/tag/v${version}";
description = "Kusto Ingest Client";
homepage = "https://github.com/Azure/azure-kusto-python";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
}

View File

@ -352,7 +352,10 @@
paho-mqtt_1
];
"azure_data_explorer" = ps: with ps; [
]; # missing inputs: azure-kusto-data azure-kusto-ingest
azure-kusto-data
azure-kusto-ingest
]
++ azure-kusto-data.optional-dependencies.aio;
"azure_devops" = ps: with ps; [
aioazuredevops
];
@ -5125,6 +5128,7 @@
"awair"
"aws"
"axis"
"azure_data_explorer"
"azure_devops"
"azure_event_hub"
"backup"

View File

@ -1173,6 +1173,10 @@ self: super: with self; {
azure-keyvault-secrets = callPackage ../development/python-modules/azure-keyvault-secrets { };
azure-kusto-data = callPackage ../development/python-modules/azure-kusto-data { };
azure-kusto-ingest = callPackage ../development/python-modules/azure-kusto-ingest { };
azure-loganalytics = callPackage ../development/python-modules/azure-loganalytics { };
azure-mgmt-advisor = callPackage ../development/python-modules/azure-mgmt-advisor { };