Metadata-Version: 2.1 Name: PyUdisk Version: 2.0.1 Summary: Extensive disk monitor for Linux OS Author-email: Vignesh Rao License: MIT License Copyright (c) 2024 TheVickypedia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Project-URL: Homepage, https://github.com/thevickypedia/PyUdisk Project-URL: Source, https://github.com/thevickypedia/PyUdisk Keywords: disk-monitor,PyUdisk Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python :: 3 Classifier: Development Status :: 5 - Production/Stable Classifier: Operating System :: POSIX :: Linux Classifier: Topic :: System :: Monitoring Requires-Python: >=3.10 Description-Content-Type: text/markdown License-File: LICENSE Requires-Dist: click==8.1.* Requires-Dist: psutil==6.0.* Requires-Dist: PyArchitecture>=0.3.0 Requires-Dist: pydantic==2.* Requires-Dist: pydantic-settings==2.* Provides-Extra: dev Requires-Dist: pre-commit; extra == "dev" Provides-Extra: standard Requires-Dist: Jinja2==3.1.*; extra == "standard" Requires-Dist: requests==2.*; extra == "standard" Requires-Dist: gmail-connector; extra == "standard" # PyUdisk PyUdisk is a python module to generate S.M.A.R.T metrics for all drives/partitions on a host machine. ![Python][label-pyversion] ![Platform][label-platform] [![pypi][label-actions-pypi]][gha_pypi] [![Pypi][label-pypi]][pypi] [![Pypi-format][label-pypi-format]][pypi-files] [![Pypi-status][label-pypi-status]][pypi] ### Installation **Recommendations** - Install `python` [3.10] or [3.11] - Use a dedicated [virtual environment] For monitoring and reporting, use ```shell pip install PyUdisk[standard] ``` For basic functionality, use ```shell pip install PyUdisk ``` ### Usage **IDE** ```python import pyudisk if __name__ == '__main__': for metric in pyudisk.smart_metrics(): print(metric) ``` **CLI** ```shell pyudisk start ``` > Use `pyudisk --help` for usage instructions. ## Environment Variables
Sourcing environment variables from an env file > _By default, `PyUdisk` will look for a `.env` file in the current working directory._
- **SMART_LIB**: Path to the S.M.A.R.T CLI library. Uses `udisksctl` for Linux and `smartctl` for macOS/Windows. - **DISK_LIB**: Path to disk util library. Uses `lsblk` for Linux, `diskutil` for macOS, and `pwsh` for 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][release-notes] **Requirement** ```shell python -m pip install gitverse ``` **Usage** ```shell gitverse-release reverse -f release_notes.rst -t 'Release Notes' ``` ## Linting `pre-commit` will ensure linting **Requirement** ```shell python -m pip install pre-commit ``` **Usage** ```shell pre-commit run --all-files ``` ## Pypi Package [![pypi-module][label-pypi-package]][pypi-repo] [https://pypi.org/project/PyUdisk/][pypi] ## License & copyright © Vignesh Rao Licensed under the [MIT License][license] [license]: https://github.com/thevickypedia/PyUdisk/blob/master/LICENSE [label-pypi-package]: https://img.shields.io/badge/Pypi%20Package-PyUdisk-blue?style=for-the-badge&logo=Python [label-pyversion]: https://img.shields.io/badge/python-3.10%20%7C%203.11-blue [label-platform]: https://img.shields.io/badge/Platform-Linux|macOS|Windows-1f425f.svg [label-actions-pypi]: https://github.com/thevickypedia/PyUdisk/actions/workflows/main.yaml/badge.svg [label-pypi]: https://img.shields.io/pypi/v/PyUdisk [label-pypi-format]: https://img.shields.io/pypi/format/PyUdisk [label-pypi-status]: https://img.shields.io/pypi/status/PyUdisk [gha_pypi]: https://github.com/thevickypedia/PyUdisk/actions/workflows/main.yaml [pypi]: https://pypi.org/project/PyUdisk [pypi-files]: https://pypi.org/project/PyUdisk/#files [pypi-repo]: https://packaging.python.org/tutorials/packaging-projects/ [release-notes]: https://github.com/thevickypedia/PyUdisk/blob/main/release_notes.rst