'How do I get the RAM manufacturer on MacOS using Python 3?

I'm working on a benchmarking application, and I thought it would be useful if users could see the manufacturer of their RAM. I came across this post: Get ram manufacturer, which was very helpful for finding the manufacturer on Windows. However, it didn't answer the question of how I would get the manufacturer of RAM on MacOS.

I came across many libraries for finding system information, such as psutil and system-info. However, none of the libraries I found could find the manufacturer of RAM on MacOS.

I also tried running system_profiler SPHardwareDataType from Python, but that only returns information for the amount of memory installed, not the manufacturer of the memory.

However, I do see that in the "System Information" application on MacOS, you can view the manufacturer of your RAM, as shown in this screenshot: https://i.imgur.com/VeieDsT.png. But that still doesn't solve the problem of how I would get the manufacturer from that application into Python.

Any help would be appreciated. Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source