From b47205ce7fac6f23bebd14cc53c9ac622624a238 Mon Sep 17 00:00:00 2001 From: sasha0552 Date: Tue, 5 Mar 2024 07:49:03 +0000 Subject: [PATCH] Update readme and project metadata --- README.md | 12 +++++++++++- pyproject.toml | 8 +++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3516e06..225072d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A library and CLI utilities for managing performance states of NVIDIA GPUs. pip3 install nvidia_pstate ``` -## Usage +## Usage (CLI) ```sh # List available performance states (TODO: does not work right now, use nvidia-smi -q and count memory clocks) nvidia-pstate list-pstates @@ -20,3 +20,13 @@ nvidia-pstate set-pstate -i 0 -ps 16 # Set performance state for all GPUs nvidia-pstate set-pstate -ps 0 ``` + +## Usage (API) +```python +from nvidia_pstate import set_pstate_low, set_pstate_high + +set_pstate_low() # set pstate to "low" level (8 by default) +set_pstate_high() # set pstate to "high" level (16 by default) + +# default values can be overrided using NVIDIA_PSTATE_LOW and NVIDIA_PSTATE_HIGH environment variables. +``` diff --git a/pyproject.toml b/pyproject.toml index c82c3b5..4a32fe7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ requires = [ [project] description = "A library and CLI utilities for managing performance states of NVIDIA GPUs." name = "nvidia_pstate" -version = "1.0.0" +version = "1.0.1" readme = "README.md" authors = [ @@ -17,6 +17,8 @@ authors = [ ] classifiers = [ + "License :: OSI Approved :: MIT License", + "Programming Language :: Python", "Programming Language :: Python :: 3", ] @@ -25,3 +27,7 @@ license = { text = "MIT" } [project.scripts] nvidia-pstate = "nvidia_pstate.scripts.nvidia_pstate:main" + + +[project.urls] +Homepage = "https://github.com/sasha0552/nvidia-pstate"