ZenitH-AT / nvidia-data

Writes the latest product family (GPU) and operating system data from the NVIDIA Download API (lookupValueSearch) to a JSON file.
The Unlicense
5 stars 3 forks source link
data gpu json nvidia

nvidia-data

The latest product family (GPU) and operating system data from the NVIDIA Download API (lookupValueSearch) as JSON files.

What does the script do?

get_data.py reads XML data from the NVIDIA Download API and converts it to a form that can be read from more easily (key value pairs) when comparing to corresponding data from an OS.

Data mapping

Desktop and notebook GPUs are separated to account for some GPUs being present in both a desktop and notebook series (e.g., GeForce GTX 1050 Ti); some notebook GPUs may still be in the desktop key (e.g., T1000, ) because NVIDIA listed them under a desktop series, both a desktop and notebook series or none at all. OS data is structured more traditionally, since both the code and part of the name must be compared.

GPU data example (GPU name and pfid):

{
    "GeForce RTX 3070": "933",
}

OS data example (osID, OS code and OS name):

[
    {
        "id": "57",
        "code": "10.0",
        "name": "Windows 10 64-bit"
    },
]

Notes

Running the script

If the JSON files in this repository are outdated, they can be generated by running the following commands:

git clone https://github.com/ZenitH-AT/nvidia-data
cd nvidia-data
pip install -r requirements.txt
python get_data.py

Where are the JSON files used?

The JSON files created by get_data.py were initially primarily intended to be used by the nvidia-update.ps1 script (available at ZenitH-AT/nvidia-update) but are now also used by other projects, such as ElPumpo/TinyNvidiaUpdateChecker.

Previously, nvidia-update.ps1 needed to query the NVIDIA Download API multiple times, iterating through and filtering every bit of data. Measures to speed up this process (i.e., limiting queries to desktop/mobile GPU and GeForce cards only) mostly just made the code more complicated.

Now, the script passes the data taken directly from this repository to the NVIDIA AjaxDriverService. An example of how this data is used can be found here.

Possible future changes