$npx skillfedfor your agent

py3nvml

Python 3 Bindings for the NVIDIA Management Library

SkipPyPI Python ModulesReleased Nov 2021192.5K downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — py3nvml-0.2.7-py3-none-any.whl
v0.2.7 · released 2021-11-22 · 1 runtime deps: xmltodict

No—the package is abandoned (last release 2021-11-22, last commit 2022-04-14) and will not track NVIDIA driver or CUDA API changes. For new projects, use actively maintained alternatives. If you have legacy code already using py3nvml, it may still work on older systems, but do not adopt it for new development.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires NVIDIA GPU hardware and NVIDIA drivers installed; NVIDIA Management Library (libnvidia-ml.so or equivalent) must be accessible on the system.
  • Low install friction with a single lightweight dependency (xmltodict).
  • However, the package is abandoned—last release was 2021-11-22 and last commit 2022-04-14, with no active maintenance or security updates.

License · maintenance · safety

BSD (permissive) — BSD license is permissive and imposes minimal restrictions; you can use, modify, and distribute the package freely with attribution.

last release 2021-11-22 (1726 days) · last repo commit 2022-04-14 · 250 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 192,517 downloads/mo, #9,861 on PyPI

Verify before relying

pip install py3nvml

from py3nvml.py3nvml import *
nvmlInit()
print("Driver Version: {}".format(nvmlSystemGetDriverVersion()))
deviceCount = nvmlDeviceGetCount()
nvmlShutdown()
  • Compatibility with NVIDIA driver versions and CUDA toolkits released after 2022-04-14.
  • Whether xmltodict dependency is actually used at runtime or only for optional nvidia_smi module functionality.
  • Support status for Python versions beyond 3.5 (classifiers list only 3.5 explicitly).
Same gist for agents: .md · .json

What it is and what it does

py3nvml is a Python 3 port of NVIDIA's official python bindings to the NVIDIA Management Library (NVML), allowing you to query GPU state, driver info, memory usage, and running processes programmatically. It wraps the C NVML library and raises Python exceptions instead of returning error codes, making it more Pythonic than the original C interface.

Beyond basic NVML queries, the package includes utility functions for shared GPU server scenarios: grab_gpus() automatically sets CUDA_VISIBLE_DEVICES to allocate a specified number of free GPUs based on memory thresholds, get_free_gpus() detects which GPUs have no running processes, and a py3smi command-line tool provides formatted GPU status output. These utilities address the practical problem of preventing greedy frameworks from monopolizing all available GPUs.

Use it for

  • Automatically allocate N free GPUs to a job on a shared multi-GPU server without manual CUDA_VISIBLE_DEVICES configuration.
  • Monitor GPU memory usage and process counts programmatically to implement custom GPU scheduling or load-balancing logic.
  • Query driver version, GPU model names, and memory capacity at runtime to validate hardware requirements before launching compute jobs.
  • Implement a health-check or monitoring script that detects hung GPU processes or memory leaks across a cluster of machines.
  • Build a web dashboard or CLI tool that displays formatted GPU status with custom metrics or filtering.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Skip

No—the package is abandoned (last release 2021-11-22, last commit 2022-04-14) and will not track NVIDIA driver or CUDA API changes.

For new projects, use actively maintained alternatives. If you have legacy code already using py3nvml, it may still work on older systems, but do not adopt it for new development.

Install

py3nvml on PyPI

Before you install

Low install friction with a single lightweight dependency (xmltodict). However, the package is abandoned—last release was 2021-11-22 and last commit 2022-04-14, with no active maintenance or security updates.

Requires NVIDIA GPU hardware and NVIDIA drivers installed; NVIDIA Management Library (libnvidia-ml.so or equivalent) must be accessible on the system.

License in practice

BSD license is permissive and imposes minimal restrictions; you can use, modify, and distribute the package freely with attribution.

Quickstart

pip install py3nvml

from py3nvml.py3nvml import *
nvmlInit()
print("Driver Version: {}".format(nvmlSystemGetDriverVersion()))
deviceCount = nvmlDeviceGetCount()
nvmlShutdown()

Verify before relying

  • Compatibility with NVIDIA driver versions and CUDA toolkits released after 2022-04-14.
  • Whether xmltodict dependency is actually used at runtime or only for optional nvidia_smi module functionality.
  • Support status for Python versions beyond 3.5 (classifiers list only 3.5 explicitly).

Package facts

LicenseBSD permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
xmltodict
MaintenanceAbandoned 1,726 days since the last release
Last repo commit
First released
Downloads192,517 / month, #9,861 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3.5Topic :: Software Development :: Libraries :: Python ModulesTopic :: System :: HardwareTopic :: System :: Systems Administration

Evidence: py3nvml-0.2.7-py3-none-any.whl

Tags

Capabilities
nvidia gpu query pythoncuda visible devices managementgpu memory monitoringnvml python bindingsshared gpu server allocationgpu process detectionnvidia driver info python
Topics
gpu-managementnvidia-hardwareabandoned

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “cuda visible devices management”

  • py3nvmlProvides Python 3 bindings to query NVIDIA GPU state and manage GPU…
  • nvidia-nvtxProvides a Python API for annotating events and code ranges in…
  • egl-probeDetects and enumerates available graphics devices (GPUs) on a system…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also nvidia-ml-py3 · pynvml · nvidia-ml-py · GPUtil · nvgpu · nvitop · gpustat · pyrsmi · egl-probe · cuequivariance-ops-cu12

Further reading