A miniscule python package for joining and resolving paths against multiple possible directories.
Installation
To install use pip:
$ pip install multipath
Or clone the repo:
$ git clone https://github.com/adamkewley/multipath.git $ python setup.py install
Example Usage
import multipath
paths = [
"./",
"~/.someapp/",
"etc/someapp/",
]
# returns:
# './config.yml` if it exists; or,
# '~/.someapp/config.yml` if it exists; or,
# 'etc/someapp/config.yml` if it exists; or,
# raises FileNotFoundError
config = multipath.resolve(paths, "config.yml")
Release files for multipath 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| multipath-0.0.2.tar.gz | 3.1 kB | Details |
Release files / multipath-0.0.2.tar.gz
| Download URL | multipath-0.0.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ddc7c21bdcaf62479458f33292e60518970fecfbf51167d37636f5797ab5d80
|
|
BLAKE2b-256 checksum How to use checksums |
e4c3a11e1d9e5e3cfb7bf5b5454e269c3e8eb938a0c08059326e19eb3d841b5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |