{"id":19184286,"url":"https://github.com/dr-saad-la/pathprofiler","last_synced_at":"2025-09-21T02:05:30.141Z","repository":{"id":250191370,"uuid":"833749745","full_name":"dr-saad-la/pathprofiler","owner":"dr-saad-la","description":"Path profiler library that describe the content of a directory. ","archived":false,"fork":false,"pushed_at":"2024-07-26T15:41:51.000Z","size":35,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T23:53:40.300Z","etag":null,"topics":["profiling","python","python-package","system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dr-saad-la.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.rst","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-25T17:05:51.000Z","updated_at":"2025-04-06T17:59:36.000Z","dependencies_parsed_at":"2024-07-25T20:08:46.094Z","dependency_job_id":"f1f092d3-5565-4a9f-85d5-372fc0b146c4","html_url":"https://github.com/dr-saad-la/pathprofiler","commit_stats":null,"previous_names":["dr-saad-la/pathprofiler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dr-saad-la/pathprofiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr-saad-la%2Fpathprofiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr-saad-la%2Fpathprofiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr-saad-la%2Fpathprofiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr-saad-la%2Fpathprofiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dr-saad-la","download_url":"https://codeload.github.com/dr-saad-la/pathprofiler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr-saad-la%2Fpathprofiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276183775,"owners_count":25599223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["profiling","python","python-package","system"],"created_at":"2024-11-09T11:06:49.931Z","updated_at":"2025-09-21T02:05:30.125Z","avatar_url":"https://github.com/dr-saad-la.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=============\nPath profiler\n=============\n\n\n.. image:: https://img.shields.io/pypi/v/pathprofiler.svg\n        :target: https://pypi.python.org/pypi/pathprofiler\n\n.. image:: https://img.shields.io/travis/dr-saad-la/pathprofiler.svg\n        :target: https://travis-ci.com/dr-saad-la/pathprofiler\n\n.. image:: https://readthedocs.org/projects/pathprofiler/badge/?version=latest\n        :target: https://pathprofiler.readthedocs.io/en/latest/?version=latest\n        :alt: Documentation Status\n\n\n.. image:: https://pyup.io/repos/github/dr-saad-la/pathprofiler/shield.svg\n     :target: https://pyup.io/repos/github/dr-saad-la/pathprofiler/\n     :alt: Updates\n\n\n\n`pathprofiler` is a Python package designed to analyze and summarize the contents of directories. It provides utilities for validating paths, performing file and directory operations, extracting metadata, and categorizing files by type.\n\nFeatures\n--------\n\n- **Path Validation**: Ensure paths exist and are of the correct type (file or directory).\n- **File Operations**: Read, write, and delete files.\n- **Directory Operations**: Create, list, and delete directories.\n- **Metadata Extraction**: Get file size, modification time, and extensions.\n- **Categorization**: Identify and count different file types within directories.\n\nInstallation\n------------\n\nYou can install `pathprofiler` using `pip`:\n\n.. code-block:: bash\n\n    pip install pathprofiler\n\nUsage\n-----\n\nBasic Example\n^^^^^^^^^^^^^\n\n.. code-block:: python\n\n    from pathprofiler import utils\n\n    # Validate a directory path\n    directory = utils._check_path('/path/to/directory')\n\n    # List all files in a directory\n    files = utils.list_files(directory)\n    print(f'Files: {files}')\n\n    # List all subdirectories\n    subdirs = utils.list_subdirectories(directory)\n    print(f'Subdirectories: {subdirs}')\n\n    # Get file size\n    file_size = utils.get_file_size('/path/to/file.txt')\n    print(f'File size: {file_size} bytes')\n\n    # Read file content\n    content = utils.read_file('/path/to/file.txt')\n    print(f'File content: {content}')\n\n    # Write to a file\n    utils.write_file('/path/to/newfile.txt', 'Hello, World!')\n\n    # Delete a file\n    utils.delete_file('/path/to/newfile.txt')\n\nAdvanced Usage\n^^^^^^^^^^^^^^\n\nCreate a Directory\n~~~~~~~~~~~~~~~~~~\n\n.. code-block:: python\n\n    utils.create_directory('/path/to/new_directory')\n\nGet File Metadata\n~~~~~~~~~~~~~~~~~\n\n.. code-block:: python\n\n    file_path = '/path/to/file.txt'\n\n    # Get file size\n    size = utils.get_file_size(file_path)\n    print(f'Size: {size} bytes')\n\n    # Get file modification time\n    mod_time = utils.get_file_modification_time(file_path)\n    print(f'Modification time: {mod_time}')\n\n    # Get file extension\n    extension = utils.get_file_extension(file_path)\n    print(f'Extension: {extension}')\n\n    # Get filename without extension\n    filename = utils.get_filename_without_extension(file_path)\n    print(f'Filename: {filename}')\n\nContributing\n------------\n\nContributions are welcome! Please read the `CONTRIBUTING`_ guidelines before starting.\n\nLicense\n-------\n\nThis project is licensed under the MIT License. See the `LICENSE`_ file for details.\n\nContact\n-------\n\nIf you have any questions or suggestions, please open an issue on GitHub.\n\nAuthors\n-------\n\n- `Dr Saad Laouadi \u003chttps://github.com/dr-saad-la\u003e`_\n\nAcknowledgements\n----------------\n\n- `pylint \u003chttps://www.pylint.org/\u003e`_\n- `black \u003chttps://black.readthedocs.io/en/stable/\u003e`_\n- `flake8 \u003chttps://flake8.pycqa.org/en/latest/\u003e`_\n- `pycodestyle \u003chttps://pycodestyle.pycqa.org/en/latest/\u003e`_\n- `pathlib \u003chttps://docs.python.org/3/library/pathlib.html\u003e`_\n\nExample Projects\n----------------\n\nCheck out the `examples`_ directory for more usage examples.\n\nDocumentation\n-------------\n\nDetailed documentation is available in the `docs`_ directory or online at `Read the Docs \u003chttps://pathprofiler.readthedocs.io\u003e`_.\n\n.. _CONTRIBUTING: CONTRIBUTING.rst\n.. _LICENSE: LICENSE\n.. _examples: examples/\n.. _docs: docs/\n\n\nPython library that profile a directory and returns a description of the content of a directory.\n\n\n* Free software: MIT license\n* Documentation: https://pathprofiler.readthedocs.io.\n\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdr-saad-la%2Fpathprofiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdr-saad-la%2Fpathprofiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdr-saad-la%2Fpathprofiler/lists"}