PyUdisk
PyUdisk is a python module to generate S.M.A.R.T metrics for all drives/partitions on a host machine.
Installation
Recommendations
- Install
python[3.10] or [3.11] - Use a dedicated [virtual environment]
For monitoring and reporting, use
pip install PyUdisk[standard]
For basic functionality, use
pip install PyUdisk
Usage
IDE
import pyudisk
if __name__ == '__main__':
for metric in pyudisk.smart_metrics():
print(metric)
CLI
pyudisk start
Use
pyudisk --helpfor usage instructions.
Environment Variables
Sourcing environment variables from an env file
By default,
PyUdiskwill look for a.envfile in the current working directory.
- SMART_LIB: Path to the S.M.A.R.T CLI library. Uses
udisksctlfor Linux andsmartctlfor macOS/Windows. - DISK_LIB: Path to disk util library. Uses
lsblkfor Linux,diskutilfor macOS, andpwshfor Windows. - METRICS: List of metrics to monitor. Default:
[] - GMAIL_USER: Gmail username to authenticate SMTP library.
- GMAIL_PASS: Gmail password to authenticate SMTP library.
- RECIPIENT: Email recipient for email notifications.
- PHONE: Phone number for SMS notifications.
- NTFY_URL: URL for Ntfy notifications.
- NTFY_TOPIC: Topic for Ntfy notifications.
- NTFY_USERNAME: Username for Ntfy notifications.
- NTFY_PASSWORD: Password for Ntfy notifications.
- TELEGRAM_BOT_TOKEN: Telegram bot token for Telegram notifications.
- TELEGRAM_CHAT_ID: Telegram chat ID for Telegram notifications.
- TELEGRAM_THREAD_ID: Telegram thread ID for Telegram notifications.
- DISK_REPORT: Boolean flag to send disk report via email.
- REPORT_DIR: Directory to save disk reports. Default:
report - REPORT_FILE: Filename for disk reports. Default format:
disk_report_%m-%d-%Y_%I:%M_%p.html
Release Notes
Requirement
python -m pip install gitverse
Usage
gitverse-release reverse -f release_notes.rst -t 'Release Notes'
Linting
pre-commit will ensure linting
Requirement
python -m pip install pre-commit
Usage
pre-commit run --all-files
Pypi Package
https://pypi.org/project/PyUdisk/
License & copyright
© Vignesh Rao
Licensed under the MIT License
Metadata
Release files for PyUdisk 2.0.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyudisk-2.0.21-py3-none-any.whl | Python 3 | none | any | Details for pyudisk-2.0.21-py3-none-any.whl |
Release files / pyudisk-2.0.21-py3-none-any.whl
| Download URL | pyudisk-2.0.21-py3-none-any.whl |
|---|---|
| Size | 25.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0154c086f427eaa1ae961d0bc852ab2f7ab168ca16694eded790e5f5931f21c8
|
|
BLAKE2b-256 checksum How to use checksums |
7bebb4994328763caef4f2f29cc66afd16a152eaf58b1cc6aab2d8c2773d6208
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0rc1
|
Security for PyUdisk 2.0.21
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.