all Python 3platformfunction
platform.processor()
system and machine
The processor name as a string, e.g. 'x86_64' or 'Intel64 Family 6 Model 154…'; often empty or the same as machine().
Syntax
platform.processor()
The CPU model is usually not here: on Linux the function often returns the same 'x86_64' as machine(), or an empty string, and the detailed string comes mostly on Windows. For the CPU model on Linux read /proc/cpuinfo, and for the core count use os.cpu_count(). Since 3.9 the value is computed lazily and may run an external command on first call.
Examples
import platform
print(repr(platform.processor())) # → ? например 'x86_64' на Linux или '' там, где не определить
print(type(platform.processor()).__name__) # → str
See also
Open in the full glossarydocs.python.orgReport an inaccuracy