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.7.tar.gz (27.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.7-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.7-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.7-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.7-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (171.0 kB view details)

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

caste-0.1.7-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.7-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.7-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.7-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.7-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.7-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.7-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.7-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.7-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.7-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.7-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.7-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.7.tar.gz.

File metadata

  • Download URL: caste-0.1.7.tar.gz
  • Upload date:
  • Size: 27.2 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.7.tar.gz
Algorithm Hash digest
SHA256 aefa0b6785861e9575ba2b1a1254a2d07b94cef03fb02e61a2ea6cf471eb0c7f
MD5 7e86df635dbf9df0994c4f308ab889bd
BLAKE2b-256 9ff729d10a90fc635d3d51b5740ceb944bf88d8f9aa2d5787254bec367f5c473

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2f0ad34b1528b20b7de3d53327897a3d7e2baad51e17f34ab2b4fb6fa9321982
MD5 0811cda429454625261ca9bc41b6fc82
BLAKE2b-256 3ffa047b755b19b6aa1614994b89842dd7def4bd3f67ce1b590d24f17c3336de

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 71c6bc85435546d062c7f449a739946ea1a2fa3de0a87bc7f95ecacc038af248
MD5 a796c42057760fdd213ce52bb36ae056
BLAKE2b-256 471d4dad17b06d8a91e2ac065412ab5bb62bce60ed169664d7932d48db1054a2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f032f9bfa34349192e8af3a668b45275d37b0340bedae8ce79b119d661dea4da
MD5 6c6534862e62291d2cec38280edce37d
BLAKE2b-256 f0f3fc02078502669d681bd93803a2077afdf22b845d5b93e178f983e25967b7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 915ab43d2463b7c7fa704108f2798cd52335b89ca5778120af146f1f9814971a
MD5 d6836baef30345ce75bde41b72acd001
BLAKE2b-256 a531de53f5a7ac4303ce51480dbf9594519b0111c96d079be30699fd415a2d97

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 667c9eb50c88fb0a0ac3bbf052abe98195bba78d9e98ba85514b48bbc541130c
MD5 91e4b8d8c5881fee7f2f1dc0891218e7
BLAKE2b-256 91a889f1eb5b94b07e9bd45c6176e275d88db988d5724b3c8b1176bf73e85511

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6cba34198d24494060bae3d524b8a8b63f338f3ca90bc8b68031a689bcf137bd
MD5 46ff287145c8e36aecf7976704159764
BLAKE2b-256 44e443ea0c8883d553c248c4448b902bc5da1d0c579f10015e5f3df66852da1c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2ad1242bdb6b8fb8724a6e1b60b785ac11b0595ed830101c65e821ed12b361a4
MD5 f52d24c065abf756c149ea4beacaf158
BLAKE2b-256 b4023670f192f15cba99ab0880f7e9892cc34176253cd0beda62057dee1d2006

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 999095fabe2be357eb778449769d88879feabda3ccbf385fef4494c3c7cc5f6a
MD5 b6c55b993bcbb97ef4e1de18380a9e9e
BLAKE2b-256 638224c594304c7c6a725686206b0d23846a4fca1783ba7b54d5876bea7ad011

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ea228413af2732a500f7dad72797f742f373bd0aa17d391550c4ed3ab3b797fe
MD5 ef1f5d8c132553a324dd0b796601b805
BLAKE2b-256 6ecae898d7ac1f80ba4f0b47ce93b879c8475fa4c2e215474e0505f194b0a609

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9e62af0ce0e96eec702f9b48f12306654c49918188f444d9b42d9fa4efbd57c2
MD5 a8247ea748c83a5a0208046fea860a81
BLAKE2b-256 bdfc313614484591d0b74c8cd952ff8d1cf42199c5b7f555bfd84d444eb55159

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e6f4c75c9b0d3f6a7f53c19d4690c2a0636497b839c47228f2ebd046e16a477a
MD5 3eba8e63a3b6e16973cb1d70af48594e
BLAKE2b-256 9f32aabda35cab1d9f1c2c729246a5b24e5ef4c34aa9b0da386bce6097185ed3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d3d6935036d57cb13993347f06fda130bb11e18c584c283c7b605cc495d3b9af
MD5 f9ee2c518bcb5d5bad4de9e1f63153a4
BLAKE2b-256 528b003dc4be3c9f042975e914ed99f95184d61a5e16b9fa2cc01dd1097d87c4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1583603c9994965d4318c4e7dac9291dc9dd96ad6f42f6ba56e6083cd29f9d0a
MD5 cdbf3b1cb12e9c5a1a4f2de6ddb38c4a
BLAKE2b-256 c6157e3eee4991c81ee62c6bab7613d452d41470384dd8a0fa6543f774fe0f41

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d0453206d917dc708ab46c5be6a7db6ec8f5d672e33b1cd16381908c9e1525b
MD5 b331b52fe025e8b4e76d1e5caca8a883
BLAKE2b-256 b47f519ae5c7e6c9f9b13ecbb33a18478aec4a5014408281cfb7ee2a89dc4408

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9a3795190ccaa70fffb27caf169dc5f5ff881fc81b6f9f05746e00d18f21c2d4
MD5 c0c4bee3a36eccc54c6231602bc529ac
BLAKE2b-256 9d69db0cd908480b299d2ab80b50c9fd99064db4c82e5579fb64ebc76f59f177

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.7-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7a6847739be18e534577576528c5f48e4e12446e04c820f60d72bd51734573ae
MD5 aab50e1ee795c716a9995a02b779440b
BLAKE2b-256 d9e8549e4ec6a29f4974ff42a4047f8e0517c94217f76f2f5a43d91ec336983b

See more details on using hashes here.

Provenance

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