{"library":"os-traits","title":"os-traits","description":"A library containing standardized trait strings for libvirt domain capabilities, used to represent CPU features, hypervisor capabilities, and other traits. Current version: 3.6.0. Released ~1-2 times per year.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install os-traits"],"cli":null},"imports":["from os_traits import trait_names","from os_traits import TRAITS"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from os_traits import trait_names, TRAITS\n\n# List all trait names\nprint(trait_names)\n\n# Check if a certain trait exists\nif 'HW_CPU_X86_SSE' in TRAITS:\n    print('SSE trait exists')\n\n# Get trait name by value (if needed)\ndef get_trait_name(value):\n    for name, val in TRAITS.items():\n        if val == value:\n            return name\n    return None\n\nprint(get_trait_name(1))","lang":"python","description":"List all trait names and check for a specific trait.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}