Skip to main content

A partial reimplementation of psutil in pure Python using ctypes.

Project description

pypsutil

PyPI Python Versions Documentation Status GitHub Actions Cirrus CI codecov

A partial reimplementation of psutil in pure Python using ctypes. Currently, only Linux, macOS, and the BSDs are supported, but Windows support is planned.

Documentation

Example usage

pypsutil's API is very similar to psutil's:

>>> import pypsutil
>>> p = pypsutil.Process()
>>> p.pid
477967
>>> p
Process(pid=477967, name='python3', status='running', started='12:00:40')
>>> p.name()
'python3'
>>> p.exe()
'/usr/bin/python3.9'
>>> p.cwd()
'/tmp'
>>> p.cmdline()
['python3']
>>> p.terminal()
'/dev/pts/6'
>>> p.status()
<ProcessStatus.RUNNING: 'running'>
>>> p.ppid()
477771
>>> p.parent()
Process(pid=477771, name='bash', status='sleeping', started='12:00:33')

More information is available in the documentation.

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

pypsutil-0.2.0.tar.gz (78.4 kB view details)

Uploaded Source

Built Distribution

pypsutil-0.2.0-py3-none-any.whl (84.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pypsutil-0.2.0.tar.gz
  • Upload date:
  • Size: 78.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for pypsutil-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c57cb9baf54c9fd2766ad5eb8af0fda058c03ccfa908d39194c7881e29c79528
MD5 5482aaea01303be8f177be9dc5a369f0
BLAKE2b-256 a80c49e88153efda31a40d574f2a8e39efe4fa1102dc86636a456da917ffae8a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pypsutil-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 84.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for pypsutil-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34e5790c0c99761be60396cc33caa5b0fe15bbc848c38819049a5ecc3cfb02d8
MD5 530f9b5aa8e639b840b8e3a9c184715e
BLAKE2b-256 ea5f87ef1118e501fd93f72ef6b952025e1db3df22d27ee583031fde7cee38da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page