PC-Utils


NamePC-Utils JSON
Version 0.1.0.post5 PyPI version JSON
download
home_pageNone
SummaryThis package includes utility modules for datetime handling, file management, runtime tracking, etc.
upload_time2025-03-14 23:11:29
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords utilities files runtime datetime azure
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PC\_Utils

A collection of essential utilities for Productivity & Collaboration (P&C) services management, maintenance, and optimization of operational tasks. While applicable to services like Slack, these utilities are designed for broader P&C tasks.

## Features

- **Datetime Utility:** Provides a `Datetime` class with a `date_to_epoch` method that converts a date string to an epoch timestamp.
- **File Management:**
  - `FileManagement.py`: Contains a `FileMgmt` class for file searching and moving. It also includes methods for reading CSV files into a list of Python dictionaries and creating a CSV file from a list of Python dictionaries. 
  - `FileManagement_w_Azure.py`: Similar to `FileManagement.py`, intended for Azure storage (currently under development and pending testing before production use).
- **Email Extraction:**
  - `ObtainEmails.py`: Contains `get_email_addresses`, a function that extracts unique email addresses from a given string.
- **Runtime Tracking:**
  - `Runtime.py`: Provides a `Runtime` class for calculating and displaying runtime information.

## Installation

Install the package via pip:

```powershell
pip install pc-utils
```

## Usage

Import the relevant classes into your Python code:

```python
from pc_utils.Datetime import Datetime
from pc_utils.FileManagement import FileMgmt
from pc_utils.FileManagement_w_Azure import FileMgmt as AzureFileMgmt
from pc_utils.ObtainEmails import get_email_addresses
from pc_utils.Runtime import Runtime
```

### Example Usage

- **Datetime Conversion:**
  ```python
  from pc_utils.Datetime import Datetime
  dt = Datetime()
  epoch_time = dt.date_to_epoch("2025-03-11")
  print(epoch_time)
  ```
- **File Management:**
  ```python
  from pc_utils.FileManagement import FileMgmt
  fm = FileMgmt()
  fm..createOutputCSVfileFromListOfDictionaries(user_channels, fileName, start_msg = "> Writing results to file... ", no_file_created_msg = "> No channels found. No output file was created.")
  ```
- **Email Extraction:**
  ```python
  from pc_utils.ObtainEmails import get_email_addresses
  emails = get_email_addresses("Contact us at info@example.com and support@example.org.")
  print(emails)
  ```
- **Runtime Tracking:**
  ```python
  from pc_utils.Runtime import Runtime
  rt = Runtime()
  rt.print_time("\n> Start time:")
  <some code here>
  rt.print_time("\n> End time:")
  rt.print_runtime("> Total time:")
  ```

## Contributing

Contributions are welcome! Feel free to submit pull requests with improvements, new features, or bug fixes.

## License

This project is licensed under the [MIT License](LICENSE).

## Contact

For issues, feature requests, or questions, please open an issue in the repository.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "PC-Utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "utilities, files, runtime, datetime, Azure",
    "author": null,
    "author_email": "\"Marcos E. Mercado\" <marcos_elias@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/48/4a/18e814fc85eb3b81728e905b7e5751883325707e680d45e203a3f192a5e5/pc_utils-0.1.0.post5.tar.gz",
    "platform": null,
    "description": "# PC\\_Utils\r\n\r\nA collection of essential utilities for Productivity & Collaboration (P&C) services management, maintenance, and optimization of operational tasks. While applicable to services like Slack, these utilities are designed for broader P&C tasks.\r\n\r\n## Features\r\n\r\n- **Datetime Utility:** Provides a `Datetime` class with a `date_to_epoch` method that converts a date string to an epoch timestamp.\r\n- **File Management:**\r\n  - `FileManagement.py`: Contains a `FileMgmt` class for file searching and moving. It also includes methods for reading CSV files into a list of Python dictionaries and creating a CSV file from a list of Python dictionaries.&#x20;\r\n  - `FileManagement_w_Azure.py`: Similar to `FileManagement.py`, intended for Azure storage (currently under development and pending testing before production use).\r\n- **Email Extraction:**\r\n  - `ObtainEmails.py`: Contains `get_email_addresses`, a function that extracts unique email addresses from a given string.\r\n- **Runtime Tracking:**\r\n  - `Runtime.py`: Provides a `Runtime` class for calculating and displaying runtime information.\r\n\r\n## Installation\r\n\r\nInstall the package via pip:\r\n\r\n```powershell\r\npip install pc-utils\r\n```\r\n\r\n## Usage\r\n\r\nImport the relevant classes into your Python code:\r\n\r\n```python\r\nfrom pc_utils.Datetime import Datetime\r\nfrom pc_utils.FileManagement import FileMgmt\r\nfrom pc_utils.FileManagement_w_Azure import FileMgmt as AzureFileMgmt\r\nfrom pc_utils.ObtainEmails import get_email_addresses\r\nfrom pc_utils.Runtime import Runtime\r\n```\r\n\r\n### Example Usage\r\n\r\n- **Datetime Conversion:**\r\n  ```python\r\n  from pc_utils.Datetime import Datetime\r\n  dt = Datetime()\r\n  epoch_time = dt.date_to_epoch(\"2025-03-11\")\r\n  print(epoch_time)\r\n  ```\r\n- **File Management:**\r\n  ```python\r\n  from pc_utils.FileManagement import FileMgmt\r\n  fm = FileMgmt()\r\n  fm..createOutputCSVfileFromListOfDictionaries(user_channels, fileName, start_msg = \"> Writing results to file... \", no_file_created_msg = \"> No channels found. No output file was created.\")\r\n  ```\r\n- **Email Extraction:**\r\n  ```python\r\n  from pc_utils.ObtainEmails import get_email_addresses\r\n  emails = get_email_addresses(\"Contact us at info@example.com and support@example.org.\")\r\n  print(emails)\r\n  ```\r\n- **Runtime Tracking:**\r\n  ```python\r\n  from pc_utils.Runtime import Runtime\r\n  rt = Runtime()\r\n  rt.print_time(\"\\n> Start time:\")\r\n  <some code here>\r\n  rt.print_time(\"\\n> End time:\")\r\n  rt.print_runtime(\"> Total time:\")\r\n  ```\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Feel free to submit pull requests with improvements, new features, or bug fixes.\r\n\r\n## License\r\n\r\nThis project is licensed under the [MIT License](LICENSE).\r\n\r\n## Contact\r\n\r\nFor issues, feature requests, or questions, please open an issue in the repository.\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "This package includes utility modules for datetime handling, file management, runtime tracking, etc.",
    "version": "0.1.0.post5",
    "project_urls": null,
    "split_keywords": [
        "utilities",
        " files",
        " runtime",
        " datetime",
        " azure"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c2c64d7edb8bedf6fe5e869a99b207cdd7c880691c54bddcbf72db441e9e5bba",
                "md5": "05e2382d6142e02f518bef26cf598ede",
                "sha256": "6f4ec25f85f74a3a00077e39163a70b099149ab274047baac1a691ac4b594167"
            },
            "downloads": -1,
            "filename": "pc_utils-0.1.0.post5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "05e2382d6142e02f518bef26cf598ede",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 11508,
            "upload_time": "2025-03-14T23:11:29",
            "upload_time_iso_8601": "2025-03-14T23:11:29.105604Z",
            "url": "https://files.pythonhosted.org/packages/c2/c6/4d7edb8bedf6fe5e869a99b207cdd7c880691c54bddcbf72db441e9e5bba/pc_utils-0.1.0.post5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "484a18e814fc85eb3b81728e905b7e5751883325707e680d45e203a3f192a5e5",
                "md5": "36647a96919fd2832dccb27087262fce",
                "sha256": "0f42bb9462a6e657f45b063bf7025548bbd1c104679add937f97d6cabe0fea28"
            },
            "downloads": -1,
            "filename": "pc_utils-0.1.0.post5.tar.gz",
            "has_sig": false,
            "md5_digest": "36647a96919fd2832dccb27087262fce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14521,
            "upload_time": "2025-03-14T23:11:29",
            "upload_time_iso_8601": "2025-03-14T23:11:29.967225Z",
            "url": "https://files.pythonhosted.org/packages/48/4a/18e814fc85eb3b81728e905b7e5751883325707e680d45e203a3f192a5e5/pc_utils-0.1.0.post5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-03-14 23:11:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pc-utils"
}
        
Elapsed time: 0.75924s