Skip to main content

ParseCDI

An (unofficial) library for parsing the output of Crystal Disk Info. Be sure to install Crystal Disk Info before trying to use.

Installation

pip install parsecdi

Live API Example

# Run as admin for best experience

In [1]: from parsecdi import CrystalDiskInfo

# This actually fetches info from Crystal Disk Info on the current system
In [2]: ds = CrystalDiskInfo.get().get_disks()
# If you wanted to parse an existing output file, use:
# ds = CrystalDiskInfo(None).get_disks(pathlib.Path(<FILE>))

In [3]: ds
Out[3]:
[<Disk - Samsung SSD 980 PRO 1TB - S5P2NG0NB05964V - 1000.2 GB>,
 <Disk - WDS100T3X0C-00SJG0 - 20379E802164 - 1000.2 GB>]

In [4]: d = ds[0]

In [5]: d.model
Out[5]: 'Samsung SSD 980 PRO 1TB'

In [6]: d.firmware
Out[6]: '5B2QGXA7'

In [7]: d.health.status
Out[7]: 'Good'

In [8]: d.health.percent
Out[8]: 87

In [9]: d.health.smart
Out[9]:
(DiskSMARTAttribute(id=1, name='Critical Warning', raw=0, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=2, name='Composite Temperature', raw=325, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=3, name='Available Spare', raw=100, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=4, name='Available Spare Threshold', raw=10, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=5, name='Percentage Used', raw=13, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=6, name='Data Units Read', raw=151350782, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=7, name='Data Units Written', raw=264526622, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=8, name='Host Read Commands', raw=5047763158, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=9, name='Host Write Commands', raw=7843108273, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=10, name='Controller Busy Time', raw=19141, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=11, name='Power Cycles', raw=663, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=12, name='Power On Hours', raw=3451, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=13, name='Unsafe Shutdowns', raw=36, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=14, name='Media and Data Integrity Errors', raw=0, current=None, worst=None, threshold=None),
 DiskSMARTAttribute(id=15, name='Number of Error Information Log Entries', raw=0, current=None, worst=None, threshold=None))

See https://csm10495.github.io/parsecdi/ for full API documentation.

License

MIT License

Metadata

Release files for parsecdi 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parsecdi 0.0.2
File Size Uploaded Provenance Actions
parsecdi-0.0.2.tar.gz 5.5 kB Without provenance Details for parsecdi-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parsecdi 0.0.2
File Interpreter ABI Platform Actions
parsecdi-0.0.2-py3-none-any.whl Python 3 none any Details for parsecdi-0.0.2-py3-none-any.whl

Total release size: 11.2 kB

Release files / parsecdi-0.0.2.tar.gz

Download URL parsecdi-0.0.2.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
817139adcfa7243b53e783d6471615a375d43a6ae61148ca665db9b759d230c2
BLAKE2b-256 checksum
How to use checksums
81a5a2675ccb487b59f8a62d5514657b073336b6744402a76cc44020e1b93d80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / parsecdi-0.0.2-py3-none-any.whl

Download URL parsecdi-0.0.2-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c790bed591291f1259573dc69acda1a5c8e066a35e70a2e0a39962322c4694fe
BLAKE2b-256 checksum
How to use checksums
1eedc82327cea72a41481b2aa0ee41b7ebcd7550f23329211faed6e2624a0b06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Security for parsecdi 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

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