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.3.tar.gz (22.2 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.3-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.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (188.3 kB view details)

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

caste-0.1.3-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.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (187.0 kB view details)

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

caste-0.1.3-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.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (187.0 kB view details)

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

caste-0.1.3-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.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (187.0 kB view details)

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

caste-0.1.3-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.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (185.6 kB view details)

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

caste-0.1.3-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.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (184.7 kB view details)

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

caste-0.1.3-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.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (184.7 kB view details)

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

caste-0.1.3-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.3-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (184.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.3.tar.gz.

File metadata

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

File hashes

Hashes for caste-0.1.3.tar.gz
Algorithm Hash digest
SHA256 633ade54bcb2ae1067819e3674083b59963745d4f459411841b1f7eb9ccb4ae0
MD5 219d370c0431335701e2820412af14ce
BLAKE2b-256 83e8d16732c2003d069001e7937a8e36e6f2bffdd6881a899329195823d7e2d2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fea35f9317a1b297d4733313b78b3af1377d45d54a9d4eb6654cb119c098509f
MD5 34e081be0d3bdfae89a68ce0c9801a9f
BLAKE2b-256 149e94bcaab6b6b49be26977ff4d24845042a129b9d3f3c92377df95b2817847

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 14506ad38954f64a933426ef1d56323f60f1d4d98d1058d0eefaca64a56dd602
MD5 aa58575ec56cd3fb47fd65f431e51e54
BLAKE2b-256 09cfb7691a69348419b9e0ac57e2d6ce8305d6577b3cbbe33041201b420b9a7d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 660a44e7bff75132e28e4d107e8bdcd165cb0152712a66970e8975d69fe353cf
MD5 29a11f6baf59a0957c109e9a4e9f4dfc
BLAKE2b-256 e0d07890d1f83be22d8d2ec25743d8cc04fbe75ac1af994972df29d2538bce67

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 87cee98b6954d624f0f98d390ca233f54f799795c4f4acd5ab953764621fdf3c
MD5 e61b77e19b1bc12394e2fd4fe72e31e9
BLAKE2b-256 20b83ba52591a88f752222393a397455279a82241ef70fb37e21fd19e4b9b404

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cfa437e9450aa3fa6e5d6a4df59ab972f9e914c04058425e892bfabc57b63483
MD5 7c965b8aec5936bc2554b44bdad50ba8
BLAKE2b-256 1aeebe22e83fd1d59a1efde7b01ecdb5e06b798659121be8c390d6e9b8a71a52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ababbbc081fffa96feaec0ace2094908c402908c43c750ed0284776c272b0886
MD5 e62253c09f78b46163c46bbd26a6a0a9
BLAKE2b-256 d58d6eafb56f6ceb35c1cf34257387ed0aab253511253c900a6ee3f9cfaef613

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3947b1f97cbf1b320c1bd69864b89775adba5e03328d200f7708b8591b2a697f
MD5 bf9203d33e0de2a52d3b74c8391be619
BLAKE2b-256 8fe8bf8838ade1c1d4616d53d88f203bd24b34946ce1f41700c6c1fd166bdbce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b39431b23bc2542bbff601cb03e9e710270beca8776d4b28535d86ee630fd8a2
MD5 6c344afaf34b6075120bc329890cb8c9
BLAKE2b-256 1b95acc2ee23799e8e4a29ba007272f659821bb8f075957770c99b7dc5d06bc1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3f5e7f1cacbdf10dec49afdf4670ed78c312aa44a403fb28c19e0c0dc90badcc
MD5 38d697dca90b3d0fa09bdbe15755816c
BLAKE2b-256 1145583f76431fd648f26d35904bd984383d6340c73a597bff1e63128e366e52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b33070299f2f19667a6eae19cf90054a6f7b100770828210d92a299d15b5c2d8
MD5 394b0e51a8d3eadb5ae5fa30f30721a6
BLAKE2b-256 99dcd6bfec91227258b590393411865ab2b9a7266664cc71214e5aea2b5921ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 406a6d6c5a097db36cb35c71a1a946adaa1e5c11acf43b41774046427cf7a014
MD5 d26831b33f620bf28992043b86560401
BLAKE2b-256 998b04ef85954f09e253a7cae0cda8e8f991d39d4f436e565cfd33dec97acfd6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 208613cb74ac86107ec95b009d2902b0638b409e9dddc5115852ed44cf6f23cb
MD5 d17ffec54c571b56ed51f93db47e1b26
BLAKE2b-256 5ed16c3979a08d7863414ad4a89f80661eb8fbd3a948b491df8a98a0dcd229e2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3a778b5ff3500736c33cd7aed8a82d0df3baad172f4c6c61cc336744d0d249be
MD5 c424f58dfdd0b6fbdc9e9a920c54280e
BLAKE2b-256 b25f43b5e2dc8d0cff6055fa6d3b1d1c8395c2b4aec6f469a8f3429b8df8ad48

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2487fb5309947598789e3be7e605d767933fb8728f58c492a89b507e52f20439
MD5 0b8482c10ded9616629ce4c674b192b4
BLAKE2b-256 e969f8be5022af8d9e0e2a1acf89e546d0190bd6e424fac7162177683a24d637

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e9896b321f08cda36f26ad77695415d60bd9024bd24fed2ff510b92580207f7e
MD5 b7666edda49fceba03ccdbc358aee3a2
BLAKE2b-256 d4eeb3d92dda4b440b0fc067e4771d8fa113d2cc710d6ee4cddeeb2108709407

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.3-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ea91c66de62f2e84dabf97c32bd688d5a6f23383b2fe31b8e01e484cf6ef63ca
MD5 c3325bd19b39509b440854a308baa94e
BLAKE2b-256 437eafd738e443f9e4cd43f90b148181c4109e80fe8050a91feeb62ead6107ff

See more details on using hashes here.

Provenance

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