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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

caste-0.1.1-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.1-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (183.1 kB view details)

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

caste-0.1.1-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.1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (180.8 kB view details)

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

caste-0.1.1-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.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (180.7 kB view details)

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

caste-0.1.1-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.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (180.8 kB view details)

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

caste-0.1.1-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.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (180.9 kB view details)

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

caste-0.1.1-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.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (178.5 kB view details)

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

caste-0.1.1-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.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (178.6 kB view details)

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

caste-0.1.1-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.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (178.4 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.1-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ff7b03136e20488b4422017381d2e4c02e3c54776a376c84e53c539c60c15d2d
MD5 6a9de5cc689c4abc493c902cb6adf4c8
BLAKE2b-256 e8c6c453c8636e3f2fa3edbbe6d7dcb4e1fb01dcaf43232de6dfcb5a756fa14a

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 060fda020c2503f22bd181d9e648db925a4045795d7a424e76549dd2f537b882
MD5 16e5c5bde80db5328b3564fe4e7a2ad2
BLAKE2b-256 6871426969c83332dc0a982315a147f6383522ff6643678cb56120de5a9aa2e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0a1138b05788a73b6a621c4b79f26a73cf1780cc4b4ced4d11a3bb8ba57dc9cb
MD5 c5604d53c7723939fa7ce955f0e2613c
BLAKE2b-256 0567b2df2acac7cddf795a560db5ee7c763a2d87caf3dc611b5a4ce27a7b285b

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 12bcbb24059b0e78cd83ede568bec7dbafb3a6417e16d7f892fb7c6a6018a39a
MD5 ceb0be66021a48b8bd4ac87ea3024321
BLAKE2b-256 6c02e1efd26949ea05ec1a26297b2213b610b71d4e1e2cc69d43d6286487e5c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 32688985172317d99a58ce58a93b3a4d4ac52ff0a7743cb9227f1d92e6463c75
MD5 b44e6e63fe66d83697727516646b2df8
BLAKE2b-256 11e92e7fa5cd08286c6e981edfe6c68f813f000ff4a2b5cc9be0ff09cf85b910

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b8b0e5bcde1da434d1ed7a26ca49cd328fa516c9f322a7392f8e9bd56d62039d
MD5 fc1784f8fccd14179945179e0f158659
BLAKE2b-256 eda44e68041e61e20af05895a0cf02aae5404f0bc9ddc7ff18e1139ad0943005

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f007a3efb18ec518706d8706d47aca4186ed4853665c2986d4640b2c99be780e
MD5 55906a72fa9ffb42c796934e06aae3d3
BLAKE2b-256 6402366e596a354c246ff7c4831527046cdbb81dc68180c31e67276766787607

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5595f56d5a82291e6b01aeaa308a4a32e6de9229dc5b5af0ed7bdb38a615a2d4
MD5 3c3aa2697643edbf971bab19bf4c0ff5
BLAKE2b-256 89f5ec4ab77b66757f7f5e1bc8288aeea7ffa0fee076581ed3c821ab55500240

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ec56dada2ab06f67170fb71b48e0295bad6362ae14eedd269da59ac1b6416379
MD5 bb8303fff95637f20c9ffa82b3b9d978
BLAKE2b-256 34a1e790b969dcbe5b966d0ccb9f07cf5ce3c2795419569e042680ce7d28b14e

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e2990c52f8b6d63f5538745e2331eeea07935a2cef6ceba7068be4a02dd2ccbb
MD5 12adc6c02f8679c45c5729252b69ad64
BLAKE2b-256 96a4c7a673aa5c1a9605ea27aed36863b7c7a6af23a35051101c74ed9cb3f26c

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5aaea87d06b636efe83ac3c2b8cddd3b0aaeb4bee3db90dc0b1cbb62d73192e5
MD5 73d5b757e12dea1ef58473c960b56e7b
BLAKE2b-256 1821bb570fa77f4a43b89552605baab98880973ee2f7ec79b3bebd7f94104fc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7671d27dc477d8f3987e159cdb8c9a96bba3538d874535097f4ceff32b0e553b
MD5 232204f84d4352ac87a905c0e38505c4
BLAKE2b-256 31dc658af2190f09650bae4c64918593aace25e7cc20b1bb917db23ffc813ef2

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d8cfb11a675ceb2572944d4fcf3aae6703e798b3f813692a105fc66864aa6d96
MD5 84f9883217a201e75d2135ecd9f7dd2c
BLAKE2b-256 8a37ff4748cab6b4e032ff74a7884ae1d645d30e515187d21edafbcff35d97e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c562d9acc8e4706eedc3d3d058eecadb5414fbeed00372cd801359e9db4b39db
MD5 f7e53b3ffb4929ef38b6b8d9a91bf3e7
BLAKE2b-256 50188ac42e0dca3984f7fb04b3ff53a3fafe87107fd5be349db8f655798c4692

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp38-cp38-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 37bff4cebd6ae56736a25590ab40f88e6ad1cffdb74209d219b8cf5df1a7729d
MD5 8b4787b060e81d52671d62f859262328
BLAKE2b-256 d6ac31c4f578291062c4ae1a94d9599ea6edad4af6e1fbdc60afe976f48a1c44

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7a968c89d90ff3ce0e23ca30f44c734741e62f4eccbfcaa3283b4cd6d93148cb
MD5 f583807778bfabcd019f0ceb652ffedb
BLAKE2b-256 24c0ede9d527c45c1d2b3cb8e2650b3e042b5a85425336fce86c7e9d4b1cff1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for caste-0.1.1-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