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.8.tar.gz (27.3 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.8-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.8-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (171.9 kB view details)

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

caste-0.1.8-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.8-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (170.9 kB view details)

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

caste-0.1.8-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.8-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (170.8 kB view details)

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

caste-0.1.8-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.8-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (170.8 kB view details)

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

caste-0.1.8-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.8-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (171.4 kB view details)

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

caste-0.1.8-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.8-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (170.1 kB view details)

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

caste-0.1.8-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.8-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (170.0 kB view details)

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

caste-0.1.8-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.8-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (170.0 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.8.tar.gz.

File metadata

  • Download URL: caste-0.1.8.tar.gz
  • Upload date:
  • Size: 27.3 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.8.tar.gz
Algorithm Hash digest
SHA256 7772cd5dc63d4b0b140a557fc4d4683104bf310f9fde0684bfd60e2880f2d424
MD5 d74349c74eb45d0f6ae732ef9b6bb816
BLAKE2b-256 43abd8ebbc478460e6cc3ebcebf988d79dd2b41a27510c5934b1a0257d4e4687

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1e6608dae5be37fa1ec21af66f2a1318f356a7a226a828542f8055f77a7ed5ee
MD5 408eeb6f2813208ab7e9f2af971c62a2
BLAKE2b-256 f3c0ed1fb1ec3803decfb6a09b1a2e2fb7c32384a76d27d9ee1eb50b5703228e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1bc39dee1a104cc3c4ef9e02ce5be6bbf7711333591e15ec3128509a0193ed02
MD5 1dd8e2d3c14fb84e13cd416952bc2763
BLAKE2b-256 80f01acaa3cfb9438fa1deffaf26e41ceb0bfb85e14063e21549cbec7f9d8dab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 aefc2c996274a9a5910ab82738429291bb6ece8f58348dbfbeed60c924a9dbc6
MD5 687bc965069bb2ab66d6202264839be3
BLAKE2b-256 c2c4800db7534d9b0982c86e8f8272113b51e6c27e2307687dadfba4b91bfd32

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d16eab899f99d74d24ceb2550a01fdd60ae478bf17aa79a7dd6f2769f77fcbd9
MD5 89d1aa4296698b8dac8e2bb4e762dd1b
BLAKE2b-256 019c82c48a7f60260f6c09cfc3051d5c0a747dcaf623da9f6c34adb5c2ab6365

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0e8bd092a190df973844d301ed77b762712e2f232ae0c089adac8739a1b2a506
MD5 7a350f986b7ceb484c66e4a6972bfa63
BLAKE2b-256 d0ca0d1952fe72a30e576cda9c5effbe5ea2f67e8f8ecdddc9922c382eaf2c11

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 edf0007184081d40dd6be289bd83d57dfacc1b25406c3e0ba00d530b50b188d9
MD5 1742315ac334d8e5a0c9d583fd2dda87
BLAKE2b-256 f35181da0e61c3caabc4359484ea839d55bb80a67846454f7b0f8f084014fef0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d6e1ea33f86fc9d8046a1a31b6b0bc1d997d9f67b2fdea2344278bd1bf4252e4
MD5 c6f09ff8a327bafa58cd1aa872a68286
BLAKE2b-256 6ee39c2aef15c66675ae9a27f82630b5ff45b98d188de783e368a9f5cdeebf72

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bd73f128b4ce551243c43d89e30f88c39f576f7f4ef7c726ec89bfc944ec9d69
MD5 d181785beb239fe9230190ce629d8e50
BLAKE2b-256 bb855cd7fc83d3bdd79cb604d9839b5f4468025ca538dbb40da8f6e212281f29

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 497a4c1568a133aa24402fa960e9f97784ba2b1b9c44b8bd0e6fe4afa28ccd26
MD5 b7504f28e976e838b6c10997cd0b8bb1
BLAKE2b-256 575666dede78dcfe9b9a0b94f62df106c2aec5c4c32ce4467f0a5c07e4997901

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a0d04d46e1c04ecc9a875d078c2e9cb76b95e1a62632f32c5c331091b5134489
MD5 a0c0dcf9ce645cce52961267da27cdf7
BLAKE2b-256 e288373631bfdf95405c05beda2e3793d24cebb83dc8e8a0429aebcaa757d6bd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d701dc729a059011042622e13ca6610d30b05f2fe39c8d1ad8df1a74671a7153
MD5 1500bbd4ca50b980b128699dd6fa73c3
BLAKE2b-256 f9ee33b06ccaba11111c19fb8e01160fe150c27167f5a26aae37197944e2b394

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7e88fdfc8617563e84ebd5c1b0ecd36f2a5cb89c0dbd6085eeb3e4a3153e22f6
MD5 9678134e77c93cb3690e43c18ec4cf9b
BLAKE2b-256 be5af7b33348f5d82ee08e8e62e8de1a13b17329ad227726e0be9d20722a2136

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a85930ed845d0a8c21ba54ad0e5ca2cc84c974b40006f9624b81a00a1a4767aa
MD5 377dc722a17558cb38b709e506d91442
BLAKE2b-256 4a60767fcc87e6e5af090bc37a2a47e7ffee07fffaa84b960889ba223f96a5b8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6dc669498c58f33a41f941e9a51761435f639ed2a8c428e047c9750189dded27
MD5 d08159d7b7fe50ddf0dbffc1dad2da0a
BLAKE2b-256 4837cd113e1608943d598ac3bfda68b055867d97fc004fe66a354fe0b6f8e0d1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6832ab974311164d22042fe4767e3315ece49d95b753353a829352a1e037823b
MD5 76d6888e0c1b01cfaaf15664626fc3dd
BLAKE2b-256 391333f07bd2845e5303716f5c6cdccaff8a85ae3d2d2956ac93fbd36b6eb1a7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.8-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b1f67ca48daad660043a8f0fae00dba01f162448560cd6f6bfdcf6b1cc6a615c
MD5 92cba01c9aff52457152cc9b4dfd0d26
BLAKE2b-256 f934ddddb75dbcb5f9f3cc2f068d56d8c2fbbf7f115413e250887de6317afec1

See more details on using hashes here.

Provenance

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