Package to manipulate paths
Project description
pathshandler
The people you works with use a different operating system than you ? Or they store the project you are working on together in a different location on their computer ?
This package attributes a given name to a desired path, so each member of a team can refer to a similar name while directing to different paths specific to each computer.
Main features
-
Paths naming.
-
Queries on files and folders.
Installation or upgrade
To install pathshandler, use::
pip install pathshandler
To upgrade from an older version, use::
pip install --upgrade pathshandler
Quick usage example
import pathshandler as ph
# store a path inside the config file
ph.register_path('notebooks', '/home/john/Documents/projects/notebooks')
# retrieve the path
path_notebooks = ph.get_path('notebooks')
# search for all files containing the expression 'experimentB' in the folder attributed to the name 'notebooks'
wanted_files = ph.search(name='notebooks', pattern='experimentB', category='files')
API Reference
| Function | Description |
|---|---|
get_path() |
Return the path corresponding to the given name |
load_config() |
Return the content of paths_config.json which contains the names and the corresponding paths |
register_path() |
Add a path and its corresponding name inside the paths_config.json file |
remove_path() |
Remove a path and its corresponding name from the paths_config.json file |
search() |
Select files in a given folder |
save_config() |
Save the paths_config.json file |
Further details are in the online documentation https://g-patin.github.io/pathshandler/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pathshandler-0.0.2.tar.gz.
File metadata
- Download URL: pathshandler-0.0.2.tar.gz
- Upload date:
- Size: 40.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aba6aa8e2eb4efa44ffb72b04610c9c391920accdd68975decea6e201b650493
|
|
| MD5 |
2359cbe40deb63adc9281ba51df9bac3
|
|
| BLAKE2b-256 |
adca99652af50adce0c6abdb2cba76518befd02783ca5b8f475c2dd9c178f831
|
File details
Details for the file pathshandler-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pathshandler-0.0.2-py3-none-any.whl
- Upload date:
- Size: 28.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5b2845ce2f052c1809f67781b75685b706dcd8fe10cc65a3499dbb0ca317384
|
|
| MD5 |
e5ad2586677af49eec73a251dbd13e64
|
|
| BLAKE2b-256 |
57e84c3c076a4f29d03726456a7529394f5c6c6d0ab1d9965269455077c79528
|