--- id: pynvml version: "13.0.1" license: BSD-3-Clause license_treatment: permissive maintenance: aging --- # pynvml — Python utilities for the NVIDIA Management Library License: permissive · Maintenance: aging · Downloads: 3.5M/mo ## What it is and what it does pynvml is a deprecated Python utility wrapper around NVIDIA's Management Library (NVML) that lets you query GPU device information programmatically. It depends on the official nvidia-ml-py bindings and exposes utilities that mimic the command-line nvidia-smi tool, allowing you to retrieve GPU memory, utilization, and other hardware metrics. The package is no longer actively maintained and is marked for deprecation; the project explicitly recommends using nvidia-ml-py directly instead. The main entry point provides a DeviceQuery method that accepts filter strings matching nvidia-smi's query API. It is intended for demonstration and monitoring tasks rather than production use, and there is no guarantee of long-term support or maintenance. Use it for: - Monitor available GPU memory and total memory capacity on a system during development or testing. - Query GPU device properties and utilization metrics in a Python script without shelling out to nvidia-smi. - Prototype GPU monitoring or resource-tracking tools before committing to a maintained library. - Retrieve structured GPU information for logging or diagnostic purposes in legacy codebases. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python utilities for querying NVIDIA GPU device information through the NVIDIA Management Library (NVML). No. The package is explicitly deprecated and unmaintained as of version 13.0.1. The project's own documentation warns it is for demonstration only and recommends migrating directly to nvidia-ml-py. Unless you are maintaining legacy code that already depends on it, use nvidia-ml-py instead. ## Install pip install pynvml uv add pynvml poetry add pynvml ## Installing pynvml Before you install: Low install friction with a single pure-Python dependency. However, the package is explicitly deprecated as of version 13.0.1 and marked as inactive; maintenance is not guaranteed. License in practice: BSD-3-Clause is permissive and imposes no significant restrictions on use or redistribution. Quickstart: pip install pynvml from pynvml_utils import nvidia_smi nvsmi = nvidia_smi.getInstance() result = nvsmi.DeviceQuery('memory.free, memory.total') Requires NVIDIA GPU drivers and nvidia-ml-py (>=12.0.0) to be installed; NVML library must be accessible on the system. Verify before relying: - Whether the deprecated status means the package will receive security updates or bug fixes in the future. - Compatibility with specific NVIDIA driver versions or CUDA versions beyond the stated dependency on nvidia-ml-py>=12.0.0. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 3.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags nvidia gpu monitoring python, nvml python bindings, gpu device query, nvidia-smi python wrapper, gpu memory monitoring, nvidia management library, gpu information retrieval, gpu-monitoring, deprecated, nvidia [View on SkillFed](https://skillfed.io/packages/pynvml) · [View on PyPI](https://pypi.org/project/pynvml/)