Skip to main content

Opinionated hardware classification library.

Project description

caste - T-Shirt sizes for hardware

Opinionated hardware classification library for Python.

caste is a deliberately simple library that inspects a user’s machine and assigns it to a small, practical "hardware caste" (like Mini, User, or Developer). This helps you set sensible defaults for your application based on the user's hardware without manually parsing RAM, CPU, and GPU stats.

Installation

pip install caste

Quick Start

import caste

# Get a simple one-word label for the machine
print(caste.detect_caste_word())  # e.g., "User"

# Get the label and the reason for the classification
label, reason = caste.detect_caste()
print(f"Caste: {label} (Reason: {reason})")

# Get raw hardware facts if you want to perform your own logic
facts = caste.detect_hw_facts()
print(f"RAM: {facts['ram_bytes'] / 1024**3:.1f} GB")
print(f"Discrete GPU: {facts['has_discrete_gpu']}")

Hardware Castes

  • Mini — Microcomputers, embedded systems, classic/legacy PCs.
  • User — Standard consumer-level machines.
  • Developer — High-end personal computers.
  • Workstation — Professional content-creation or high-end gaming machines.
  • Rig — Dedicated servers or specialised compute systems.

API Reference

detect_hw_facts() returns a dictionary with:

  • ram_bytes (int)
  • physical_cores (int)
  • logical_threads (int)
  • gpu_kind (0=None, 1=Integrated, 2=Unified, 3=Discrete)
  • vram_bytes (int)
  • has_discrete_gpu (bool)
  • is_apple_silicon (bool)
  • is_intel_arc (bool)

Why use caste?

Modern applications often launch with no idea of the underlying hardware capability. If defaults are tuned only for a developer’s machine, it can lead to sluggish experiences on low-end hardware or not showing off your apps's best capabilities on high-end systems. caste provides a standardized way to bridge this gap.

There is also a C++ library and an executable for shell scripts and build systems. See the Github repo for details.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caste-0.1.9.tar.gz (27.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

caste-0.1.9-cp314-cp314t-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

caste-0.1.9-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (173.3 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

caste-0.1.9-cp314-cp314-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

caste-0.1.9-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (172.2 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

caste-0.1.9-cp313-cp313-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

caste-0.1.9-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (172.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

caste-0.1.9-cp312-cp312-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

caste-0.1.9-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (172.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

caste-0.1.9-cp311-cp311-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

caste-0.1.9-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (172.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

caste-0.1.9-cp310-cp310-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

caste-0.1.9-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (171.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

caste-0.1.9-cp39-cp39-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

caste-0.1.9-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (171.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

caste-0.1.9-cp38-cp38-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8musllinux: musl 1.2+ x86-64

caste-0.1.9-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (171.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file caste-0.1.9.tar.gz.

File metadata

  • Download URL: caste-0.1.9.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for caste-0.1.9.tar.gz
Algorithm Hash digest
SHA256 f350c95503da73bb2a99069800820a1d360511fb732a3cf42c1184b4981bbaea
MD5 d16bed48bf02a3bea99e9f3e66f34782
BLAKE2b-256 9c625a5dc76842d3c2763a9530a19187bf9b9dce0e1f20367efd042997774f2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9.tar.gz:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3c9ca2db223d959f6ac129bcec647ebeba77632f381e79c358e1f7ec11a691c4
MD5 ff8a67207ee7d58928b562fddf84c7e3
BLAKE2b-256 16f4cad9335361876cf31365f4449a382898a7ffdaf94185d51d139fdd11f621

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp314-cp314t-musllinux_1_2_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 15900865e9d288f92d4199c1eba4f1afd058087fa00669885077f816f16b9e56
MD5 dacd93ab65569dd57e9a92445269b9a0
BLAKE2b-256 ef5cf8788395c9914d0ea8b14a1efb30a27a0f7494c47bfcc57612afdb423d7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 af712d20073b41b86d0640a3fca5b709099b7e46579413fb9efe178c54b09248
MD5 984bfd2ee67e1b2e027cac943c349fac
BLAKE2b-256 e29fab4727d4e603d03599d8038c040b7fcc6d0414887bb487b73fb510f9c1c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp314-cp314-musllinux_1_2_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4bda878990cceffc47aacafcd97032b309ad9570684a6e96fdeaa0de3bd6675f
MD5 7d21358ca48e955e9b1a965b6acec7d0
BLAKE2b-256 f7ac5c3be0b363a83f8207940fe2241193a3328d710ff3ff9689f6941176bdd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f8117313725e636d91ce8aad41e3cfba9cd2182493fb500a924235b8bcd7b17b
MD5 ec02953ce4f132797b20a61d17bdb86a
BLAKE2b-256 432e0cf1b830814fcd8da02bca18ad453ff08b3308f236e07482cd749777b066

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp313-cp313-musllinux_1_2_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 04078bbdeb9d6336b5a0d6d735d1ec7b062edc95b65903c94a7cc5f0d7e80861
MD5 e621100abbe559e27205ea3d76bd22a0
BLAKE2b-256 56ae71ebad6dcce136911cf56caf850e8f8632a42de368879fc7d6149e284fc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fe5e261c68877cbb337c7c9fc857de4b65f84ff29a3a2653b61732e807938363
MD5 36179416ebc2342286410185342b932d
BLAKE2b-256 7b6c67923dabc521f06a91fd0521e8ab363d563ed4544c96663c74541286162c

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 722fa80278e4602f769d99fff5acd85aec5cb4342f63193b8aad42add2f25ef6
MD5 50cc2d5e1a07fcf6f159772acb919bd2
BLAKE2b-256 60dea468faeeadf70c2df739996f0b5554ce9671ed5585e2ea48ed32dfb1383a

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 db080fe916fad31a676ff42a281f8b76dcc3e63f5e2a6855e4f02e10567a1b5b
MD5 7a27769dbf1a5e668cff040b14b2b3eb
BLAKE2b-256 1fef960b1d4731bad91ef66fbd5dfb6bb488b5dfa034863f9127fd038e377379

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 33240ad0cc11eacfe27936dc3058b391e4a40cdce5fefe88040af571d44e7d9f
MD5 ffe1ff079a26701bb9d987cf63a2b7a8
BLAKE2b-256 8c33b3545d69e19b7b96688563cc86b9d0d3f1a842a2144d48ea840998da84d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3d872229c4b628a2d6ab69df676044ba5f8756d3992c3c47c72131115870e064
MD5 9c47f515afec7019549a9d49cda7192d
BLAKE2b-256 72406214d4c2b1e53169fdc0d6e192e0091ba30a2300aa1bf873b4a2ef556b84

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp310-cp310-musllinux_1_2_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2b9cec8165ee8c0e4fcaffaf3eb824d7cb769da62bcf06e6e41b081a31c31312
MD5 42a5647afb44d82244557bf2cf86f38a
BLAKE2b-256 22ec1c6c43c2a98e705d1bd5d632d69c32782d50b1dcf23476145e6c8bb3b326

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 092d7251a4eca572c7e34a4c1cb4a34f98a987371514b7dbfc61486ccff99480
MD5 866d3bf59109f4a96e74411b3d3236e1
BLAKE2b-256 56cf7eb05a6ecd1858006fdb07387d6f0d41347fe8e5a5883453eec59c0dfd87

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp39-cp39-musllinux_1_2_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7e173544f4f16fabf330a1266204bbe9bffc6cadd67710e56926ae436d312d68
MD5 af86a9fc3c4a94731b4ce91e04f9b030
BLAKE2b-256 fc58423d1abc903b3b035ff0271e22ae3c486da4b7d8a1af41ec18af548aad78

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp38-cp38-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d1e5c3d5040d4dac14c8e106005e5340b43d1cd5183d57e1189f9e5644d4ee76
MD5 d5ea6210d2a416c818ce81fc020bdd67
BLAKE2b-256 0b6b61d0678c40ecab7ce47195161a0ab3a58ad1cd85b5424204540d01d7bb61

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp38-cp38-musllinux_1_2_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caste-0.1.9-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.9-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 389fecce9642f78b8d0941fff97a90aa72e68939c9b64b81af22ce972e25349d
MD5 cc7fdda5da585318237b1f43447ca3a7
BLAKE2b-256 55367a0de5038d2062d4dfb23c9704faa79f56107ad20c0d90131edf42df467d

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.9-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on zeth/caste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page