platform:
The platform module is part of Python's standard library, meaning it comes pre-installed with Python and does not require additional installation. It provides tools to retrieve information about the system (hardware, OS, and Python version).
Key Features:
platform.system()
Returns the name of the operating system (e.g., 'Windows', 'Linux', 'Darwin' for macOS).
platform.release()
Returns the OS release version (e.g., '10' for Windows 10).
platform.version()
Returns the OS version details as a string.
platform.architecture()
Returns the architecture of the system (e.g., ('64bit', 'ELF')).
platform.node()
Returns the network name of the machine.
platform.machine()
Returns the machine type (e.g., 'x86_64').
platform.processor()
Returns the processor type (e.g., 'Intel64 Family 6 Model 158 Stepping 10').
platform.python_version()
Returns the Python version (e.g., '3.10.7').
platform.uname()
Returns a named tuple with comprehensive system information:
system, node, release, version, machine, processor.