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.4.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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4.tar.gz.

File metadata

  • Download URL: caste-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 4c03350b33f1a25874a9f10ea325ea741e2e945449b0095fda122a1f86b7dc2a
MD5 6c86ad91bc0cd227a5c600858b71be53
BLAKE2b-256 1fbb4ec928013d13d692984a1e3571101c5576cbadbea9e3237814816c5729cf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4ff92c336ec2e4001df9d0f99b26ddeaa19b84aad9261623519691783838d296
MD5 80fac156509fa0d7acd75845b46b64b1
BLAKE2b-256 bcd300e25e3055477d55143ecbb7f77b14600d4caf94457e52736832a0807fe7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e25498efbdde5ef8aecc36bf21d32163649ffa0398025cdf65d49518e85904e0
MD5 a14da1a6a41023d80781e5d40995c25d
BLAKE2b-256 ab37cc94e2df27eaa7b1b5930f1851081349addca3663e8d4d4ef10c0f4721c4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b6a42d45e251a4cfc15c49472db89b303222c07b2b192c32d4c4bb7e8a5881b1
MD5 727223bcbd220a75137a87aad1ed0624
BLAKE2b-256 63cbea06b60945e7624c41a7a5c2f0e0b3621524de4f6edf1484359b5667fcd9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 167c31c8e0f91eb1c9d114ce8626b2b099aeaa65c529719ac123fe2808e5e6c6
MD5 4b111477f53326e78fb0bd49502808a2
BLAKE2b-256 d0ae8f4bcd836d26b3fe545faf13f2035be2696d0c628d5a5848167cdb2872b3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fcb8285279ffffc8be74554e890fa7d7da64464bdf84124b616dade086fcc249
MD5 38c12a6b734fc7b6f4a1220b7e7302f7
BLAKE2b-256 08b825a7d0e7fabb69c6eb9f9f1d1b52a275a024cbd4a03897573a65d42f96fc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 62dff6796ee3475e692e1654f0fbd4afbe1329e6e5560ee095408691acfa6ecb
MD5 32f1887ade04fb728a37002fa73fef04
BLAKE2b-256 30dd963f6817b931f67499ce270f3be7c4e999b7b44311bc6caeb70dbca57aaf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2d2a304ddeacd7d4779475894a1000cb5feb2d043d9bbc83c0cc020dd19d433f
MD5 19058612bb3cd2d6ced22934b28d4289
BLAKE2b-256 8fe37342094e23d5bce5d390940312c35c56e93b28969f355cd1f58d61efdc6f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 65e6fbd186ac4e3e013ad043c845748a113aa83f4ece2d362ed73236900af7ed
MD5 b52c2aaf4d49ced02f9e7ff5ef6cb3a7
BLAKE2b-256 96a8ef630ba96b6540727f53071cb314e1765ac5aaeb1eb32b4c93dc9a91b79a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d55e1ddc3748462c56f804cc178442de10f34d4942b3c82a5a5e40c5b3bf83bf
MD5 2fbd8350b36390f1c4118d16d65500b3
BLAKE2b-256 0b507a46d8d1c7e85b173a4bc29a11628b339aaff89b48968217bcd3285128ea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d462b2565926f1d26291e5213c95714915e57989f72987ffe08dbbc918837fd3
MD5 de0a8a242d58067e71803366fd92e609
BLAKE2b-256 c72baa9213a2f7e896b05cb204513921f5ff35e1287526c82afe55681ce3f0bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2031e0f020545a8a7556aa4f8bf2c050a4c892ab87fbfa501d824236c065d7a2
MD5 e201eef289c8bcc9af5c0dd9f712b26b
BLAKE2b-256 7593af9b948af001897feb4779a02d9d5d43d539687ae8e57c2c0a5ee309c632

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 83fd6587bbab7c581864e6181d72d3312f0f490c2946e5e80049be426b300696
MD5 e0d76539e01bd31efa3ecd1d3af53251
BLAKE2b-256 19b1fe9802a07c13d6795dc44e02afb4b4ddf8ee324b188818269e885917322b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 46a5706d82a0ee1515248bff41cd0fddd0254de522bf0a07533cd7acdc1479e3
MD5 9e4386f20e3e9277610a29cf4208a708
BLAKE2b-256 8482c35af09e48af3ef04feb416de6937242e024c022a7201deda8e9ad6184b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d7f3e44e54f17259995c0c340a44003cfbeac4bffe2e3c11f884a31415e9e17
MD5 08f15610c48edf6932d56dabb5d23156
BLAKE2b-256 586e20e45a401abc9131f8446c2ce98fd9c6d1ad00dba20fd3145704662e730f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2e69515343280155bbbfd47075fe547a95c36033da53b1beeac926c6a347ae61
MD5 2034d815b464191a986ee645c6b419c1
BLAKE2b-256 eb1022fb01659c85f2374f69e52edb2dc416abfd2f54488a1c033716ade22efc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.4-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cf512db9a36b249432ae974a471fbcab7b008ff28dba444a008c1448ceb4b33b
MD5 ad2bdc47f68ac4cdfddbe32592c442f1
BLAKE2b-256 fca5362833ab7a8a6a29ad5520ca8cc2fb5a47fef1c454fea5371ef96676b80d

See more details on using hashes here.

Provenance

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