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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (180.7 kB view details)

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

caste-0.1.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for caste-0.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6898ea9dab7a38b331a5d97809f5d17117eb364eb90c508383d079b906e05bdb
MD5 6337517bc6204e3d5809fb5f84fbb353
BLAKE2b-256 d6c5d8f7613613301786d8f2a811f2361bfdcb21d38d4484cbd07a71021b244a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eacb86545ac78c99e9caa561a3c7d225396d0b9260164074496eefb0a56b8d1a
MD5 c5ffc488b09ef51dfb4d5ed45f7eac54
BLAKE2b-256 62f537f1efd3e30484a19ef47dbf0b54295272c8417745238da99bd8a266f20c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3d7413755ae7018963bee1468d4c334c09093f5631f2b6fee740d8553018e21f
MD5 2e19e35a45926c45be17aa1793ff847c
BLAKE2b-256 626f3c43a69e6dd2585b1ece3790d8e06cd6c2cdbbc954dbc7238df06a61cfc5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9479e23295e61bd10424bab5265a3218f214f35daa3f2fd8c6eea8ccb094b754
MD5 a372c3214aa5ab99ebd8adc3cad9e98d
BLAKE2b-256 fb60e61a7e5b21d77a3a7eb12bbb4ec227162a596d7e76978a7bc7863493ca5f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6055c5aaed8b4c85a3f0dcf3bb26e6f7477767513391fc0039f1454dea572fa8
MD5 a514d5a946f4006b339b5a849ce3727b
BLAKE2b-256 5f8045757000ad8a644a207fa8b0fafa672baef3a49855ed799810b1cdb11f6f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f3629c64e11dd42a211159488ebdda1d40bba41619efc5ba3cfc198acd102b7c
MD5 2670f09ee36a30348f78931c985b8d91
BLAKE2b-256 7eb60a762f5f8665951278b2c26c896a525b751b52fd8d8ab12a2f688d01b87e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1ed1259dbc5d4d636bbe8853dbddc76560a74ec7620952875310b58c31cbabd4
MD5 f1f6bb3d1bcbef61f3d10df64fb30209
BLAKE2b-256 3167e075a3e70d71970a00a467abf0b1149b8984d232fa5f70355587ea27c538

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 84274399300a15938b44f07a3c19097feff475143b3b71b0e25259904b2b5775
MD5 14f2c42b36c48fb8d41da54fcf544a6a
BLAKE2b-256 176ecdc6d2f4ceca3111ff7ad868289d7b91bce97aad1dafa70a8d4992b3b580

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 708153ba6787882346502aa1545a8b16f54881474fd05c2655c7f0a38f07e2b9
MD5 e9be4806dc8da15b2ceeb8bfa2997dc3
BLAKE2b-256 33f2363274e53a6a5d77b74ee11c8bf91b4dc81294bfb61ee001af67c1a4d144

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2bcb5edf87dc44497ba7f97d5f09b4363e0b2b7a1da81300a81a6301c3f4a383
MD5 4629e780aa65769e477d9b4e8f5d9979
BLAKE2b-256 25f9f23706c3d019115bcd4109c7135093ad3cabb50c38d68492f491009bd50e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f74d2003d47bfcceca4d1a5fbae284f7eb55e1e2e6cd46faef5ad580b0a81057
MD5 5b0b40465ba5922b2f8ed6cb5d711546
BLAKE2b-256 811cd436e5fa1849408d2ba62a6cddf81134abd07b016ef96fbd1c47b4fe2de7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 32bcc821ea564090426f6d2f221e3966e940a558ebb9e8b5502a04578bf25df6
MD5 4e9c20e73a54a4fc33d8ee42ca9f97e4
BLAKE2b-256 e2c1afd7e0ecf30cc126ae56324db9914b99e3266a51ecd42f0bd77010e957c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 63ed3d9fc4b7556f8cdd629a6147ce71f7d72f0498c15aa1451ed549ff7cf93e
MD5 efc6cf707ba07977530ffad6367aebdd
BLAKE2b-256 91a8612db74a3b711edc710b7354a227742475fb338c70ba6ef3cce740506d1e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f31230cd57f070e077e9e7522c3b22f387b765c68db349f815388a25a20b7905
MD5 4711b9696afdc843ccb65f8ab1f54572
BLAKE2b-256 4559cf0f38ab43f10ac1bede273245991a681daebae2a6dc7486d0ca4a132554

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a36b9cc41855a5858c72576cbdcff0e52c5ed56305fa4b39f10ffc3a1e7a67c3
MD5 c18b7c282e5cdf1b910dd51ea268ffa5
BLAKE2b-256 af00e48344e03e6aa2fea62d559359e0598a5d24b86d886e8a7ff478b6c66bff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for caste-0.1.2-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d5d8bf82a407363c285a832919b582b0ae6f1057a85af73214f45c150eb16d14
MD5 662b0a3a1d97cd9d186add5456f90687
BLAKE2b-256 63472f1ce2471cbe9dde5184af5a4e3deb03df24e61a2dfe2ca340591d4c8b22

See more details on using hashes here.

Provenance

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