Install & Compatibility
Where this runs
tested against v3.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.9s · import 0.000s · 20MB
21MB installed
● package 21MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
COMPUTE_ACCELERATORS
✓ from os_traits import COMPUTE_ACCELERATORS
✗ from os_traits import trait_names
List all trait names and check for a specific trait.
from os_traits import trait_names, TRAITS
# List all trait names
print(trait_names)
# Check if a certain trait exists
if 'HW_CPU_X86_SSE' in TRAITS:
print('SSE trait exists')
# Get trait name by value (if needed)
def get_trait_name(value):
for name, val in TRAITS.items():
if val == value:
return name
return None
print(get_trait_name(1))
Upgrade
Version history
3.8.0latest on PyPI · released Jun 9, 2026
Audit
Dependencies
pbroptionalBuild dependency (setuptools plugin). Not a runtime dependency but required for setup.py install from source.