Files
nixpkgs/pkgs/development/python-modules/greenplanet-energy-api/default.nix
T
Jamie Magee 973c3fb696 python3Packages.greenplanet-energy-api: init at 0.1.8
Add a new Python package for the Green Planet Energy API library.
This is an async Python library for querying the Green Planet Energy API.

- Uses fetchFromGitHub with the latest v0.1.8 tag
- Follows the finalAttrs pattern as per nixpkgs conventions
- Maintainer: jamiemagee
- All 25 test cases pass with 94% coverage
2026-02-25 17:04:44 -08:00

48 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
aiohttp,
pytest-asyncio,
pytest-cov,
aioresponses,
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "greenplanet-energy-api";
version = "0.1.8";
pyproject = true;
src = fetchFromGitHub {
owner = "petschni";
repo = "greenplanet-energy-api";
tag = "v${finalAttrs.version}";
hash = "sha256-Ffmb4UUVfFhSNAy3Fq+3ERYSfD09JnrR8rKUV0sXjNI=";
};
build-system = [ setuptools ];
dependencies = [
aiohttp
];
nativeCheckInputs = [
pytest-asyncio
pytest-cov
aioresponses
pytestCheckHook
];
pythonImportsCheck = [ "greenplanet_energy_api" ];
meta = {
description = "Async Python library for querying the Green Planet Energy API";
homepage = "https://github.com/petschni/greenplanet-energy-api";
changelog = "https://github.com/petschni/greenplanet-energy-api/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.jamiemagee ];
};
})