A library containing standardized trait strings
Project description
A library containing standardized trait strings.
Traits are strings that represent a feature of some resource provider. This library contains the catalog of constants that have been standardized in the OpenStack community to refer to a particular hardware, virtualization, storage, network, or device trait.
Free software: Apache license
Documentation: http://docs.openstack.org/developer/os-traits
Usage
os-traits is primarily composed of a set of constants that may be referenced by simply importing the os_traits module and referencing one of the module’s traits constants:
$ python Python 2.7.11+ (default, Apr 17 2016, 14:00:29) [GCC 5.3.1 20160413] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os_traits as ot >>> print ot.HW_CPU_X86_SSE42 HW_CPU_X86_SSE42
Don’t know what the symbol names are for the os_traits module? There’s a helper method for that:
>>> import pprint >>> pprint.pprint(ot.get_symbol_names()) [... <snip> 'HW_CPU_X86_AVX2', 'HW_CPU_X86_SGX', 'HW_CPU_X86_AVX', 'HW_CPU_X86_AVX512BW', 'HW_CPU_X86_AVX512DQ', 'HW_CPU_X86_SSE', 'HW_CPU_X86_SHA', 'HW_CPU_X86_AVX512F', 'HW_CPU_X86_F16C', 'HW_CPU_X86_SSE41', 'HW_CPU_X86_SSE42', 'HW_CPU_X86_VMX', 'HW_CPU_X86_ASF', 'HW_CPU_X86_BMI2', 'HW_CPU_X86_CLMUL', 'HW_CPU_X86_AVX512VL', 'HW_CPU_X86_AVX512PF', 'HW_CPU_X86_XOP', 'HW_CPU_X86_BMI', 'HW_CPU_X86_ABM', 'HW_CPU_X86_3DNOW']
Want to see the trait strings for a subset of traits? There’s a method for that too:
>>> pprint.pprint(ot.get_traits(ot.NAMESPACES['X86'])) ['HW_CPU_X86_AES-NI', 'HW_CPU_X86_AVX512ER', 'HW_CPU_X86_AVX512CD', 'HW_CPU_X86_TBM', 'HW_CPU_X86_TSX', 'HW_CPU_X86_FMA3', 'HW_CPU_X86_SVM', 'HW_CPU_X86_FMA4', 'HW_CPU_X86_MPX', 'HW_CPU_X86_SSE2', 'HW_CPU_X86_SSE3', 'HW_CPU_X86_MMX', 'HW_CPU_X86_SSSE3', 'HW_CPU_X86_SSE4A', 'HW_CPU_X86_AVX2', 'HW_CPU_X86_SGX', 'HW_CPU_X86_AVX', 'HW_CPU_X86_AVX512BW', 'HW_CPU_X86_AVX512DQ', 'HW_CPU_X86_SSE', 'HW_CPU_X86_SHA', 'HW_CPU_X86_AVX512F', 'HW_CPU_X86_F16C', 'HW_CPU_X86_SSE41', 'HW_CPU_X86_SSE42', 'HW_CPU_X86_VMX', 'HW_CPU_X86_ASF', 'HW_CPU_X86_BMI2', 'HW_CPU_X86_CLMUL', 'HW_CPU_X86_AVX512VL', 'HW_CPU_X86_AVX512PF', 'HW_CPU_X86_XOP', 'HW_CPU_X86_BMI', 'HW_CPU_X86_ABM', 'HW_CPU_X86_3DNOW']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for os_traits-0.2.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fc4ffdea150ee05291cbb8a4c1e31c9820877fa2d600c96ca2dade715bc1935 |
|
MD5 | 2697412c2732a74828a84b043f53c1d9 |
|
BLAKE2b-256 | 1757b4d1e8286370e98e0a3814ff94974c045ad2f7aa42ff97cdbcbc91d839d7 |