python-cpuid
Call cpuid from Python code.
This module provides C bindings to call the cpuid instruction from Python code. Simply pass a MSR ID and the cpuid function will return the result as a tuple representing the eax, ebx, ecx and edx registers as integers.
from cpuid import cpuid
msr = 0x80000000 # example value
eax, ebx, ecx, edx = cpuid(msr)
CPU features
In addition to the raw cpuid functionality, this library provides helpers for commonly used CPUID registers.
from cpuid.features import prcessor_features, secure_encryption_info, vendor
vendor() # returns the result of cpuid(0) as bytes, ex: b"GenuineIntel"
features = processor_features() # A class with all the fields of cpuid(1)
secure_encryption_features = secure_encryption_info() # AMD secure encryption features
Feel free to add more CPUID registers! You can find the specification in official Intel and AMD docs like this one: https://www.amd.com/system/files/TechDocs/24594.pdf.
Why?
Other projects already provide this functionality. To the best of our knowledge:
Notes
We do not (yet) provide binary wheel distributions for this package, because of the added complexity of shipping compiled libraries for Linux. You will require GCC to compile the package for your system.
This project has been set up using PyScaffold 4.3. For details and usage information on PyScaffold see https://pyscaffold.org/.
Metadata
Release files for python-cpuid 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_cpuid-0.1.1.tar.gz | 21.3 kB | Without provenance | Details for python_cpuid-0.1.1.tar.gz |
Release files / python_cpuid-0.1.1.tar.gz
| Download URL | python_cpuid-0.1.1.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
092adf0d567a2ce068f10ff5b0b085b1be23cfa4ac5ac6890bc96b4f1539abbf
|
|
BLAKE2b-256 checksum How to use checksums |
237db96d5dd57557839fc54319d4e0cfdb508bafd7ac6702c60749df196a07ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for python-cpuid 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.