--- id: archspec version: "0.2.6" license: Apache-2.0 OR MIT license_treatment: permissive maintenance: active --- # archspec — A library to query system architecture License: permissive · Maintenance: active · Downloads: 348.4K/mo ## What it is and what it does Archspec is a Python library that provides standardized, human-readable labels for system architecture components—primarily CPU microarchitectures—and APIs to detect, query, and reason about compatibility relationships between them. It grew out of Spack and exposes functionality to identify what CPU architecture a system has, compare microarchitectures for compatibility, and model relationships between different CPU families and generations. The library has no runtime dependencies and installs cleanly on Python 3.6 and later. It is actively maintained and suitable for integration into package managers, build systems, or any tool that needs to understand and work with CPU architecture compatibility. While still in Alpha, it has been in development since 2020-02-02 and is used in production contexts. Use it for: - Detect the CPU microarchitecture of a system to select optimized binaries or build flags - Compare microarchitectures to determine if a pre-built binary is compatible with a target system - Model CPU compatibility chains in package managers to avoid installing incompatible optimized builds - Query architecture metadata for system profiling or hardware inventory tools - Reason about CPU feature sets and generations for compiler optimization decisions ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Archspec provides APIs to detect, query, and compare CPU microarchitectures and other system architecture aspects using human-readable labels. Yes, if you need CPU microarchitecture detection and compatibility reasoning. Low install friction, no dependencies, permissive dual licensing (Apache-2.0 OR MIT), and active maintenance make it a safe choice. Alpha status means the API may evolve, but the library is already in production use. Not needed if your tool doesn't care about CPU-level compatibility or microarchitecture details. ## Install pip install archspec uv add archspec poetry add archspec ## Installing archspec Before you install: Low friction installation with no runtime dependencies. Active maintenance with recent commits as of 2026-08-11, though still in Alpha status. License in practice: Dual-licensed under Apache-2.0 OR MIT; users may choose either permissive license at their option, with no restrictions on commercial or private use. Quickstart: pip install archspec import archspec.cpu host = archspec.cpu.host() print(host.name) Verify before relying: - Specific CPU models and microarchitectures supported by version 0.2.6 - Performance characteristics when querying large architecture datasets - Stability guarantees given Alpha development status ## Package facts - License: Apache-2.0 OR MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 348.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cpu microarchitecture detection, system architecture compatibility, cpu model comparison, architecture labeling, microarchitecture queries, hardware compatibility checking, architecture metadata, cpu-architecture, hardware-detection, compatibility-checking [View on SkillFed](https://skillfed.io/packages/archspec) · [View on PyPI](https://pypi.org/project/archspec/)