Metadata-Version: 2.4
Name: pyhwloc
Version: 3.0.0
Summary: Python interface of the hwloc library.
Project-URL: source, https://github.com/open-mpi/pyhwloc
Project-URL: documentation, https://pyhwloc.readthedocs.io/
Author-email: Jiaming Yuan <jm.yuan@outlook.com>
Maintainer-email: Jiaming Yuan <jm.yuan@outlook.com>
License: BSD-3-Clause
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: C
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development
Requires-Python: >=3.12
Description-Content-Type: text/x-rst

###################################################################
Python Interface for the Portable Hardware Locality (hwloc) Library
###################################################################

- `Documentation <https://pyhwloc.readthedocs.io/>`__
- `Official site <https://www.open-mpi.org/projects/hwloc/>`__ of the hwloc library.


Quick Start Example
===================

.. code-block:: python

    from pyhwloc import from_this_system

    # Create and load system topology
    with from_this_system() as topo:
        # Get basic system information
        n_cores = topo.n_cores()
        n_numa = topo.n_numa_nodes()

        print(f"System has {n_cores} CPU cores")
        print(f"System has {n_numa} NUMA nodes")

        # Get the current CPU binding
        cpuset = topo.get_cpubind()
        print(f"Current CPU binding: {cpuset}")


Supported Platforms
===================

- Linux distributions, tested with latest Ubuntu LTS.
- Latest Windows.