Skip to main content

System resource info, processor usage logging, RAM limit — standalone module from the SciTeX ecosystem

Project description

scitex-resource

PyPI Python Tests Install Test Coverage Docs License: AGPL v3

System resource info, processor usage logging, and RAM limiting helpers, extracted from the SciTeX ecosystem as a standalone package.

Install

pip install scitex-resource

API

import scitex_resource as r

# Snapshot of CPU / RAM / disk / GPU / monitor info
specs = r.get_specs()

# CPU/RAM samples (one-shot)
usage = r.get_processor_usages()

# Continuous logging (CSV)
r.log_processor_usages("/tmp/usage.csv", limit_min=30, interval_s=1)

# Cap process RAM
r.limit_ram(0.5)

Status

Standalone fork of scitex.resource. Deps: pandas, psutil, PyYAML, matplotlib.

Decoupling notes:

  • scitex.str.readable_bytes / scitex.gen.fmt_size / scitex.str.printc → vendored as 3 small helpers in _compat.py.
  • scitex.io._load.load / scitex.io._save.save → use pandas.read_csv / to_csv directly for the CSV log files; defer to scitex.io only if a non-CSV path is requested (raises ImportError without scitex installed).
  • scitex.sh.sh → prefer scitex_sh if installed, fall back to plain subprocess.run (list-only).
  • scitex.session.start/close __main__ block → simplified to plain main().

The umbrella package's scitex.resource import path is preserved via a sys.modules-alias bridge. 65/65 tests pass.

License

AGPL-3.0-only (see LICENSE).

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

scitex_resource-0.2.0.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scitex_resource-0.2.0-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file scitex_resource-0.2.0.tar.gz.

File metadata

  • Download URL: scitex_resource-0.2.0.tar.gz
  • Upload date:
  • Size: 32.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_resource-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8086446e61c57c1df41685e6ff2fd381c84988488ebbf0256898f331c0b0fa86
MD5 30cac1080e2cddaf37b99728b2d43787
BLAKE2b-256 f5613da7b95e838d84912a36bb7574b272832a7d20c02497c34714997f0859b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_resource-0.2.0.tar.gz:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-resource

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitex_resource-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: scitex_resource-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 34.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_resource-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a817242c00380be347f1890b7e27622d15de3471ac3b5171ff589a8224aeb01e
MD5 4430d8d4fd0a17c7286ebc142eb09fa0
BLAKE2b-256 e1e6bdf55cf2c68f08781a536036f582aa476383fe3156d7af1f840af2b24f2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_resource-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-resource

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