path-traveler


Namepath-traveler JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/vhiwase/path-traveler
SummaryTravel any path and find some files.
upload_time2023-11-29 20:23:06
maintainer
docs_urlNone
authorVaibhav Hiwase
requires_python>=3.6
licenseMIT license
keywords path_traveler
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Travel any path and find some files
```path-traveler``` is a simple package to walk and travel from any root path directory into all of its children directories and files coming in the journey and perform search operation to list down all available path(s) of the file(s).

## Use in python code
Following are some of the sample examples to show the use of the ```path-traveler``` package. This package has a function named ```travelling``` which takes optional input 2 arguments. ```root_path``` is the first argument used to set the root directory path and ```find``` is the second argument used to search any file in the root directory and all of its children directories. The default is ```None``` which searches all files from ```root_path```. Let's take a look.
```
>>> from path_traveler import travelling

>>> root_path = './sample'
    
>>> find = 'spec.json'

>>> journey = travelling(root_path=root_path, find=find)

>>> journey._fields
('root_path', 'cwd', 'absolute_paths', 'relative_paths', 'travel')

>>> root_path = journey.root_path

>>> current_working_directory = journey.cwd

>>> absolute_paths = journey.absolute_paths

>>> relative_paths = journey.relative_paths

>>> traveller = journey.travel
```

## Use in command line interface (CLI)

```path_traveler --help```
```
Usage: path-traveler [OPTIONS]

Options:
  -P, --root_path TEXT            Any path from which you want to start
                                  travelling. If None is given then the root
                                  directory of this module will act as root
                                  path. The default is None.

  -F, --find TEXT                 Find any file name which you want to
                                  identify no matter whether is it present in
                                  any of the subdirectories. If None is given
                                  all find will be searching. The default is
                                  None.

  -A, --show_absolute_paths BOOLEAN
                                  Print absolute paths  [default: (False)]
  -R, --show_relative_paths BOOLEAN
                                  Print relative paths  [default: (False)]
  -E, --show_examples BOOLEAN     Print predefined examples  [default:
                                  (False)]

  --help                          Show this message and exit.
```
For more information please visit [GitHub](https://github.com/vhiwase/path-traveler/ "Github Link")

# License
MIT License

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vhiwase/path-traveler",
    "name": "path-traveler",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "path_traveler",
    "author": "Vaibhav Hiwase",
    "author_email": "hiwase.vaibhav@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bc/db/6b3d11a6c4d0753029681fe67f1f840b828353858578db6e9db3426cb8aa/path_traveler-0.0.7.tar.gz",
    "platform": null,
    "description": "# Travel any path and find some files\r\n```path-traveler``` is a simple package to walk and travel from any root path directory into all of its children directories and files coming in the journey and perform search operation to list down all available path(s) of the file(s).\r\n\r\n## Use in python code\r\nFollowing are some of the sample examples to show the use of the ```path-traveler``` package. This package has a function named ```travelling``` which takes optional input 2 arguments. ```root_path``` is the first argument used to set the root directory path and ```find``` is the second argument used to search any file in the root directory and all of its children directories. The default is ```None``` which searches all files from ```root_path```. Let's take a look.\r\n```\r\n>>> from path_traveler import travelling\r\n\r\n>>> root_path = './sample'\r\n    \r\n>>> find = 'spec.json'\r\n\r\n>>> journey = travelling(root_path=root_path, find=find)\r\n\r\n>>> journey._fields\r\n('root_path', 'cwd', 'absolute_paths', 'relative_paths', 'travel')\r\n\r\n>>> root_path = journey.root_path\r\n\r\n>>> current_working_directory = journey.cwd\r\n\r\n>>> absolute_paths = journey.absolute_paths\r\n\r\n>>> relative_paths = journey.relative_paths\r\n\r\n>>> traveller = journey.travel\r\n```\r\n\r\n## Use in command line interface (CLI)\r\n\r\n```path_traveler --help```\r\n```\r\nUsage: path-traveler [OPTIONS]\r\n\r\nOptions:\r\n  -P, --root_path TEXT            Any path from which you want to start\r\n                                  travelling. If None is given then the root\r\n                                  directory of this module will act as root\r\n                                  path. The default is None.\r\n\r\n  -F, --find TEXT                 Find any file name which you want to\r\n                                  identify no matter whether is it present in\r\n                                  any of the subdirectories. If None is given\r\n                                  all find will be searching. The default is\r\n                                  None.\r\n\r\n  -A, --show_absolute_paths BOOLEAN\r\n                                  Print absolute paths  [default: (False)]\r\n  -R, --show_relative_paths BOOLEAN\r\n                                  Print relative paths  [default: (False)]\r\n  -E, --show_examples BOOLEAN     Print predefined examples  [default:\r\n                                  (False)]\r\n\r\n  --help                          Show this message and exit.\r\n```\r\nFor more information please visit [GitHub](https://github.com/vhiwase/path-traveler/ \"Github Link\")\r\n\r\n# License\r\nMIT License\r\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Travel any path and find some files.",
    "version": "0.0.7",
    "project_urls": {
        "Homepage": "https://github.com/vhiwase/path-traveler"
    },
    "split_keywords": [
        "path_traveler"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12498a8ad67a4693f339a45e124083f2bfa7ecc7651d3cf5f3773ac51dd5aad6",
                "md5": "d35a148a5f9528c72830c30d5d0eea7c",
                "sha256": "a7774ede468372ab38b7fb8fb610d049e26dc7c19f0d58b0c2f25a362cf2d9e7"
            },
            "downloads": -1,
            "filename": "path_traveler-0.0.7-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d35a148a5f9528c72830c30d5d0eea7c",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 9044,
            "upload_time": "2023-11-29T20:22:31",
            "upload_time_iso_8601": "2023-11-29T20:22:31.671039Z",
            "url": "https://files.pythonhosted.org/packages/12/49/8a8ad67a4693f339a45e124083f2bfa7ecc7651d3cf5f3773ac51dd5aad6/path_traveler-0.0.7-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bcdb6b3d11a6c4d0753029681fe67f1f840b828353858578db6e9db3426cb8aa",
                "md5": "7a19675c06e21985c8814eb34dd606ba",
                "sha256": "d03febadfd4fcb5de96188253f8e1c640ec15411ce9f97a22c44bcc23bc6091f"
            },
            "downloads": -1,
            "filename": "path_traveler-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "7a19675c06e21985c8814eb34dd606ba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 9229,
            "upload_time": "2023-11-29T20:23:06",
            "upload_time_iso_8601": "2023-11-29T20:23:06.741293Z",
            "url": "https://files.pythonhosted.org/packages/bc/db/6b3d11a6c4d0753029681fe67f1f840b828353858578db6e9db3426cb8aa/path_traveler-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-29 20:23:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vhiwase",
    "github_project": "path-traveler",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "path-traveler"
}
        
Elapsed time: 0.15190s