Skip to main content

What is it ?

cpu_cores is small python library and utility to get the number of “physical” cpu cores (without hyperthreading logical cores) of a linux/osx box.

On Linux, this is not an easy task because of hyperthreaded logical cores included in /proc/cpuinfo. Please, read carefully this excellent post to understand why.

Special features

  • support Linux (well tested) and OSX (needs some extra tests files), easy to extend to support other OS

  • unit tests (> 90% coverage)

  • python2 and python3 support

  • no dependencies

Usage

See the README for more details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpu_cores-0.1.3.tar.gz (8.6 kB view details)

Uploaded Source

File details

Details for the file cpu_cores-0.1.3.tar.gz.

File metadata

  • Download URL: cpu_cores-0.1.3.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cpu_cores-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6793184f517317fe24f4321d172303e9cb7ef5f338371588e0d4c9102427f95f
MD5 1f7d2b40e85eb8b5cafcd6849ec457b3
BLAKE2b-256 cc1394c5150a0516562e2a5810ace708cc3712f5b2d66388ad25230a859fa196

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page